U-Boot 2018.03 (Jun 05 2018 - 19:54:00 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
MMC:
Loading Environment from NAND... *** Warning - bad CRC, using default environment
Failed (-5)
In: serial
Out: serial
Err: serial
Net: egiga0
Error: egiga0 address not set.
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
unexpected character 'b' at the end of partition
Error initializing mtdparts!
incorrect device type in ubi
Partition ubi not found!
Error, no UBI device/partition selected!
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA310> printenv
baudrate=115200
bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ipaddr=192.168.1.1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)bootargs_root=
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial
Environment size: 357/131068 bytes
Note the mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)bootargs_root=
Yeah, that's wrong.
And it explains the error message
U-Boot 2018.03 (Jun 05 2018 - 19:54:00 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
MMC:
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
Error: egiga0 address not set.
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
unexpected character 'b' at the end of partition
Error initializing mtdparts!
incorrect device type in ubi
Partition ubi not found!
Error, no UBI device/partition selected!
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
"unexpected character 'b' at the end of partition". That's the "bootargs_root=" that got appended there.
Hi @bobafetthotmail I'm the OP guy of this thread it seems there's a bug on upgrading firmware. I have problem upgrading from 4.9 to 4.14 latest git trunk then I do sysupgrade I get this error.
root@LEDE-NSA325:/# sysupgrade -n -p /mnt/sda1/nsa325\ gcc8/targets/kirkwood/generic/openwrt-kirkwood-zyxel_nsa325-squashfs-sysupgrade.bin
Image not in /tmp, copying...
Device nsa325 not supported by this image
Supported devices: zyxel,nsa325
Image check 'fwtool_check_image' failed.
Anyway I've manage to upgrade it using latest snapshot of uImage.
Did you have issues booting a USB drive like described in that thread?
If you had issues and that patch fixed it, then can you open a PR with it on OpenWrt github?
Is this issue on bodhi's uboot or OpenWrt's?
I never used tftpboot command. I always do
tftp RAM-address file-name
bootm RAM-address
Yes I know but I don't think they are needed.
This can go in the nsa325 wiki page.
I have never seen CPU temp rise above 60, actually the HDD temperature is a much bigger issue.
You can read but not control the fan speed, so I don't see why I should need to read it.
If you want a to add a script that will shut down the NSA325 if the fan stops spinning or the temp increases to 80 or 112 celsius? You can do a PR for that, I'm OK with that.
Did you have issues booting a USB drive like described in that thread?
Yes
The issue was seen on stock uboot and U-Boot 2019.01 (Mar 29 2019 - 14:55:08 +0000). But It was NOt seen/fixed on U-Boot 2017.07-tld-1
If you had issues and that patch fixed it, then can you open a PR with it on OpenWrt github?
You mean propose changes ? I'm not sure if my knowledge is sufficient. I take a look and @mibodhi introduce this change in commit
In uboot repository there were few commit on this file common/usb_storage.c after release 2017.07
The uboot 2019.01 is OK to start NSA325v2 from nand. I just need to start U-Boot 2017.07-tld-1 via kwboot to first time did sysupgrade.
99 % [....................................]
[Type Ctrl-\ + c to quit]
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
SoC: Kirkwood 88F6282_A1
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
## Error: "setenv" not defined
ubi0: attaching mtd1
ubi0: scanning is finished
UBI init error 22
Error, no UBI device/partition selected!
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA325> 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
NSA325> fatload usb 0 0x800000 nsa325ram.bin
reading nsa325ram.bin
3364296 bytes read in 273 ms (11.8 MiB/s)
NSA325> bootm 0x800000
## Booting kernel from Legacy Image at 00800000 ...
Image Name: ARM OpenWrt Linux-4.14.109
Created: 2019-03-29 14:55:08 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3364232 Bytes = 3.2 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.109 (buildbot@slashdirt-03) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9753-6df5ab8)) #0 Fri Mar 29 14:55:08 2019
........................
root@OpenWrt:/tmp# wget http://downloads.openwrt.org/snapshots/targets/kirkwood/
generic/openwrt-kirkwood-zyxel_nsa325-squashfs-factory.bin
Downloading 'http://downloads.openwrt.org/snapshots/targets/kirkwood/generic/openwrt-kirkwood-zyxel_nsa325-squashfs-factory.bin'
Connecting to 148.251.78.235:80
Writing to 'openwrt-kirkwood-zyxel_nsa325-squashfs-factory.bin'
openwrt-kirkwood-zyx 100% |*******************************| 3968k 0:00:00 ETA
Download completed (4063232 bytes)
root@OpenWrt:/tmp# sysupgrade -F openwrt-kirkwood-zyxel_nsa325-squashfs-factory.
bin
Image metadata not found
Image check 'fwtool_check_image' failed but --force given - will update anyway!
Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... ubusd logd dnsmasq netifd odhcpd ntpd
Sending KILL to remaining processes ...
Performing system upgrade...
ubidetach: error!: cannot detach "/dev/mtd2"
error 19 (No such device)
ubiformat: mtd2 (nand), size 132907008 bytes (126.7 MiB), 1014 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1013 -- 100 % complete
ubiformat: 964 eraseblocks are supposedly empty
ubiformat: 2 bad eraseblocks found, numbers: 90, 190
ubiformat: warning!: 48 of 1012 eraseblocks contain non-UBI data
ubiformat: warning!: only 0 of 1012 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: flashing eraseblock 30 -- 100 % complete
ubiformat: formatting eraseblock 987[ 183.078612] ubi0: attaching mtd2
ubiformat: formatting eraseblock 1013 -- 100 % complete
[ 183.254843] ubi0: scanning is finished
[ 183.286479] ubi0: volume 2 ("rootfs_data") re-sized from 9 to 961 LEBs
[ 183.293611] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[ 183.299147] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[ 183.306067] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[ 183.312793] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[ 183.319614] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[ 183.325744] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[ 183.332998] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1254764615
[ 183.342181] ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
[ 183.351550] ubi0: background thread "ubi_bgt0d" started, PID 2498
UBI device number 0, total 1012 LEBs (130572288 bytes, 124.5 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: [ 183.381613] reboot: Restarting system
U-Boot 2019.01 (Mar 29 2019 - 14:55:08 +0000)
ZyXEL NSA325 2-Bay Power Media Server
SoC: Kirkwood 88F6282_A1
DRAM: 512 MiB
NAND: 128 MiB
MMC:
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
## Error: "setenv" not defined
ubi0: attaching mtd3
ubi0: scanning is finished
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: 1254764615
ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
No size specified -> Using max size (2322432)
Read 2322432 bytes from volume kernel to 00800000
## Booting kernel from Legacy Image at 00800000 ...
Image Name: ARM OpenWrt Linux-4.14.109
Created: 2019-03-30 9:36:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2207208 Bytes = 2.1 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.109 (buildbot@slashdirt-03) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9754-fbe2e7d)) #0 Sat Mar 30 09:36:31 2019
Regarding temperature and fan speed - In my case, the fan is quite loud (e.g compare to nsa310)
So I'm thinking about disconnect it / replace or maybe some resistor to slow down. How it looks like in your case ?
I thinking about wiki for nsa325 similar to nsa310:
Ah ok I thought you applied patches to OpenWrt u-boot.
I see the changes in the usb code of uboot in the commit you linked.
I will try to send a PR myself, and I will ask you to test a uboot I compiled, as all my USB drives work fine in uboot.
Does the uboot in the nsa310b have the same issue? I think it should. Can you try the same USB drive in the nsa310b and see if it works or not?
In my nsa325, the noise happens because it's screwed to the metal plate in the back. The fan was nearly silent if removed from the NAS. The metal plate was making a lot of noise with just a little vibration from the fan.
I placed some soft rubber between the fan and the metal plate, and used metal wire instead of the screws to hold it in place. Now it's not noisy.
I can't slow the fan down, I'm using old drives that heat a lot, I need the air movement.
I have test uboot 2019.01 on my NSA310 and issue was introduced with uboot 2019.01:
U-Boot 2018.03 (Jun 09 2018 - 16:42:36 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
MMC:
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA310> 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
NSA310>
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
NSA310> fatload usb 0 0x1000000 u-boot.kwb
645376 bytes read in 75 ms (8.2 MiB/s)
NSA310> nand erase 0x0 0x100000
NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK
NSA310> nand write 0x1000000 0x00000 0x100000
NAND write: device 0 offset 0x0, size 0x100000
1048576 bytes written: OK
NSA310> reset
resetting ...
U-Boot 2019.01 (Feb 24 2019 - 23:07:20 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
MMC:
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA310> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
ERROR: NOT USB_CONFIG_DESC 80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
NSA310>
Hi, I just quickly change to uboot 2019.07
and it compile (with old patches). I will test it tomorrow.
Have you consider to propose/add nsa310 do u-boot https://github.com/u-boot/u-boot ?
that we you don't have maintain it
U-Boot 2019.07 (Sep 16 2019 - 14:01:42 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
MMC:
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA310> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
ERROR: NOT USB_CONFIG_DESC 60
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
NSA310>
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA325> 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
NSA325> fatload usb 0 0x1000000 uboot_nsa310_2019.07.kwb
reading uboot_nsa310_2019.07.kwb
654604 bytes read in 125 ms (5 MiB/s)
NSA325> nand erase 0x00000 0x100000
NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK
NSA325> nand write 0x1000000 0x00000 0x100000
NAND write: device 0 offset 0x0, size 0x100000
1048576 bytes written: OK
NSA325> reset
resetting ...
U-Boot 2019.07 (Sep 16 2019 - 14:01:42 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
MMC:
Loading Environment from NAND... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: egiga0
Error: egiga0 address not set.
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
NSA310>
NSA310>
U-Boot 2019.07 (Sep 16 2019 - 14:01:42 +0000)
ZyXEL NSA310 1-Bay Power Media Server
SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
NAND: 128 MiB
MMC:
Loading Environment from NAND... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: egiga0
Error: egiga0 address not set.
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
ubi0: attaching mtd3
ubi0: scanning is finished
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: 1009, bad PEBs: 5, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 9/6, WL threshold: 4096, image sequence number: 603085179
ubi0: available PEBs: 0, total reserved PEBs: 1009, PEBs reserved for bad PEB handling: 15
No size specified -> Using max size (2322432)
Read 2322432 bytes from volume kernel to 00800000
## Booting kernel from Legacy Image at 00800000 ...
Image Name: ARM OpenWrt Linux-4.14.143
Created: 2019-09-18 8:51:24 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2238938 Bytes = 2.1 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.143 (kofec@E5420Mint) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10494-e05310b9b8)) #0 Mon Sep 16 08:11:59 2019
[ 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 NSA310b
I've got a Zyxel NSA325V1 with OpenWrt installed and it works fine but the fan is always running. I would like to know if it is possible to control the fan speed? I've run binwalk on the original firmware and found a script that seems to do fancontrol in the stock firmware. Could someone have a look and let me know if this could be used in OpenWrt?
This is the location of the script in the binwalk extracted firmware:
I don't know if it is possible to do in OpenWrt but this is what I found in the stock firmware. I don't know if this is enough info for someone more knowledgeable to write fan control code or not but I thought I would share the info anyway.
The ADT7463 chip seems to be supported by kernel driver lm85 https://www.kernel.org/doc/Documentation/hwmon/lm85 However after installing kmod-hwmon-lm85, lm-sensors does not seem to detect the sensor / fan. I guess it will need a different dtb / dts file to define the sensor / fan. I'll create a post on https://forum.doozan.com/list.php?2 and see if anybody there has an idea how to make this work.
I've checked the board and can't find a 24 pin ADT7463 chip. The only 24 pin chip is a Holtek HT66F30. So the name of the script in stock firmware is misleading and automatic fan control via lm-sensors is not going to work. I guess the only way is to write a custom script which adjusts the fan speed.