Re: Zyxel NAS326 - Debian / Boot from USB? January 19, 2017 04:51AM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 20, 2017 03:49AM |
Admin Registered: 13 years ago Posts: 18,994 |
apt-get install i2c-tools
echo "CPU Temperature" $(($(/usr/sbin/i2cget -y 0x0 0x0a 0x07))) "C" echo "Fanspeed" $[60000/$(($(/usr/sbin/i2cget -y 0x0 0x0a 0x08)))] "RPM"
Re: Zyxel NAS326 - Debian / Boot from USB? January 21, 2017 03:33AM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 10:37AM |
Registered: 7 years ago Posts: 24 |
Marvell>> ext2load usb 0:1 0x1000000 /zImage-4.9.0-mvebu-tld-8 4466616 bytes read in 567 ms (7.5 MiB/s) Marvell>> bootz 0x1000000 * kernel: cmdline image address = 0x01000000 Starting kernel ... Uncompressing Linux... done, booting the kernel. Error: unrecognized/unsupported machine ID (r1 = 0x00000210). Available machine support: ID (hex) NAME ffffffff Generic DT based system ffffffff Marvell Armada 39x (Device Tree) ffffffff Marvell Armada 380/385 (Device Tree) ffffffff Marvell Armada 375 (Device Tree) ffffffff Marvell Armada 370/XP (Device Tree) ffffffff Marvell Dove Please check your kernel config and/or bootloader.
*** Booting kernel from kernel 2 @0x08700000 *** USB2.0 0: Host Mode USB3.0 0: Host Mode USB3.0 1: Host Mode Board configuration detected: Net: | port | Interface | PHY address | |--------|-----------|--------------| | egiga0 | RGMII | 0x01 | egiga0 [PRIME] Hit any key to stop autoboot: 0 ---------- THESE COMMANDS ENTERED BY ME -------------- Marvell>> mw.l f1018140 003c8800 Marvell>> usb reset (Re)start USB... Marvell>> ext2load usb 0:1 0x2000000 /boot/initrd.img-4.4.0-34-generic 31865396 bytes read in 1355 ms (22.4 MiB/s) Marvell>> ext2load usb 0:1 0x1000000 /zImage-4.9.0-mvebu-tld-8 4466616 bytes read in 567 ms (7.5 MiB/s) Marvell>> bootz 0x1000000 0x2000000 ---------- THESE COMMANDS ENTERED BY ME END -------------- * kernel: cmdline image address = 0x01000000 Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid Erasing Nand... Writing to Nand... done *** change boot partition to kernel1 *** resetting ... BootROM - 1.73 Booting from NAND flash General initialization - Version: 1.0.0 Detected Device ID 6810 High speed PHY - Version: 2.0 Init RD NAS topology board SerDes lanes topology details: | Lane # | Speed | Type | -------------------------------- | 0 | 06 | SATA0 | | 1 | 05 | USB3 HOST0 | | 2 | 06 | SATA1 | | 5 | 05 | USB3 HOST1 | -------------------------------- High speed PHY - Ended Successfully DDR3 Training Sequence - Ver TIP-1.26.0 mvSysEnvGetTopologyUpdateInfo: TWSI Read failed DDR3 Training Sequence - Switching XBAR Window to FastPath Window DDR3 Training Sequence - Ended Successfully Not detected suspend to RAM indication BootROM: Image checksum verification PASSED __ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** LOADER ** U-Boot 2013.01-svn48023 (Oct 13 2015 - 09:25:56) Marvell version: 2014_T3.0p6 Board: RD-NAS-88F6820-DDR3 SoC: MV88F6810 Rev A0 running 1 CPUs CPU: ARM Cortex A9 MPCore (Rev 1) LE CPU 0 CPU @ 1332 [MHz] L2 @ 666 [MHz] TClock @ 250 [MHz] DDR @ 666 [MHz] DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled DRAM: 512 MiB Map: Code: 0x1fed0000:0x1ff95d60 BSS: 0x1ffef2b4 Stack: 0x1f9cff20 Heap: 0x1f9d0000:0x1fed0000 U-Boot Environment: 0x00200000:0x00280000 (NAND) NAND: 256 MiB MMC: mv_sdh: 0 Erasing Nand... Writing to Nand... done *** Booting kernel from kernel 1 @0x00E00000 *** USB2.0 0: Host Mode USB3.0 0: Host Mode USB3.0 1: Host Mode Board configuration detected: Net: | port | Interface | PHY address | |--------|-----------|--------------| | egiga0 | RGMII | 0x01 | egiga0 [PRIME] Hit any key to stop autoboot: 0
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 10:53AM |
Registered: 7 years ago Posts: 24 |
# cat /proc/mtd dev: size erasesize name mtd0: 00200000 00020000 "U-Boot" mtd1: 00200000 00020000 "U-Boot env" mtd2: 00a00000 00020000 "Config" mtd3: 00f00000 00020000 "Kernel-1" mtd4: 06a00000 00020000 "RootFS-1" mtd5: 00f00000 00020000 "Kernel-2" mtd6: 06a00000 00020000 "RootFS-2"
# apt-get install mtd-utils
# nanddump -f mtd0_backup /dev/mtd0 # nanddump -f mtd1_backup /dev/mtd1 # nanddump -f mtd2_backup /dev/mtd2 # nanddump -f mtd3_backup /dev/mtd3 # nanddump -f mtd4_backup /dev/mtd4 # nanddump -f mtd5_backup /dev/mtd5 # nanddump -f mtd6_backup /dev/mtd6
# flash_eraseall /dev/mtd3 flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it Erasing 128 Kibyte @ ee0000 -- 100 % complete # nandwrite -p /dev/mtd3 /boot/zImage_4.9.5_with_initrd_dtb Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 .... Writing data to block 67 at offset 0x860000
# uname -a Linux nas328 4.9.5 #1 SMP Sun Jan 22 16:04:27 UTC 2017 armv7l armv7l armv7l GNU/Linux
# flash_eraseall /dev/mtd3 # nandwrite /dev/mtd3 mtd3_backup
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 11:13AM |
Registered: 7 years ago Posts: 24 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 03:15PM |
Registered: 7 years ago Posts: 24 |
ls -1 /sys/class/leds nsa326:red:copy nsa326:red:sata1 nsa326:red:sata2 nsa326:red:sys nsa326:white:copy nsa326:white:sata1 nsa326:white:sata2 nsa326:white:sys nsa326:white:usb
> sudo -s # echo 1 >/sys/class/leds/nsa326\:red\:copy/brightness
# echo 0 >/sys/class/leds/nsa326\:red\:copy/brightness
# cat /sys/class/leds/nsa326\:red\:copy/trigger [none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer disk-activity ide-disk1 ide-disk2 heartbeat
# echo heartbeat >/sys/class/leds/nsa326\:white\:sys/trigger
# cat /sys/class/leds/nsa326\:white\:sata1/trigger none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer disk-activity [ide-disk1] ide-disk2 heartbeat # cat /sys/class/leds/nsa326\:white\:sata2/trigger [none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer disk-activity ide-disk1 ide-disk2 heartbeat
# echo ide-disk2 > /sys/class/leds/nsa326\:white\:sata2/trigger
# echo ide-disk2 > /sys/class/leds/nsa326\:red\:sata2/trigger # echo none > /sys/class/leds/nsa326\:white\:sata2/trigger
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 03:25PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 03:56PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 04:02PM |
Admin Registered: 13 years ago Posts: 18,994 |
> # cat /proc/mtd > dev: size erasesize name > mtd0: 00200000 00020000 "U-Boot" > mtd1: 00200000 00020000 "U-Boot env" > mtd2: 00a00000 00020000 "Config" > mtd3: 00f00000 00020000 "Kernel-1" > mtd4: 06a00000 00020000 "RootFS-1" > mtd5: 00f00000 00020000 "Kernel-2" > mtd6: 06a00000 00020000 "RootFS-2" >>
> # apt-get install mtd-utils >>
> # nanddump -f mtd0_backup /dev/mtd0 > # nanddump -f mtd1_backup /dev/mtd1 > # nanddump -f mtd2_backup /dev/mtd2 > # nanddump -f mtd3_backup /dev/mtd3 > # nanddump -f mtd4_backup /dev/mtd4 > # nanddump -f mtd5_backup /dev/mtd5 > # nanddump -f mtd6_backup /dev/mtd6 >>
> # flash_eraseall /dev/mtd3 > flash_eraseall has been replaced by `flash_erase > <mtddev> 0 0`; please use it > Erasing 128 Kibyte @ ee0000 -- 100 % complete > > # nandwrite -p /dev/mtd3 > /boot/zImage_4.9.5_with_initrd_dtb > Writing data to block 0 at offset 0x0 > Writing data to block 1 at offset 0x20000 > .... > Writing data to block 67 at offset 0x860000 >>
> # uname -a > Linux nas328 4.9.5 #1 SMP Sun Jan 22 16:04:27 UTC > 2017 armv7l armv7l armv7l GNU/Linux >>
> # flash_eraseall /dev/mtd3 > # nandwrite /dev/mtd3 mtd3_backup >
nanddump -f mtd0_backup /dev/mtd0We should specify the options explicitly ( --obmitoob, --noecc, ...). Default options are not clear (older nandwrite or nanddump have different options).
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 04:12PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 04:31PM |
Registered: 7 years ago Posts: 24 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 04:57PM |
Registered: 7 years ago Posts: 24 |
Quote
bodhi
Device drivers -> Power supply class support - can
> enable/disable both Power and Reboot actions.
>
Are you sure that it is related to the buttons?
Quote
bodhi
> Update Not so smooth with rear USB 3.0 port
> - somehow usb flash with rootfs only boots when
> inserted into front USB.
>
Let me see. Check your config to see if XHCI is compiled into the kernel?
Quote
bodhi
This looks like a coding error on Zyxel part. They did not do enough to switch kernel (just blindly rewriting the boocmd each time)
Quote
bodhi
look into CONFIG_INITRAMFS_SOURCE
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 05:39PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 07:28PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 22, 2017 11:42PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 06:04AM |
Registered: 7 years ago Posts: 24 |
[ 22.400979] random: fast init done [ 23.006880] random: crng init done BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) ls -la /dev/sd* brw------- 1 8, 19 /dev/sdb3 brw------- 1 8, 18 /dev/sdb2 brw------- 1 8, 17 /dev/sdb1 brw------- 1 8, 16 /dev/sdb brw------- 1 8, 3 /dev/sda3 brw------- 1 8, 2 /dev/sda2 brw------- 1 8, 1 /dev/sda1 brw------- 1 8, 0 /dev/sda (initramfs) ----- After re-inserting USB flash drive (to same port - plug out, plug in) ------ 173.401396] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd [ 173.433218] usb-storage 3-1:1.0: USB Mass Storage device detected [ 173.440951] scsi host2: usb-storage 3-1:1.0 [ 174.482139] scsi 2:0:0:0: Direct-Access SanDisk Ultra Fit 1.00 PQ: 0 ANSI: 6 [ 174.491996] sd 2:0:0:0: [sdc] 60062500 512-byte logical blocks: (30.8 GB/28.6 GiB) [ 174.505735] sd 2:0:0:0: [sdc] Write Protect is off [ 174.510817] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 174.527574] sdc: sdc1 [ 174.531924] sd 2:0:0:0: [sdc] Attached SCSI removable disk ls -la /dev/sd* brw------- 1 8, 33 /dev/sdc1 brw------- 1 8, 32 /dev/sdc brw------- 1 8, 19 /dev/sdb3 brw------- 1 8, 18 /dev/sdb2 brw------- 1 8, 17 /dev/sdb1 brw------- 1 8, 16 /dev/sdb brw------- 1 8, 3 /dev/sda3 brw------- 1 8, 2 /dev/sda2 brw------- 1 8, 1 /dev/sda1 brw------- 1 8, 0 /dev/sda (initramfs)
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 01:24PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 01:28PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 01:43PM |
Registered: 7 years ago Posts: 24 |
beeper: beeper { compatible = "gpio-beeper"; gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; };
# apt-get install beep # watch -n 1 beep
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 01:48PM |
Admin Registered: 13 years ago Posts: 18,994 |
Quote
Testing gpio-beeper (it's doesn't beep, but rather makes 'click-clack' sound - may be it's not a beeper at all?!):
Re: Zyxel NAS326 - Debian / Boot from USB? January 23, 2017 05:33PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 01:07AM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 11:01AM |
Registered: 7 years ago Posts: 24 |
Quote
bodhi
:) It does not seem to be a gpio-beeper. The Zyxel boxes seem to lack a conventional way to activate buzzer.
Fan off (update - it also powers off ethernet!): gpio0 pin24 -> 1 gpio1 pin19 -> 0 Fan off can be tested in U-boot console: mw.l f1018100 05200000 mw.l f1018140 00348000 Fan on: gpio1 pin19 -> 1 gpio0 pin24 -> can be any value Board reboot: gpio0 pin24 -> 1 gpio1 pin19 -> 0 gpio0 pin24 -> 0 Default values: gpio0 pin24 -> 0 gpio1 pin19 -> 1Just in case anyone finds that info useful or has an idea how to use it.
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 03:41PM |
Admin Registered: 13 years ago Posts: 18,994 |
> Fan off: > gpio0 pin24 -> 1 > gpio1 pin19 -> 0 > > Fan off can be tested in U-boot console: > mw.l f1018100 05200000 > mw.l f1018140 00348000 > > Fan on: > gpio1 pin19 -> 1 > gpio0 pin24 -> can be any value > > Board reboot: > gpio0 pin24 -> 1 > gpio1 pin19 -> 0 > gpio0 pin24 -> 0 > > Default values: > gpio0 pin24 -> 0 > gpio1 pin19 -> 1 >> Just in case anyone finds that info useful or has
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 04:31PM |
Registered: 7 years ago Posts: 24 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 06:04PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Zyxel NAS326 - Debian / Boot from USB? January 24, 2017 11:38PM |
Admin Registered: 13 years ago Posts: 18,994 |
Quote
Zyxel NAS326 Installation
Updated 24 Jan 2017
Re: Zyxel NAS326 - Debian / Boot from USB? January 25, 2017 09:10AM |
Registered: 7 years ago Posts: 24 |
#!/bin/sh ## buzzer_beep.sh - beep N times usage() { echo echo -e "\033[031mUsage: `basename $0` <beep times>\033[0m" echo } if [ "$1" != "" ]; then COUNT=$1 else usage exit 1 fi if [ ${COUNT} -ge 30 ]; then FOREVER=1 fi # # BUZZER: GPIO 19 # # Set Blink Enable Register # devmem 0xf1018108 32 0x00080000 # # Set Blink Counter to A # # * # devmem 0xf1018120 32 0x00000000 while [ "${COUNT}" != "0" ]; do # Set Blink Enable Register devmem2 0xf1018108 w 0x00080000 # Set Blink Counter to A # * devmem2 0xf1018120 w 0x00000000 # Set ON/OFF duration # - ON duration for Blink Counter A devmem2 0xF10181C0 w 0x0000BC00 # - OFF duration for Blink Counter A devmem2 0xf10181C4 w 0x0000BC00 #msleep 500 #usleep 500000 sleep 1 # Clear Blink Enable Regoster devmem2 0xf1018108 w 0x00000000 if [ "${FOREVER}" != "1" ]; then COUNT=$((COUNT-1)) fi #msleep 500 #usleep 500000 sleep 1 done # Clear Blink Enable Regoster devmem2 0xf1018108 w 0x00000000 exit 0
> sudo apt-get install devmem2 > sudo ./buzzer_beep.sh 3
Re: Zyxel NAS326 - Debian / Boot from USB? January 25, 2017 06:25PM |
Admin Registered: 13 years ago Posts: 18,994 |