Welcome! Log In Create A New Profile

Advanced

zyxel310 + uBoot no USB

Posted by Lobo 
zyxel310 + uBoot no USB
September 23, 2019 01:43AM
Hi,

I tried to install debian on zyxel310 nas server, because I had problems with original fw (nfs freeze and some other). Nex time I tried openwrt, but there is some problem with speed over net (samba/nfs/sshfs - all are slow)

But when I tried debian - http://davidegironi.blogspot.com/2018/12/debian-and-openmediavault-on-zyxtel.html I have problem with step 2

uboot does not see usb:

NSA310> printenv 
baudrate=115200
bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=50:67:F0:69:BF:1E
ipaddr=192.168.1.108
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
partition=nand0,0
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial

Environment size: 394/131068 bytes
NSA310> 

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
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
NSA310>

but when I installed openwrt, usb in uboot worked, in openwrt usb working too.
Uboot I installed with kwboot

I tried 4 different devices, but nothing :-/

can someone help me please?

thank You a lot
Re: zyxel310 + uBoot no USB
September 23, 2019 02:24AM
Lobo,

Looks like you are not running my released u-boot.

Quote

bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000

So I am not sure what that problem is.

Try running kwboot with my latest uboot in this release thread

Quote

uboot.2017.07-tld-1.nsa310.bodhi.tar

See if you can start USB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
September 23, 2019 03:28AM
ok thank You a lot, I will try it - but I am not sure - I think I installed correct version

can there be a problem whit install ower kw boot?
Re: zyxel310 + uBoot no USB
September 23, 2019 04:40AM
Lobo,

Before trying kwboot.

Let it boot with serial console, interrupt it and

ver
printenv

Please post the entire serial log here (everything from the command to start serial console).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/23/2019 04:41AM by bodhi.
Re: zyxel310 + uBoot no USB
September 23, 2019 07:28AM
Hi, here is it:

U-Boot 2019.01 (Jun 28 2019 - 19:49:33 +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> ver
U-Boot 2019.01 (Jun 28 2019 - 19:49:33 +0000)
ZyXEL NSA310 1-Bay Power Media Server

arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 7.4.0 r10366-c2e819537f) 7.4.0
GNU ld (GNU Binutils) 2.31.1
NSA310> printenv
baudrate=115200
bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=50:67:F0:69:BF:1E
ipaddr=192.168.1.108
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
partition=nand0,0
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial

Environment size: 394/131068 bytes
NSA310>
Re: zyxel310 + uBoot no USB
September 23, 2019 04:58PM
Lobo,

> U-Boot 2019.01 (Jun 28 2019 - 19:49:33 +0000)
> ZyXEL NSA310 1-Bay Power Media Server

That's definitely not my released u-boot. Looks like OpenWrt one.

OK. So please go ahead and try kwboot booting with the image uboot.2017.07-tld-1.nsa310.mtd0.kwb

After you got it loaded and running, interrupt serial console and

usb start

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
September 24, 2019 01:45AM
many thanks, I really thougth I had the right uboot. I'll try it again in the evening



Edited 1 time(s). Last edit at 09/24/2019 01:49AM by Lobo.
Re: zyxel310 + uBoot no USB
October 07, 2019 06:23AM
Hi boodhi, sorry for long time break (a lot of work)

I tried it again, but:

root@debian-netbook:/home/bada# kwboot -t -B 115200 /det.2017.07-tld-1.nsa310.mtd0.kwb -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [................................................
  1 % [................................................
  3 % [................................................
  5 % [................................................
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 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 

U-Boot 2019.01 (Jun 28 2019 - 19:49:33 +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> ver

U-Boot 2019.01 (Jun 28 2019 - 19:49:33 +0000)
ZyXEL NSA310 1-Bay Power Media Server

arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 7.4.0 r10366-c2e819537f) 7.4.0
GNU ld (GNU Binutils) 2.31.1

NSA310> usb start
starting 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> 

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
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
NSA310> printenv 
baudrate=115200
bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=50:67:F0:69:BF:1E
ipaddr=192.168.1.108
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
partition=nand0,0
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial

Environment size: 394/131068 bytes
NSA310>

I can't to say what I'am doing wrong :-/
Re: zyxel310 + uBoot no USB
October 07, 2019 10:43AM
I'm sorry, I found the problem - I didn't interrupt boot right after kwboot -p - now I'am in second step but:

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> fatload usb 0 0x0 0x800000 uboot.kwb
reading 0x800000
** Unable to read file 0x800000 **

it can mean bad flash disk (I have only one now)?
Re: zyxel310 + uBoot no USB
October 07, 2019 09:51PM
Lobo,

Congrats!

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 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

Now at this point, you are running the latets u-boot from RAM.

What you should do next is boot into Debian, and then flash this U-Boot 2017.07-tld-1.

Please get the current envs in u-boot to doublecheck which envs were loaded (I think it is still OpenWrt set of envs, but I like to see it).

printenv

The next step: we will load the corerct set of envs to boot Debian. I wil post that instruction after I see your printenv output.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
October 08, 2019 02:54PM
thank You a lot Bodhi,

here is it:
NSA310> ver

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 

gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA310> printenv 
baudrate=115200
bootcmd=ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=50:67:F0:69:BF:1E
ipaddr=192.168.1.108
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
partition=nand0,0
serverip=192.168.1.2
stderr=serial
stdin=serial
stdout=serial

Environment size: 426/131068 bytes
NSA310> usb start
starting 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 0x0 0x800000 uboot.kwb
reading 0x800000
** Unable to read file 0x800000 **

disc is 4GB flash formated in win10 to FAT32, on the disc are two files:
$ sha512sum uboot.img 
3d04d0426827b915d336f8c84763daeda03e9eb26597dcbf3bf9440bee6ceed115c5f852557ac179e85f0f2f9bd042e1a273132e7e63cfa8a51cf12fbe100db0  uboot.img
$ sha512sum uboot.kwb 
3db47bbb1ceda4e770aa114fb05bcf16c070e1c3c8232d55ffc466f4daaef680ecd0922cc51f707cbedfd3ff6d5ab6b759992297fd78be7383efcb333c8d418a  uboot.kwb

have a nice day

L
Re: zyxel310 + uBoot no USB
October 08, 2019 05:50PM
Lobo,

Create the USB Debian rootfs using the tarball Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

https://forum.doozan.com/read.php?2,12096

Scroll down to section

Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:


And then,

Try loading the default envs as described in this post (and the post right before it):

https://forum.doozan.com/read.php?3,38889,40094#msg-40094

After you loaded the default envs script at u-boot prompt, you need to adjust the envs to boot NSA310

setenv dtb_file '/boot/dts/kirkwood-nsa310.dtb'

And try to boot

boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
October 13, 2019 12:28AM
than You a lot Bodhi - after disc creation ("Updated 25 Aug 2019" post)

and copying uboot.2016.05-tld-1.environment.scr (from the attached file) to /boot/ o this disk and


root@debian-netbook:/home/bada# kwboot -t -B 115200 /det.2017.07-tld-1.nsa310.mtd0.kwb -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [................................................
  1 % [................................................
  3 % [................................................
  5 % [................................................
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 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 

usb start
ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr
source 0x800000
printenv
setenv devices 'usb ide'
setenv ethaddr xx:xx:xx:xx:xx:xx (replaced with my adress)
setenv dtb_file '/boot/dts/kirkwood-nsa310.dtb'
boot

I'am in the debian now (user:password root:root)

what is the next correct procedure please?

thank You a lot for Your patience

L



Edited 2 time(s). Last edit at 10/13/2019 01:23AM by Lobo.
Attachments:
open | download - uboot.2016.05-tld-1.environment.scr (3.2 KB)
Re: zyxel310 + uBoot no USB
October 13, 2019 01:00AM
is it this? https://forum.doozan.com/read.php?3,38889,40094#msg-40094

and correct uboot.2016.05-tld-1.environment.img is from here?: https://www.dropbox.com/s/4smmw2wr4ugayz9/uboot.2016.05-tld-1.environment.bodhi.tar

and what mean "fw_setenv mtdparts 'xxxxxxxxx' (forgotten :-()"?

sorry for many question, but I'am not a IT :(

thank You a lot
Re: zyxel310 + uBoot no USB
October 13, 2019 01:34AM
Lobo,

Quote

I'am in the debian now (user:password root:root)

Cool!

So now you can flash the new u-boot and its env image to NAND.

Follow the instruction in the release thread:

https://forum.doozan.com/read.php?3,12381

There are 11 steps. You will need to read them and see if you are comfortable with the instruction. After you've done each step, if the result is not what is exepcted, post the question here before going to the next step. And don't reboot or power off the box until you're done with all 11 steps.


Quote

A. Flashing Instruction:


Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

1. uBoot envs config should be defined as followed in your /etc/fw_env.config

cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

- And your mtd partitions should be:

cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"

Note: for boxes such as Pogo V4 and Zyxel NSA3xx, the mtd partition definition are kept the same as stock definition, therefore is different from the one above.

If you don't have /etc/fw_env.config file in your system then go ahead and create this file with the above content. MTD parts are not important for booting and it can be adjusted later. For users who like to keep the stock mtd definition, there is no need to adjust it to the above definition. As long as mtd0 is defined as 1MB (0x00100000) or greater then it will be OK:
mtd0: 00100000 00020000 "u-boot"

2. Make sure ethaddr is set in uBoot env. It must be set before rebooting the system. However, if you plan to flash the default envs image in step 8 (Flashing default u-boot envs image), then no need to worry about it now. It can be set after you've booted in to Linux. The MAC address will be set to a valid randomly generated local address.
fw_printenv ethaddr

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution. And save your current u-boot envs with fw_printenv, or just copy/paste the listing into a text file. Note the nanddump command below allows future restoration to the same box you're backing up, and also can be used to restore a differrent box's mtd0 if needed.

Dumping NAND mtd0:
nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Save envs:
fw_printenv > current_envs.txt
or
blparam > current_envs.txt

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[ 2.413231] Scanning device for bad blocks
[ 2.417731] Bad eraseblock 3 at 0x000000060000

This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.

5. Extract the archive to /tmp

Among the tar commands below, be careful and execute only one tar command corresponding to your platform that you are installing to, using the tar file that you have downloaded before starting the flashing instruction. Beware of the similar sounding name of different u-boots (nsa310s and nsa310 are two different u-boots).
cd /tmp
tar -xf uboot.2017.07-tld-1.dockstar.bodhi.tar
tar -xf uboot.2017.07-tld-1.goflexhome.bodhi.tar
tar -xf uboot.2017.07-tld-1.goflexnet.bodhi.tar
tar -xf uboot.2017.07-tld-1.iconnect.bodhi.tar
tar -xf uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
tar -xf uboot.2017.07-tld-1.pogo_e02.bodhi.tar
tar -xf uboot.2017.07-tld-1.pogo_v4.bodhi.tar
tar -xf uboot.2017.07-tld-2.sheevaplug.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa320.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa325.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa310s.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa310.bodhi.tar

Be extra careful with the next 2 commands in step 6 and 7, you should see output that look like below in those steps. If there is error, then do not reboot, post your problem here so we can help.

6. Erase mtd0
flash_erase /dev/mtd0 0 4
Expected output:
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done

7. Write image to NAND

Among the nandwrite commands below, be extra careful and execute only one nandwrite command corresponding to your platform that you are installing to, using the kwb file that you have extracted in step 5. Please double check to make sure the file is for the correct platform. Especially the similar sounding names (e.g. nsa310s and nsa310 are different u-boots).

nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexhome.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexnet.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.iconnect.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_e02.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_v4.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-2.sheevaplug.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa320.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa325.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310s.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310.mtd0.kwb

Expected output:
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).

As described in step 1, u-boot envs must be defined in /etc/fw_env.config as

# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

a. Download the default u-boot envs at Dropbox:

uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c

This tarball includes 3 files:

uboot.2016.05-tld-1.environment.img (the default envs image to be flashed)
uboot.2016.05-tld-1.environment (the content of the default envs in text format)
uboot.2016.05-tld-1.environment.64K.img (small envs image to be flashed on HP T5325 only).

b. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

c. Save current envs with fw_printenv, or just copy/paste the listing into a text file.
fw_printenv > current_envs.txt

d. Flash u-boot envs to NAND location 0xC0000.

Be extra careful with the next 2 commands, you should see output that look like below. If there is error, then do not reboot, post your problem here so we can help.

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Expected output:
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Expected output:
Writing data to block 6 at offset 0xc0000

e. Modify the following u-boot variables using fw_setenv:

e.1 ArcNumber:

Note that arcNumber and machid are not necessary if you are booting with FDT kernel 3.17+ in the latest kernel and rootfs thread. But it does not hurt to set them anyway.

archNumber and machid are required for non-FDT kernel (3.16.x or earlier)

Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears them).

for Pogo V4/Mobile:
fw_setenv arcNumber 3960
fw_setenv machid f78

for iConnect:
fw_setenv arcNumber 2870
fw_setenv machid

for Stora:
fw_setenv arcNumber 2743
fw_setenv machid

for Dockstar:
fw_setenv arcNumber 2998
fw_setenv machid

for Pogo E02:
fw_setenv arcNumber 3542
fw_setenv machid dd6

for GoFlex Home:
fw_setenv arcNumber 3338
fw_setenv machid


for GoFlex Net:
fw_setenv arcNumber 3089
fw_setenv machid

for Sheevaplug:
fw_setenv arcNumber 2097
fw_setenv machid

for NSA325:
fw_setenv arcNumber 4495
fw_setenv machid

for NSA320:
fw_setenv arcNumber 3956
fw_setenv machid

for NSA310S/320S:
fw_setenv arcNumber 4931
fw_setenv machid

for NSA310:
fw_setenv arcNumber 4022
fw_setenv machid

e.2 Box specific envs:

Then for all boxes, restore these 2 envs using the saved envs text in step c (replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

e.3 uEnv.txt envs correction (optional):

These envs are important to be set if you plan to use uEnv.txt (see section C).

fw_setenv uenv_init_devices 'echo Initializing devices...; setenv init_usb "usb start"; setenv init_ide "ide reset"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done'
fw_setenv uenv_read 'echo Loading envs from $device_type $disk_number...; if load $device_type $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi'
fw_setenv uenv_load 'run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;'
fw_setenv uenv_read_disk

And for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA. This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).
fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'


f. Adjust the DTB name to boot with a rootfs that has FDT kernel 3.17+ (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

In the special case when you are booting with a non-FDT kernel 3.16 or earlier, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file

h. For sanity check, list you envs again
fw_printenv

If there is error in listing u-boot envs, stop here and post your problem so we can help.

Remember to save away your old envs text file created in step c for future reference in case more need to be restored.

i. Done step 8.


9. For sanity check, print out uBoot envs to see if they look OK.
fw_printenv
and then double check the ethaddr env again to be sure. Don't reboot if there is error while listing U-Boot envs.

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'


11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show:

U-Boot 2017.07-tld-1 (….)
<your box name>

DONE installation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
October 13, 2019 01:18PM
it is ok, installanion was ok - thank You a lot for Your patience

there was only one little problem after installation:

ethernet card is now
enp1s0

not

eth0

/etc/network/interfaces look now:

auto lo enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

Thank You again

L
Re: zyxel310 + uBoot no USB
October 13, 2019 05:11PM
> it is ok, installanion was ok - thank You a lot
> for Your patience

Cool!

>
> there was only one little problem after
> installation:
>
> ethernet card is now
>
> enp1s0
>

That's expected. The new network naming scheme shows up when you activate systemd. I don't recall seeing this in Debian buster syvinit.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
October 13, 2019 11:29PM
Hi, all work ok, samba speed is (r/w) on 25/25 Mbps, scp 8Mbps (in openwrt it was 10/10 and 2.5/2.5) - that is much better

I have one more question please - are here some recommended things after debian installation?

For example - install firmware-linux-free/nonfree or something other packages, some specific settings for NSA310?

Thank You and have nice day

L
Re: zyxel310 + uBoot no USB
October 14, 2019 12:31AM
Lobo,

> I have one more question please - are here some
> recommended things after debian installation?
>
> For example - install firmware-linux-free/nonfree

It's case by case. If you want to use some USB gadgets, usually you need firmware-linux-nonfree

> or something other packages, some specific
> settings for NSA310?

Look at /etc/rc.local and /etc/init.d/halt for examples how to control the system LED and disks LED. And in your system they are in

/sys/class/leds/nsa310.....

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: zyxel310 + uBoot no USB
October 22, 2019 01:10AM
Hi Bodhi,

thank You a lot - everything work ok, sharing, leds

please one more think: do You have an idea about speed of this sharing? In original firmware it was (over NFS) 55/35 MBs. Now is it about 35/35. Where there may be a bottleneck?

L
Re: zyxel310 + uBoot no USB
October 22, 2019 05:34AM
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: