From owner-freebsd-arm@FreeBSD.ORG Wed Oct 29 06:49:44 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17A473A3 for ; Wed, 29 Oct 2014 06:49:44 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1 with cipher DES-CBC3-SHA (112/168 bits)) (Client CN "smtp.me.com", Issuer "VeriSign Class 3 Extended Validation SSL SGC CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD24291E for ; Wed, 29 Oct 2014 06:49:43 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0NE7003IZ1M64Q60@st11p02mm-asmtp002.mac.com> for freebsd-arm@freebsd.org; Wed, 29 Oct 2014 06:49:20 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.28,0.0.0000 definitions=2014-10-29_04:2014-10-28,2014-10-29,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1408290000 definitions=main-1410290075 Subject: Re: FreeBSD 11-CURRENT on Raspberry Pi 512MB MIME-version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Content-type: text/plain; charset=us-ascii From: Rui Paulo X-Priority: 3 In-reply-to: <0A8390C3FC2B444B9AA8AC934B79DCD6@ad.peach.ne.jp> Date: Tue, 28 Oct 2014 23:49:18 -0700 Content-transfer-encoding: quoted-printable Message-id: References: <0A8390C3FC2B444B9AA8AC934B79DCD6@ad.peach.ne.jp> To: Daisuke Aoyama X-Mailer: Apple Mail (2.1990.1) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 06:49:44 -0000 On Oct 28, 2014, at 18:20, Daisuke Aoyama wrote: >=20 > I've created FreeBSD 11-CURRENT for RPi based on svn 273303. >=20 > The first version is released at my Japanese blog: >=20 > Download and tips > http://shell.peach.ne.jp/aoyama/archives/2931 > Initial setup of FreeBSD 11 on RPi > http://shell.peach.ne.jp/aoyama/archives/2946 > Package installation of Apache 2.4(event MPM), MySQL 5.6, PHP 5.6(ZTS) = and phpMyAdmin. > http://shell.peach.ne.jp/aoyama/archives/2951 >=20 > The pre-build base images are available from my archives: > http://www.peach.ne.jp/archives/rpi/ > (Latest version is = FreeBSD-armv6-11.0-RPI-B-test20-r273303-20141026.img.gz) >=20 > Download and decompress it, then write it to an SD card of 8GB or = more. > This image is intended to use as a headless server. (No X11 and GPU = 16MB) > For quick playing, I provide some useful packages such as samba 4.1, = AMP. >=20 > This version have cpufreq(4) based frequency contoller. > Clock frequencies can be dynamically changed by hand or powerd. > Also realtime raw values including temperature are stored in = hw.cpufreq: >=20 > Example overclock at 1000MHz: >=20 > # sysctl hw.cpufreq > hw.cpufreq.arm_freq: 1000000000 > hw.cpufreq.core_freq: 500000000 > hw.cpufreq.sdram_freq: 500000000 > hw.cpufreq.turbo: 1 > hw.cpufreq.voltage_core: 6 > hw.cpufreq.voltage_sdram_c: 1 > hw.cpufreq.voltage_sdram_i: 1 > hw.cpufreq.voltage_sdram_p: 1 > hw.cpufreq.temperature: 50843 >=20 > # sysctl dev.cpu > dev.cpu.%parent: > dev.cpu.0.%desc: Open Firmware CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: > dev.cpu.0.%pnpinfo: name=3Dcpu@0 compat=3Darm,1176jzf-s > dev.cpu.0.%parent: cpulist0 > dev.cpu.0.freq: 300 > dev.cpu.0.freq_levels: 1000/-1 900/-1 800/-1 700/-1 600/-1 500/-1 = 400/-1 300/-1 >=20 >=20 > Note: > Do not build kernel without patch to bcm2835_mbox.c, otherwise you get = a panic in msleep. >=20 > Using config is here: > http://www.peach.ne.jp/archives/rpi/config/RPI-B-test20 >=20 > Source and pacth is here: > http://www.peach.ne.jp/archives/rpi/patch/ >=20 > Local packages is here: > http://www.peach.ne.jp/archives/rpi/ports/packages/All/ >=20 >=20 > Pre-configured: >=20 > MEM 496MB/GPU 16MB/SWAP none > Clock: ARM 800MHz/Core 400MHz/SDRAM 400MHz (overclock from = 700/250/400) > ntpdate: 0.freebsd.pool.ntp.org > portsnap: fetch and extracted > powerd: enabled (min 300MHz) >=20 > See also: > http://www.peach.ne.jp/archives/rpi/00README.txt This is pretty interesting. Is anyone already helping you merge your = code to FreeBSD? Some questions: - Did you measure the power consumption when using the different = frequency values? - Could you also export the temperature in dev.cpu.0.temperature like = coretemp/amdtemp? You'd need to perform a device lookup and then lookup = its sysctl context. One suggestion I have is to move the register definition structures to a = header file like bcm2835_cpufreq.h. There are some style issues with your patch, but I think it's pretty = close to being ready. -- Rui Paulo