]> git.sur5r.net Git - u-boot/commitdiff
sandbox: document support of block device emulation
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Thu, 11 Aug 2016 20:52:03 +0000 (22:52 +0200)
committerSimon Glass <sjg@chromium.org>
Mon, 19 Sep 2016 03:04:38 +0000 (21:04 -0600)
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Changed 'Sandbox' to 'sandbox' in subject:
Signed-off-by: Simon Glass <sjg@chromium.org>
board/sandbox/README.sandbox

index ed820d338e586bb9dba9d491152d2325f9757b2a..02d8ab3d09d49ed4821f8ec564ff00bd9fabbdaf 100644 (file)
@@ -320,6 +320,25 @@ CONFIG_SPI_IDLE_VAL
        The idle value on the SPI bus
 
 
+Block Device Emulation
+----------------------
+
+U-Boot can use raw disk images for block device emulation. To e.g. list
+the contents of the root directory on the second partion of the image
+"disk.raw", you can use the following commands:
+
+=>host bind 0 ./disk.raw
+=>ls host 0:2
+
+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
+$> lodev=`sudo losetup -P -f --show ./disk.raw`
+$> sudo mkfs.vfat -n EFI -v ${lodev}p1
+$> sudo mkfs.ext4 -L ROOT -v ${lodev}p2
+
+
 Writing Sandbox Drivers
 -----------------------