Hi there!
I'm trying to install OpenWrt on a Netgear Stora low cost NAS. As far as I know, this is still untested.
For now, I've gained access to the bootloader through the serial console:
Bootloader (Marvell U-Boot)
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: RD-88F6281A LE
U-Boot 1.1.4 (May 30 2011 - 09:26:20) Marvell version: 3.4.15
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE60
Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 64MB
DRAM CS[1] base 0x04000000 size 64MB
DRAM Total size 128MB 16bit width
Flash: 0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
CRC in Flash: 54317363, Calculated CRC: 54317363
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
Module 0 is RGMII
Module 1 is TDM
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0, egiga1 [PRIME]
Hit any key to stop autoboot: 0
Marvell>>
Marvell>>
U-Boot printenv
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
CASset=min
MALLOC_len=1
ethprime=egiga1
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=00:50:43:00:02:02
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loidaddr=0x02000000
autoload=no
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
console=console=ttyS0,115200
mainlineLiNux=no
fw_up=disable
bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
ethaddr=E0:46:9A:84:28:BD
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
hddPowerCtrl=no
loadaddr=0x02000000
enaAutoRecovery=no
ethact=egiga1
Environment size: 1257/131068 bytes
OS boot (HipServ OS d'Axentra - Linux 2.6.22 based)
Marvell>> boot
NAND read: device 0 offset 0x100000, size 0x300000
Bad block at 0x300000 in erase block from 0x300000 will be skipped
Reading data from 0x41f800 -- 100% complete.
3145728 bytes read: OK
## Booting image at 00800000 ...
Image Name: Linux-2.6.22.18-Netgear
Created: 2011-05-26 15:05:01 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2789276 Bytes = 2.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux............................................................................................................................................................ done, booting the kernel.
Linux version 2.6.22.18-Netgear (mostafah@es5x86.axentra.com) (gcc version 4.2.1) #11 Thu May 26 11:04:55 EDT 2011
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 32512
Kernel command line: console=ttyS0,115200 ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB 64MB 0MB 0MB = 128MB total
Memory: 124800KB available (4048K code, 268K data, 692K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 64MB
SDRAM_CS1 ....base 04000000, size 64MB
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size 1MB
INTER_REGS ....base f1000000, size 1MB
NFLASH_CS ....base fa000000, size 2MB
SPI_CS ....base f4000000, size 16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size 2MB
Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21)-- RD-88F6281A Soc: 88F6281 A1 LE
Detected Tclk 200000000 and SysClk 333333333
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c063d600
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
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
RTC has been updated!!!
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
o RAID 5 Xor calculation
o kernel memcpy
o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c000eed0)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
loop: module loaded
Loading Marvell Ethernet Driver:
o Cached descriptors in DRAM
o DRAM SW cache-coherency
o Multi RX Queue support - 4 RX queues
o Multi TX Queue support - 2 TX Queues
o TCP segmentation offload enabled
o Receive checksum offload enabled
o Transmit checksum offload enabled
o Network Fast Processing (Routing) supported
o Network Fast Processing (NAT) supported
o Driver ERROR statistics enabled
o Driver INFO statistics enabled
o Proc tool API enabled
o Gateway support enabled
o Using Marvell Header Mode
o L2 IGMP support
o Rx descripors: q0=128 q1=128 q2=128 q3=128
o Tx descripors: q0=532 q1=532
o Loading network interface(s):
o eth0, ifindex = 1, GbE port = 0
o eth1, ifindex = 2, GbE port = 1
mvFpRuleDb (c7978000): 1024 entries, 4096 bytes
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
Integrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 24 at 0x00300000
Bad eraseblock 769 at 0x06020000
Bad eraseblock 901 at 0x070a0000
Bad eraseblock 1024 at 0x08000000
Bad eraseblock 1117 at 0x08ba0000
Bad eraseblock 1576 at 0x0c500000
Bad eraseblock 1826 at 0x0e440000
Using static partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00700000 : "uImage"
0x00700000-0x10000000 : "root"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd2 to ubi0
UBI: MTD device name: "root"
UBI: MTD device size: 249 MiB
UBI: number of good PEBs: 1986
UBI: number of bad PEBs: 6
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 1986
UBI: number of PEBs reserved for bad PEB handling: 38
UBI: max/mean erase counter: 1/0
UBI: background thread "ubi_bgt0d" started, PID 285
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int32x1 81 MB/s
raid6: int32x2 95 MB/s
raid6: int32x4 102 MB/s
raid6: int32x8 92 MB/s
raid6: using algorithm int32x4 (102 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
arm4regs : 903.600 MB/sec
8regs : 629.200 MB/sec
32regs : 750.000 MB/sec
raid5: using function: arm4regs (903.600 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 8192 max)
mvFpNatDb (c7849000): 1024 entries, 4096 bytes
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NFP (fdb) init 256 entries, 1024 bytes
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Freeing init memory: 692K
Reset button not pressed
Proceeding normally.
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 239857664 bytes (234236 KiB, 228 MiB, 1889 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: 4 (latest is 4)
UBIFS: default compressor: zlib
UBIFS: reserved for root: 0 bytes (0 KiB)
INIT: version 2.86 booting
Welcome to HipServ
Press 'I' to enter interactive startup.
System clock set to hardware clock.
Setting clock : Sat Oct 15 15:52:49 GMT-2 2011 [ OK ]
Starting udev: [ OK ]
Setting hostname axentraserver.localdomain: [ OK ]
Setting up Logical Volume Management: No volume groups found
[ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
Mounting local filesystems: mount: sysfs already mounted or /sys busy
mount: according to mtab, /sys is already mounted on /sys
[FAILED]
Enabling /etc/fstab swaps: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
HipServ startup:Alarm cleared.
[FAILED]
Starting netgear-lifecycle:[ OK ]
Starting reset: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
/etc/init.d/iptables: line 42: /etc/sysconfig/networking/oe-profiles/default/ifcfg-eth0: No such file or directory
FATAL: Module ip_conntrack not found.
FATAL: Module iptable_nat not found.
FATAL: Module xt_tcpudp not found.
Flushing all current rules and user defined chains: [ OK ]
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules:
[ OK ]
[ OK ]
check_igd.pl: no process killed
[ OK ] igd-daemon:[ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
Starting locator:[ OK ]
Starting system message bus: [ OK ]
Starting sshd: [ OK ]
Starting cups: [ OK ]
Starting xinetd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
Starting backupagent: [ OK ]
Starting httpd: [ OK ]
Starting appserver: [ OK ]
Starting crond: [ OK ]
Starting AppleTalk services:
Starting cnid_metad:[ OK ]
Starting afpd:[ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
Starting OEone System Proxy: SPD starting....log level=1, uid=0
[ OK ]
Starting access-patrol:[ OK ]
Starting Avahi daemon... [ OK ]
Starting minidlna.init: Starting /usr/sbin/minidlna ... Media directory not accessible! [/home/0common/FamilyPhotos]
Media directory not accessible! [/home/0common/FamilyMusic]
Media directory not accessible! [/home/0common/FamilyDocuments]
Media directory not accessible! [/home/0common/FamilyVideos]
[ OK ]
0
/etc/init.d/iptables: line 42: /etc/sysconfig/networking/oe-profiles/default/ifcfg-eth0: No such file or directory
FATAL: Module ip_conntrack not found.
FATAL: Module iptable_nat not found.
FATAL: Module xt_tcpudp not found.
Flushing all current rules and user defined chains: [ OK ]
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules:
[ OK ]
Starting DAAP server: [ OK ]
Starting mynetworkd:[ OK ]
HipServ - Checking if RAID needs to be rebuilt
Starting RAID monitor
2260
HipServ - Updating RAID lights
HipServ - Bringing up iptables
HipServ - Updating date...
Error : Temporary failure in name resolution
15 Oct 15:54:56 ntpdate[2386]: can't find host 0.pool.ntp.org
15 Oct 15:54:56 ntpdate[2386]: no servers can be used, exiting
success
HipServ - Checking for updates...
success
HipServ - Enabling swap
*** WARNING: Could not start swapfile ***
HipServ - Cleaning USB mountpoints
HipServ - Mounting USB devices
HipServ - Checking for FTPS certificate
HipServ - Found vsftpd key file
HipServ - Starting spindownd: [ OK ]
HipServ - Starting usbreaderd: [ OK ]
HipServ - Ensuring that table structures are up-to-date
HipServ - boot complete
axentraserver.localdomain login:
I do not have root access to the NAS: there are several documented procedures, but all of them require the NAS to be registered with the Neatger's dedicated web site. And, even if it's a brand new device, I would like to avoid that - call me paranoid if you want
Anyway, here are some more data directly from wiki.openwtora.com:
The original Stora have three partitions:
1. -Original-U-BOOT (1Mb)
2. -Original-Kernel (6Mb)
3. -Original-ROOTFS (249Mb)# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00600000 00020000 "uImage" mtd2: 0f900000 00020000 "root"
On the same page, there is the layout for a custom firmware:
The custom firmware will be:
1. -Original-U-BOOT (1Mb)
2. -NEW-Kernel (4Mb)
3. -NEW-ROOTFS (251Mb)# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00400000 00020000 "uImage" mtd2: 0fb00000 00020000 "root"
I didn't try yet to burn the flash. My hope was to be able to a least boot an alternate kernel from RAM. But with no luck:
Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatls usb 0:3
935056 wnr854t-uimage
2490368 squashfs.img
2490368 wnr854t-squashfs.img
2426880 openwrt-kirkwood-rootfs.tar
1122376 openwrt-kirkwood-uimage
1245188 openwrt-kirkwood-sheevaplug-jffs2-64k.img
935016 openwrt-wrt350nv2-uimage
7 file(s), 0 dir(s)
Marvell>> fatload usb 0:3 0x1100000 openwrt-wrt350nv2-uimage
reading openwrt-wrt350nv2-uimage
...........................................................................................
935016 bytes read
Marvell>> setenv bootargs console=ttyS0,115200n8
Marvell>> bootm 0x1100000
## Booting image at 01100000 ...
Image Name: Linux-3.0.3
Created: 2011-10-15 23:23:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 934952 Bytes = 913 kB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
***** Here the device appears to "hang".
Since I'm not even quite sure of the right target, I tried that both with orion and kirkwood uImage.
I fell a little bit stuck here, so I'll be glad for any hint or advice
Thanks in advance.
- Sylvain