W1-EEPROM: add sandbox driver
[oweals/u-boot.git] / board / sandbox / README.sandbox
index 02d8ab3d09d49ed4821f8ec564ff00bd9fabbdaf..b49042de2f6bf9974bbfa836e38bbeccba167a8e 100644 (file)
@@ -1,7 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (c) 2014 The Chromium OS Authors.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 Native Execution of U-Boot
@@ -24,6 +23,12 @@ single board in board/sandbox.
 CONFIG_SANDBOX_BIG_ENDIAN should be defined when running on big-endian
 machines.
 
+There are two versions of the sandbox: One using 32-bit-wide integers, and one
+using 64-bit-wide integers. The 32-bit version can be build and run on either
+32 or 64-bit hosts by either selecting or deselecting CONFIG_SANDBOX_32BIT; by
+default, the sandbox it built for a 32-bit host. The sandbox using 64-bit-wide
+integers can only be built on 64-bit hosts.
+
 Note that standalone/API support is not available at present.
 
 
@@ -44,10 +49,6 @@ Note:
       make sandbox_defconfig all NO_SDL=1
       ./u-boot
 
-   If you are building on a 32-bit machine you may get errors from __ffs.h
-   about shifting more than the machine word size. Edit the config file
-   include/configs/sandbox.h and change CONFIG_SANDBOX_BITS_PER_LONG to 32.
-
 U-Boot will start on your computer, showing a sandbox emulation of the serial
 console:
 
@@ -104,8 +105,8 @@ recreate the binary file.
 
 To execute commands directly, use the -c option. You can specify a single
 command, or multiple commands separated by a semicolon, as is normal in
-U-Boot. Be careful with quoting as the shall will normally process and
-swallow quotes. When -c is used, U-Boot exists after the command is complete,
+U-Boot. Be careful with quoting as the shell will normally process and
+swallow quotes. When -c is used, U-Boot exits after the command is complete,
 but you can force it to go to interactive mode instead with -i.
 
 
@@ -186,7 +187,7 @@ U-Boot sandbox supports these emulations:
 - SPI flash
 - TPM (Trusted Platform Module)
 
-A wide range of commands is implemented. Filesystems which use a block
+A wide range of commands are implemented. Filesystems which use a block
 device are supported.
 
 Also sandbox supports driver model (CONFIG_DM) and associated commands.
@@ -243,7 +244,7 @@ dhcp
 set serverip WWW.XXX.YYY.ZZZ
 tftpboot u-boot.bin
 
-The bridge also support (to a lesser extent) the localhost inderface, 'lo'.
+The bridge also supports (to a lesser extent) the localhost interface, 'lo'.
 
 The 'lo' interface cannot use the RAW AF_PACKET API because the lo interface
 doesn't support Ethernet-level traffic. It is a higher-level interface that is
@@ -333,11 +334,16 @@ the contents of the root directory on the second partion of the image
 A disk image can be created using the following commands:
 
 $> truncate -s 1200M ./disk.raw
-$> echo -e "label: gpt\n,64M,U\n,,L" | /usr/sbin/sfdisk  ./disk.raw
+$> echo -e "label: gpt\n,64M,U\n,,L" | /usr/sbin/sgdisk  ./disk.raw
 $> lodev=`sudo losetup -P -f --show ./disk.raw`
 $> sudo mkfs.vfat -n EFI -v ${lodev}p1
 $> sudo mkfs.ext4 -L ROOT -v ${lodev}p2
 
+or utilize the device described in test/py/make_test_disk.py:
+
+   #!/usr/bin/python
+   import make_test_disk
+   make_test_disk.makeDisk()
 
 Writing Sandbox Drivers
 -----------------------