FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)
Daisuke Aoyama
aoyama at peach.ne.jp
Fri Jan 4 19:48:15 UTC 2013
I have updated clang RPI code based on SVN r244906.
Now the patched kernel supports VFP under clang world.
I received the request about VFP. However, it seemed not to work correctly.
So, I made a small patch. VFP is not well tested. You might get an error or a panic.
major change:
o fix broken divider in dev/sdhci
o add SDHCI_QUIRK_BROKEN_HS_CONTROL to dev/sdhci
o use 100MHz for bcm2835_sdhci
o replace IRQ handler with hand optimized asm code
o more optimaized asm routine(bcm2835_asm.S), replace generic bus_XXX
o VFP support (experimental, requires modified /usr/bin/as)
By default, it boots with vfp enabled kernel(since 20130105). If you have a trouble,
you can boot without vfp by using /boot/kernel/kernel.novfp.
If your SD card work with HS mode, you can enable by:
set hw.bcm2835.sdhci.hs=1 in /boot/loader.rc or set in loader prompt.
If failed to boot, you need enter loader prompt to set hw.bcm2835.sdhci.hs=0.
If you want replace kernel only, please update /usr/bin/as from:
http://www.peach.ne.jp/archives/rpi/test/as-20130105.gz
However, I recommend you to use freebsd-pi-clang-20130105.img(or later) as the base image.
----------------------------------------------------------------------
You can get the pre-build image from my archives:
http://www.peach.ne.jp/archives/rpi/
(At this time, freebsd-pi-clang-20130105.img.gz is the latest version.)
Download and decompress it, then write it to SD. This image requires SD 4GB or more.
I'm using as headless server. So, you need a serial console for seeing full boot log.
If you want the video out, please remove the line of "set console=comconsole" in
/boot/loader.rc.
If you need to change the value on it, please mount the second partition (e.g. /dev/da0s2a).
This version includes complete source tree of r244906.
But the patch is not applied. You must apply the patch manually.
Note: first time, it takes about 2 minutes for generating the SSH keys.
Using config is here:
http://www.peach.ne.jp/archives/rpi/config/RPI-B-test12
New kernel only is here:
http://www.peach.ne.jp/archives/rpi/kernel/
Source and pacth is here:
http://www.peach.ne.jp/archives/rpi/patch/
For more, please read this:
http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004507.html
http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004421.html
http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004331.html
http://shell.peach.ne.jp/aoyama/
----------------------------------------------------------------------
How to use VFP:
add "-mfloat-abi=softfp -mfpu=vfp" to your CFLAGS
for example:
CFLAGS=-O2 -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s -mfloat-abi=softfp -mfpu=vfp
----------------------------------------------------------------------
Enjoy clang world in Raspberry Pi!
Thank you.
--
Daisuke Aoyama
More information about the freebsd-arm
mailing list