Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2013 04:48:11 +0900
From:      "Daisuke Aoyama" <aoyama@peach.ne.jp>
To:        <freebsd-arm@freebsd.org>
Subject:   Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)
Message-ID:  <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp>
In-Reply-To: <D3ABE3919EA74D668DB060952B5CD8C0@ad.peach.ne.jp>
References:  <B5F827FF91C94FF2AFEE00194A2BB2C5@ad.peach.ne.jp> <B508111FCE534B2CBA61F4D1EC1078D3@ad.peach.ne.jp> <D3ABE3919EA74D668DB060952B5CD8C0@ad.peach.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2659960079254C38ACD2F1DCBB7A1A19>