Date: Tue, 17 Apr 2012 14:34:50 -0500 From: Mark Tinguely <marktinguely@gmail.com> To: "Alex T." <dioxinu@gmail.com> Cc: freebsd-arm@freebsd.org, Damjan Marion <dmarion@freebsd.org> Subject: Re: beaglebone Message-ID: <CAP%2BM-_G66VKLdw6vXHXkJHGh35JygoegxoSATcuc4scVzXb-CQ@mail.gmail.com> In-Reply-To: <CABt%2Bj0==MY1N8esvF0vdX5XHkigcjj_v1f1DJdot8KKxC_-dDA@mail.gmail.com> References: <FE86500B-9B6F-458E-A74B-9D3BC4530BAC@freebsd.org> <CABt%2Bj0==MY1N8esvF0vdX5XHkigcjj_v1f1DJdot8KKxC_-dDA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 17, 2012 at 1:00 PM, Alex T. <dioxinu@gmail.com> wrote: > Just a quick question. What compiler do you use? When I start the kernel > compilation the gcc from my base system is used, which is gcc 4.2.1, and it > complains about armv6 target cpu: > > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. > cc1: error: unrecognized command line option "-mlittle-endian" > sys/arm/arm/genassym.c:1: error: bad value (armv6) for -march= switch > sys/arm/arm/genassym.c:1: error: bad value (armv6) for -mtune= switch > > Do you override CC by any chance? > Thanks. > > > On 17 April 2012 14:25, Damjan Marion <dmarion@freebsd.org> wrote: > >> >> I put together guide how to build bootable SD card with FreeBSD on >> beaglebone. >> >> http://people.freebsd.org/~dmarion/beaglebone/creating_bootable_sd_card/ >> >> It is still work in progress, so ethernet driver is not complete and USB >> support is missing. >> >> Will be happy to hear any feedback. >> >> Damjan >> >> _______________________________________________ This should be somewhere in the FreeBSD ARM pages: First, create the following directories into the destination directory : mkdir -p usr/bin mdkir -p usr/lib mkdir -p usr/include mkdir -p usr/share/man/man1 mkdir -p usr/share/info mkdir -p usr/libdata/ldscripts mkdir -p usr/libexec go in /usr/src/gnu/usr.bin/cc, and do : make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross clean depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install Then go in /usr/src/gnu/usr.bin/binutils, and do : make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross clean depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install You should get what is needed to cross-compile a kernel. You need to set the following environment varibles for cross-compiling : export CC=/usr/cross/usr/bin/gcc export AS=/usr/cross/usr/bin/as export NM=/usr/cross/usr/bin/nm export RANLIB=/usr/cross/usr/bin/ranlib export LD=/usr/cross/usr/bin/ld export OBJCOPY=/usr/cross/usr/bin/objcopy export SIZE=/usr/cross/usr/bin/size export MACHINE=arm export MACHINE_ARCH=arm I add: export PATH=/usr/cross/usr/bin:$PATH: If you are doing a buildworld, do not use a cross compiler and only specify: make TARGET_ARCH=arm buildworld make TARGET_ARCH=arm DESTDIR=/path/to/arm/root installworld
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP%2BM-_G66VKLdw6vXHXkJHGh35JygoegxoSATcuc4scVzXb-CQ>