Re: Zyxel NAS326 - Debian / Boot from USB? September 28, 2019 05:51PM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Zyxel NAS326 October 06, 2019 04:51AM |
Registered: 5 years ago Posts: 2 |
###### setup WOL ###### if [ -e ${CONF_PATH}/wol.status ]; then /sbin/i2cset -y 0x0 0xa 0xa 0x0006 w else /sbin/i2cset -y 0x0 0xa 0xa 0x0306 w fi
/usr/sbin/i2cset -y 0x0 0xa 0xa 0x0006 w
###### set auto power-on ###### if [ -e ${CONF_PATH}/storage/pwron.status ]; then pwrmode=`${CAT} ${CONF_PATH}/storage/pwron.status` #zyshclient -p 150 -e "pwron ${pwrmode}" if [ $pwrmode = 'always' ]; then /sbin/i2cset -y 0x0 0x0a 0x0a 0x0107 w else /sbin/i2cset -y 0x0 0x0a 0x0a 0x0007 w fi else #zyshclient -p 150 -e "pwron former" /sbin/i2cset -y 0x0 0x0a 0x0a 0x0107 w fi
Re: Debian on Zyxel NAS326 October 06, 2019 05:26AM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
> I think I found a solution for the WOL Problem.
> I searched in the orignal rcS2 in /etc on the
> original RootFS and found this:
>
> ###### setup WOL ######
> if [ -e ${CONF_PATH}/wol.status ]; then
> /sbin/i2cset -y 0x0 0xa 0xa 0x0006 w
> else
> /sbin/i2cset -y 0x0 0xa 0xa 0x0306 w
> fi
Quote
> If I put:
>
> /usr/sbin/i2cset -y 0x0 0xa 0xa 0x0006 w
>
> in my /etc/rc.local WOL works for me.
>
> Tested with 5.1.7-mvebu-tld-1.
Re: Debian on Zyxel NAS326 October 07, 2019 12:30AM |
Admin Registered: 13 years ago Posts: 19,094 |
/usr/sbin/i2cset -y 0x0 0xa 0xa 0x0006 w
root@Nas326:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: g Wake-on: g Link detected: yes
/sbin/i2cset -y 0x0 0xa 0xa 0x0006 w /sbin/i2cset -y 0x0 0xa 0xa 0x0306 w /sbin/i2cset -y 0x0 0xa 0xa 0x0107 w /sbin/i2cset -y 0x0 0xa 0xa 0x0007 w
/sbin/i2cset -y 0x0 0xa 0xa <some 32 bit mask> w
Re: Debian on Zyxel NAS326 October 07, 2019 12:01PM |
Registered: 5 years ago Posts: 2 |
Re: Debian on Zyxel NAS326 October 07, 2019 06:19PM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
A3. Normal Operation
The USB rootfs should be plugged in permanently, and the serial console module should be removed.
1. Whenever the NAS326 is rebooted or cold started, to boot without manual intervention, the serial console module must be unplugged from the NAS326. If the serial console module is plugged in, then step 1 in the installation instruction A2 must be executed (so that the NAS326 will continue booting when it detected the serial console present). Note that reboot in some instance will work with serial console plugged in.
2. If you want to boot back to stock OS in NAND, just shutdown the box, unplug the USB and power up the box. It will boot the kernel 1 in NAND and then if not successful, it will try kernel 2.
This also serves as a rescue system. Whenever the rootfs on USB has problem and cannot boot (the effect is just like the USB drive is not plugged in), the NAS326 will fall back to booting the kernel 1 or 2 in NAND. When this occurs, the u-boot envs in step 4 must be reentered at serial console again to allow booting back to USB rootfs.
3. Setup WOL. Please see this post for how to activate WOL:
Re: Debian on Zyxel NAS326 October 09, 2019 04:24AM |
Admin Registered: 13 years ago Posts: 19,094 |
/usr/sbin/i2cset -y 0x0 0xa 0xa 0x0006 w
Re: Debian on Zyxel NAS326 October 12, 2019 09:06AM |
Registered: 5 years ago Posts: 4 |
Re: Debian on Zyxel NAS326 October 12, 2019 05:39PM |
Admin Registered: 13 years ago Posts: 19,094 |
Dave
Re: Debian on Zyxel NAS326 November 24, 2019 03:27PM |
Re: Debian on Zyxel NAS326 November 24, 2019 04:31PM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Zyxel NAS326 January 12, 2020 10:45AM |
Registered: 4 years ago Posts: 15 |
CASset=max CONTRY_TYPE=FF FEATURE_BIT=00 MALLOC_len=5 MODEL_ID=B303 MPmode=SMP PRODUCT_NAME=STG-328 VENDOR_NAME=MitraStar Technology Corp. autoload=no baudrate=115200 boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2) earlyprintk=serial bootargs_dflt=$console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:eth0:none bootargs_root=root=/dev/nfs rw bootcmd=nand read 0x2000000 0x08700000 0xF00000 && bootz 0x2000000 bootcmd_auto=stage_boot $boot_order bootcmd_custom=if run usb_bootcmd; then; else if run bootcmd_stock_1; then; else run bootcmd_stock_2; reset; fi; fi bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000; bootcmd_stock_1=run set_bootargs_stock; echo Booting from NAND kernel 1 ...; nand read 0x2000000 0x00E00000 0xF00000 && bootz 0x2000000 bootcmd_stock_2=run set_bootargs_stock; echo Booting from NAND kernel 2 ...; nand read 0x2000000 0x08700000 0xF00000 && bootz 0x2000000 bootdelay=10 cacheShare=no console=console=ttyS0,115200 core_checksum_1=ef8a9629888e1ceec7460982d09cb77b core_checksum_2=ef8a9629888e1ceec7460982d09cb77b curr_bootfrom=2 device_partition=0:1 disaMvPnp=no eeeEnable=no enaClockGating=no enaCpuStream=no enaFPU=yes enaMonExt=no enaWrAllo=no eth1addr=00:50:43:38:32:25 eth1mtu=1500 eth2addr=00:50:43:38:a6:25 eth2mtu=1500 eth3addr=00:50:43:32:a6:38 eth3mtu=1500 ethact=egiga0 ethaddr=98:0D:67:4D:4C:44 ethmtu=1500 ethprime=egiga0 fdt_addr=2040000 fdt_skip_update=yes fdtaddr=0x1000000 fdtfile=armada-38x-modular.dtb fwversion_1=V5.21(AAZF.4) fwversion_2=V5.21(AAZF.4) ide_path=/ image_name=uImage img_checksum_1=4f8482d456f3aa06b3d7a4769916fa45 img_checksum_2=4f8482d456f3aa06b3d7a4769916fa45 initrd_name=uInitrd ipaddr=10.4.50.170 kernel_addr=${kernel_addr_1} kernel_addr_1=0x00000000; run bootcmd_custom; kernel_addr_2=0x08700000 kernel_addr_r=2080000 kernel_mtd_1=3 kernel_mtd_2=5 lcd0_enable=0 lcd0_params=640x480-16@60 lcd_panel=0 load_dtb_addr=0x1000000 load_image_addr=0x02000000 load_initrd_addr=0x2900000 loadaddr=0x02000000 loads_echo=0 modelid_1=B303 modelid_2=B303 mtdids=nand0=armada-nand mtdparts=mtdparts=armada-nand:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2) mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500 mv_pon_addr=00:50:43:25:a6:38 nandEcc=nfcConfig=4bitecc netbsd_en=no netmask=255.255.255.0 netretry=no next_bootfrom=2 pcieTune=no pexMode=RC pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm pxefile_addr_r=3100000 ramdisk_addr_r=2880000 revision_1=51163 revision_2=51163 romfile_checksum_1=55FA romfile_checksum_2=55FA rootpath=/srv/nfs/ sata_delay_reset=0 sata_dma_mode=yes script_addr_r=3000000 script_name=boot.scr serial_number=S190Y30120562 serverip=10.4.50.38 set_bootargs_stock=setenv bootargs "console=ttyS0,115200 ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs1 rw rootdelay=2" standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000; stderr=serial stdin=serial stdout=serial sysimg_mtd_1=4 sysimg_mtd_2=6 usb0Mode=host usbActive=1 usbType=2 usb_bootcmd=echo Booting from USB ...; setenv fdt_skip_update yes; run usb_init; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/armada-380-zyxel-nas326.dtb; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr usb_init=mw.l f1018100 20420000; mw.l f1018140 003E8800; sleep 3; usb start usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial" vxworks_en=no yuk_ethaddr=00:00:00:EE:51:81 zld_checksum_1=fb6f99502a16990e237befde4540abd0 zld_checksum_2=fb6f99502a16990e237befde4540abd0 change_boot_part=0
Re: Debian on Zyxel NAS326 January 12, 2020 10:17PM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Zyxel NAS326 January 12, 2020 10:55PM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 13, 2020 12:26AM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
For 1st time installation, please use the instruction below.
kwboot -t -B 115200 /dev/ttyUSB0 -d
Re: Debian on Zyxel NAS326 January 13, 2020 12:48PM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 13, 2020 11:13PM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 13, 2020 11:48PM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
Installation Instruction for specific boxes:
Zyxel NAS326 (Armada 380) Installation, see this thread.
WD My Cloud EX2100 (Armada 385) Installation: see this thread.
GlobalScale Technologies Mirabox (Armada 370) Installation, see this thread
Thecus N2350 (Armada 385) Installation: see this thread.
Synolgy RS816 (Armada 385) Installation: see Installation with USB rootfs (Section I). In the near future, there will be 3 more sections for other installation methods, but they are not ready yet.
Quote
Installation for NAS326 box can be done with serial console connected (section A), or inside stock OS and without serial console (section B for USB rootfs, section C for SATA rootfs). Note: for section A and B, the USB rootfs must be inserted to the front USB port (USB 2.0).
Quote
Yes, I connected serial adapter, Prolific 2303(as I recall, writing from work). I successfully installed debian on Stora, Iomega with this adapter. I use screen on Debian Buster. Unit doesn't boot with adapter in USB slot. I disconnected it, boot proceeds. Then I quickly connect it and see some scrawls like word fragments.
Re: Debian on Zyxel NAS326 January 14, 2020 12:14AM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 14, 2020 02:29AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Zyxel NAS326 January 14, 2020 10:52PM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 14, 2020 11:24PM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Zyxel NAS326 January 21, 2020 05:32AM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 21, 2020 06:35AM |
Admin Registered: 13 years ago Posts: 19,094 |
ifconfig fw_printenv ethaddr
fw_printenv dmesg
hwaddress ether xx:xx:xx:xx:xx:xx
Re: Debian on Zyxel NAS326 January 21, 2020 07:16AM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 21, 2020 03:42PM |
Admin Registered: 13 years ago Posts: 19,094 |
auto lo eth0 iface lo inet loopback #iface eth0 inet dhcp iface eth0 inet static address 192.168.1.25 netmask 255.255.255.0 gateway 192.168.1.1
ifdown eth0 ifconfig -v eth0 hw ether 98:0d:67:4d:4c:44 ifup eth0
ping 192.168.1.1
dmesg ifconfig -a
Re: Debian on Zyxel NAS326 January 21, 2020 11:23PM |
Registered: 4 years ago Posts: 15 |
Re: Debian on Zyxel NAS326 January 22, 2020 03:22AM |
Admin Registered: 13 years ago Posts: 19,094 |
inet6 addr: fe80::9a0d:67ff:fe4d:4c44/64 Scope:Link
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial ipv6.disable=1"'
Re: Debian on Zyxel NAS326 January 22, 2020 04:17AM |
Registered: 4 years ago Posts: 15 |
eth0 Link encap:Ethernet HWaddr 98:0d:67:4d:4c:44 inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:68 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:532 RX bytes:0 (0.0 B) TX bytes:5025 (4.9 KiB) Interrupt:36
root@debian:~# arp 192.168.1.1 Address HWtype HWaddress Flags Mask Iface 192.168.1.1 (incomplete) eth0
Re: Debian on Zyxel NAS326 January 22, 2020 04:39AM |
Admin Registered: 13 years ago Posts: 19,094 |