Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2012 20:42:13 +0000
From:      "Alex T." <dioxinu@gmail.com>
To:        Mark Tinguely <marktinguely@gmail.com>
Cc:        freebsd-arm@freebsd.org, Damjan Marion <dmarion@freebsd.org>
Subject:   Re: beaglebone
Message-ID:  <CABt%2Bj0n_-BvQq8ezwhB80F437=wDfFa7ccuHTvcYZRxm=V94qQ@mail.gmail.com>
In-Reply-To: <CAP%2BM-_G66VKLdw6vXHXkJHGh35JygoegxoSATcuc4scVzXb-CQ@mail.gmail.com>
References:  <FE86500B-9B6F-458E-A74B-9D3BC4530BAC@freebsd.org> <CABt%2Bj0==MY1N8esvF0vdX5XHkigcjj_v1f1DJdot8KKxC_-dDA@mail.gmail.com> <CAP%2BM-_G66VKLdw6vXHXkJHGh35JygoegxoSATcuc4scVzXb-CQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Damjan, Oleksandr, Thanks for your help, I really appreciate your
assistance.

I have noticed that different ARM cpus are handled in the code with ifdefs
like this one:

#ifdef CPU_CORTEXA

and as far as I understand in order for the CPU_CORTEXA to be defined I
need to add

cpu         CPU_CORTEXA

to sys/arm/omap/std.omap. What I don't understand right now is the
following code in sys/arm/include/pmap.h

#if defined(CPU_ARMV7)
void  pmap_pte_init_armv7(void);
#endif

As far as i know ARMV7 covers the Cortex-A family. So how do I properly set
CPU_ARMV7 ?
I guess I'm missing how the parameters make their way from KERNEL configs
to the actual source code.

Thanks a lot.


On 17 April 2012 19:34, Mark Tinguely <marktinguely@gmail.com> wrote:

> 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?CABt%2Bj0n_-BvQq8ezwhB80F437=wDfFa7ccuHTvcYZRxm=V94qQ>