Date: Mon, 16 Mar 2015 19:43:11 -0700 From: Tim Kientzle <tim@kientzle.com> To: Russell Haley <russ.haley@gmail.com> Cc: freebsd-arm <freebsd-arm@freebsd.org>, Ian Lepore <ian@freebsd.org> Subject: Re: Building Cross Compiler and u-boot Message-ID: <DDCF2BD6-D6AA-4841-842F-288FECB7F0AB@kientzle.com> In-Reply-To: <CABx9NuThtL=iFJz%2B4Hk_ruKVCc1x9OFkKwQH9%2B9BngB%2BqEz%2Bgg@mail.gmail.com> References: <CABx9NuQXb_FJMw%2BqwbaGuFX94LkEMRf_9kAuowk6ctYBEDQn=A@mail.gmail.com> <1426437012.67325.7.camel@freebsd.org> <CABx9NuS0_XY_N4TtyiL8O3vWU37V5JVcs5M-p%2BYhUQB8HrkVkg@mail.gmail.com> <CABx9NuThtL=iFJz%2B4Hk_ruKVCc1x9OFkKwQH9%2B9BngB%2BqEz%2Bgg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You=E2=80=99re trying to use the cross-compiler for the native bits. When building U-Boot, you should use: HOSTCC=3Dcc HOSTCC is a native compiler used to build a couple of U-Boot tools, = including gen_eth_addr. Those tools are then used to process other = pieces of U-Boot on the build machine. The default is =E2=80=98gcc=E2=80= =99 which only works if you have a native GCC installed. Last I = checked, the native bits did not actually require GCC, so just use = =E2=80=98cc=E2=80=99 here. CROSS_COMPILE=3Darm-none-eabi- This sets the prefix used to generate names for the various cross-tools. = With this setting, the build process will use arm-none-eabi-gcc, = arm-none-eabi-ar, etc. This can also be a path name or any other text. = There are also individual arguments for each program, but you probably = won=E2=80=99t need to use those. Tim > On Mar 15, 2015, at 11:02 PM, Russell Haley <russ.haley@gmail.com> = wrote: >=20 > Thanks Johny Mattsson, that's what I needed! >=20 >=20 > root@Jailbird:/usr/uboot# gmake SED=3Dgsed HOSTCC=3Darm-none-eabi-gcc > CROSS_COMPILE=3Darm-none-eabi- ccwmx53js_config > Configuring a wireless module > Configuring for ccwmx53 board... > root@Jailbird:/usr/uboot# >=20 >=20 > However: > root@Jailbird:/usr/uboot# gmake SED=3Dgsed HOSTCC=3Darm-none-eabi-gcc > CROSS_COMPILE=3Darm-none-eabi- > for dir in tools examples/standalone examples/api ; do gmake -C $dir > _depend ; done > gmake[1]: Entering directory '/usr/uboot/tools' > gmake[1]: Nothing to be done for '_depend'. > gmake[1]: Leaving directory '/usr/uboot/tools' > gmake[1]: Entering directory '/usr/uboot/examples/standalone' > gmake[1]: Nothing to be done for '_depend'. > gmake[1]: Leaving directory '/usr/uboot/examples/standalone' > gmake[1]: Entering directory '/usr/uboot/examples/api' > gmake[1]: Nothing to be done for '_depend'. > gmake[1]: Leaving directory '/usr/uboot/examples/api' > gmake -C tools all > gmake[1]: Entering directory '/usr/uboot/tools' > arm-none-eabi-gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer > -idirafter /usr/uboot/include -idirafter /usr/uboot/include2 > -idirafter /usr/uboot/include -I /usr/uboot/libfdt -I /usr/uboot/tools > -DTEXT_BASE=3D0x77800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -o > gen_eth_addr.o gen_eth_addr.c -c > gen_eth_addr.c:24:19: fatal error: stdio.h: No such file or directory > #include <stdio.h> > ^ > compilation terminated. > /usr/uboot/config.mk:218: recipe for target 'gen_eth_addr.o' failed > gmake[1]: *** [gen_eth_addr.o] Error 1 > gmake[1]: Leaving directory '/usr/uboot/tools' > Makefile:402: recipe for target 'tools' failed > gmake: *** [tools] Error 2 > root@Jailbird:/usr/uboot# >=20 > My source is from here: https://github.com/rpaulo/uboot-ccwmx53-digi >=20 >=20 > On Sun, Mar 15, 2015 at 9:01 PM, Russell Haley <russ.haley@gmail.com> = wrote: >> Hi Ian, >>=20 >> Sorry, I'm sure this is a newbie mistake, but I'm still getting gcc = not found. >>=20 >> root@Jailbird:/usr/local/arm-none-eabi$ pkg install arm-none-eabi-gcc >> Updating FreeBSD repository catalogue... >> FreeBSD repository is up-to-date. >> All repositories are up-to-date. >> Checking integrity... done (0 conflicting) >> The most recent version of packages are already installed >> root@Jailbird:/usr/local/arm-none-eabi$ gcc >> gcc: Command not found. >>=20 >> I'm not sure where it was installed? >> root@Jailbird:/usr/local/arm-none-eabi/bin# ls >> ar as ld ld.bfd nm objcopy objdump ranlib size = strip >>=20 >>=20 >>=20 >>=20 >> On Sun, Mar 15, 2015 at 9:30 AM, Ian Lepore <ian@freebsd.org> wrote: >>> On Sat, 2015-03-14 at 21:14 -0700, Russell Haley wrote: >>>> Hello I am trying to build the cross compile tools and make u-boot. >>>>=20 >>>> Tim Kientzle spoke about two ways of getting cross compilers for >>>> outside of building FreeBDS: >>>>=20 >>>> 1) make TARGET=3Darm TARGET_ARCH=3Darmv6 buildenv >>>>=20 >>>> after a successful buildworld >>>>=20 >>>> 2)make xdev XDEV=3Darm XDEV_ARCH=3Darmv6 >>>>=20 >>>> I have struggled (and failed) to make either work. I checked out = Rui >>>> Paulos uboot fork to /usr/uboot. >>>>=20 >>>>=20 >>>> 1)Using buildenv -> >>>=20 >>> The xdev way of building crosstools to build uboot is pretty much = dead. >>> Probably the best way forward is to use one of the existing u-boot = ports >>> such as sysutils/u-boot-wandboard, copy it and transform it into a = port >>> to build the flavor you need. To save the time of building the port >>> cross-compiler from scratch you can do "pkg install = arm-none-eabi-gcc". >>>=20 >>> Are you working with the ConnectCore 6? If so, the u-boot ports for >>> wandboard or cubox-hummingboard are probably 99% ready, you may need = to >>> tweak the config file patch in the port. >>>=20 >>> -- Ian >>>=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DDCF2BD6-D6AA-4841-842F-288FECB7F0AB>