Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2012 16:06:51 -0800
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        Daisuke Aoyama <aoyama@peach.ne.jp>
Cc:        freebsd-arm@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)
Message-ID:  <50C91C1B.4070301@bluezbox.com>
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
On 12/12/2012 9:08 AM, Daisuke Aoyama wrote:
> Hi,
>
> I've created FreeBSD clang world for RPI based on svn 244112 + 
> eabi.diff(NOT USE) + few NetBSD code.
> I didn't test with "-mfloat-abi=softfp" but it might work.
>
> The first version is released at my Japanese blog:
> http://shell.peach.ne.jp/aoyama/archives/2357
>
> Thank you for many comments to previous versions.
> Thank you for adding RPI support to FreeBSD.
> Thank you for porting latest clang to head!
> It's very useful for RPI developing now.
>
> You can get the pre-build image from my archives:
>
> http://www.peach.ne.jp/archives/rpi/
> (At this time, freebsd-pi-clang-20121213.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.
>
> Note: first time, it takes about 2 minutes for generating the SSH keys.
> This version includes axe(ASIX AX88x7x/760) driver because smsc is not 
> stable.
> Now "cc" is "clang" instead of "gcc". If you want to use gcc, specify 
> or edit /etc/make.conf.
> The initial setup code is taken from NetBSD.
>
> Using config is here:
> http://www.peach.ne.jp/archives/rpi/config/RPI-B-test8
>
> Source and pacth is here:
> http://www.peach.ne.jp/archives/rpi/patch/
>
>
> Pre-configured for:
>
> MEM 496MB/GPU 16MB/SWAP 512MB
> I/O: multi-console (primary serial)
> IP address: 192.168.1.240
> Default router: 192.168.1.1
> DNS: 192.168.1.1
> sshd: enabled
>
> User: pi
> Password: raspberry
> Password(root): raspberry
>
> kernel section limit:
> TS=256MB, DS=1024MB, SS=256MB
>
> example of /etc/make.conf:
> ----------------------------------------------------------------------
> WITHOUT_X11=yes
>
> WITH_CLANG=yes
> WITH_CLANG_IS_CC=yes
>
> # Now cc = clang is default
> #CC=clang
> #CXX=clang++
> #CPP=clang-cpp
>
> # 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
>
> # For gcc
> #CC=gcc
> #CXX=g++
> #CPP=cpp
> ----------------------------------------------------------------------
> How to use GPT USB stick in RPI:
>
> (if you use something, delete/destory it before doing)
> # gpart delete -i NN da0
> # gpart destroy -F da0
>
> (create new partition and format)
> # gpart create -s gpt da0
> # gpart add -t freebsd-ufs da0
> # gpart show
> # newfs -U -j /dev/da0p1
>
> (mount it)
> # mount /dev/da0p1 /mnt
> ----------------------------------------------------------------------
> Known problems:
> o SD card is not configured correctly. (power on/off need if it's failed)
> o hang the system. (unknown reason)
> o smsc is not stable.
> o alignment/padding is not same as gcc. (temporary avoid strict 
> alignment now)
> o call both IDCACHE_WBINV_ALL and DCACHE_WB_RANGE at switch. (can't 
> work without both)
> o still depend on GNU as (gas syntax).
>
> TODO:
> o modify/replace bcm2835 drivers.
> o using "clang -integrated-as".
> o fix alignment with clang.
> o self build.
> o use EABI if possible.
> o create build script :-)
>
> Enjoy clang world in Raspberry Pi!

Amazing! Thank you for working on it



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