[U-Boot] [PATCH v4 9/9] sandbox: add config_distro_defaults and config_distro_bootcmd

Simon Glass sjg at chromium.org
Thu Apr 23 17:15:44 CEST 2015


Hi,

On 21 April 2015 at 02:13, Sjoerd Simons <sjoerd.simons at collabora.co.uk> wrote:
> Hey Joe,
>
> On Mon, 2015-04-20 at 23:31 -0500, Joe Hershberger wrote:
>> Hi Sjoerd,
>>
>> On Mon, Apr 13, 2015 at 3:54 PM, Sjoerd Simons
>> <sjoerd.simons at collabora.co.uk> wrote:
>> > Make the sandbox setup more generic/examplary by including
>> > config_distro_defaults.h and config_distro_bootcmd.h.
>> >
>> > Among other things this makes it easy to test whether images will boot
>> > though with the standard distro bootcmds by running e.g:
>> >   u-boot -c 'host bind 0 myimage.img ; boot'
>> >
>> > By default there are 2 target host devices to emulate device with
>> > multiple storage devices (e.g. internal ("host 0") and external
>> > ("host 1") and verify that the prioritization and fallbacks do work
>> > correctly.
>> >
>> > Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
>> > Reviewed by: Simon Glass <sjg at chromium.org>
>> > Acked-by: Simon Glass <sjg at chromium.org>
>>
>> For me this has broken the build of the "env" target.
>>
>> I get this following error:
>>
>> In file included from /home/joe/u-boot/tools/env/fw_env.c:117:
>> /usr/include/search.h:173: error: expected "}" before
>> "BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX"
>> make[2]: *** [tools/env/fw_env.o] Error 1
>> make[1]: *** [env] Error 2
>> make: *** [sub-make] Error 2
>>
>> I haven't looked closely at the header you've added. Any quick
>> thoughts about what's going on?
>
> Hrm, the problem seems to be that when running "make env" CONFIG_SANDBOX
> isn't defined, so you get the error triggered above.
>
> Essentially that error is trying to tell you - You're trying to build a
> config which will cause your boot environment to have commands not
> supported by this build..
>
> I haven't dug out what exactly causes this difference in definitions but
> it does make me wonder whether we should trigger on something more
> conventional like CONFIG_CMD_HOST (similar to e.g. CONFIG_CMD_MMC)
> rather then CONFIG_SANDBOX

That sounds reasonable. Also I think it would be good to add a flag to
enable the distro boot feature. At present I always get the bootdelay
message and then an error:

U-Boot 2015.04-00423-g183ad88 (Apr 23 2015 - 09:05:12)

DRAM:  128 MiB
Using default environment

In:    serial
Out:   lcd
Err:   lcd
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
Not bound to a backing file
Not bound to a backing file

I did a similar thing with LCD since it was similarly invasive.

Regards,
Simon


More information about the U-Boot mailing list