From owner-freebsd-arm@FreeBSD.ORG Tue Mar 17 02:48:26 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FB95E33 for ; Tue, 17 Mar 2015 02:48:26 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC20E08 for ; Tue, 17 Mar 2015 02:48:25 +0000 (UTC) Received: by pdnc3 with SMTP id c3so76028566pdn.0 for ; Mon, 16 Mar 2015 19:48:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=DNQGriI41RaFnHJ7l/OYERL6NOKIItWDC1oq6aqyi9I=; b=L5szsR3Z2nXgRl8AtKSrH91T9wJdUGN6of6ZeiD2Dzu6x0AKpz12tSbJwWFI6KVHMV xCUJpyoTofDF9syjAOUg0IDocXaMVcnST8+sW+EKkpAsT0rgZO8thUhzPrTOjPPvk/bt B/z41cHL0braGztP7dHHPqHP+FZ1lMztTOU+VrO0yOsf9BZoBIDPYbxOOt08cawrqMOU B7mnaHyR3rQoFTBw8LHShshgiPn5+spDRxQrlkHg3qk+BiWmr6+Omwnz/qEtGou3YlIh 2JyylIsPs9qkH4bbM9iGv0sB/Iy66BWx76/eN+NxKh1LfyldNkR7UXGRgVrkkw4xiPC9 ntzQ== X-Gm-Message-State: ALoCoQmpuhi/HmCBqX7LSuZkDeefYR55b8Ha7419nxjsED9bXaIpp2MUtMMASlC5KRXb4X6h9cP6 X-Received: by 10.66.124.129 with SMTP id mi1mr143277503pab.21.1426560195382; Mon, 16 Mar 2015 19:43:15 -0700 (PDT) Received: from [192.168.1.100] (c-24-6-220-224.hsd1.ca.comcast.net. [24.6.220.224]) by mx.google.com with ESMTPSA id hz8sm19526426pac.5.2015.03.16.19.43.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Mar 2015 19:43:14 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: Building Cross Compiler and u-boot From: Tim Kientzle In-Reply-To: Date: Mon, 16 Mar 2015 19:43:11 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1426437012.67325.7.camel@freebsd.org> To: Russell Haley X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-arm , Ian Lepore X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2015 02:48:26 -0000 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 = 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 > ^ > 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 = 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 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"