From owner-freebsd-arm@FreeBSD.ORG Mon Mar 16 06:02:43 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 1B446E2B; Mon, 16 Mar 2015 06:02:43 +0000 (UTC) Received: from mail-yh0-x229.google.com (mail-yh0-x229.google.com [IPv6:2607:f8b0:4002:c01::229]) (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 D39107EA; Mon, 16 Mar 2015 06:02:42 +0000 (UTC) Received: by yhpt93 with SMTP id t93so14132352yhp.0; Sun, 15 Mar 2015 23:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8dTB+Ik4XHzGp1mdhnPAiYrV9Y50TaS+enePv0KSJck=; b=tQ5jXJUpMUlEEfOtia7dxScS5wy1SLdnx4bauzJO59pk14wNZaoVblUHEIuSBi2JNf BPlUORurJDjLujm+dVP5LtAoAYg4HISgV8/mPzuXWrNbUQ9wB7tOxytOBN/ia5so0YNL U31ReYp0+jUDH7tbkP3zQxzroJqXiiAyV8e0CQWXKVstoZDWLL5/w/xh4SNgx+CU+LgF f4IS620Qg4FhF6QPt8XWXCr/ST2pQDExzyD6LRXnyeySsYYkRzikSSbrGlf3AGtMtyuA D3Kn1L+vYaw/F40AXpRMIgJQ6xapbBedGO0bAsct25pzlW2MbFBpHjnjPzSBBcVfHXJk Vckg== MIME-Version: 1.0 X-Received: by 10.236.63.65 with SMTP id z41mr8890483yhc.8.1426485760817; Sun, 15 Mar 2015 23:02:40 -0700 (PDT) Received: by 10.170.182.81 with HTTP; Sun, 15 Mar 2015 23:02:40 -0700 (PDT) In-Reply-To: References: <1426437012.67325.7.camel@freebsd.org> Date: Sun, 15 Mar 2015 23:02:40 -0700 Message-ID: Subject: Re: Building Cross Compiler and u-boot From: Russell Haley To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: freebsd-arm 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: Mon, 16 Mar 2015 06:02:43 -0000 Thanks Johny Mattsson, that's what I needed! root@Jailbird:/usr/uboot# gmake SED=gsed HOSTCC=arm-none-eabi-gcc CROSS_COMPILE=arm-none-eabi- ccwmx53js_config Configuring a wireless module Configuring for ccwmx53 board... root@Jailbird:/usr/uboot# However: root@Jailbird:/usr/uboot# gmake SED=gsed HOSTCC=arm-none-eabi-gcc CROSS_COMPILE=arm-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=0x77800000 -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# My source is from here: https://github.com/rpaulo/uboot-ccwmx53-digi On Sun, Mar 15, 2015 at 9:01 PM, Russell Haley wrote: > Hi Ian, > > Sorry, I'm sure this is a newbie mistake, but I'm still getting gcc not found. > > 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. > > 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 > > > > > 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. >>> >>> Tim Kientzle spoke about two ways of getting cross compilers for >>> outside of building FreeBDS: >>> >>> 1) make TARGET=arm TARGET_ARCH=armv6 buildenv >>> >>> after a successful buildworld >>> >>> 2)make xdev XDEV=arm XDEV_ARCH=armv6 >>> >>> I have struggled (and failed) to make either work. I checked out Rui >>> Paulos uboot fork to /usr/uboot. >>> >>> >>> 1)Using buildenv -> >> >> 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". >> >> 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. >> >> -- Ian >>