2023.04 U-Boot Kirkwood - ZyXEL NSA325 May 26, 2023 09:22PM |
Admin Registered: 12 years ago Posts: 17,933 |
md5sum 15ef315acc142d4704fd4b8eec18b6be sha256sum f0eebe427f509179a6fd7c0a5a017180b0c2cdec13f5d71fb27fcf95246cca2b
uboot.2023.04-tld-1.nsa325.kwb uboot.2023.04-tld-1.nsa325.environment.img uboot.2023.04-tld-1.nsa325.environment uboot.2023.04-tld-1.nsa325.boot.scr
# MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xc0000 0x20000 0x20000
echo "/dev/mtd0 0xc0000 0x20000 0x20000" > /etc/fw_env.config
dev: size erasesize name mtd0: 00100000 00020000 "uboot" mtd1: 00080000 00020000 "stock_uboot_env" mtd2: 00080000 00020000 "key_store" mtd3: 00080000 00020000 "info" mtd4: 00a00000 00020000 "etc" mtd5: 00a00000 00020000 "kernel_1" mtd6: 02fc0000 00020000 "rootfs1" mtd7: 00a00000 00020000 "kernel_2" mtd8: 02fc0000 00020000 "rootfs2"
nanddump --noecc --omitoob -l 0x80000 -f mtd0.nsa325 /dev/mtd0 nanddump --noecc --omitoob -f mtd0.nsa325.envs -s 786432 -l 131072 /dev/mtd0If installing from stock u-boot, also save stock envs
nanddump --noecc --omitoob -f mtd0.nsa325.envs.stock /dev/mtd1
fw_printenv > current_envs.txtFor most stock OS, there is no fw_printenv. So it's OK if this step fails.
dmesg | grep -i 'bad' [ 2.413231] Scanning device for bad blocks [ 2.417731] Bad eraseblock 3 at 0x000000060000
cd /tmp tar xf uboot.2023.04-tld-1.nsa325.bodhi.tar
flash_erase /dev/mtd0 0 4Expected output:
Erase Total 4 Units Performing Flash Erase of length 131072 at offset 0x60000 done
nandwrite /dev/mtd0 /tmp/uboot.2023.04-tld-1.nsa325.kwbExpected 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
flash_erase /dev/mtd0 0xc0000 1Expected output:
Erase Total 1 Units Performing Flash Erase of length 131072 at offset 0xc0000 done
nandwrite -s 786432 /dev/mtd0 /tmp/uboot.2023.04-tld-1.nsa325.environment.imgExpected output:
Writing data to block 6 at offset 0xc0000
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'For sanity check, list you envs again
fw_printenv
fw_setenv preboot 'run preboot_nc' fw_setenv ipaddr '192.168.0.xxx' fw_setenv serverip '192.168.0.yyy'
U-Boot 2023.04-tld-1 (Jun 24 .......) ZyXEL NSA325 2-Bay Power Media Server
fw_setenv devices 'sata usb' fw_setenv init_sata 'sata init' fw_setenv scan_disk 'echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start"; setenv scan_sata "sata init"; 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' fw_setenv uenv_init_devices 'echo Initializing devices...; setenv init_usb "usb start"; setenv init_sata "sata init"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin serial,nc; setenv stdout serial,nc; setenv stderr serial,nc; version'
cd /media/sdb1/boot cp -a uboot.2023.04-tld-1.nsa325.boot.scr boot.scr sync
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 June 09, 2023 11:30PM |
Admin Registered: 12 years ago Posts: 17,933 |
Quote
8. (Optional) Activate netconsole
Please do not activate netconsole! I'm troubleshooting a problem, stay tune... .
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 July 01, 2023 03:34PM |
Admin Registered: 12 years ago Posts: 17,933 |
Quote
Update 01 July 2023: Fixed netconsole
Quote
5. Flash u-boot image to NAND
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 September 03, 2023 04:09AM |
Registered: 5 years ago Posts: 109 |
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 September 03, 2023 02:34PM |
Admin Registered: 12 years ago Posts: 17,933 |
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 September 03, 2023 03:40PM |
Registered: 5 years ago Posts: 109 |
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 September 04, 2023 01:19PM |
Admin Registered: 12 years ago Posts: 17,933 |
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325 September 04, 2023 01:46PM |
Registered: 5 years ago Posts: 109 |