From owner-freebsd-arm@FreeBSD.ORG Fri Jan 4 19:48:15 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8577AE81 for ; Fri, 4 Jan 2013 19:48:15 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id 2BCF83EA for ; Fri, 4 Jan 2013 19:48:14 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 9AFC339E09 for ; Sat, 5 Jan 2013 04:48:07 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 8239539D62 for ; Sat, 5 Jan 2013 04:48:07 +0900 (JST) Message-ID: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> From: "Daisuke Aoyama" To: References: In-Reply-To: Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Sat, 5 Jan 2013 04:48:11 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Fri, 04 Jan 2013 19:48:15 -0000 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