Welcome! Log In Create A New Profile

Advanced

Zyxel NSA325 questions (uboot)

Posted by Alatun 
Zyxel NSA325 questions (uboot)
April 25, 2020 12:52PM
Hi there!

I've been testing the debian install like documented here in the forums on my NSA325. I've got a serial connection and was successful in running

./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p

with an attached USB stick prepared with the Debian kirkwood rootfs. So I could test the whole thing, without modifying the original setup.

What I noticed: without an USB stick the new U-Boot does not boot the original stock firmware, but does a reset. I have quite some experience with Linux on Intel systems, but this the first time dealing with the ARM and embedded world. The hardware configuration of these systems seems not being done via hardware scanning, but by using a "device tree" and U-Boot seems responsible initializing the hardware and then starting the linux kernel.

My first question: if I update to a new U-Boot, how can I start the stock firmware? And maybe switch between booting from the internal flash and from USB / disk.

Second question: I've seen several "fw_setenv" commands in the guides here, which set env variables for U-Boot, but I'd like to get more knowledge what's going on. Probably some values are being passed to the Linux kernel, but some also must control the behavior of U-Boot. Maybe someone can point me in the right direction.

Thanks in advance.
Re: Zyxel NSA325 questions (uboot)
April 25, 2020 04:56PM
Alatun,

> My first question: if I update to a new U-Boot,
> how can I start the stock firmware? And maybe
> switch between booting from the internal flash and
> from USB / disk.

No, currently it is not possible to boot back to stock FW after you've installed the new u-boot. It might be possible in the future, if I run out of things to do on my list, and have time to play with it a bit. But this has a very low priority.

> Second question: I've seen several "fw_setenv"
> commands in the guides here, which set env
> variables for U-Boot, but I'd like to get more
> knowledge what's going on. Probably some values
> are being passed to the Linux kernel, but some
> also must control the behavior of U-Boot. Maybe
> someone can point me in the right direction.
>

In u-boot, the command is setenv. In Linux, the command is fw_setenv. They do the same thing. But setenv will not save the envs permanently, until you do saveenv. fw_setenv will change the env and save it at the same time.

So to test various settings, setenv should be used in u-boot prompt. Since it is transient, if you reset the box (with u-boot reset command), or cycle power, then every thing will be back to the way it was. And then when you are sure to want to keep the envs change, you would do saveenv.

In my u-boot installation instruction, only fw_setenv was used. This has a purpose: no serial console needed, and it is only possible to use fw_setenv if your current system configuration is already what need to be.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 questions (uboot)
April 26, 2020 02:38AM
Thx bodhi,

I'm looking for a way to reset the box the original firmware state, if anything goes wrong. Later yesterday evening I found the command printenv which dumps all the env settings which are currently set.

I've recorded both the stock env settings and the settings of the 2017.07 U-Boot (see below). If I understood things correctly, it should be possible to switch back to the stock firmware by applying the stock U-Boot env settings. Right? Or are the different versions of U-Boot no longer compatible regarding the commands involved?

So, if I create two scripts: one for setting the stock U-Boot env setting and one for booting from USB / disk this could solve the above problem.

The only problem could be, that each setup has slightly different keys. But does this matter?

Stock U-Boot env settings:
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=4C:9E:FF:BF:55:FC
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
disaMvPnp=no
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
pcieTune1=no
ethact=egiga0

New U-Boot env:
arcNumber=4495
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_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;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15
Re: Zyxel NSA325 questions (uboot)
April 26, 2020 03:39AM
Alatun,

> I've recorded both the stock env settings and the
> settings of the 2017.07 U-Boot (see below). If I
> understood things correctly, it should be possible
> to switch back to the stock firmware by applying
> the stock U-Boot env settings. Right?

No, it will not work.

> Or are the
> different versions of U-Boot no longer compatible
> regarding the commands involved?

The difference is not in the command set or the envs. The difference betweek stock u-boot and new u-boot is structural.

The new u-boot set up its registers, memory,... etc to run a mainline kernel. Stock u-boot is set up to run this NSA325 stock kernel, a customed kernel 2.6.xx running on busybox.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Multivan
Re: Zyxel NSA325 questions (uboot)
August 25, 2023 04:42AM
Hi all,

after setup the tftp server (tfpt64) in Windows10 and download the u-boot.kwb I did the following steps :

Marvell>> setenv ipaddr 192.168.1.2
Marvell>> setenv serverip 192.168.1.101
Marvell>> Marvell>>tftpboot 0x800000 uboot.kwb
Marvell>> nand erase 0x0 0x100000
Marvell>> tftpboot 0x800000 uboot.kwb
Marvell>> nand write 0x800000 0x0 0x80000

It seems everything are ok, but after I put the command:

Marvell>> reset

no output can be seen in the serial terminal. I need urgent help.
how can I have the access to the NSA 325?

Thank you in advance
Multivan
Re: Zyxel NSA325 questions (uboot)
August 25, 2023 12:45PM
Multivan,

> after setup the tftp server (tfpt64) in Windows10
> and download the u-boot.kwb

Where did you download this u-boott.kwb (what version is this), stock u-boot or one of my new u-boot releases?

I did the following
> steps :
>
> Marvell>> setenv ipaddr 192.168.1.2
> Marvell>> setenv serverip 192.168.1.101
> Marvell>> Marvell>>tftpboot 0x800000 uboot.kwb
> Marvell>> nand erase 0x0 0x100000
> Marvell>> tftpboot 0x800000 uboot.kwb
> Marvell>> nand write 0x800000 0x0 0x80000
>
> It seems everything are ok, but after I put the
> command:
>
> Marvell>> reset
>
> no output can be seen in the serial terminal. I
> need urgent help.

Don't flash u-boot image in serial console without verifying the current running u-boot supports it and the envs are correct for the NAND flash to be visible.

> how can I have the access to the NSA 325?

To recover from it, connect serial console. And you need another Linux box to run the serial console module converter. And then follow the instruction in this post:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

Once you can boot with kwboot, it is unbricked. And then go from there to consider installing Debian, or try to restore stock u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Multivan
Re: Zyxel NSA325 questions (uboot)
September 05, 2023 07:45AM
Hi Bodhi,

Thank You very much for your quick response.

I manage to install the ubuntu on my PC. I download the files from your link:

https://www.dropbox.com/s/zlgzv27d7d42tfv/uboot.2023.04-tld-1.nsa325.bodhi.tar

I use my PC and send the command to NSA325:

Ubuntu> kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2023.04-tld-1.nsa325.kwb -p

After the the NSA325 is unbricked, should I flash the NAND with this uboot.2023.04-tld-1.nsa325.kwb, again, with the following commands from the USB Stick?

NSA325> usb reset
NSA325> fatload usb 0 0x1000000 u-boot.kwb
NSA325> nand erase 0x0 0x100000
NSA325> nand write 0x1000000 0x00000 0x100000
NSA325> reset

What about the remaining files from your the pakage above from your links?

Asks Multivan
Re: Zyxel NSA325 questions (uboot)
September 05, 2023 12:14PM
Multivan,

You did not answer my question above.

Quote

Where did you download this u-boott.kwb (what version is this), stock u-boot or one of my new u-boot releases?

And have you run kwboot successfully? if you did, please post the serial console log here (copy from the terminal session and paste here).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Multivali
Re: Zyxel NSA325 questions (uboot)
September 06, 2023 09:01AM
Hi Bodhi,

sorry. I read over your question.

>Quote

>Where did you download this u-boott.kwb (what version is this), stock u-boot or one of my new u-boot releases?

Answer: I download from this link: https://archive.openwrt.org/releases/18.06.0/targets/kirkwood/generic/u-boot-nsa325/


> And have you run kwboot successfully? if you did, please post the serial console log here (copy from the terminal session and paste here).


Answer; I use your uboot for kwboot and it works:

sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.kwb -p
Sending boot message. Please reboot the target...-
Sending boot image...
0 % [......................................................................]
1 % [......................................................................]
3 % [......................................................................]
5 % [......................................................................]
6 % [......................................................................]
8 % [......................................................................]
10 % [......................................................................]
11 % [......................................................................]
13 % [......................................................................]
15 % [......................................................................]
17 % [......................................................................]
18 % [......................................................................]
20 % [......................................................................]
22 % [......................................................................]
23 % [......................................................................]
25 % [......................................................................]
27 % [......................................................................]
29 % [......................................................................]
30 % [......................................................................]
32 % [......................................................................]
34 % [......................................................................]
35 % [......................................................................]
37 % [......................................................................]
39 % [......................................................................]
41 % [......................................................................]
42 % [......................................................................]
44 % [......................................................................]
46 % [......................................................................]
47 % [......................................................................]
49 % [......................................................................]
51 % [......................................................................]
53 % [......................................................................]
54 % [......................................................................]
56 % [......................................................................]
58 % [......................................................................]
59 % [......................................................................]
61 % [......................................................................]
63 % [......................................................................]
64 % [......................................................................]
66 % [......................................................................]
68 % [......................................................................]
70 % [......................................................................]
71 % [......................................................................]
73 % [......................................................................]
75 % [......................................................................]
76 % [......................................................................]
78 % [......................................................................]
80 % [......................................................................]
82 % [......................................................................]
83 % [......................................................................]
85 % [......................................................................]
87 % [......................................................................]
88 % [......................................................................]
90 % [......................................................................]
92 % [......................................................................]
94 % [......................................................................]
95 % [......................................................................]
97 % [......................................................................]
99 % [....................................]
[Type Ctrl-\ + c to quit]
#

U-Boot 2023.04-tld-1 (Jun 24 2023 - 17:50:21 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC: Kirkwood 88F6282_A1
Model: ZyXEL NSA325
DRAM: 512 MiB
Core: 19 devices, 15 uclasses, devicetree: separate
NAND: 128 MiB
Loading Environment from NAND... *** Warning - bad CRC, using default environment

Resetting console stdin/stdout/stderr to serial...
In: serial
Out: serial
Err: serial
pcie0.0: Link up
Net:
Warning: ethernet-controller@72000 (eth0) using random MAC address - 5e:3b:61:bb:ac:5b
eth0: ethernet-controller@72000
Hit any key to stop autoboot: 0
starting USB...
Bus ehci@50000: USB EHCI 1.00
Bus xhci_pci: Register 4000820 NbrPorts 4
Starting the controller
USB XHCI 0.96
scanning bus ehci@50000 for devices... 2 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device

Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 80.00A80 Ser#: WD-WMC4N1224220
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
... is now current device
Scanning sata 0:1...
ethernet-controller@72000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
NSA325>
Re: Zyxel NSA325 questions (uboot)
September 06, 2023 02:49PM
Multivali,

> https://archive.openwrt.org/releases/18.06.0/targets/kirkwood/generic/u-boot-nsa325/

I see. You wants to run OpenWrt. Have you installed it before on this box?

1. If you want to run both OpenWrt (from NAND) and Debian (from USB) then see this post:

https://forum.doozan.com/read.php?4,86219

2. If you have installed OpenWrt on this box and now just want to restore the corrupted u-boot, then kwboot with the u-boot.kwb (from https://archive.openwrt.org/releases/18.06.0/targets/kirkwood/generic/u-boot-nsa325/). And then boot into OpenWrt. After that, you can flash the u-boot.kwb image from inside OpenWrt.

If you are not sure, then you probably want to do 1 above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Multivan
Re: Zyxel NSA325 questions (uboot)
September 12, 2023 11:49AM
Bodhi,

first of all, thank you very much for your support.

After I download the u-boot.kwb from:
https://archive.openwrt.org/releases/18.06.0/targets/kirkwood/generic/u-boot-nsa325/
and
the openwrt from this links:
https://downloads.openwrt.org/releases/22.03.5/targets/kirkwood/generic/openwrt-22.03.5-kirkwood-zyxel_nsa325-squashfs-factory.bin

copied both to the USB stick and plug it in the rear USB port of NSA325.

Using the kwboot to boot the NSA325 and flash the NAND according to:

usb start
usb reset
fatload usb 0 0x1000000 u-boot.kwb
nand erase 0x0 0x100000
nand write 0x1000000 0x00000 0x100000
reset
setenv mtdparts 'mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)'
setenv bootcmd 'run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
saveenv
reset
setenv ethaddr xx:xx:xx:xx:xx:xx
saveenv
usb reset
fatload usb 0 0x2000000 nsa325.bin
nand erase.part ubi
nand write 0x2000000 ubi 0x600000
reset

The first restart seems ok. openwrt is running.
but after the cold start (power plug out and in) the uboot seem does not work properly.
The uboot stops :

NAS325>

Openwrt is not up.

after I send the reset command from terminal windows uboot continues and openwrt is up.
Do you have and Idea why the start process stops ?
Re: Zyxel NSA325 questions (uboot)
September 12, 2023 12:54PM
Multivan,

> after I send the reset command from terminal
> windows uboot continues and openwrt is up.
> Do you have and Idea why the start process stops ?

Powerup, interrupt serial consle and,
printenv
boot
And post the entire serial console log here (copy/paste everything on the terminal).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Multivan
Re: Zyxel NSA325 questions (uboot)
September 13, 2023 01:54AM
Hi Bodhi,

attached you will find the printout:


NSA325> printenv
baudrate=115200
bootcmd=run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=xx:xx:xx:xx:xx:xx
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
stderr=serial
stdin=serial
stdout=serial

Environment size: 349/131068 bytes



NSA325> boot
## Error: "setenv" not defined
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=2", 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: 2/0, WL threshold: 4096, image sequence number: 1682627295
ubi0: available PEBs: 0, total reserved PEBs: 1009, PEBs reserved for bad PEB handling: 15
Read 0 bytes from volume kernel to 800000
No size specified -> Using max size (2709504)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-5.10.176
   Created:      2023-04-27  20:28:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2689432 Bytes = 2.6 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 5.10.176 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Thu Apr 27 20:28:15 2023
[    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 NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 510160K/524288K available (6008K kernel code, 600K rwdata, 928K rodata, 1024K init, 215K bss, 14128K reserved, 0K cma-reserved)
[    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] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000038] Switching to timer-based delay loop, resolution 5ns
[    0.000165] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000190] pid_max: default: 32768 minimum: 301
[    0.000356] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000378] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001195] CPU: Testing write buffer coherency: ok
[    0.002294] Setting up static identity map for 0x100000 - 0x10003c
[    0.002521] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.002731] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.005706] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005736] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.005856] pinctrl core: initialized pinctrl subsystem
[    0.007283] NET: Registered protocol family 16
[    0.007630] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.008554] thermal_sys: Registered thermal governor 'step_wise'
[    0.008649] cpuidle: using governor ladder
[    0.008923] Feroceon L2: Enabling L2
[    0.008964] Feroceon L2: Cache support initialised.
[    0.017627] No ATAGs?
[    0.059756] SCSI subsystem initialized
[    0.061286] usbcore: registered new interface driver usbfs
[    0.061334] usbcore: registered new interface driver hub
[    0.061378] usbcore: registered new device driver usb
[    0.066379] clocksource: Switched to clocksource orion_clocksource
[    0.067094] NET: Registered protocol family 2
[    0.067285] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.068060] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.068108] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.068165] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.068218] TCP: Hash tables configured (established 4096 bind 4096)
[    0.068291] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.068316] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.068477] NET: Registered protocol family 1
[    0.068505] PCI: CLS 0 bytes, default 32
[    0.072386] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.075619] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.075635] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.076287] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.078433] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.079480] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    0.079518] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    0.079541] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.079556] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.079716] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.079734] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.079747] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    0.079757] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.079766] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.079862] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.080943] PCI: bus0: Fast back to back transfers disabled
[    0.080958] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.081081] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    0.081116] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    0.081240] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.081280] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    0.082214] PCI: bus1: Fast back to back transfers disabled
[    0.082231] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.082387] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.082403] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.082423] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.082435] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.082487] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.082505] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    0.084305] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.085679] printk: console [ttyS0] disabled
[    0.085763] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.683818] printk: console [ttyS0] enabled
[    0.688577] Loading iSCSI transport class v2.0-870.
[    0.697613] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.704002] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.708665] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.716275] Scanning device for bad blocks
[    0.731957] Bad eraseblock 121 at 0x000000f20000
[    0.744156] Bad eraseblock 201 at 0x000001920000
[    0.762533] Bad eraseblock 346 at 0x000002b40000
[    0.794324] Bad eraseblock 632 at 0x000004f00000
[    0.829536] Bad eraseblock 954 at 0x000007740000
[    0.840773] 3 fixed-partitions partitions found on MTD device orion_nand
[    0.847510] Creating 3 MTD partitions on "orion_nand":
[    0.852674] 0x000000000000-0x0000000c0000 : "uboot"
[    0.859641] 0x0000000c0000-0x000000140000 : "uboot_env"
[    0.865406] 0x000000140000-0x000008000000 : "ubi"
[    0.882095] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.892441] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 28:28:5d:13:f0:f8
[    0.901430] i2c /dev entries driver
[    0.906144] orion_wdt: Initial timeout 21 sec
[    0.921171] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.929121] NET: Registered protocol family 10
[    0.935495] Segment Routing with IPv6
[    0.939275] NET: Registered protocol family 17
[    0.943790] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.956966] 8021q: 802.1Q VLAN Support v1.8
[    0.965276] UBI: auto-attach mtd2
[    0.968652] ubi0: attaching mtd2
[    1.142334] ubi0: scanning is finished
[    1.157366] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[    1.162887] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.169815] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.176558] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.183377] ubi0: good PEBs: 1009, bad PEBs: 5, corrupted PEBs: 0
[    1.189508] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.196772] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1682627295
[    1.205944] ubi0: available PEBs: 0, total reserved PEBs: 1009, PEBs reserved for bad PEB handling: 15
[    1.215584] ubi0: background thread "ubi_bgt0d" started, PID 468
[    1.222502] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.228037] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.240524] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.250851] Freeing unused kernel memory: 1024K
[    1.255827] Run /sbin/init as init process
[    1.533486] init: Console is alive
[    1.537149] init: - watchdog -
[    1.919255] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.023251] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.035594] fsl-ehci: Freescale EHCI Host controller driver
[    2.045288] ehci-orion: EHCI orion driver
[    2.049499] orion-ehci f1050000.ehci: EHCI Host Controller
[    2.055042] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    2.062862] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    2.096410] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    2.102988] hub 1-0:1.0: USB hub found
[    2.107292] hub 1-0:1.0: 1 port detected
[    2.115885] ehci-platform: EHCI generic platform driver
[    2.131909] sata_mv f1080000.sata: slots 32 ports 2
[    2.141429] scsi host0: sata_mv
[    2.145662] scsi host1: sata_mv
[    2.149080] ata1: SATA max UDMA/133 irq 32
[    2.153210] ata2: SATA max UDMA/133 irq 32
[    2.396392] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.598466] hub 1-1:1.0: USB hub found
[    2.602618] hub 1-1:1.0: 4 ports detected
[    2.656405] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.665115] ata1.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133
[    2.671864] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    2.683260] ata1.00: configured for UDMA/133
[    2.687847] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68E 0A80 PQ: 0 ANSI: 5
[    2.697098] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    2.704894] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.711242] sd 0:0:0:0: [sda] Write Protect is off
[    2.716151] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.206401] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.215115] ata2.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133
[    3.221860] ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.231178] ata2.00: configured for UDMA/133
[    3.235734] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68E 0A80 PQ: 0 ANSI: 5
[    3.244985] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    3.252792] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.258939] sd 1:0:0:0: [sdb] Write Protect is off
[    3.263841] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.488639]  sda: sda1 sda2
[    3.492473] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.049098]  sdb: sdb1 sdb2
[    4.052983] sd 1:0:0:0: [sdb] Attached SCSI disk
[    4.061886] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    4.067207] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    4.074889] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    4.084222] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    4.089499] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    4.096947] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    4.108479] hub 2-0:1.0: USB hub found
[    4.112737] hub 2-0:1.0: 2 ports detected
[    4.117282] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.126213] hub 3-0:1.0: USB hub found
[    4.130536] hub 3-0:1.0: 2 ports detected
[    4.140476] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.150500] init: - preinit -
[    4.790459] random: jshn: uninitialized urandom read (4 bytes read)
[    4.879912] random: jshn: uninitialized urandom read (4 bytes read)
[    5.097363] random: jshn: uninitialized urandom read (4 bytes read)
[    5.237642] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[    5.247469] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.859443] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[    6.869285] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.440818] UBIFS (ubi0:2): Mounting in unauthenticated mode
[    9.472542] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 667
[    9.505853] UBIFS (ubi0:2): recovery needed
[    9.634917] UBIFS (ubi0:2): recovery completed
[    9.639482] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    9.647369] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.657339] UBIFS (ubi0:2): FS size: 120637440 bytes (115 MiB, 935 LEBs), journal size 6064128 bytes (5 MiB, 47 LEBs)
[    9.667999] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[    9.674647] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID CE6DD0C1-1FB5-4D73-A2B8-DDBB23A9BFAF, small LPT model
[    9.689042] mount_root: switching to ubifs overlay
[    9.700926] urandom-seed: Seeding with /etc/urandom.seed
[    9.767706] procd: - early -
[    9.770726] procd: - watchdog -
[   10.383035] procd: - watchdog -
[   10.387081] procd: - ubus -
[   10.433123] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.442335] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.449060] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.457929] procd: - init -
Please press Enter to activate this console.
[   11.170656] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.234609] rtc-pcf8563 0-0051: registered as rtc0
[   11.246437] rtc-pcf8563 0-0051: setting system clock to 2023-09-13T06:36:35 UTC (1694586995)
[   11.262652] urngd: v1.0.2 started.
[   11.349965] PPP generic driver version 2.4.2
[   11.368584] NET: Registered protocol family 24
[   11.395853] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.415830] random: crng init done
[   11.419282] random: 28 urandom warning(s) missed due to ratelimiting
[   17.621251] br-lan: port 1(eth0) entered blocking state
[   17.626545] br-lan: port 1(eth0) entered disabled state
[   17.631992] device eth0 entered promiscuous mode
[   20.596176] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control enabled
[   20.630712] br-lan: port 1(eth0) entered blocking state
[   20.635975] br-lan: port 1(eth0) entered forwarding state
[   20.655605] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

=========
bodhi edit: please use code tags (formatted code) to post log.



Edited 1 time(s). Last edit at 09/13/2023 01:58PM by bodhi.
Re: Zyxel NSA325 questions (uboot)
September 13, 2023 08:50AM
Hi,
It looks OK now.
[ 20.596176] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control enabled
[ 20.630712] br-lan: port 1(eth0) entered blocking state
[ 20.635975] br-lan: port 1(eth0) entered forwarding state
[ 20.655605] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

What do you expect ? NSA325 doesn't have DHCP client as default settings - you have to change it.
Here you have important information:
https://openwrt.org/docs/guide-quick-start/walkthrough_login



Edited 1 time(s). Last edit at 09/13/2023 08:50AM by kofec.
Multivan
Re: Zyxel NSA325 questions (uboot)
September 13, 2023 11:08AM
Hi Kotec,
below you will find my answer ans comment:

kofec Wrote:
-------------------------------------------------------
> Hi,
> It looks OK now.
> [ 20.596176] mv643xx_eth_port mv643xx_eth_port.0
> eth0: link up, 100 Mb/s, full duplex, flow control
> enabled
> [ 20.630712] br-lan: port 1(eth0) entered blocking
> state
> [ 20.635975] br-lan: port 1(eth0) entered
> forwarding state
> [ 20.655605] IPv6: ADDRCONF(NETDEV_CHANGE):
> br-lan: link becomes ready
>
> What do you expect ?

Multivan: Yes indeed it look ok now, but I do not want to send the boot command each time after and cold start.
my expectation is the NSA325 will reach to this state, automatically, after a cold start is performed.



NSA325 doesn't have DHCP
> client as default settings - you have to change
> it.
> Here you have important information:
> https://openwrt.org/docs/guide-quick-start/walkthrough_login
Re: Zyxel NSA325 questions (uboot)
September 13, 2023 11:53AM
So I think that we need logs for "cold start" when it didn't start. Maybe you already provided ?
Re: Zyxel NSA325 questions (uboot)
September 13, 2023 02:00PM
Multivan,

Looks normal. Now shutdown, power up and let it boot without interruption. And post entire the serial boot log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: