From owner-freebsd-arm@FreeBSD.ORG Thu Dec 13 00:07:06 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0621CFC4; Thu, 13 Dec 2012 00:07:06 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id 82DB88FC18; Thu, 13 Dec 2012 00:07:05 +0000 (UTC) Received: from [88.198.91.248] (helo=[IPv6:::1]) by id.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1TiwKD-0008y7-8Y; Wed, 12 Dec 2012 16:06:56 -0800 Message-ID: <50C91C1B.4070301@bluezbox.com> Date: Wed, 12 Dec 2012 16:06:51 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Daisuke Aoyama Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: 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 > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2012 00:07:06 -0000 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