Skip to contentSkip to conversation

unable to build tools with 2014.04-rc2 for x86

U-Boot Dennis Gilmore 2 participants 4 messages Mar 13, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

to date I have been doing a make tools on x86 builds without doing any configuration to build mkimage for use on x86 hosts. with 2014.04-rc2 the build fails with

make tools
Makefile:485: *** "System not configured - see README". Stop.

As there is no x86 configs I can not select one, and if I choose something random, such as sheevaplug build fails with

make CROSS_COMPILE="" tools
GEN include/autoconf.mk.dep
cc1: error: bad value (armv5te) for -march= switch
GEN include/autoconf.mk
cc1: error: bad value (armv5te) for -march= switch

  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  CC      lib/asm-offsets.s

lib/asm-offsets.c:1:0: error: bad value (armv5te) for -march= switch
/*
^
make[1]: *** [lib/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

if i put a blank include/config.mk to make the System not configured check happy, the build fails with

make tools

  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h

Could not find linker script.
make: *** [prepare1] Error 1

So the question is how am I supposed to build mkimage for x86?

Dennis

#1 lore raw

Hello Dennis,

Quoted 1 line

So the question is how am I supposed to build mkimage for x86?

I think
make CROSS_COMPILE=arm-linxu-gnu- sheevaplug_config tools
will work for you.

tools/ is built for host (x86) even if the target board is configured for ARM.

Best Regards
Masahiro Yamada

#2 lore raw
Quoted 6 lines · On Thu, 13 Mar 2014 12:47:16 +0900 Masahiro Yamada <[email protected]>…

Hello Dennis,

Quoted 1 line

So the question is how am I supposed to build mkimage for x86?

Quoted 7 lines

I think
make CROSS_COMPILE=arm-linxu-gnu- sheevaplug_config tools
will work for you.

tools/ is built for host (x86) even if the target board is configured for ARM.

having to add a build dependency on a cross compiler seems really wrong.

Seems to me we should fix things so tools are buildable without such requirements.

seems that when doing native builds detection does not work right either

+ make 'HOSTCC=gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard' -j4
make: arm-linux-gcc: Command not found
/bin/sh: arm-linux-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information.
GEN include/autoconf.mk.dep
/bin/sh: arm-linux-gcc: command not found
GEN include/autoconf.mk
/bin/sh: arm-linux-gcc: command not found

  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  UPD     include/config/uboot.release
  HOSTCC  scripts/basic/fixdep
  CHK     include/generated/version_autogenerated.h

/bin/sh: arm-linux-gcc: command not found
/bin/sh: arm-linux-ld.bfd: command not found
UPD include/generated/version_autogenerated.h
CC lib/asm-offsets.s
/bin/sh: arm-linux-gcc: command not found

Dennis

#3 lore raw

Hello Dennis,

Quoted 14 lines · On Wed, 12 Mar 2014 23:22:07 -0500 Dennis Gilmore <[email protected]> wrote:
Quoted 11 lines · On Thu, 13 Mar 2014 12:47:16 +0900 Masahiro Yamada <[email protected]>…

Hello Dennis,

Quoted 1 line

So the question is how am I supposed to build mkimage for x86?

I think
make CROSS_COMPILE=arm-linxu-gnu- sheevaplug_config tools
will work for you.

Quoted 7 lines
Quoted 2 lines

tools/ is built for host (x86) even if the target board is configured for ARM.

having to add a build dependency on a cross compiler seems really wrong.

Seems to me we should fix things so tools are buildable without such requirements.

Agree.
It is weird that tools depend on board configuration.

I think sources under tools/ should not depend on any CONFIG macros.

But, in fact, they do.
tools/envcrc.c and tools/env/fw_env.h even include <config.h>.

It is true we could "make tools" prior to Kbuild. But tools/mkimage created in that way is different from the one with board configuration.

Cross tools is used to extract CONFIG macros
from include/configs/<board>h.
If we could switch to Kconfig, such a gimmick would be deleted.

Best Regards
Masahiro Yamada