[ELDK] compiling u-boot/tools/env

K Richard Pixley rpixley at graphitesystems.com
Fri May 22 06:35:25 CEST 2015


On 5/21/15 17:01 , Marek Vasut wrote:
> On Monday, May 18, 2015 at 05:05:39 PM, K Richard Pixley wrote:
>> On 5/17/15 16:27 , Anatolij Gustschin wrote:
>>> On Sun, 17 May 2015 13:49:42 -0700
>>>
>>> K Richard Pixley <rpixley at graphitesystems.com> wrote:
>>>> Note the "HOSTCC" here is incorrect.
>>>>
>>>> rpixley at victory> cd u-boot-2014.07/
>>>> rpixley at victory> .
>>>> /opt/eldk-5.6/powerpc-e500v2/environment-setup-ppce500v2-linux
>>>> rpixley at victory> echo $CROSS_COMPILE
>>>> powerpc-linux-
>>>> rpixley at victory> make env CROSS_COMPILE=powerpc-linux-
>>>> Makefile:516: *** "System not configured - see README".  Stop.
>>>> rpixley at victory> less ../Makefile
>>>> rpixley at victory> make EP2020XS_config
>>>> Configuring for EP2020XS - Board: EP2020XS, Options: P2020,36BIT
>>>> rpixley at victory> make env CROSS_COMPILE=powerpc-linux-
>>>>
>>>>      GEN     include/autoconf.mk.dep
>>>>      GEN     include/autoconf.mk
>>>>      HOSTCC  scripts/basic/fixdep <--- note that HOSTCC is wrong here.
>>>>      HOSTCC  tools/env/aes.o
>>>>
>>>> In file included from tools/env/aes.c:1:0:
>>>> tools/env/../../lib/aes.c:28:20: fatal error: string.h: No such file or
>>>> directory
>>>>
>>>>     #include <string.h>
>>>>     
>>>>                        ^
>>>>
>>>> compilation terminated.
>>>> make[1]: *** [tools/env/aes.o] Error 1
>>>> make: *** [env] Error 2
>>> This seems to be the powerpc-e500v2 toolchain issue, the path
>>> /opt/eldk-5.6/powerpc-e500v2/sysroots/ppce500v2-linux/usr/include
>>> is not used for #include <...> search. The toolchain was configured
>>> with
>>> "--with-sysroot=/opt/eldk-5.6/powerpc-e500v2/sysroots/ppce500v2-linux"
>>> option, but this directory doesn't exist.
>>>
>>> Please try to workaround this by creating a symlink as follows:
>>>    $ cd /opt/eldk-5.6/powerpc-e500v2/sysroots
>>>    $ sudo ln -s ppce500v2-linux-gnuspe ppce500v2-linux
>>>
>>> Then "make env" should work.
>> That works for me.  Thank you.
>>
>> Can we get this fixed for the next release, please?
> I will try. Can someone write me a short summary so I can look into
> the code please? Or a patch even ? ;-)
>
> Best regards,
> Marek Vasut
Short summary:

As shipped and as directed, (meaning, sourcing the env file), the 
eldk-5.6 toolchain for powerpc-e500v2 can't build u-boot.  Or at least, 
it can't build the u-boot/tools/env portion of u-boot.  This can serve 
as a regression test for this bug.  (I'm surprised this wasn't done 
already).

This can be traced to a bad directory reference in the env file, 
"--with-sysroot=/opt/eldk-5.6/powerpc-e500v2/sysroots/ppce500v2-linux" 
which doesn't exist.  It's not clear whether this directory is missing, 
(and should have been included which seems most likely), or whether this 
value should have pointed to a directory which /was/ shipped, (perhaps 
ppce500v2-linux-gnuspe).

I haven't been into the source, but I'd start with how the env file is 
configured and/or produced.  That should likely expose whether the 
directory is missing or badly pointed.

--rich


More information about the eldk mailing list