#1 2012-05-18 18:21:18
[Vistor NAS-34] 安裝Arch Linux ARM
對使用者而言, NAS的人機介面就是WebUI. 如果您已滿足這層薄紗, 就不必往下看了. 因為接下來的操作, 都會影響到機器保固. 請自己量力而為.
NAS或其他嵌入式設備所運行的操作系統, 幾乎都是精簡過的Linux OS. 通常是晶片製造商所提供的rootfs(Root file system). 這可減少所需佔用的flash空間大小, 降低整體成本. 但這個精簡過的Linux OS操作起來, 比之x86的Linux OS, 並不是那麼順手. 隨著材料技術的精進與flash價格的降低, 逐漸有廠商將Linux OS移植到flash. 例如: 迷你筋斗雲使用Fedora 12.
NAS使用常見的Linux OS有甚麼好處? 一言以蔽之, 套件. 而Linux OS不是只有一種, 那未免太無趣了. x86的Linux OS, 某些網友可能玩過了. 支援arm的Linux OS, 相對較少. 參考Architecture support.
以下簡述NAS-34安裝ALARM(Arch Linux ARM), 從無到有的過程. 領悟之後, 也可套用到其他NAS, 安裝自己喜愛的Linux OS.
事前準備:
1. 理解Linux開機流程. 參考文末連結網址.
2. 建立交叉編譯環境. 視自己使用的Linux OS而有所不同.
3. TFTP server.
4. NFS server. (亦可省略)
5. console線.
其中, TFTP server與NFS server可拿Tomato路由器來用即可.
1. 核心, 驅動硬體. 頭痛的萬惡之源. 以ALARM來說, 目前使用v3.1.10. 到學術網路下載核心原始碼吧.
$ aria2c ftp://ftp.isu.edu.tw/Linux/kernel/linux-3.1.10.tar.xz
$ tar -xJf linux-3.1.10.tar.xz -C Source
$ sudo ln -s /home/使用者/Source/linux-3.1.10 /usr/src/linux-3.1.10
編譯環境. 以Arch Linux來說,
# pacman -S base-devel
交叉編譯器, 先拿CodeSourcery來用. 也可檢查自己的Linux, 是否有現成的交叉編譯器.
$ tar -xjf arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C Toolchain
因U-Boot使用uImage, 需要mkimage程式. 由AUR撈吧. 視CPU, 先自行修改/etc/makepkg.conf
$ cd AUR/uboot-mkimage
$ aria2c https://aur.archlinux.org/packages/ub/uboot-mkimage/uboot-mkimage.tar.gz
$ aria2c https://aur.archlinux.org/packages/ub/uboot-mkimage/PKGBUILD
$ makepkg -s
$ makepkg -i
由附檔nas-34.x86.sh, 編譯核心.
$ ./nas-34.x86.sh
在選單中, 視需要挑選. 不清楚之處, 查閱說明.
機板型號, 只選Marvell Orion-NAS Reference Design
若不想動到flash, 取消Memory Technology Device (MTD) support
若要使用NFS server上的rootfs, 將NFS client support編入核心.
編譯成功後, 將/usr/src/linux-3.1.10/arch/arm/boot/uImage, 上傳到TFTP server.
2. rootfs, 也就是整個Linux OS. ALARM, Gentoo, Fedora, OpenWrt都有現成的rootfs, Debian可由debootstrap製作.
測試初期, rootfs放在NFS server比較方便. 但因區網速度的關係, 執行速度較慢. 若rootfs放在硬碟, 執行速度快. 但測試期間, 硬碟反覆抽拔, 也顯得費事. USB硬碟/隨身碟則居於二者之間. 所以, 端看自己的選擇.
$ aria2c http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
$ sudo tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /mnt/nfs
3. 接上console線, 進入U-Boot.
>> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.1.1:/nas/alarm ip=dhcp noinitrd'
>> dhcp
>> tftpboot 800000 uImage
>> bootm 800000
U-Boot指令, 輸入help, 自行參考.
bootargs設定值, 參考Linux原始碼內的文件說明, Documentation/filesystems/nfs/nfsroot.txt
開機所顯示的訊息, 可與原廠韌體的開機訊息比對, 進一步調校核心.
好了, 如果編譯的核心沒出錯, 終端機則等候使用者登入. root的密碼也是root. 進入ALARM後, 再自行修改其他設定值.
參考:
1. 維基百科, Linux startup process
2. 鳥哥, 開機流程, 模組管理與 Loader
3. Arch Linux, Arch Boot Process
4. IBM, Inside the Linux boot process
附件:
nas-34.x86.sh, 大小: 262 bytes, 下載: 4
離線
#2 2012-05-19 00:09:50
Re: [Vistor NAS-34] 安裝Arch Linux ARM
有了Linux OS後, 接下來的操作, 都可以在NAS上直接執行. 當然, 您也可以繼續在x86作交叉編譯.
同樣以ALARM舉例.
先更新系統.
# pacman -Syu
下載Linux v3.1.10核心原始碼, 解壓縮, 先不建立連結.
移除linux-headers, 建立連結, 再安裝linux-headers, 套用ALARM的Linux核心原始碼修正檔, 並備份ALARM預設的核心設定檔.
# pacman -R linux-headers
# cd /usr/src
# ln -s /home/使用者/Source/linux-3.1.10 linux-3.1.10-10-ARCH
# pacman -Sf linux-headers
# cd /usr/src/linux-3.1.10-10-ARCH
# cp .config linux-3.1.10-10-ARCH.config
# chown -R 使用者 * .config .tmp_versions
更正: 仔細想想後, 以上指令好像不太正確. ABS才是正規作法.
linux-3.1.10-10-ARCH, 隨日後更新系統, 自行變更.
如上篇, 建立編譯環境.
因在原生機器跑gcc, 不需要再安裝交叉編譯器了.
同樣, 需要mkimage. ALARM有現成套件, 不需要由AUR重建套件.
# pacman -S uboot-mkimage
以上, 準備就緒.
參考Orion NAS customisation guide, 準備修改Linux原始碼. 目的是為了機板型號, MTD, GPIO等. 但GPIO這部分, 我還沒搞定.
上篇所提及的機板型號, 並不是Linux原始碼所支援. 如果您注意原廠韌體的console開機訊息:
_ _ _ _
| \ | | | | (_)
| \| | ___| |_ _ __ ___ _ __ ___ __
| . ` |/ _ \ __| '__/ _ \| '_ \| \ \/ /
| |\ | __/ |_| | | (_) | | | | |> <
|_| \_|\___|\__|_| \___/|_| |_|_/_/\_\
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** LOADER **
** MARVELL BOARD: NTX-88F5182-NH233 LE
ARM機板的型號, 登錄在The ARM Linux Project的Machines. Netronix NH-233也早就登錄在內.
先更新機板型號資料檔
$ cd /usr/src/linux-3.1.10-10-ARCH/arch/arm/tools
$ mv mach-types mach-types.orig
$ wget -O mach-types http://www.arm.linux.org.uk/developer/machines/download.php
arch/arm/mach-orion5x目錄內, 含括Linux所支援的Orion機器的相關程式碼, 但沒有NAS-34所使用的NH-233型號, 得手動建立.
Orion NAS customisation guide說, 複製現有的"機型-setup.c"來修改. 自行找個機板零組件與NAS-34相似的機型, 將該檔複製為nh233-setup.c
這個nh233-setup.c描述硬體設定, MTD, RTC, GPIO, PHY, SATA等. 因無原廠釋出的原始碼可供參考, 只能由原廠韌體開機訊息及參考其他-setup.c, 盡自己所能, 將nh233-setup.c描述完整.
1. GPIO. 可控管燈號, 按鈕, 電源, 風扇等, 但各個機型有各自的設計, 腳位定義都不相同. 無原始碼參考, 只能猜測, 比較麻煩.
2. NOR: Samsung K8D6316UBM PI07
MTD分割表, 參照開機訊息與/proc/mtd來設定.
Creating 5 MTD partitions on "phys_mapped_flash":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x00770000 : "File-System"
0x00770000-0x00780000 : "System-config"
0x00780000-0x00790000 : "bootloader-config"
0x00790000-0x00800000 : "Boot-loader"
$ cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00010000 "Kernel"
mtd1: 00570000 00010000 "File-System"
mtd2: 00010000 00010000 "System-config"
mtd3: 00010000 00010000 "bootloader-config"
mtd4: 00070000 00010000 "Boot-loader"
3. RTC: Philips PCF8563
RTC: character device (/dev/rtc) driver v1.01 (06/08/2007) is registered
PCF8563 Real-Time Clock Driver, Revision: 0.99
I2C: character device (/dev/i2c0) driver v1.00 (11/15/2006) is registered
AT24C02 I2C Driver, $Revision: 1.0 $
參考HP的mv2120-setup.c內__initdata mv2120_i2c_rtc函式, 仍無法與RTC通訊, 取得日期時間值.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
若ALARM開機後即執行NTP網路校時, RTC就不是那麼重要了. 只不過會在日誌前段, 使用1970年作紀錄.
4. PHY: Marvell 88E1118
5. SATA: Marvell 88SM4140-LAD
修改nh233-setup.c完畢後, 將NH-233添加在核心編譯選單中.
$ mv Kconfig Kconfig.orig
$ cp Kconfig.orig Kconfig
$ nano Kconfig
...
config MACH_NH233
bool "Netronix NH-233"
help
Netronix NH-233, Vistor NAS-34
$ mv Makefile Makefile.orig
$ cp Makefile.orig Makefile
$ nano Makefile
...
obj-$(CONFIG_MACH_NH233) += nh233-setup.o
好了, 有了之前編譯核心的經驗, 這次應該駕輕就熟. 同樣由附檔nas-34.sh編譯核心與核心模組.
$ ./nas-34.sh
General setup:
Local version: -Orion
Embedded system, 選取.
System Type:
ARM system type: Marvell Orion
Orion Implementations: Netronix NH-233
Accept early Feroceon cores with an ARM926 ID, 選取.
Floating point emulation:
VFP-format floating point maths, 選取.
其他選項, 依需要挑選.
在NAS-34上面直接編譯, 與原生Linux OS相容性最好. 但因CPU與RAM的關係, 必須經過漫長等候, 才能取得結果.
睡前讓它跑, 醒來查成果. 途中若出槌, 除錯再重來.
編譯後的uImage, 同樣上傳到TFTP server. 進入U-Boot, 下指令, 載入核心.
...
Machine: Netronix NH-233
...
若搞定核心, 改將rootfs放在SATA試試.
核心啟動參數設定, 參閱Documentation/kernel-parameters.txt
若核心與核心模組已達成您的需求, 將核心設定檔.config, 核心uImage, 核心模組目錄, 三者作備份.
若您偏好其他Linux OS, 例如: Debian, 也是建議使用該Linux OS釋出的核心原始碼作編譯, 才能保持最佳的套件相容, 避免日後困擾.
最後修改: hippo (2012-07-28 03:09:52)
附件:
nas-34.sh, 大小: 198 bytes, 下載: 3
離線
#3 2012-05-19 12:04:16
Re: [Vistor NAS-34] 安裝Arch Linux ARM
接下來, 試試將rootfs放在RAID, 啟動ALARM.
因NAS-34共可接五顆SATA硬碟, 若不玩玩RIAD或LVM, 未免可惜. 內建U-Boot不支援由USB載入核心. 若由TFTP載入核心, 則可使用到全部硬碟所建立的RAID. 或者, 第一顆硬碟切一小塊分割區, 存放uImage+initrd. 日後若決定捨棄原廠韌體, 則可將uImage+initrd塞入8MB flash.
以下簡述1+3, 第一顆硬碟分割10MB, 格式化ext2, 存放uImage+initrd. 其餘三顆硬碟建立RAID 0, 運行ALARM.
1. 分割/dev/sdb, sdc, sdd.
因我想將swap也放在RAID 0, 所以每顆硬碟各分割二個分割磁區. 第二分割區大小為85MB(RAM 128MB * 2 / 3 HDs)
Type: FD Linux raid autodetect
2. 建立/dev/md0, md1
# modprobe raid0
# mdadm -C /dev/md0 -l 0 -n 3 --homehost=NAS-34 /dev/sd[bcd]1
# mdadm -C /dev/md1 -l 0 -n 3 --homehost=NAS-34 /dev/sd[bcd]2
3. 格式化/dev/md0, md1
# mkfs.ext4 /dev/md0
# mkswap -f /dev/md1
4. 安裝ALARM rootfs
# mount /dev/md0 /mnt/raid
# tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /mnt/raid
5. 安裝之前編譯的核心模組
# mkdir /mnt/raid/lib/modules/3.1.10-10-Orion
# cp -R /lib/modules/3.1.10-10-Orion/* /mnt/raid/lib/modules/3.1.10-10-Orion
6. 編輯mdadm.conf
# nano /mnt/raid/etc/mdadm.conf
DEVICE /dev/sd[bcd]1
DEVICE /dev/sd[bcd]2
ARRAY /dev/md0 devices=/dev/sdb1,/dev/sdc1,/dev/sdd1 name=NAS-34:0
ARRAY /dev/md1 devices=/dev/sdb2,/dev/sdc2,/dev/sdd2 name=NAS-34:1
7. 編輯fstab
# nano /mnt/raid/etc/fstab
/dev/md0 / ext4 defaults 0 1
/dev/md1 none swap sw 0 0
8. 使用mkinitcpio, 建立initrd.
$ nano nas-34.conf
MODULES="md_mod raid0"
HOOKS="base udev autodetect sata mdadm_udev filesystems fsck"
$ mkinitcpio -c nas-34.conf -g initrd.img
9. 將編譯的uImage, initrd.img, 複製到/dev/sda1
好了, 重新開機, 進入U-Boot.
>> setenv bootargs 'console=ttyS0,115200 root=/dev/md0 md=0,/dev/sdb1,/dev/sdc1,/dev/sdd1 rootfstype=ext4 initrd=0xb00000,8M'
>> ext2load ide 0:1 0x800000 /uImage
>> ext2load ide 0:1 0xb00000 /initrd.img
>> bootm 0x800000
核心啟動參數, 參閱Documentation/md.txt, initrd.txt
至此, 您應該能體會到我所說, 頭痛的萬惡之源. 當然啦, 也有現成的核心與核心模組可用. 不過, 仍要經過些許處理後, 才能將NAS-34順利開機, 進入ALARM. 有興趣的網友, 請自行測試, 我就不囉唆了.
離線
#4 2012-05-21 11:27:39
Re: [Vistor NAS-34] 安裝Arch Linux ARM
感謝分享. 這樣就幫助不小
配上 PlugUI https://github.com/archlinuxarm/PlugUI
PlugUI 2 是 ARM Arch Linux ARM 用的Web GUI
就可成為完整品
離線
#5 2012-05-22 11:08:26
Re: [Vistor NAS-34] 安裝Arch Linux ARM
補充說明:
1. 核心, 是進入Linux OS前的硬體驅動, 得先傷腦筋準備.
2. U-Boot使用特定格式的uImage, 由mkimage製作.
3. ALARM armv5te釋出的uImage, 僅支援某些使用Marvell Kirkwood的機型. NAS-34使用Marvell Orion, 不能直接拿釋出的uImage來用, 要自行編譯uImage.
4. 編譯Orion核心的設定檔, 在Linux原始碼內, arch/arm/configs/orion5x_defconfig. 在menuconfig視需要挑選. 編譯後的核心要能驅動PHY, SATA, USB.
5. Orion機板型號相關檔案, 位於arch/arm/mach-orion5x/
6. 編譯後的uImage, 放在TFTP server或SATA1的分割區, 供U-Boot載入.
7. 編譯後的核心模組, 放在/lib/modules/核心版本/
8. rootfs, 解壓縮到NFS server, 或SATA, 或RAID. 若用RAID, 要搭配initrd.
9. 一切測試妥當後, 若要修改U-Boot設定, 先printenv, 將原始設定備份.
離線
#6 2012-06-21 01:49:22
Re: [Vistor NAS-34] 安裝Arch Linux ARM
抱歉 久等了
簡單版的Kernel make 文章在這..
http://www.osslab.com.tw/Hardware/Open_ … m_firmware
我還會修改
另外h大JLink玩的怎樣了?
離線
#8 2012-07-08 23:04:17
Re: [Vistor NAS-34] 安裝Arch Linux ARM
以下簡述由TFTP載入核心, 進入NFS server內的Arch Linux ARM. 也是使用Tomato作TFTP, NFS server.
若要使用NFS server內的Linux rootfs, 核心要支援NFS client. 有二種方式:
1. 若編譯為核心模組, 要搭配initrd.
2. 若編入核心, 要選取Root file system on NFS.
使用第二種方式比較簡單, 如同這篇, 就不說明了. 以下使用第一種方式, 搭配initrd舉例.
交叉編譯後, 除核心uImage之外, 還要由核心模組製造initrd, 支援NFS client. initrd製作過程與這篇雷同.
1. 先將核心模組複製到運行Arch Linux ARM(armv5te)的機器.
2. 安裝mkinitcpio-nfs-utils套件.
# pacman -S mkinitcpio-nfs-utils
3. 設定檔
$ nano nfs.conf
MODULES="sunrpc lockd auth_rpcgss nfs"
HOOKS="base udev autodetect net"
4. 製作
$ mkinitcpio -c nfs.conf -k 3.1.10-11-Orion -g initrd-3.1.10-11-Orion.img
==> Starting build: 3.1.10-11-Orion
-> Parsing hook: [base]
-> Parsing hook: [udev]
-> Parsing hook: [autodetect]
-> Parsing hook: [net]
==> Generating module dependencies
==> Creating gzip initcpio image: initrd-3.1.10-11-Orion.img
==> Image generation successful
5. 檢查
$ lsinitcpio initrd-3.1.10-11-Orion.img
同樣, 將uImage, initrd-3.1.10-11-Orion.img上傳到TFTP server.
ArchLinuxARM-armv5te-latest.tar.gz解壓縮到NFS server.
進入U-Boot:
>> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.1.1:/nas/alarm ip=dhcp initrd=0xb00000,5M'
>> dhcp
>> tftpboot 800000 uImage
>> tftpboot b00000 initrd-3.1.10-11-Orion.img
>> bootm 800000
或另一種方式, 由mkimage將initrd進一步加工.
$ mkimage -A arm -O linux -T ramdisk -a 0xb00000 -n "Linux-3.1.10-11-Orion NFS" -d initrd-3.1.10-11-Orion.img uInitrd
Image Name: Linux-3.1.10-11-Orion NFS
Created: Sun Jul 8 18:06:43 2012
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 1914558 Bytes = 1869.69 kB = 1.83 MB
Load Address: 0x00B00000
Entry Point: 0x00B00000
>> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.1.1:/nas/alarm ip=dhcp'
>> dhcp
>> tftpboot 800000 uImage
>> tftpboot b00000 uInitrd
>> bootm 800000 b00000
離線
#9 2012-07-10 23:26:27
Re: [Vistor NAS-34] 安裝Arch Linux ARM
以下簡述將編譯的核心寫入flash memory, 置換原廠韌體. 此步驟風險較大, 可能導致無法開機. 請自行斟酌能力, 再決定是否進行. 覆寫前, 請先備份.
在這篇提過1+3作RAID0, 還不符合我想要的四顆硬碟作陣列. 雖然搭配TFTP可達成, 但還是麻煩. 在U-Boot不支援USB boot的情況下, 只得將核心寫入flash memory, 開機由flash memory載入核心.
要將核心寫入flash memory, 雖可由U-Boot操作. 不過, 我選擇使用mtd-utils套件. 首先要考慮的是MTD分割空間. 在這篇有提到MTD分割表. 原分割空間並不符合我的核心大小, 所以修改nh233-setup.c, 重新分配MTD後, 再重新編譯核心.
# cat /proc/mtd
dev: size erasesize name
mtd0: 00260000 00010000 "uImage"
mtd1: 00220000 00010000 "uInitrd"
mtd2: 00300000 00010000 "UBIFS"
mtd3: 00010000 00010000 "U-BootEnv"
mtd4: 00070000 00010000 "U-Boot"
1. 安裝mtd-utils.
# pacman -S mtd-utils
2. MTD資訊.
# mtdinfo -a
Count of MTD devices: 5
Present MTD devices: mtd0, mtd1, mtd2, mtd3, mtd4
Sysfs interface supported: yes
mtd0
Name: uImage
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 38 (2490368 bytes, 2.4 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:0
Bad blocks are allowed: false
Device is writable: true
mtd1
Name: uInitrd
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 34 (2228224 bytes, 2.1 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:2
Bad blocks are allowed: false
Device is writable: true
mtd2
Name: UBIFS
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 48 (3145728 bytes, 3.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:4
Bad blocks are allowed: false
Device is writable: true
mtd3
Name: U-BootEnv
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 1 (65536 bytes, 64.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:6
Bad blocks are allowed: false
Device is writable: true
mtd4
Name: U-Boot
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 7 (458752 bytes, 448.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:8
Bad blocks are allowed: false
Device is writable: false
3. 寫入mtd1, mtd2.
# flashcp uImage /dev/mtd0
# flashcp uInitrd /dev/mtd1
4. 重新開機, 進入U-Boot.
>> cp.b ff800000 800000 260000
>> cp.b ffa60000 b00000 220000
>> bootm 800000 b00000
測試無誤後, 再將U-Boot變數值儲存.
5. 重新開機
_ _ _ _
| \ | | | | (_)
| \| | ___| |_ _ __ ___ _ __ ___ __
| . ` |/ _ \ __| '__/ _ \| '_ \| \ \/ /
| |\ | __/ |_| | | (_) | | | | |> <
|_| \_|\___|\__|_| \___/|_| |_|_/_/\_\
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** LOADER **
** MARVELL BOARD: NTX-88F5182-NH233 LE
U-Boot 1.1.1 (Jul 21 2007 - 13:08:28) Marvell version: 1.10.8
DRAM CS[0] base 0x00000000 size 128MB
DRAM Total size 128MB
mv_flash.c: [8192kB@ff800000]
Protect flash from 0xFFF90000 ~ 0xFFFFFFFF
Flash: 8 MB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 500Mhz
Orion 1 streaming disabled
SysClock = 166Mhz , TClock = 166Mhz
USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net: egiga0 [PRIME]
Using 88E1118 phy
Marvell Serial ATA Adapter
Intergrated Sata device found
Device 0: OK
Model: ST380811AS Firm: 3.AAE Ser#: 5PS1W259
Type: Hard Disk
Supports 48-bit addressing
Capacity: 76319.0 MB = 74.5 GB (156301488 x 512)
hit any key to switch tftp boot.
Hit any key to stop autoboot: 0
bootcmd:[run myRAID]
Hit any key to stop autoboot: 0
src base_address=00000000, size = d
src address=FF800000
dest address=00800000
count =00260000
src base_address=00000000, size = d
src address=FFA60000
dest address=00B00000
count =00220000
## Booting image at 00800000 ...
Image Name: Linux-3.1.10-11-Orion
Created: 2012-07-12 17:17:56 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2374224 Bytes = 2.3 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00b00000 ...
Image Name: Linux-3.1.10-11-Orion RAID0
Created: 2012-07-13 1:21:11 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 2113487 Bytes = 2 MB
Load Address: 00b00000
Entry Point: 00b00000
Verifying Checksum ... OK
## Transferring control to Linux (at address 00008000) ...
Starting kernel ...
arg:console=ttyS0,115200 root=/dev/md0 md=0,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1 rootfstype=ext4
Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.1.10-11-Orion (abel@NAS-M25) (gcc version 4.7.1 (GCC) ) #2 PREEMPT Fri Jul 13 01:17:20 CST 2012
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Vistor NAS-34
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyS0,115200 root=/dev/md0 md=0,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1 rootfstype=ext4
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
allocated 524288 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 128MB = 128MB total
Memory: 121792k/121792k available, 9280k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc8800000 - 0xfd800000 ( 848 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0453924 (4399 kB)
.init : 0xc0454000 - 0xc0476000 ( 136 kB)
.data : 0xc0476000 - 0xc04a45f0 ( 186 kB)
.bss : 0xc04a4614 - 0xc0568a6c ( 786 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:64
sched_clock: 32 bits at 166MHz, resolution 5ns, wraps every 25769ms
Console: colour dummy device 80x30
Calibrating delay loop... 331.77 BogoMIPS (lpj=1658880)
pid_max: default: 32768 minimum: 301
Security Framework initialized
AppArmor: AppArmor disabled by boot time parameter
Mount-cache hash table entries: 512
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
NET: Registered protocol family 16
Orion ID: MV88F5182-A2. TCLK=166666667.
Applying Orion-1/Orion-NAS PCIe config read transaction workaround
PCI: bus0: Fast back to back transfers disabled
PCI: bus1: Fast back to back transfers enabled
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
FS-Cache: Loaded
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
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
Unpacking initramfs...
Freeing initrd memory: 2064K
audit: initializing netlink socket (disabled)
type=2000 audit(0.630:1): initialized
msgmni has been set to 241
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
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 mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) 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 29
ata2: SATA max UDMA/133 irq 29
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:08:54:xx:xx:xx
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
GRE over IPv4 demultiplexor driver
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: not present
registered taskstats version 1
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.15: Port Multiplier 1.2, 0x11ab:0x4140 r193, 4 ports, feat 0x5/0x1f
ata1.00: hard resetting link
ata1.01: hard resetting link
ata1.02: hard resetting link
ata1.03: hard resetting link
ata1.00: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata1.00: 156301488 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
ata1.01: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata1.01: 156301488 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.01: configured for UDMA/133
ata1.02: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata1.02: 156301488 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.02: configured for UDMA/133
ata1.03: ATA-7: ST380811AS, 3.AAE, max UDMA/133
ata1.03: 156301488 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.03: configured for UDMA/133
ata1: EH complete
scsi 0:0:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
scsi 0:1:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
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
scsi 0:2:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
sd 0:1:0:0: [sdb] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:1:0:0: [sdb] Write Protect is off
sd 0:2:0:0: [sdc] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:1:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
scsi 0:3:0:0: Direct-Access ATA ST380811AS 3.AA PQ: 0 ANSI: 5
sd 0:2:0:0: [sdc] Write Protect is off
sd 0:2:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:3:0:0: [sdd] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:3:0:0: [sdd] Write Protect is off
sd 0:3:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
sdb: sdb1 sdb2
sdc: sdc1 sdc2
sd 0:2:0:0: [sdc] Attached SCSI disk
sd 0:1:0:0: [sdb] Attached SCSI disk
sdd: sdd1 sdd2
sd 0:3:0:0: [sdd] Attached SCSI disk
ata2: SATA link down (SStatus 0 SControl 300)
Freeing init memory: 136K
:: running early hook [udev]
udevd[47]: starting version 185
md: raid0 personality registered for level 0
:: running hook [udev]
:: Triggering uevents...
md: bind<sda2>
md: bind<sdb2>
md: bind<sdb1>
md: bind<sda1>
md: bind<sdc1>
md: bind<sdd1>
bio: create slab at 1
md/raid0:md0: looking at sdd1
md/raid0:md0: comparing sdd1(156168192) with sdd1(156168192)
md/raid0:md0: END
md/raid0:md0: ==> UNIQUE
md/raid0:md0: 1 zones
md/raid0:md0: looking at sdc1
md/raid0:md0: comparing sdc1(156168192) with sdd1(156168192)
md/raid0:md0: EQUAL
md/raid0:md0: looking at sda1
md/raid0:md0: comparing sda1(156168192) with sdd1(156168192)
md/raid0:md0: EQUAL
md/raid0:md0: looking at sdb1
md/raid0:md0: comparing sdb1(156168192) with sdd1(156168192)
md/raid0:md0: EQUAL
md/raid0:md0: FINAL 1 zones
md/raid0:md0: done.
md/raid0:md0: md_size is 624672768 sectors.
md: bind<sdd2>
******* md0 configuration *********
zone0=[sda1/sdb1/sdc1/sdd1/]
zone offset=0kb device offset=0kb size=312336384kb
**********************************
md0: detected capacity change from 0 to 319832457216
md0: unknown partition table
md: bind<sdc2>
md/raid0:md1: looking at sdc2
md/raid0:md1: comparing sdc2(129024) with sdc2(129024)
md/raid0:md1: END
md/raid0:md1: ==> UNIQUE
md/raid0:md1: 1 zones
md/raid0:md1: looking at sdd2
md/raid0:md1: comparing sdd2(129024) with sdc2(129024)
md/raid0:md1: EQUAL
md/raid0:md1: looking at sdb2
md/raid0:md1: comparing sdb2(129024) with sdc2(129024)
md/raid0:md1: EQUAL
md/raid0:md1: looking at sda2
md/raid0:md1: comparing sda2(129024) with sdc2(129024)
md/raid0:md1: EQUAL
md/raid0:md1: FINAL 1 zones
md/raid0:md1: done.
md/raid0:md1: md_size is 516096 sectors.
******* md1 configuration *********
zone0=[sda2/sdb2/sdc2/sdd2/]
zone offset=0kb device offset=0kb size=258048kb
**********************************
md1: detected capacity change from 0 to 264241152
md1: unknown partition table
:: performing fsck on '/dev/md0'
/dev/md0: clean, 35447/19521536 files, 1406322/78084096 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
------------------------------
:: Adjusting system time and setting kernel timezone [DONE]
:: Starting UDev Daemon [DONE]
:: Triggering UDev uevents udevd[126]: starting version 185
[DONE]
:: Loading User-specified Modules [BUSY] 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.
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 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
physmap platform flash device: 00800000 at ff800000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank. Manufacturer ID 0x0000ec Chip ID 0x0000e2
Amd/Fujitsu Extended Query Table at 0x0040
FS-Cache: Netfs 'nfs' registered for caching
Fixing Samsung's Amd/Fujitsu Extended Query version to 1.0
Inserted module 'nfs' Amd/Fujitsu Extended Query version 1.0.
[DONE]
:: Waiting for UDev uevents to be processed number of CFI chips: 1
[BUSY] Using physmap partition information
Creating 5 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000260000 : "uImage"
0x000000260000-0x000000480000 : "uInitrd"
0x000000480000-0x000000780000 : "UBIFS"
0x000000780000-0x000000790000 : "U-BootEnv"
0x000000790000-0x000000800000 : "U-Boot"
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
[DONE]
:: Configuring Virtual Consoles [DONE]
:: Bringing up loopback interface [DONE]
:: Unlocking encrypted volumes: [DONE]
:: Checking Filesystems [DONE]
:: Remounting Root [BUSY] EXT4-fs (md0): re-mounted. Opts: user_xattr,barrier=1,stripe=512,data=ordered
[DONE]
:: Mounting Local Filesystems [DONE]
:: Activating Swap [BUSY] Adding 258044k swap on /dev/md1. Priority:-1 extents:1 across:258044k
[DONE]
:: Configuring Time Zone [DONE]
:: Initializing Random Seed [DONE]
:: Removing Leftover Files [DONE]
:: Setting Hostname: NAS-34 [DONE]
:: Saving dmesg Log [DONE]
INIT: Entering runlevel: 3
:: Starting Syslog-NG [DONE]
:: Starting Network [BUSY] mv643xx_eth_port mv643xx_eth_port.0: eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[DONE]
:: Starting OpenNTPD [DONE]
:: Mounting Network Filesystems [DONE]
:: Starting crond daemon [DONE]
:: Starting Secure Shell Daemon [BUSY] NET: Registered protocol family 10
[DONE]
Arch Linux 3.1.10-11-Orion (ttyS0)
NAS-34 login:
若要先行測試mtd-utils套件內其他指令, 可在x86用mtdram核心模組, 摹擬NOR flash. 請自行參考mtd-utils相關文件.
離線
#10 2012-07-11 13:57:19
Re: [Vistor NAS-34] 安裝Arch Linux ARM
使用uboot 升級 uboot, kernel ,rootfs 與一些基本指令
可以參考
http://www.osslab.com.tw/Hardware/Open_ … Nas/U-boot
有勞hippo大多多方享
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
0 | 8380 | 2013-04-28 21:51:47 作者 hippo | |
|
24 | 86166 | 2013-04-24 13:25:44 作者 hannahmo |
[Vistor NAS-34] 請問要如何才能修改FLASH ROM上的資料 作者 halhalhsu
|
2 | 11429 | 2013-01-09 00:41:44 作者 halhalhsu |
[TonidoPlug2] Arch Linux ARM 測試 作者 hippo
|
1 | 13636 | 2012-08-07 22:15:59 作者 hippo |
|
80 | 275306 | 2011-06-03 22:35:44 作者 amingo |