|
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 _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
---------- Forwarded message ----------
From: Yanhui Shen <[hidden email]> Date: 2012/4/17 Subject: Re: beaglebone To: Damjan Marion <[hidden email]> Wow, finally it comes! :-) Last year I found this project, but haven't tried yet. It is for beagleboard which was said more powerful than beaglebone. http://code.google.com/p/beagleboard-freebsd/ 2012/4/17 Damjan Marion <[hidden email]> > > 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 > > _______________________________________________ > [hidden email] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "[hidden email]" > -- Best regards, Yanhui Shen -- Best regards, Yanhui Shen _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion-2
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 <[hidden email]> 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 > > _______________________________________________ > [hidden email] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "[hidden email]" > [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On 17/04/2012 11:00 AM, Alex T. 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? It's stock toolchain from projects/armv6 tree. You just need to build it first. Run make TARGET_ARCH=arm TARGET_CPUTYPE=armv6 kernel-toolchain before making buildkernel. _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
Yes you are right, I missed this step. Now that I ran it I have the
toolchain built. But unfortunately, I get the same issue. I don't know if this matters, but 1) I'm not building under /usr/src. I have the source code checked out to a different location. 2) I defined MAKEOBJDIRPREFIX, KERNSRCDIR, and ROOT. On 17 April 2012 18:08, Oleksandr Tymoshenko <[hidden email]> wrote: > On 17/04/2012 11:00 AM, Alex T. 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? >> > > It's stock toolchain from projects/armv6 tree. You just need > to build it first. > > Run > > make TARGET_ARCH=arm TARGET_CPUTYPE=armv6 kernel-toolchain > > before making buildkernel. > > ______________________________**_________________ > [hidden email] mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-arm<http://lists.freebsd.org/mailman/listinfo/freebsd-arm> > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@**freebsd.org<[hidden email]> > " > [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On 17/04/2012 11:57 AM, Alex T. wrote:
> Yes you are right, I missed this step. Now that I ran it I have the > toolchain built. But unfortunately, I get the same issue. I don't know > if this matters, but > > 1) I'm not building under /usr/src. I have the source code checked out > to a different location. > 2) I defined MAKEOBJDIRPREFIX, KERNSRCDIR, and ROOT. Try removing TARGET_CPUTYPE=armv6 from amke arguments. Should do the trick. _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Alex T.
On Tue, Apr 17, 2012 at 1:00 PM, Alex T. <[hidden email]> 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 <[hidden email]> 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 _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
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 <[hidden email]> wrote: > On Tue, Apr 17, 2012 at 1:00 PM, Alex T. <[hidden email]> 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 <[hidden email]> 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 > [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Alex T.
On 17/04/2012 11:57 AM, Alex T. wrote:
> Yes you are right, I missed this step. Now that I ran it I have the > toolchain built. But unfortunately, I get the same issue. I don't know > if this matters, but > > 1) I'm not building under /usr/src. I have the source code checked out > to a different location. > 2) I defined MAKEOBJDIRPREFIX, KERNSRCDIR, and ROOT. I used this script to build projects/armv6: http://people.freebsd.org/~gonzo/arm/build-armv6.sh If it doesn't work for you - my guess would be that there is something in /etc/src.conf or /etc/make.conf that meddles with a build Please note that TARGET_CPUTYPE is set only for buildworld. projects/armv6 is still WIP so some hiccups are expected :) _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Alex T.
On Apr 17, 2012, at 10:42 PM, Alex T. wrote: > 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. If I recall correctly we renamed CPU_ARMV7 to CPU_CORTEXA in respect to other CPUs which are ARMv7 but they are not Cortex-A (like marvel Armada 510). Where have you found this code? Which board are you targeting? _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion-2
On Apr 17, 2012, at 7:25 AM, Damjan Marion 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. Great! Can't wait to try it on the BeagleBone I've been tinkering with. BTW, FreeBSD-CURRENT can build U-Boot with the native xdev tools. It just requires adding -lc to one place in the U-Boot Makefile (and a sufficiently recent -CURRENT.) Tim _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion-2
>
> If I recall correctly we renamed CPU_ARMV7 to CPU_CORTEXA in respect to > other CPUs which are ARMv7 but they are not Cortex-A (like marvel Armada > 510). > The code is taken from gitorious repo and having taken a look at the history I realize it might be old. Where have you found this code? Which board are you targeting? > My target is Pandaboard. Oleksandr, Thank you for the script. I think I need to get the source new source and try to build it again. Thank you for your help guys. On 17 April 2012 21:32, Damjan Marion <[hidden email]> wrote: > > On Apr 17, 2012, at 10:42 PM, Alex T. wrote: > > > 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. > > > If I recall correctly we renamed CPU_ARMV7 to CPU_CORTEXA in respect to > other CPUs which are ARMv7 but they are not Cortex-A (like marvel Armada > 510). > > Where have you found this code? Which board are you targeting? > > > [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On 18/04/2012 10:41 AM, Alex T. wrote:
>> >> If I recall correctly we renamed CPU_ARMV7 to CPU_CORTEXA in respect to >> other CPUs which are ARMv7 but they are not Cortex-A (like marvel Armada >> 510). >> > > The code is taken from gitorious repo and having taken a look at the > history I realize it might be old. > > Where have you found this code? Which board are you targeting? >> > > My target is Pandaboard. > > Oleksandr, Thank you for the script. I think I need to get the source new > source and try to build it again. Pandaboard is not yet ready for SD-root. I checked yesterday - mounting FS in RO works, but RW mount deadlocks the board. NFS root should work OK though. I'll check what's wrong with MMC driver. _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On Apr 18, 2012, at 8:01 PM, Oleksandr Tymoshenko wrote: > Pandaboard is not yet ready for SD-root. I checked yesterday - mounting > FS in RO works, but RW mount deadlocks the board. NFS root should work > OK though. I'll check what's wrong with MMC driver. MMC code works on beaglebone so maybe there is an issue with sDMA which is different. Damjan_______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Alex T.
On Apr 18, 2012, at 7:41 PM, Alex T. wrote: > The code is taken from gitorious repo and having taken a look at the history I realize it might be old. That code is really old and only reason why I'm still keeping is that OMAP3 code is not imported into SVN. Please use projects/armv6 from svn.freebsd.org. Damjan_______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion
On 18/04/2012 11:20 AM, Damjan Marion wrote:
> > On Apr 18, 2012, at 8:01 PM, Oleksandr Tymoshenko wrote: > >> Pandaboard is not yet ready for SD-root. I checked yesterday - mounting >> FS in RO works, but RW mount deadlocks the board. NFS root should work >> OK though. I'll check what's wrong with MMC driver. > > MMC code works on beaglebone so maybe there is an issue with sDMA which is different. Yes, the issue was in sDMA code. Now when it's fixed I got FreeBSD running on pandaboard off the SD card. stock PANDABOARD config file should be modified, at the moment it's configured for NFS boot. MLO, u-boot.bin and boot.scr could be obtained from this URL: http://people.freebsd.org/~gonzo/pandaboard/ _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion-2
On Apr 17, 2012, at 7:25 AM, Damjan Marion 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. Your instructions should have buildworld before buildkernel. In particular, buildworld constructs the cross-compile toolchain that buildkernel expects. Cheers, Tim _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On 2012-04-21, at 4:11 PM, Tim Kientzle <[hidden email]> wrote: > > On Apr 17, 2012, at 7:25 AM, Damjan Marion 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. > > Your instructions should have buildworld before buildkernel. > > In particular, buildworld constructs the cross-compile toolchain > that buildkernel expects. There is separate target for this "kernel-toolchain"_______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
On Apr 21, 2012, at 10:54 PM, Oleksandr Tymoshenko wrote:
> On 2012-04-21, at 4:11 PM, Tim Kientzle <[hidden email]> wrote: >> On Apr 17, 2012, at 7:25 AM, Damjan Marion 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/ >>> >> Your instructions should have buildworld before buildkernel. >> >> In particular, buildworld constructs the cross-compile toolchain >> that buildkernel expects. > > There is separate target for this "kernel-toolchain" Yes, there is. But you have to run "buildworld" anyway, so you may as well do that before buildkernel. Then you don't need any extra steps. Cheers, Tim _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
|
In reply to this post by Damjan Marion-2
On Apr 17, 2012, at 7:25 AM, Damjan Marion 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. I assembled a shell script to automate building a FreeBSD disk image for BeagleBone: https://github.com/kientzle/freebsd-beaglebone It should make it very easy for people to build working images. You should be able to get started by just: * Cloning the project above onto a recent FreeBSD-CURRENT desktop. * sudo /bin/sh beaglebsd.sh The script will prompt you for everything it needs, including downloading the necessary source code. Tim _______________________________________________ [hidden email] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[hidden email]" |
| Powered by Nabble | Edit this page |
