From owner-freebsd-arm@FreeBSD.ORG Fri Dec 26 12:45:33 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 491F45F4 for ; Fri, 26 Dec 2014 12:45:33 +0000 (UTC) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0906F66B30 for ; Fri, 26 Dec 2014 12:45:32 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id B836A6811F for ; Fri, 26 Dec 2014 21:36:51 +0900 (JST) Received: from artemis (unknown [172.18.0.21]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 8C0E268118 for ; Fri, 26 Dec 2014 21:36:51 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: Subject: NAS4Free on Raspberry Pi and ARM problems Date: Fri, 26 Dec 2014 21:36:49 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original 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.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: Fri, 26 Dec 2014 12:45:33 -0000 Hello, I'm building and debugging NAS4Free(w/samba 4.1.14) on RPi. To share ARM problems, I write here. Sorry for a long email. You can get latest test image of NAS4Free 9.3.0.2 for RPi(1GB SD card) from my archives: http://www.peach.ne.jp/archives/nas4free/test/NAS4Free-rpi-SD-9.3.0.2.1214-20141226.img.gz All features should work on RPi. (except ZFS,iSCSI booting,DAAP,UPnP) To use overclock, go to "System|Advanced" and enable "Power Daemon" and save it. To use existing external USB drives, go to "Disks|Management" and click "Import disks". If new disk, go to "Disks|Format" and format UFS(GPT), then mount it from "Disks|Mount Point|Management". Don't forget to configure NTP server from "System|General Setup". All src will be committed to: https://sourceforge.net/p/nas4free/code/HEAD/tree/ This version is based on my FreeBSD image: http://www.peach.ne.jp/archives/rpi/FreeBSD-armv6-11.0-RPI-B-test21-r275967-20141223.img.gz For more about NAS4Free on Raspberry Pi (Japanese): http://shell.peach.ne.jp/aoyama/archives/3016 For more info of my FreeBSD image, you can see the thread of: http://lists.freebsd.org/pipermail/freebsd-arm/2014-October/009443.html http://lists.freebsd.org/pipermail/freebsd-arm/2014-November/009509.html ---------------------------------------------------------------------- Critical bugs: Swap pager can't handle smaller reservations than 32 pages (128KiB). I already posted as: http://lists.freebsd.org/pipermail/freebsd-arm/2014-November/009530.html Under ubldr (uboot loader), can't use file type preload image usually used as mfsroot. preload_fetch_addr() in sys/kern/subr_module.c always return module pa + kernel base, but ubldr stores va in module info. In Raspberry Pi, it shows 0x80000000 + module address (=0xc0000000 + module address + 0xc0000000). Of course, I get a panic always... For RPi workaround, just subtract preload_addr_relocate before using it like: addr = (uint8_t *)preload_fetch_addr(mod); #if defined(__arm__) /* XXX workaround for module info bug */ if (addr < (uint8_t *)preload_addr_relocate) addr -= preload_addr_relocate; #endif /* addr can use in any of amd64/i386/arm */ Library dependency can't be detected by ldd. Some important libs such as used by pam_XXX is missing in NAS4Free build. As a result, I can't login the system. To resolve it, I use YAMAMOTO's patch: http://lists.freebsd.org/pipermail/freebsd-arm/2014-October/009303.html I don't know this is correct, but it helps to build NAS4Free on RPi. ---------------------------------------------------------------------- Minor bugs: Nothing 3wire + autologin entry in /etc/gettytab. Can't build ispfw on RPi after installing some ports. (not checked what ports) ---------------------------------------------------------------------- Unchecked/Unresolved problems: Can't compile ports/firefly (iTunes/DAAP) and ports/fuppes (DLNA/UPnP). Can't run newfs on mmcsd slice. >newfs: ioctl (WDINFO): /dev/mmcsd0s4a: can't rewrite disk label: Inappropriate ioctl for device smartctl crashed in runtime lib when running without args. >kernel: pid 6221 (smartctl), uid 0: exited on signal 6 # smartctl smartctl 6.3 2014-07-26 r3976 [FreeBSD 11.0-CURRENT arm] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org ERROR: smartctl requires a device name as the final command-line argument. Use smartctl -h to get a usage summary Fatal error during phase 1 unwinding Abort Internal LAN driver cause timeout. >kernel: smsc0: warning: MII read timeout >kernel: smsc0: warning: Failed to read register 0x114 ---------------------------------------------------------------------- I tested with Raspberry Pi model B 900MHz(non overvoltage) and TOSHIBA MK5065GSX (2.5-inch 500GB). SMB2 performance from Windows 7 is Sequential Read = 4.5MB/s, Write = 3.8MB/s. Also I tested booting on model A w/USB ether adapter(if_axe). Try it yourself. Thanks, -- Daisuke Aoyama