[ELDK] compiling u-boot/tools/env

Anatolij Gustschin agust at denx.de
Sun May 17 21:00:34 CEST 2015


Hi Richard,

On Sun, 17 May 2015 10:26:54 -0700
K Richard Pixley <rpixley at graphitesystems.com> wrote:

> Yes, the makefile works fine.  But not as advertised.  Instead, it 
> builds for the host, not the target.
> 
> I'm asking about how to build for my /target/.
> 
> The eldk toolchain isn't capable of working from CROSS_COMPILE alone.  
> It requires setting a number of other variables as well. The current 
> build system doesn't appear to be capable of supporting this for tools/env.

Building "fw_printenv" for the target works with make, i.e.:

$ git rev-parse HEAD
524123a70761110c5cf3ccc5f52f6d4da071b959

$ head Makefile | grep -E 'VERS|PATCH|SUB'
VERSION = 2014
PATCHLEVEL = 07
SUBLEVEL =

$ export CROSS_COMPILE=arm-linux-gnueabi-;export ARCH=arm

$ . /opt/eldk-5.4/armv7a/environment-setup-armv7a-vfp-neon-linux-gnueabi

$ make nitrogen6q_config
Configuring for nitrogen6q - Board: nitrogen6x, Options: IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024
 
$ make env
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
  HOSTCC  scripts/basic/fixdep
  HOSTCC  tools/env/aes.o
  HOSTCC  tools/env/crc32.o
  HOSTCC  tools/env/ctype.o
  HOSTCC  tools/env/env_attr.o
  HOSTCC  tools/env/env_flags.o
  HOSTCC  tools/env/fw_env.o
  HOSTCC  tools/env/fw_env_main.o
  HOSTCC  tools/env/linux_string.o
  HOSTLD  tools/env/fw_printenv_unstripped
  STRIP   tools/env/fw_printenv

$ file tools/env/fw_printenv
tools/env/fw_printenv: ELF 32-bit LSB executable, ARM, version 1 (SYSV), \
dynamically linked (uses shared libs), for GNU/Linux 2.6.16, \
BuildID[sha1]=0x50da78ea86f3dc1a5a83529da21206f9a46fc93b, stripped

If you need more verbose make output to check which compiler and options
are used for building, run

 $ make V=1 env

> If I'm understanding you, what you're saying here is that 
> tools/env/README is in error and that the directory has now lost the 
> ability to cross compile and can now /only/ build native.  Is that correct?

s. above. cross-building works also, provided you configured building
for the target first (i.e. "make nitrogen6q_config" step above).

Best regards,

Anatolij

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-50 Fax: +49-8142-66989-80  Email: agust at denx.de


More information about the eldk mailing list