[U-Boot] recent tools on FreeBSD

Jeroen Hofstee jeroen at myspectrum.nl
Thu Feb 5 20:51:45 CET 2015


Hello Guilherme,

Thanks for commenting on this,

On 02/05/15 13:27, Guilherme Maciel Ferreira wrote:
> Hi Jeroen,
>
> My apologies, I didn't test the tools on BSD. The answers are inline.
>
> Best regards,
> Guilherme
>
> Am 04.02.2015 19:37 schrieb "Jeroen Hofstee" <jeroen at myspectrum.nl>:
>> Hello Guilherme / Simon,
>>
>> It seems that commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c,
>> "tools: moved code common to all image tools to a separated module."
> I guess the culprit is commit a93648d197df48fa46dd55f925ff70468bd81c71,
> "imagetool: replace image registration function by linker_lists feature".
> Because that commit introduced the linker script to imagetools.
>

Likely, since some patches depend on each other I was unable to revert
a single commit.

Anyway as far as I am concerned there are two separate
build targets, the bare u-boot having an (almost) naked compiler, beside
stdarg and stdbool? without any other host includes or objects (well with
CONFIG_USE_PRIVATE_LIBGCC=y). U-boot provides linker scripts for them,
and we have fine grained control over them and an excuse to throw any
trick at them if it makes things faster / smaller etc. It is still nice 
if this
compiles anywhere though..

On the other hand there are "tools" for the host / target userland, which
should build against the host / targets "std*". Those things should be 
buildable
on any decent host / target and be straightforward (and _not_ define KERNEL
etc, since it are userland tools). There is no linker for them afaik, so 
tweaking
them seems like a bad idea. Hence I am tempted to remove the use of
linker generated lists from tools...

>> - and really last, how do I test if it works..
> There are two scripts to test the image tools, test-imagetools.sh and
> test-fit.py. Running those scripts you make sure the linker list is
> properly setup, because it is required by the imagetools to find the image
> type.
>
> $ make O=sandbox clean
> $ make O=sandbox sandbox_config
> $ make mrproper
> $ make O=sandbox
> $ ./test/image/test-imagetools.sh
> $ ./test/image/test-fit.py -u sandbox/u-boot

Sandbox used to build on FreeBSD, but it is quite a mess at the moment.
But a I said, I think the best solution for tools is not to use linker 
generated
list in the first place for tools.

Regards,
Jeroen


More information about the U-Boot mailing list