#11 2012-01-20 10:45:41
Re: 華碩 NAS-M25 測試
如果您已參照這篇能進入CLI, 就能安裝Debian, Gentoo等. 其他廠牌的NAS, 也是類似作法.
使用Gentoo與其他Linux發行版本的不同之處是:
1. 執行檔是透過原始碼在機器上直接編譯產生. 藉調整編譯參數, 而能發揮CPU最大功效.
2. Debian等常見的Linux, 依照發佈版本, 套件庫維護一段時間後, 就停止更新. 而Gentoo的版本更新, 也是由原始碼編譯, 就無所謂的"版本"升級. 簡單來說, 一種是自助餐, 看師傅端出的菜色來選擇; 另一種是自己當總舖師, 親自下廚烹調.
Gentoo for ARM目前釋出的是stage3的壓縮檔. 下載前, 先理解機器的CPU類型. 參考維基百科.
下載, 解壓縮:
# aria2c ftp://ftp.twaren.net/Linux/Gentoo/releases/arm/autobuilds/20120113/armv5tel-softfloat-linux-gnueabi/stage3-armv5tel-20120113.tar.bz2
# aria2c ftp://ftp.twaren.net/Linux/Gentoo/snapshots/portage-latest.tar.bz2
# mkdir /opt/Gentoo
# tar -xjf stage3-armv5tel-20120113.tar.bz2 -C /opt/Gentoo
# tar -xjf portage-latest.tar.bz2 -C /opt/Gentoo/usr
進入Gentoo:
# mount -t proc /proc /opt/Gentoo/proc
# chroot /opt/Gentoo env -i TERM=xterm /bin/bash
時區:
# mv /etc/localtime /etc/localtime.Gentoo
# ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
DNS(依自己的環境設定):
# nano /etc/resolv.conf
nameserver 192.168.1.1
gcc支援的ARM:
# gcc --target-help
...
Known ARM CPUs (for use with the -mcpu= and -mtune= options):
cortex-m0, cortex-m1, cortex-m3, cortex-r4f, cortex-r4, cortex-a9,
cortex-a8, cortex-a5, arm1156t2f-s, arm1156t2-s, mpcore, mpcorenovfp,
arm1176jzf-s, arm1176jz-s, arm1136jf-s, arm1136j-s, arm1026ej-s, arm926ej-s,
iwmmxt2, iwmmxt, xscale, arm1022e, arm1020e, arm10e, arm968e-s, arm966e-s,
arm946e-s, arm9e, arm1020t, arm10tdmi, ep9312, arm940t, arm922t, arm920t,
arm920, arm9tdmi, arm9, arm740t, arm720t, arm710t, arm7tdmi-s, arm7tdmi,
strongarm1110, strongarm1100, strongarm110, strongarm, arm810, arm8,
arm7dmi, arm7dm, arm7m, arm7500fe, arm7500, arm7100, arm710c, arm720,
arm710, arm700i, arm700, arm70, arm7di, arm7d, arm7, arm620, arm610, arm600,
arm60, arm6, arm3, arm250, arm2
Known ARM architectures (for use with the -march= option):
iwmmxt2, iwmmxt, ep9312, armv7e-m, armv7-m, armv7-r, armv7-a, armv7,
armv6-m, armv6t2, armv6zk, armv6z, armv6k, armv6j, armv6, armv5te, armv5e,
armv5t, armv5, armv4t, armv4, armv3m, armv3, armv2a, armv2
...
編譯參數, 套件來源:
# nano /etc/make.conf
CFLAGS="-O2 -pipe -mtune=arm926ej-s -march=armv5te"
GENTOO_MIRRORS="ftp://ftp.twaren.net/Linux/Gentoo/ \
ftp://ftp.ncnu.edu.tw/Linux/Gentoo/ \
ftp://gentoo.cs.nctu.edu.tw/gentoo/"
SYNC="rsync://rsync3.tw.gentoo.org/gentoo-portage"
更新套件庫:
# emerge --sync
更新系統:
# emerge -ua world
參考:
1. Synology DS107
2. Using Gentoo on the Plug Computer
3. GenLink for ARM9
離線
#12 2012-01-26 11:57:19
Re: 華碩 NAS-M25 測試
現今的NAS, 大多使用U-Boot當作Boot Loader, 早期機型, 例如: 久森MZK-NAS01SG是使用RedBoot. U-Boot除可由MTD載入Linux啟動外, 也可由NFS載入. 我的想法是, 由U-Boot, 透過NFS載入Linux. 這個作法就如同之前寫的PXE boot, 差別在Boot Loader由SYSLINUX改為U-Boot. 這個作法最大的好處是, 不會動到韌體.
雖然可以chroot到Linux OS, 但多那麼一層, 就像戴著保險套, 作愛做的事, 隔靴搔癢, 不過癮. 而Optware, 或交叉編譯原始碼, 以我目前的智商, 還有一些瓶頸. 所以才動念, 將整個系統轉到Linux OS.
目前, 有許多Linux OS支援ARM, 但安裝方法不像安裝在PC那麼簡單. 參考Martin Michlmayr的Debian HOWTOs在NAS-M25測試.
1. 使用Toamto內建DNSMasq的TFTP:
# cd /opt/tftpboot
# aria2c ftp://ftp.twaren.net/Linux/Debian/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-219/kernel
# aria2c ftp://ftp.twaren.net/Linux/Debian/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-219/initrd.gz
2. 裝硬碟, 接上console線, 開機後, 進入U-Boot:
>> dhcp
>> tftpboot 0x800000 kernel
>> tftpboot 0xa00000 initrd.gz
>> setenv bootargs 'console=ttyS0,115200 root=/dev/ram rw initrd=0xa00000,0x8fffff'
>> bootm 0x800000
## Booting image at 00800000 ...
Image Name: Debian kernel
Created: 2011-10-05 21:24:16 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1435672 Bytes = 1.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-5-kirkwood (Debian 2.6.32-38) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Mon Oct 3 16:55:04 UTC 2011
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
...
3. PieTTY ssh到NAS-M25 dhcp取得的IP. 使用者: installer, 密碼: install.
4. 選Start installer, 經由網路安裝Debian.
5. 略過安裝boot loader. 這在QNAP TS-119/TS-219是寫入flash.
6. 安裝完畢後, 關機. 將/boot/內的vmlinuz-2.6.32-5-kirkwood取出.
7. 使用華碩GPL原始碼內的mkimage, 建立uImage.
$ mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n 'Debian kernel' -d vmlinuz-2.6.32-5-kirkwood uImage
Image Name: Debian kernel
Created: Tue Jan 24 20:40:19 2012
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1434052 Bytes = 1400.44 kB = 1.37 MB
Load Address: 0x00008000
Entry Point: 0x00008000
8. uImage上傳到Tomato的/opt/tftpboot/
9. 開機, 進入U-Boot, 測試核心.
>> dhcp
>> tftpboot 0x800000 uImage
>> bootm 0x800000
## Booting image at 00800000 ...
Image Name: Debian kernel
Created: 2012-01-24 12:40:19 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1434052 Bytes = 1.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x0000020f).
Available machine support:
ID (hex) NAME
00000690 Marvell DB-88F6281-BP Development Board
00000691 Marvell RD-88F6192-NAS Development Board
00000692 Marvell RD-88F6281 Reference Board
0000078c Marvell 88F6281 GTW GE Board
00000a76 Marvell eSATA SheevaPlug Reference Board
00000831 Marvell SheevaPlug Reference Board
00000a63 Marvell GuruPlug Reference Board
0000085b QNAP TS-119/TS-219
000009c6 QNAP TS-41x
00000bb6 Seagate FreeAgent DockStar
00000b44 Marvell OpenRD Ultimate Board
00000939 Marvell OpenRD Client Board
00000915 Marvell OpenRD Base Board
00000b1e HP t5325 Thin Client
Please check your kernel config and/or bootloader.
卡關, 第一階段就失敗. U-Boot分別設定arcNumber=1680等, 還是無效. 而由華碩GPL原始碼重新編譯的2.6.22.18核心, 可以過關. 我在想, 既然v2.6.22.18可以, 怎麼v2.6.32不行? 嘗試Marvell orion-stable-2.6.31, 一樣卡在machine ID. 如果使用v2.6.22.18, Debian的第二階段ramdisk還不知道怎麼搞? 智商不足, 失敗! 看來, 只好比對同樣使用v2.6.22.18的SheevaPlug原始碼, 測試Ubuntu了.
離線
#13 2012-01-30 18:10:02
Re: 華碩 NAS-M25 測試
以下是在PC上的Gentoo, 交叉編譯linux-3.1.10-gentoo-r1, 產生uImage. NAS-M25由Tomato TFTP+NFS載入Gentoo(armv5tel).
Tomato:
依上一篇安裝stage3-armv5tel, 設定TFTP, NFS.
PC:
1. 安裝CodeSourcery Toolchain, U-Boot工具程式
# emerge sgpp-lite-arm-linux-bin u-boot-tools
2. 載入kirkwood_defconfig, 挑選自己需要的項目後, 編譯核心與核心模組.
3. 核心上傳到Tomato TFTP server, 核心模組安裝在NFS server的lib/內.
4. 經console, 進入NAS-M25 U-Boot.
>> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs rw nfsroot=/nas/Gentoo ip=dhcp noinitrd init=/bin/sh'
>> dhcp
>> tftpboot 0x800000 uImage
>> bootm 0x800000
...
sh-4.1#
5. 設定root密碼
# passwd
6. 開機啟動SSH. 其他時區等設定, 參考上一篇.
# rc-update add sshd default
7. 重新開機, 進入U-Boot, 更換bootargs. console訊息如下:
>> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs rw nfsroot=/nas/Gentoo ip=dhcp noinitrd'
>> dhcp
>> tftpboot 0x800000 uImage
>> bootm 0x800000
## Booting image at 00800000 ...
Image Name: Linux-3.1.10-gentoo-r1
Created: 2012-01-30 2:47:48 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2125272 Bytes = 2 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.1.10-gentoo-r1 (root@gentoo) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #1 PREEMPT Mon Jan 30 10:47:40 CST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell DB-88F6281-BP Development Board
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS0,115200 root=/dev/nfs rw nfsroot=/nas/Gentoo ip=dhcp noinitrd
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 514884k/514884k available, 9404k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xe0800000 - 0xfe800000 ( 480 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc03e5444 (3958 kB)
.init : 0xc03e6000 - 0xc0405000 ( 124 kB)
.data : 0xc0406000 - 0xc0429f00 ( 144 kB)
.bss : 0xc0429f24 - 0xc04c1a1c ( 607 kB)
Preemptible hierarchical RCU implementation.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:114
sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
Console: colour dummy device 80x30
Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
Kirkwood PCIe port 0:
link down, ignoring
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource orion_clocksource
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 1005
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
brd: module loaded
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 21
ata2: SATA max UDMA/133 irq 21
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0: eth0: port 0 with MAC address 00:50:43:3c:3b:5d
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Marvell Orion EHCI
usb usb1: Manufacturer: Linux 3.1.10-gentoo-r1 ehci_hcd
usb usb1: SerialNumber: orion-ehci.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
Orion Watchdog Timer: Initial timeout 21 sec
cpuidle: using governor ladder
cpuidle: using governor menu
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
rtc-mv rtc-mv: setting system clock to 2012-01-30 08:44:44 UTC (1327913084)
ADDRCONF(NETDEV_UP): eth0: link is not ready
ata1: SATA link down (SStatus 0 SControl F300)
usb 1-1: new high speed USB device number 2 using orion-ehci
usb 1-1: New USB device found, idVendor=0409, idProduct=005a
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
ata2: SATA link down (SStatus 0 SControl F300)
mv643xx_eth_port mv643xx_eth_port.0: eth0: link up, 1000 Mb/s, full duplex, flow control disabled
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests .., OK
IP-Config: Got DHCP answer from 192.168.1.254, my address is 192.168.1.22
IP-Config: Complete:
device=eth0, addr=192.168.1.22, mask=255.255.255.0, gw=192.168.1.254,
host=NAS-M25, domain=, nis-domain=(none),
bootserver=192.168.1.254, rootserver=192.168.1.254, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:11.
Freeing init memory: 124K
INIT: version 2.88 booting
OpenRC 0.9.4 is starting up Gentoo Linux (armv5tel)
* Mounting /proc ...
[ ok ]
* WARNING: rc_sys not defined in rc.conf. Falling back to automatic detection
* Caching service dependencies ...
[ ok ]
* Mounting /sys ...
[ ok ]
* Mounting /dev ...
[ ok ]
* Starting udevd ...
[ ok ]
* Populating /dev with existing devices through uevents ...
[ ok ]
* Waiting for uevents to be processed ...
[ ok ]
* Mounting /dev/pts ...
[ ok ]
* Mounting /dev/shm ...
[ ok ]
* Setting system clock using the hardware clock [Local Time] ...
[ ok ]
* Autoloaded 0 module(s)
* Checking local filesystems ...
[ ok ]
* Updating /etc/mtab ...
[ ok ]
* Mounting local filesystems ...
[ ok ]
* Configuring kernel parameters ...
[ ok ]
* Creating user login records ...
[ ok ]
* Cleaning /var/run ...
[ ok ]
* Wiping /tmp directory ...
[ ok ]
* Setting hostname to nas-m25 ...
[ ok ]
* Setting terminal encoding [UTF-8] ...
[ ok ]
* Setting keyboard mode [UTF-8] ...
[ ok ]
* Loading key mappings [us] ...
[ ok ]
* Bringing up interface lo
* Caching network module dependencies
* 127.0.0.1/8 ...
[ ok ]
* Adding routes
* 127.0.0.0/8 via 127.0.0.1 ...
[ ok ]
* Mounting USB device filesystem [usbfs] ...
[ ok ]
* Activating swap devices ...
[ ok ]
* Initializing random number generator ...
[ ok ]
INIT: Entering runlevel: 3
* Mounting network filesystems ...
[ ok ]
* Starting sshd ...
[ ok ]
* Doing udev cleanups
* Starting local
[ ok ]
This is nas-m25.unknown_domain (Linux armv5tel 3.1.10-gentoo-r1) 08:45:05
nas-m25 login:
8. SSH或Console登入後, 調整Gentoo其他設定.
目前問題:
1. MAC不對, 還沒研究出如何更改.
2. 燈號, 按鈕等與GPIO有關, 還沒進一步深究.
不論如何, 吸取Debian失敗的經驗, 用在Gentoo, 達成NFS啟動, 印證自己的想法, 總有些收穫了.
離線
#14 2012-02-02 23:57:00
Re: 華碩 NAS-M25 測試
>> bootm 0x800000
## Booting image at 00800000 ...
Image Name: Linux-3.2.2
Created: 2012-02-02 15:07:24 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2113032 Bytes = 2 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.2.2 (abel@debian) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 PREEMPT Thu Feb 2 23:07:09 CST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell DB-88F6281-BP Development Board
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS0,115200 root=/dev/nfs rw nfsroot=/nas/NFSroot/RootFS/Debian/armel ip=dhcp noinitrd
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 514932k/514932k available, 9356k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xe0800000 - 0xfe800000 ( 480 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc03e231c (3945 kB)
.init : 0xc03e3000 - 0xc0401000 ( 120 kB)
.data : 0xc0402000 - 0xc04261e0 ( 145 kB)
.bss : 0xc0426204 - 0xc04b5b4c ( 575 kB)
NR_IRQS:114
sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
Console: colour dummy device 80x30
Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
Kirkwood PCIe port 0:
link down, ignoring
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 1005
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 21
ata2: SATA max UDMA/133 irq 21
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0: eth0: port 0 with MAC address 00:50:43:3c:3b:5d
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Marvell Orion EHCI
usb usb1: Manufacturer: Linux 3.2.2 ehci_hcd
usb usb1: SerialNumber: orion-ehci.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
Orion Watchdog Timer: Initial timeout 21 sec
cpuidle: using governor ladder
cpuidle: using governor menu
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
rtc-mv rtc-mv: setting system clock to 2012-02-02 15:46:28 UTC (1328197588)
ADDRCONF(NETDEV_UP): eth0: link is not ready
ata1: SATA link down (SStatus 0 SControl F300)
usb 1-1: new high-speed USB device number 2 using orion-ehci
usb 1-1: New USB device found, idVendor=0409, idProduct=005a
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
ata2: SATA link down (SStatus 0 SControl F300)
mv643xx_eth_port mv643xx_eth_port.0: eth0: link up, 1000 Mb/s, full duplex, flow control disabled
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests .., OK
IP-Config: Got DHCP answer from 192.168.1.254, my address is 192.168.1.22
IP-Config: Complete:
device=eth0, addr=192.168.1.22, mask=255.255.255.0, gw=192.168.1.254,
host=NAS-M25, domain=, nis-domain=(none),
bootserver=192.168.1.254, rootserver=192.168.1.254, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:10.
Freeing init memory: 120K
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
.udev/ already exists on the static /dev! ... (warning).
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...done.
Cleaning up ifupdown....
Setting up networking....
Loading kernel modules...done.
Activating lvm and md swap...done.
Checking file systems...fsck from util-linux-ng 2.17.2
done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Cleaning up temporary files....
Configuring network interfaces...done.
Cleaning up temporary files....
Setting kernel variables ...done.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: cron.
Debian GNU/Linux 6.0 NAS-M25 ttyS0
NAS-M25 login: root
Password:
Linux NAS-M25 3.2.2 #1 PREEMPT Thu Feb 2 23:07:09 CST 2012 armv5tel
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@NAS-M25:~#
改用核心v3.2.2, 終於搞出來了.
離線
#15 2012-02-09 20:11:51
Re: 華碩 NAS-M25 測試
話說已搞懂U-Boot TFTP啟動Gentoo, Debian後, 這次來搞由U-Boot選擇啟動硬碟內的Gentoo, Debian, Arch Linux ARM. 找顆80GB硬碟玩玩. 硬碟分割如下:
Device Boot Start End Blocks Id System
/dev/sda1 63 32129 16033+ 83 Linux
/dev/sda2 32130 156299374 78133622+ 5 Extended
/dev/sda5 32193 74300624 37134216 83 Linux
/dev/sda6 74300688 114302474 20000893+ 83 Linux
/dev/sda7 114302538 154304324 20000893+ 83 Linux
/dev/sda8 154304388 156299374 997493+ 82 Linux swap / Solaris
sda1存放核心, 格式化為ext2; sda5, 6, 7存放Gentoo, Debian, Arch Linux ARM; sda8為共用的swap.
Gentoo都是原始碼現編, 分割空間要大些.
進入U-Boot後, 若要啟動Gentoo:
>> setenv bootargs 'console=ttyS0,115200 root=/dev/sda5 noinitrd'
>> ide reset
>> ext2load ide 0:1 0x800000 /uImage
>> bootm 0x800000
由sda1載入核心後, 進入Gentoo. 同理, 指定root=/dev/sda6, 則進入Debian.
修改各自的/etc/fstab, 啟用sda8的swap.
離線
#17 2012-05-29 12:06:04
Re: 華碩 NAS-M25 測試
以下是將核心放在USB隨身碟, 開機自動由USB載入核心, 啟動二顆80GB RAID 0, 進入Arch Linux ARM.
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: DB-88F6281A-BP LE
U-Boot 1.1.4 (Oct 28 2011 - 11:04:05) Marvell version: 3.5.9
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB40
Soc: 88F6281 A0CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Addresses 87M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (87M - 7M):
Alpha : memset_ver2
Done
NAND:128 MB
Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Booting from image 0
Hit any key to stop autoboot: 0
DETECT : gpio = 0x000001c0
(Re)start USB...
USB: scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.............................................................................................................................................................................................................................................................
2648952 bytes read
....
.....................................................................................................................................................................................................
2066775 bytes read
## Booting image at 00800000 ...
Image Name: Linux-3.1.10-11-ARCH
Created: 2012-05-29 1:19:59 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2648888 Bytes = 2.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
Image Name: Linux-3.1.10-11-ARCH RAID0
Created: 2012-05-28 14:06:39 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 2066711 Bytes = 2 MB
Load Address: 01100000
Entry Point: 01100000
Verifying Checksum ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.1.10-11-ARCH (hippo@NAS-M25) (gcc version 4.7.0 20120505 (prerelease) (GCC) ) #3 PREEMPT Tue May 29 09:19:21 CST 2012
...(省略)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata1.00: HPA detected: current 156299375, native 156301488
ata1.00: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata1.00: 156299375 sectors, multi 0: LBA48 NCQ (depth 31/32)
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 156299375 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
usb 1-1.3: new high speed USB device number 3 using orion-ehci
scsi2 : usb-storage 1-1.3:1.0
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata2.00: HPA detected: current 156299375, native 156301488
ata2.00: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata2.00: 156299375 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 156299375 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 1:0:0:0: Attached scsi generic sg1 type 0
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1 sdb2
sd 1:0:0:0: [sdb] Attached SCSI disk
Freeing init memory: 144K
:: running early hook [udev]
udevd[50]: starting version 182
md: raid0 personality registered for level 0
:: running hook [udev]
:: Triggering uevents...
scsi 2:0:0:0: Direct-Access JetFlash TS4GJFV20 0.00 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdc] 8060927 512-byte logical blocks: (4.12 GB/3.84 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: Attached scsi generic sg2 type 0
sd 2:0:0:0: [sdc] Asking for cache data failed
sd 2:0:0:0: [sdc] Assuming drive cache: write through
md: bind<sdb1>
sd 2:0:0:0: [sdc] Asking for cache data failed
sd 2:0:0:0: [sdc] Assuming drive cache: write through
md: bind<sdb2>
md: bind<sda1>
bio: create slab at 1
md/raid0:md0: looking at sda1
md/raid0:md0: comparing sda1(155297792) with sda1(155297792)
md/raid0:md0: END
md/raid0:md0: ==> UNIQUE
md/raid0:md0: 1 zones
md/raid0:md0: looking at sdb1
md/raid0:md0: comparing sdb1(155297792) with sda1(155297792)
md/raid0:md0: EQUAL
md/raid0:md0: FINAL 1 zones
md/raid0:md0: done.
md/raid0:md0: md_size is 310595584 sectors.
******* md0 configuration *********
md: bind<sda2>
zone0=[sda1/sdb1/]
sdc: sdc1
zone offset=0kb device offset=0kb size=155297792kb
md/raid0:md1: looking at sda2
md/raid0:md1: comparing sda2(996352) with sda2(996352)
md/raid0:md1: END
md/raid0:md1: ==> UNIQUE
**********************************
md0: detected capacity change from 0 to 159024939008
md/raid0:md1: 1 zones
md/raid0:md1: looking at sdb2
md/raid0:md1: comparing sdb2(996352) with sda2(996352)
md/raid0:md1: EQUAL
md/raid0:md1: FINAL 1 zones
md/raid0:md1: done.
md/raid0:md1: md_size is 1992704 sectors.
******* md1 configuration *********
zone0=[sda2/sdb2/]
zone offset=0kb device offset=0kb size=996352kb
**********************************
md1: detected capacity change from 0 to 1020264448
md0: unknown partition table
md1: unknown partition table
sd 2:0:0:0: [sdc] Asking for cache data failed
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Attached SCSI removable disk
:: performing fsck on '/dev/md0'
/dev/md0: clean, 75546/9707520 files, 978551/38824448 blocks
:: mounting '/dev/md0' on real root
EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (null)
:: running cleanup hook [udev]
INIT: version 2.88 booting
> Arch Linux ARM
> http://www.archlinuxarm.org
------------------------------
:: Setting Consoles to UTF-8 mode [DONE]
:: Loading Keyboard Map: us [DONE]
:: Adjusting system time and setting kernel timezone [DONE]
...(省略)
Arch Linux 3.1.10-11-ARCH (ttyS0)
NAS-M25 login:
這意味著甚麼呢? 新版韌體的U-Boot支援USB, 核心優先由USB載入. 藉由核心啟動參數的指定, 可選擇自己想要進入的Linux OS. 簡單來說, 就是多重開機啦.
離線
#18 2012-08-23 14:52:39
Re: 華碩 NAS-M25 測試
依ALARM 3.1.10-13-ARCH config作修改, 使用CodeSourcery arm-2012.03-57交叉編譯, 產生的uImage, uInitrd已上傳Google, 直接使用ALARM釋出的核心模組即可.
1. 參閱這篇, 自行建立磁碟陣列. 亦可在PC上製作.
2. 磁碟陣列製作完成後, 下載解壓縮ALARM rootfs到對應分割區.
3. 製作uInitrd, 置於TFTP, 重新測試.
4. 測試無誤後, 可改由USB隨身碟載入核心開機, 無需動到原廠韌體.
5. 若連U-Boot設定值都不想更動:
5-1. 重新編譯uImage.
Boot options:
Default kernel command string: 核心啟動參數
Kernel command line type: Always use the default kernel command string
5-2. 重新製作uInitrd.
mkimage, load address: 0x1100000 (手邊機器是這個位址, 不確定其他NAS-M25是否都相同)
5-3. uImage, uInitrd複製到ext2格式的USB隨身碟.
6. 目前只測出Power LED, USB copy, Reset按鈕, 其餘GPIO尚未解決.
最後修改: hippo (2012-08-27 12:40:57)
離線