[U-Boot] [PATCH] sandbox: block driver using host file/device as backing store

Henrik Nordström henrik at henriknordstrom.net
Wed May 15 23:29:31 CEST 2013


ons 2013-05-15 klockan 10:42 -0700 skrev Simon Glass:
> Some high-level comments:
> 
> Configuring for sandbox board...
> sandbox.c: In function ‘host_dev_bind’:

>  - should not have any warnings

Shame on me :)

Fixed now, and should have before submitting for review.

> =>sb bind
> Segmentation fault (core dumped)
> 
> - should print a nice error if an arg is missing

Right. done.

And correct usage is
sb bind 0 file
(devices 0-3 supported, arbitrary limit of 4 currently)

have corrected the help message to reflect this.


> =>sb bind fred
> =>
> 
> - should print an error if the file is not found

In this version it opens the file on access and you get the error then.
Have now moved that to the bind operation which gives immediate
feedback.

Initially I thought of having some predefined device backing names but
it's better to always use the sb bind command to establish the backing
name.

Have also added and "sb info" command to show the bound devices.

> - should create an example of how to use this

Yes. Is there any existing documentation for sandbox somewhere to add
to?

> - suggest a test script in test/sandbox which sets up a loopback
> device containing a partition table and ext2 filesystem (for example,
> then runs U-Boot sandbox and lists and reads a file. Example test
> scripts you might copy are:
> 
> http://patchwork.ozlabs.org/patch/228876/
> 
> and this rather more complicated one:
> 
> http://patchwork.ozlabs.org/patch/211049/

Ok. I'll look into this.

> Also please enable partitions and EFI support so we get more functionality:
> 
> #define CONFIG_PARTITION_UUIDS
> #define CONFIG_CMD_PART
> #define CONFIG_EFI_PARTITION

Ok, can do this. Didn't want to enable too much as part of the block
driver patch.

Done.

Current version of the patch is at
https://github.com/hno/u-boot/commit/9b5f9b762a6e901f599b7ae1c9946806a4422929.patch

will submit a new copy to the mailinglist after adding documentation &
testsuite.

Regards
Henrik



More information about the U-Boot mailing list