Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2012 09:34:51 +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:  <B508111FCE534B2CBA61F4D1EC1078D3@ad.peach.ne.jp>
In-Reply-To: <B5F827FF91C94FF2AFEE00194A2BB2C5@ad.peach.ne.jp>
References:  <B5F827FF91C94FF2AFEE00194A2BB2C5@ad.peach.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
I've updated FreeBSD clang world for RPI based on svn r244663.
(To save working time, drop EABI patch.)

Now clang is 3.2 final. This version includes complete source tree of 
r244663.
But the patch is not applied. You must apply the patch manually.
This version has been confirmed that the kernel can be compiled by self and 
booting from it.

You can get the pre-build image from my archives:

http://www.peach.ne.jp/archives/rpi/
(At this time, freebsd-pi-clang-20121225.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 the 
boot log.
If you need to change the value on it, please mount the second partition 
(e.g. /dev/da0s2a).
If you want the video out, please remove the line of "set 
console=comconsole" in /boot/loader.rc.

Using config is here:
http://www.peach.ne.jp/archives/rpi/config/RPI-B-test9

Source(diff) and pacth is here:
http://www.peach.ne.jp/archives/rpi/patch/


For more, please read this:
http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004331.html

tested /etc/make.conf:
----------------------------------------------------------------------
WITHOUT_X11=yes
WITH_CLANG=yes
WITH_CLANG_IS_CC=yes

# For clang
NO_WERROR=
WERROR=

CFLAGS=-O2 -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s -mfloat-abi=soft
COPTFLAGS=-O1 -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s -mfloat-abi=soft
----------------------------------------------------------------------
How to build the kernel in RPI:

# fetch -o /usr 
http://www.peach.ne.jp/archives/rpi/patch/src-244663-20121225.patch.gz
# fetch -o /usr/src/sys/arm/conf 
http://www.peach.ne.jp/archives/rpi/config/RPI-B-test9
# cd /usr/src
# gzcat /usr/src-244663-20121225.patch.gz | patch
# make buildkernel KERNCONF=RPI-B-test9

(wait about 60 minutes :)

If you want re-compile, you can try to use like this:

# make buildkernel KERNCONF=RPI-B-test9 -DNO_CLEAN -DNO_CLEANDIR
----------------------------------------------------------------------

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?B508111FCE534B2CBA61F4D1EC1078D3>