The first time I ran this command
mtk_uartboot -s COM5 --payload bl2-mt7986-ddr3-ram.bin --aarch64 --fip fip.bin && putty.exe -serial COM5 -sercfg 115200,8,n,1,N
It immediately tried to connect to tftp and I used the rescue tool to upload the official firmware, running the same command now it tries to boot from flash and these are the logs:
ubi0: scanning is finished
ubi0 warning: ubi_calculate_reserved: number of bad PEBs (169) is above the expe cted limit (40), not reserving any PEBs for bad PEB handling, will use available PEBs (if any)
ubi0: attached mtd4 (name "UBI_DEV", size 252 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 1847, bad PEBs: 169, corrupted PEBs: 0
ubi0: user volume: 6, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 1847, PEBs reserved for bad PEB ha ndling: 0
UBI: vol_id reserved_pebs alignment data_pad vol_type usable_leb_size us ed_ebs used_bytes last_eb_bytes corrupted upd_marker name_len name
UBI: 0 1 1 0 dynamic 1f000 1 1f000 1f000 0 0 5 nvram
UBI: 1 8 1 0 dynamic 1f000 8 f8000 1f000 0 0 7 Factory
UBI: 2 8 1 0 dynamic 1f000 8 f8000 1f000 0 0 8 Factory2
UBI: 3 242 1 0 dynamic 1f000 242 45fe000 1f000 0 0 5 linux
UBI: 4 242 1 0 dynamic 1f000 242 45fe000 1f000 0 0 6 linux2
UBI: 5 29e 1 0 dynamic 1f000 29e 5122000 1f000 0 0 5 jffs2
UBI: 7fffefff 2 1 0 dynamic 1f000 2 3e000 2 0 0 d layout volume
Read 1015808 bytes from volume Factory to 000000005f707ac0
EEPROM set 0: OK (version 4)
Read 1015808 bytes from volume Factory2 to 000000005f707ac0
EEPROM set 1: OK (version 4)
Read 1015808 bytes from volume Factory to 000000005fb45590
Select EEPROM set 0 at offset 0x0.
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.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
You choosed 3
3: Boot System code via Flash (default).
TUF-AX4200 bootloader version: 1.0.0.2
MAC Address: 00:AA:BB:CC:DD:E0
Read 40 bytes from volume linux to 0000000046000000
FIT/FDT format image found at 0x46000000,size 0x277a154
Read 41394556 bytes from volume linux to 0000000046000000
## Loading kernel from FIT Image at 46000000 ...
Using 'config-1' configuration
Trying 'kernel-1' kernel subimage
Description: ARM64 OpenWrt Linux-3.0
Type: Kernel Image
Compression: lzma compressed
Data Start: 0x460000e4
Data Size: 3282880 Bytes = 3.1 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x48080000
Entry Point: 0x48080000
Hash algo: crc32
Hash value: 7668cafc
Hash algo: sha1
Hash value: 3c2e2747fa4b53e70993d3420d532efbdb6f4578
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading ramdisk from FIT Image at 46000000 ...
Using 'config-1' configuration
Trying 'rootfs-1' ramdisk subimage
Description: Root File System
Type: RAMDisk Image
Compression: Unknown Compression
Data Start: 0x46327354
Data Size: 38086923 Bytes = 36.3 MiB
Architecture: Unknown Architecture
OS: Unknown OS
Load Address: 0x00000000
Entry Point: 0x00000000
Hash algo: crc32
Hash value: 22aa7ab4
Hash algo: sha1
Hash value: fd796defdb99cc4ef8555a4544742f6325b7c268
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
Using 'config-1' configuration
Trying 'fdt-1' fdt subimage
Description: ARM64 OpenWrt mt7986a-tuf-ax4200 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x463219e8
Data Size: 22648 Bytes = 22.1 KiB
Architecture: AArch64
Hash algo: crc32
Hash value: b6b7394f
Hash algo: sha1
Hash value: ca2f2da08197e56392c4e448500a7cd71fcc204c
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x463219e8
Read 40 bytes from volume linux2 to 000000005f7ffb90
Uncompressing Kernel Image
Loading Device Tree to 000000005f7f3000, end 000000005f7fb877 ... OK
volume linux seq: 4
Starting kernel ...
Booting Linux on physical CPU 0x0000000000 [0x410fd034]
Linux version 5.4.225 (root@asus) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r0-db7dd 77)) #1 SMP Wed Nov 6 08:00:56 CST 2024
Machine model: TUF-AX4200/TUF-AX4200Q
earlycon: uart8250 at MMIO32 0x0000000011002000 (options '')
printk: bootconsole [uart8250] enabled
On node 0 totalpages: 130062
DMA32 zone: 2048 pages used for memmap
DMA32 zone: 0 pages reserved
DMA32 zone: 130062 pages, LIFO batch:31
psci: probing for conduit method from DT.
psci: PSCIv1.1 detected in firmware.
psci: Using standard PSCI v0.2 function IDs
psci: MIGRATE_INFO_TYPE not supported.
psci: SMC Calling Convention v1.0
percpu: Embedded 23 pages/cpu s55512 r8192 d30504 u94208
pcpu-alloc: s55512 r8192 d30504 u94208 alloc=23*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Detected VIPT I-cache on CPU0
CPU features: detected: GIC system register CPU interface
CPU features: kernel page table isolation disabled by kernel configuration
Built 1 zonelists, mobility grouping on. Total pages: 128014
Kernel command line: root_rfs=0x327354 rootfstype=squashfs ubi.mtd=UBI_DEV conso le=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32 ,0x11002000 root=/dev/mtdblock6
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 491952K/520248K available (6590K kernel code, 488K rwdata, 1676K rodata, 448K init, 342K bss, 28296K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Invalid signature of oopsbuf: FF-FF-FF-FF-FF-FF-FF-FF (len -1)
rcu: Hierarchical RCU implementation.
rcu: CONFIG_RCU_FANOUT set to non-default value of 32.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
GICv3: GIC: Using split EOI/Deactivate mode
GICv3: 640 SPIs implemented
GICv3: 0 Extended SPIs implemented
GICv3: Distributor has no Range Selector support
GICv3: 16 PPIs implemented
GICv3: no VLPI support, no direct LPI support
GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
arch_timer: cp15 timer(s) running at 12.98MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2feb955e7, m ax_idle_ns: 440795202655 ns
sched_clock: 56 bits at 12MHz, resolution 77ns, wraps every 4398046511072ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 25.97 BogoMIPS (lpj=51944)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
ASID allocator initialised with 65536 entries
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Detected VIPT I-cache on CPU1
GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
Detected VIPT I-cache on CPU2
GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
Detected VIPT I-cache on CPU3
GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
smp: Brought up 1 node, 4 CPUs
SMP: Total of 4 processors activated.
CPU features: detected: 32-bit EL0 Support
CPU features: detected: CRC32 instructions
CPU: All CPU(s) started at EL2
alternatives: patching kernel code
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645 041785100000 ns
futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic allocations
SCSI subsystem initialized
libata version 3.00 loaded.
rbus 18000000.wbsys: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x18000000-0x18ffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: scanning bus
pci 0000:00:00.0: [14c3:7986] type 00 class 0x000280
pci 0000:00:00.0: reg 0x10: [mem 0x18000000-0x1800000f 64bit]
pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x0000000f]
pci 0000:00:00.0: reg 0x1c: [mem 0x00000000-0x0000000f]
pci 0000:00:00.0: reg 0x20: [mem 0x00000000-0x0000000f]
pci 0000:00:00.0: reg 0x24: [mem 0x00000000-0x0000000f]
pci_bus 0000:00: fixups for bus
pci_bus 0000:00: bus scan returning with max=00
clocksource: Switched to clocksource arch_sys_counter
thermal_sys: Registered thermal governor 'fair_share'
thermal_sys: Registered thermal governor 'bang_bang'
thermal_sys: Registered thermal governor 'step_wise'
thermal_sys: Registered thermal governor 'user_space'
thermal_sys: Registered thermal governor 'power_allocator'
NET: Registered protocol family 2
IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
PCI: CLS 0 bytes, default 64
workingset: timestamp_bits=62 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
mtk-pcie 11280000.pcie: host bridge /pcie@11280000 ranges:
mtk-pcie 11280000.pcie: Parsing ranges property...
mtk-pcie 11280000.pcie: MEM 0x20000000..0x2fffffff -> 0x20000000
phy phy-pcie-phy@11c00000.0: try to get sw efuse
phy phy-pcie-phy@11c00000.0: try to get sw efuse+
phy phy-pcie-phy@11c00000.0: u3 auto load valid efuse: ENABLE with value: 1
phy phy-pcie-phy@11c00000.0: u3 efuse - intr 28, rx_imp f, tx_imp e
phy phy-pcie-phy@11c00000.0: pcie auto load valid efuse: ENABLE with value: 1
phy phy-pcie-phy@11c00000.0: u3 lane1 efuse - intr 28, rx_imp f, tx_imp e
mtk-pcie 11280000.pcie: PCIe link down, ltssm reg val: 0x0
mtk-pcie: probe of 11280000.pcie failed with error -110
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
printk: console [ttyS0] disabled
11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 12, base_baud = 2500000) is a S T16650V2
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
printk: bootconsole [uart8250] disabled
11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 13, base_baud = 1625000) is a S T16650V2
11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 14, base_baud = 1625000) is a S T16650V2
mtk_rng 1020f000.trng: registered RNG driver
random: crng init done
cacheinfo: Unable to detect cache hierarchy for CPU 0
loop: module loaded
mt7986-pinctrl 1001f000.pinctrl: pin_config_set op failed for pin 36
mtk-spi 1100a000.spi: Error applying setting, reverse things back
Unable to handle kernel NULL pointer dereference at virtual address 000000000000 0010
Mem abort info:
ESR = 0x96000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000005
CM = 0, WnR = 0
[0000000000000010] user address but active_mm is swapper
Internal error: Oops: 96000005 [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.225 #1
Hardware name: TUF-AX4200/TUF-AX4200Q (DT)
pstate: 40000085 (nZcv daIf -PAN -UAO)
pc : mtk_spi_can_dma+0x0/0x30
lr : mtk_spi_interrupt+0x60/0x358
sp : ffffff801fe8efb0
x29: ffffff801fe8efb0 x28: ffffff800ffe0000
x27: 0000000000000060 x26: ffffffc0107ee8b8
x25: ffffffc0109818da x24: ffffff8003158000
x23: 0000000000000084 x22: ffffff801fe8f07c
x21: 0000000000000000 x20: ffffff80031a9800
x19: ffffff80031a9e00 x18: 0000000000020000
x17: 0000000087c69a9d x16: 0000000018bb2684
x15: 00000000fffffff0 x14: 6361622073676e69
x13: 6874206573726576 x12: 0140000000000000
x11: 0000000000000020 x10: 0000000000000040
x9 : ffffffc010929fe8 x8 : ffffffc010929fe0
x7 : ffffff801e4a9960 x6 : 0000000000000000
x5 : ffffff801e4a9918 x4 : ffffffc00f586000
x3 : ffffffc01044d7a0 x2 : 0000000000000000
x1 : 0000000000000000 x0 : ffffff80031a9800
Call trace:
mtk_spi_can_dma+0x0/0x30
__handle_irq_event_percpu+0x54/0x148
handle_irq_event_percpu+0x1c/0x60
handle_irq_event+0x40/0xb0
handle_fasteoi_irq+0xdc/0x190
generic_handle_irq+0x24/0x38
__handle_domain_irq+0x60/0xb8
gic_handle_irq+0xc0/0x158
el1_irq+0xb8/0x140
__setup_irq+0x454/0x858
request_threaded_irq+0xd4/0x180
devm_request_threaded_irq+0x74/0xe8
mtk_spi_probe+0x26c/0x6a0
platform_drv_probe+0x50/0xa0
really_probe+0xd8/0x300
driver_probe_device+0x54/0xe8
device_driver_attach+0x6c/0x78
__driver_attach+0x5c/0xe8
bus_for_each_dev+0x60/0x98
driver_attach+0x20/0x28
bus_add_driver+0x180/0x1f0
driver_register+0x60/0x110
__platform_driver_register+0x44/0x50
mtk_spi_driver_init+0x18/0x20
do_one_initcall+0x74/0x1c8
kernel_init_freeable+0x17c/0x234
kernel_init+0x10/0xfc
ret_from_fork+0x10/0x1c
Code: 2a0203e4 52800003 17ffffe6 d503201f (b9401041)
---[ end trace 629e1e2f92eac75d ]---
Kernel panic - not syncing: Fatal exception in interrupt
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x00002,20002008
Memory Limit: none
Rebooting in 1 seconds..
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 0000 0000
L0: 8005 0000 [0001]
00: 1012 0000
F9: 0000 0000
L0: 8005 0000 [0001]
01: 102A 0001
02: 1012 0000
BP: 2000 00C0 [0001]
EC: 0000 0000 [1000]
T0: 0000 00B9 [010F]
System halt!