Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Zyxel NSA325 - Issue installing latest rootfs (4 replies)

$
0
0
Hi,

I'm struggling a bit with the Instructions from this topic - https://forum.doozan.com/read.php?2,12096

As per instructions :
Quote
Note: If this is your first time installation, then you only need rootfs Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel linux-6.5.7-kirkwood-tld-1 already installed).

So what I'm doing is to follow the instructions.
- Prepare the usb (ext4)
- extract the Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2
- Prepare step 4a
- Run kwboot , interrupt autoboot and manually try to boot on front usb (using latest uboot, as seen below)
root@onewithforce:/run/media/alex/rootfs/boot# du -sk uInitrd
5656 uInitrd

 
root@onewithforce:~# kwboot  -t -B 115200 /dev/ttyUSB0 -b /home/alex/Downloads/tmpp/uboot.2023.04-tld-1.nsa325.kwb -p
kwboot version 2023.07
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (520596 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 27 % [......................................................................]
 29 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 65 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 70 % [......................................................................]
 72 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 77 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [......................................................................]
 99 % [........                                                              ]
Done
Finishing transfer
[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... OK
Resetting console stdin/stdout/stderr to serial...
In:    serial
Out:   serial
Err:   serial
pcie0.0: Link up
Net:   eth0: ethernet-controller@72000
Hit any key to stop autoboot:  0 

NSA325> 
NSA325> boot
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... cannot reset port 3!?
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60060452  	efa7222f-01	83
loading envs from usb 0 ...
Failed to load '/boot/uEnv.txt'
Can't set block device
Can't set block device
Can't set block device
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
stopping USB..
Unknown command 'ide' - try 'help'
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
resetting ...

I was googling a bit and found a hint here and copied the env file:
root@onewithforce:/run/media/alex/rootfs/boot# cp -a /home/alex/Downloads/tmpp/uboot.2023.04-tld-1.nsa325.environment uEnv.txt
Verified the dts file is correct as well. Now let's give it another try.

Here are the envs before booting:
NSA325> print
arcNumber=4495
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; usb stop; run bootcmd_sata; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot
bootdelay=2
console=ttyS0,115200
default=-a
device=0:1
ethact=egiga0
ethaddr=b6:d0:5e:0f:a1:17
fdtcontroladdr=1fb516e0
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=fatload usb 0:1 0x1c00000 /dts/kirkwood-nsa325.dtb
load_initrd=fatload usb 0:1 0x1100000 /uInitrd
load_uimage=fatload usb 0:1 0x800000 /uImage
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x80000@0x0(uboot),0x20000@0xc0000(uboot_env)
partition=nand0,2
rootdelay=4
rootfstype=ext4
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env)
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; 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 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=LABEL=rootfs
ver=U-Boot 2023.04-tld-1 (Jun 24 2023 - 17:50:21 -0700)\
ZyXEL NSA325 2-Bay Power Media Server

Environment size: 2205/131068 bytes
It shall boot from /boot/uImage and /boot/uInitrd, which were both created in step 4a.
Now trying to boot:

NSA325> boot
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... cannot reset port 3!?
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60060452  	efa7222f-01	83
loading envs from usb 0 ...
2890 bytes read in 12 ms (234.4 KiB/s)
importing envs ...
## Info: input data size = 2896 = 0xB50
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
14414 bytes read in 13 ms (1.1 MiB/s)
loading uImage ...
6223944 bytes read in 82 ms (72.4 MiB/s)
loading uInitrd ...
5791271 bytes read in 78 ms (70.8 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.7.5-kirkwood-tld-1
   Created:      2024-03-16  18:56:13 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6223880 Bytes = 5.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.7.5-kirkwood-tld-1
   Created:      2024-03-16  18:56:33 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes = 5.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
stopping USB..
Unknown command 'ide' - try 'help'
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
resetting ...

Some progress, but still not what it should.
Would be appreciated of what steps I'm missing or misunderstood from the initial statement the Debian.bz is all I need for a first installation.

Viewing all articles
Browse latest Browse all 3247

Trending Articles