Here are the results.
This is the JTAG console output during the boot loop after flashing with openwrt-21.02.1-ramips-rt305x-zyxel_nbg-419n-v2-squashfs-sysupgrade.bin.
U-Boot 1.1.3 (Mar 6 2012 - 17:34:10)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 3c
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment
============================================
Ralink UBoot Version: 3.6.0.1_a3
--------------------------------------------
ASIC 3352_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Mar 6 2012 Time:17:34:10
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 384 MHZ ####
estimate memory size =64 Mbytes
uboot: NBG-419N v2 Power LED...on
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
6: To emergency.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
a: Auto load system code then write to Flash via TFTP.
0
3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
. Image Name: MIPS OpenWrt Linux-5.4.154
Created: 2021-10-24 9:01:35 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1497169 Bytes = 1.4 MB
Load Address: 80000000
Entry Point: 80000000
raspi_read: from:50040 len:16d851
....................... Verifying Checksum ... OK
Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover
I have tried with minimal images that I created with the imagebuilder - same thing. Has anything concerning the Kernel image compression changed?
To confirm that the 18.x version can be loaded and to verify the load address / entry points I chose the TFTP to RAM option. Here is the result:
U-Boot 1.1.3 (Mar 6 2012 - 17:34:10)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 3c
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment
============================================
Ralink UBoot Version: 3.6.0.1_a3
--------------------------------------------
ASIC 3352_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Mar 6 2012 Time:17:34:10
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 384 MHZ ####
estimate memory size =64 Mbytes
uboot: NBG-419N v2 Power LED...on
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
6: To emergency.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
a: Auto load system code then write to Flash via TFTP.
You choosed 1
0
raspi_read: from:40028 len:6
.
1: System Load Linux to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (10.10.10.123) ==:10.10.10.123
Input server IP (10.10.10.3) ==:10.10.10.3
Input Linux Kernel filename () ==:NBG419Nv2.bin
netboot_common, argc= 3
NetTxPacket = 0x83FE4F00
KSEG1ADDR(NetTxPacket) = 0xA3FE4F00
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'NBG419Nv2.bin'.
TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REPLY, set server/gtwy eth addr (90:e6:ba:56:87:72)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################
done
Bytes transferred = 3492806 (354bc6 hex)
NetBootFileXferSize= 00354bc6
raspi_read: from:30000 len:10000
.Erasing SPI Flash...
raspi_erase: offs:30000 len:10000
.
Writing to SPI Flash...
raspi_write: to:30000 len:10000
.
done
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
Image Name: MIPS OpenWrt Linux-4.14.151
Created: 2019-11-05 14:12:18 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 3492742 Bytes = 3.3 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64
Starting kernel ...
[ 0.000000] Linux version 4.14.151 (buildbot@91d4e1610b27) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7897-9d401013fc)) #0 Tue Nov 5 14:12:18 2019
[ 0.000000] SoC Type: Ralink RT3352 id:1 rev:6
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is ZyXEL NBG-419N v2
Back in 18.x, I rebooted with the JTAG attached and loaded the 21.02.1 kernel image:
[ 248.102710] reboot: Restarting system
U-Boot 1.1.3 (Mar 6 2012 - 17:34:10)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 3c
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.1_a3
--------------------------------------------
ASIC 3352_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Mar 6 2012 Time:17:34:10
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 384 MHZ ####
estimate memory size =64 Mbytes
uboot: NBG-419N v2 Power LED...on
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
6: To emergency.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
a: Auto load system code then write to Flash via TFTP.
You choosed 1
0
raspi_read: from:40028 len:6
.
1: System Load Linux to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (10.10.10.123) ==:10.10.10.123
Input server IP (10.10.10.3) ==:10.10.10.3
Input Linux Kernel filename (NBG419Nv2.bin) ==:nbg419nv2-210201kernel.bin
netboot_common, argc= 3
NetTxPacket = 0x83FE4F00
KSEG1ADDR(NetTxPacket) = 0xA3FE4F00
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'nbg419nv2-210201kernel.bin'.
TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REPLY, set server/gtwy eth addr (90:e6:ba:56:87:72)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#############
done
Bytes transferred = 4390660 (42ff04 hex)
NetBootFileXferSize= 0042ff04
raspi_read: from:30000 len:10000
.Erasing SPI Flash...
raspi_erase: offs:30000 len:10000
.
Writing to SPI Flash...
raspi_write: to:30000 len:10000
.
done
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
Image Name: MIPS OpenWrt Linux-5.4.154
Created: 2021-10-24 9:01:35 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 4390596 Bytes = 4.2 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64
Starting kernel ...
[ 0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[ 0.000000] SoC Type: Ralink RT3352 id:1 rev:6
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is ZyXEL NBG-419N v2
Here is my last attempt, for the moment, flashing the 21.02.1 kernel image from the bootloader
root@OpenWrt:/# reboot
root@OpenWrt:/# [ 333.730367] br-lan: port 1(eth0.1) entered disabled state
[ 333.759776] device eth0.1 left promiscuous mode
[ 333.769336] br-lan: port 1(eth0.1) entered disabled state
[ 334.597042] device eth0 left promiscuous mode
[ 338.450934] reboot: Restarting system
U-Boot 1.1.3 (Mar 6 2012 - 17:34:10)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 3c
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.1_a3
--------------------------------------------
ASIC 3352_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Mar 6 2012 Time:17:34:10
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 384 MHZ ####
estimate memory size =64 Mbytes
uboot: NBG-419N v2 Power LED...on
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
6: To emergency.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
a: Auto load system code then write to Flash via TFTP.
You choosed 2
0
raspi_read: from:40028 len:6
.
2: System Load Linux Kernel then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
Please Input new ones /or Ctrl-C to discard
Input device IP (10.10.10.123) ==:10.10.10.123
Input server IP (10.10.10.3) ==:10.10.10.3
Input Linux Kernel filename (nbg419nv2-210201kernel.bin) ==:nbg419nv2-210201kernel.bin
netboot_common, argc= 3
NetTxPacket = 0x83FE4F00
KSEG1ADDR(NetTxPacket) = 0xA3FE4F00
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'nbg419nv2-210201kernel.bin'.
TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (90:e6:ba:56:87:72)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#############
done
Bytes transferred = 4390660 (42ff04 hex)
NetBootFileXferSize= 0042ff04
raspi_erase_write: offs:50000, count:42ff04
raspi_erase: offs:50000 len:420000
..................................................................
raspi_write: to:50000 len:420000
..................................................................
raspi_read: from:50000 len:10000
.raspi_read: from:60000 len:10000
.raspi_read: from:70000 len:10000
.raspi_read: from:80000 len:10000
.raspi_read: from:90000 len:10000
.raspi_read: from:a0000 len:10000
.raspi_read: from:b0000 len:10000
.raspi_read: from:c0000 len:10000
.raspi_read: from:d0000 len:10000
.raspi_read: from:e0000 len:10000
.raspi_read: from:f0000 len:10000
.raspi_read: from:100000 len:10000
.raspi_read: from:110000 len:10000
.raspi_read: from:120000 len:10000
.raspi_read: from:130000 len:10000
.raspi_read: from:140000 len:10000
.raspi_read: from:150000 len:10000
.raspi_read: from:160000 len:10000
.raspi_read: from:170000 len:10000
.raspi_read: from:180000 len:10000
.raspi_read: from:190000 len:10000
.raspi_read: from:1a0000 len:10000
.raspi_read: from:1b0000 len:10000
.raspi_read: from:1c0000 len:10000
.raspi_read: from:1d0000 len:10000
.raspi_read: from:1e0000 len:10000
.raspi_read: from:1f0000 len:10000
.raspi_read: from:200000 len:10000
.raspi_read: from:210000 len:10000
.raspi_read: from:220000 len:10000
.raspi_read: from:230000 len:10000
.raspi_read: from:240000 len:10000
.raspi_read: from:250000 len:10000
.raspi_read: from:260000 len:10000
.raspi_read: from:270000 len:10000
.raspi_read: from:280000 len:10000
.raspi_read: from:290000 len:10000
.raspi_read: from:2a0000 len:10000
.raspi_read: from:2b0000 len:10000
.raspi_read: from:2c0000 len:10000
.raspi_read: from:2d0000 len:10000
.raspi_read: from:2e0000 len:10000
.raspi_read: from:2f0000 len:10000
.raspi_read: from:300000 len:10000
.raspi_read: from:310000 len:10000
.raspi_read: from:320000 len:10000
.raspi_read: from:330000 len:10000
.raspi_read: from:340000 len:10000
.raspi_read: from:350000 len:10000
.raspi_read: from:360000 len:10000
.raspi_read: from:370000 len:10000
.raspi_read: from:380000 len:10000
.raspi_read: from:390000 len:10000
.raspi_read: from:3a0000 len:10000
.raspi_read: from:3b0000 len:10000
.raspi_read: from:3c0000 len:10000
.raspi_read: from:3d0000 len:10000
.raspi_read: from:3e0000 len:10000
.raspi_read: from:3f0000 len:10000
.raspi_read: from:400000 len:10000
.raspi_read: from:410000 len:10000
.raspi_read: from:420000 len:10000
.raspi_read: from:430000 len:10000
.raspi_read: from:440000 len:10000
.raspi_read: from:450000 len:10000
.raspi_read: from:460000 len:10000
.raspi_read: from:470000 len:10000
.raspi_erase: offs:470000 len:10000
.
raspi_write: to:470000 len:10000
.
raspi_read: from:470000 len:10000
.Done!
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
. Image Name: MIPS OpenWrt Linux-5.4.154
Created: 2021-10-24 9:01:35 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 4390596 Bytes = 4.2 MB
Load Address: 80000000
Entry Point: 80000000
raspi_read: from:50040 len:42fec4
................................................................... Verifying Checksum ... OK
Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover
Is it possible that the image is too large? Would that make any sense? Will it be useful to generate a minimal image since the router supports usb/extroot? Any help is highly appreciated.