From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Thu, 11 Aug 2016 22:52:03 +0200 Subject: [U-Boot] [PATCH 1/3 v2] Sandbox: document support of block device emulation In-Reply-To: <20160811205205.6184-1-stefan.bruens@rwth-aachen.de> References: <20160811205205.6184-1-stefan.bruens@rwth-aachen.de> Message-ID: <33f19392f5f4459f9e05a30da147183b@rwthex-w2-b.rwth-ad.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Stefan Br?ns Acked-by: Simon Glass --- board/sandbox/README.sandbox | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox index ed820d3..02d8ab3 100644 --- a/board/sandbox/README.sandbox +++ b/board/sandbox/README.sandbox @@ -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 ----------------------- -- 2.9.2