Zyxel NSA3xx
Some references :
ZyXEL NSA325 v1/v2 - 21.02.0 (UBOOT)
ZyXEL NSA325 v1/v2 - 21.02.0 (r16279-5cc0535800)
ZyXEL NSA3xx @ OpenWrt WIKI
kirkwood: add ZyXEL NSA325 device
The ZyXEL NSA325 device is a Kirkwood based NAS:
- SoC: Marvell 88F6702 1600Mhz
- SDRAM memory: 512MB DDR2 400Mhz
- Gigabit ethernet: Marvell Alaska
- Flash memory: 128MB
- 1 Power button
- 1 Power LED (blue)
- 5 Status LED (green/red)
- 1 Copy/Sync button
- 1 Reset button
- 2 SATA II ports (internal)
- 2 USB 2.0 ports (back)
- 1 USB 3.0 port (front)
- Fan (fixed speed)
- hardware watchdog in a mcu
Basically a bigger, more powerful version of NSA310,
installation is the same as they share the same flash layout.
A notable difference is that there is a hardware watchdog
in a mcu on the board, which is disabled by default in the LEDE u-boot.
The watchdog is also disabled with a GPIO activation through
raw register change when kwbooting or it would reset the board before
the new uboot was transferred.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=4383c13aee8963ee93ca1950e7f0ea5a35309ab4
From my notes :
refresh uboot !
NSA3x0S> load usb 0 0x1000000 nsa310s/u-boot-nsa310s/u-boot.kwb
576376 bytes read in 661 ms (850.6 KiB/s)
NSA3x0S> nand erase 0x0 0x100000
NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK
NSA3x0S> nand write 0x1000000 0x00000 $filesize
NAND write: device 0 offset 0x0, size 0x8cb78
576376 bytes written: OK
NSA3x0S> version
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:50:06 -0700)
ZyXEL NSA310S/320S 1/2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA3x0S> reset
resetting ...
nsa310s => version
U-Boot 2020.04 (Feb 21 2021 - 23:57:34 +0000)
arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 8.4.0 r15888-f79f496ed6) 8.4.0
GNU ld (GNU Binutils) 2.34
nsa310s =>
rewrite ethaddr !
nsa310s => setenv ethaddr 52:3b:20:9c:11:51
nsa310s => saveenv
nsa310s => reset
resetting ...
env check !
U-Boot 2020.04 (Feb 21 2021 - 23:57:34 +0000)
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 80.00A80 Ser#: WD-WMC4N2711626
Type: Hard Disk
Supports 48-bit addressing
Capacity: 764436.4 MB = 746.5 GB (1565565872 x 512)
Hit any key to stop autoboot: 0
nsa310s => printenv
baudrate=115200
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part ubi; ubifsmount ubi:rootfs; ubi read 0x800000 kernel; bootm 0x0
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
ipaddr=192.168.1.1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xc0000@0x0(uboot),0x80000@0xc0000(uboot_env),-@0x140000(ubi)
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial
Environment size: 437/131068 bytes
nsa310s =>
flash OpenWrt !
nsa310s => usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
nsa310s => ext2ls usb 0:1 nsa310s
<DIR> 4096 .
<DIR> 4096 ..
4325376 openwrt-19.07.7-kirkwood-zyxel_nsa325-squashfs-factory.bin
4980736 openwrt-kirkwood-zyxel_nsa310s-squashfs-factory.bin
<DIR> 4096 u-boot-nsa310s
nsa310s => mtdparts
device nand0 <orion_nand>, # parts = 3
#: name size offset mask_flags
0: uboot 0x000c0000 0x00000000 0
1: uboot_env 0x00080000 0x000c0000 0
2: ubi 0x07ec0000 0x00140000 0
active partition: nand0,0 - (uboot) 0x000c0000 @ 0x00000000
defaults:
mtdids :
mtdparts: mtdparts=orion_nand:0xc0000@0x0(uboot),0x80000@0xc0000(uboot_env),-@0x140000(ubi)
nsa310s => ext2load usb 0 0x2000000 nsa310s/openwrt-kirkwood-zyxel_nsa310s-squashfs-factory.bin
4980736 bytes read in 135 ms (35.2 MiB/s)
nsa310s => nand erase.part ubi
NAND erase.part: device 0 offset 0x140000, size 0x7ec0000
Skipping bad block at 0x00c80000
Skipping bad block at 0x01900000
Erasing at 0x7fe0000 -- 100% complete.
OK
nsa310s => nand write 0x2000000 ubi $filesize
NAND write: device 0 offset 0x140000, size 0x4c0000
4980736 bytes written: OK
nsa310s =>
nsa310s => reset
resetting ...
booting !
U-Boot 2020.04 (Feb 21 2021 - 23:57:34 +0000)
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 80.00A80 Ser#: WD-WMC4N2711626
Type: Hard Disk
Supports 48-bit addressing
Capacity: 764436.4 MB = 746.5 GB (1565565872 x 512)
Hit any key to stop autoboot: 0
ubi0: attaching mtd3
ubi0: scanning is finished
ubi0: volume 2 ("rootfs_data") re-sized from 9 to 954 LEBs
ubi0: attached mtd3 (name "ubi", size 126 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 512 (aligned 512), data offset: 2048
ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1613951854
ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
UBIFS error (ubi0:1 pid 0): init_constants_early: too few LEBs (16), min. is 17
Error reading superblock on volume 'ubi:rootfs' errno=-22!
ubifsmount - mount UBIFS volume
Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
No size specified -> Using max size (2580480)
Read 2580480 bytes from volume kernel to 00800000
## Booting kernel from Legacy Image at 00800000 ...
Image Name: ARM OpenWrt Linux-5.4.99
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2545681 Bytes = 2.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.99 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15888-f79f496ed6)) #0 Sun Feb 21 23:57:341
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: ZyXEL NSA310S
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0xc0000@0x0(uboot),0x80000@0xc0000(uboot_env),-@0x140000(ub)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 250944K/262144K available (5156K kernel code, 179K rwdata, 1420K rodata, 1024K init, 211K bss, 11200K reserved, 0)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x2d4/0x4fc with crng_init=0
...
[ 1.840650] 8021q: 802.1Q VLAN Support v1.8
[ 1.848304] UBI: auto-attach mtd2
[ 1.851657] ubi0: attaching mtd2
[ 2.047631] ubi0: scanning is finished
[ 2.064699] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[ 2.070198] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[ 2.077039] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[ 2.083730] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[ 2.090498] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[ 2.096557] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[ 2.103761] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number:
...
[ 7.983554] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.237551] UBIFS (ubi0:2): default file-system created
[ 8.243772] UBIFS (ubi0:2): Mounting in unauthenticated mode
[ 8.279690] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 645
[ 8.350996] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[ 8.358830] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 8.368728] UBIFS (ubi0:2): FS size: 121669632 bytes (116 MiB, 943 LEBs), journal size 6064128 bytes (5 MiB, 47 LEBs)
[ 8.379295] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[ 8.385878] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID B41139D1-3B5E-4406-9116-5C5591D124F5, small LPT model
[ 8.398845] mount_root: overlay filesystem has not been fully initialized yet
[ 8.406338] mount_root: switching to ubifs overlay
[ 8.416045] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 8.498245] procd: - early -
[ 8.501767] procd: - watchdog -
[ 9.135590] procd: - watchdog -
[ 9.139113] procd: - ubus -
[ 9.196064] procd: - init -
Please press Enter to activate this console.
[ 9.783748] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.873545] xt_time: kernel timezone is -0000
[ 9.923876] PPP generic driver version 2.4.2
[ 9.951566] NET: Registered protocol family 24
[ 9.986270] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 10.117593] urngd: v1.0.2 started.
[ 10.225499] random: crng init done
[ 10.228914] random: 7 urandom warning(s) missed due to ratelimiting
BusyBox v1.33.0 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r15888-f79f496ed6
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#
check env from OpenWrt !
root@OpenWrt:/# fw_printenv
baudrate=115200
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part ubi; ubifsmount ubi:rootfs; ubi read 0x800000 kernel; bootm 0x0
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
ipaddr=192.168.1.1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xc0000@0x0(uboot),0x80000@0xc0000(uboot_env),-@0x140000(ubi)
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial
root@OpenWrt:/#
Advice :
I hope I forget nothing...
I write all here quickly, without reformatting and re-reading, so take care an read twice !
I have more notes and can take a longer look, later...