Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2014 21:36:49 +0900
From:      "Daisuke Aoyama" <aoyama@peach.ne.jp>
To:        <freebsd-arm@freebsd.org>
Subject:   NAS4Free on Raspberry Pi and ARM problems
Message-ID:  <F4CBCA49441F46B2ABB19017AC3359FE@ad.peach.ne.jp>

next in thread | raw e-mail | index | archive | help
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
 




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