2024-01-25 10:23:02 +00:00
|
|
|
{
|
|
|
|
description = ''
|
|
|
|
TP-Link Archer AX23 / AX1800 Dual Band Wi-Fi 6 Router
|
|
|
|
*****************************************************
|
|
|
|
|
|
|
|
Hardware summary
|
|
|
|
================
|
|
|
|
|
|
|
|
- MediaTek MT7621 (880MHz)
|
|
|
|
- 16MB Flash
|
|
|
|
- 128MB RAM
|
|
|
|
- WLan hardware: Mediatek MT7905, MT7975
|
|
|
|
'';
|
|
|
|
|
|
|
|
system = {
|
|
|
|
crossSystem = {
|
mipsel architecture
Still fails to execute /bin/init though:
```
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR3
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: SPI Flash
Date:Feb 16 2022 Time:16:26:34
============================================
THIS IS uboot
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 880 MHZ ####
estimate memory size =128 Mbytes
Press '4' or 't' to break the booting process
Press 'x' to enter recovery web server
0
#Reset_MT7530
set LAN/WAN LLLLW
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Feb 16 2022 - 16:26:34)
MT7621 # tftpboot 0x868c3000 result/image
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/image'.
TIMEOUT_COUNT=10,Load address: 0x868c3000
Loading: *T Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
######################################Got ARP REQUEST, return our IP
###########################
#################################################################
#################################################################
#################################################################
###############################
done
Bytes transferred = 2820054 (2b07d6 hex)
LoadAddr=868c3000 NetBootFileXferSize= 002b07d6
MT7621 # tftpboot 0x86400000 result/rootfs
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/rootfs'.
TIMEOUT_COUNT=10,Load address: 0x86400000
Loading: *Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################################
done
Bytes transferred = 4972544 (4be000 hex)
LoadAddr=86400000 NetBootFileXferSize= 004be000
MT7621 # bootm 0x868c3000
## Booting image at 868c3000 ...
Image Name: MIPS Liminix Linux
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2819990 Bytes = 2.7 MB
Load Address: 80001000
Entry Point: 80001000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
nm_init:791
nm_initFwupPtnStruct:276
nm_lib_readPtnTable:738
[NM_Debug](nm_lib_readPtnTable) 00743: NM_PTN_TABLE_BASE = 0xfe0000
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 1054, requried len = 8192
[NM_Debug](nm_lib_readPtnTable) 00751: Reading Partition Table from NVRAM ... OK
[NM_Debug](nm_lib_readPtnTable) 00759: Parsing Partition Table ... OK
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 3, requried len = 3
[NM_Error](nm_api_checkTestMode) 00417: factory boot check testmode flag is not 1.
### test_mode=disable,boot_args:console=ttyS1,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit mtdparts=raspi:256k(uboot),4096k(uImage),11968k@0x440000(rootfs),64k@0xff0000(ART) mem=128M test_mode=disable
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128
Starting kernel ...
Linux version 5.15.137 (nixbld@liminix.builder) (mipsel-unknown-linux-musl-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1 SMP Sat Jan 27 11:47:12 UTC 2024
SoC Type: MediaTek MT7621 ver:1 eco:4
printk: bootconsole [early0] enabled
CPU0 revision is: 0001992f (MIPS 1004Kc)
MIPS: machine is TP-Link Archer AX23 v1
VPE topology {2,2} total 4
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
percpu: Embedded 11 pages/cpu s14544 r8192 d22320 u45056
pcpu-alloc: s14544 r8192 d22320 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists, mobility grouping on. Total pages: 32512
Kernel command line: liminix console=ttyS0,115200 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 root=ubi0:liminix rootfstype=squashfs fw_devlink=off mtdparts=phram0:4980736(rootfs) phram.phram=phram0,2252341248,4980736,65536 root=/dev/mtdblock0
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Writing ErrCtl register=0003003d
Readback ErrCtl register=0003003d
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 119816K/131072K available (6564K kernel code, 622K rwdata, 1244K rodata, 1220K init, 217K bss, 11256K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 256
clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
Console: colour dummy device 80x25
Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU1 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 1: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU2 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 2: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU3 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 3: done.
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
FPU Affinity set after 4688 emulations
vgaarb: loaded
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource GIC
NET: Registered PF_INET protocol family
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
PCI: CLS 0 bytes, default 32
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=15 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler mq-deadline registered
io scheduler kyber registered
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0060000000
mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
mt7621-pci 1e140000.pcie: PCIE0 enabled
mt7621-pci 1e140000.pcie: PCIE1 enabled
PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:01.0: supports D1
pci 0000:00:01.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:01:00.0: [14c3:7916] type 00 class 0x000280
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
pci 0000:02:00.0: [14c3:7915] type 00 class 0x000280
pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:02:00.0: supports D1 D2
pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:02: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)
pci 0000:00:01.0: PCI bridge to [bus 02-ff]
pci 0000:00:01.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x605fffff pref]
pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
pci 0000:00:00.0: BAR 7: assigned [io 0x0000-0x0fff]
pci 0000:00:01.0: BAR 7: assigned [io 0x1000-0x1fff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
pci 0000:01:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
pci 0000:01:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: bridge window [mem 0x60100000-0x602fffff pref]
pci 0000:02:00.0: BAR 0: assigned [mem 0x60400000-0x604fffff 64bit pref]
pci 0000:02:00.0: BAR 2: assigned [mem 0x60500000-0x60503fff 64bit pref]
pci 0000:02:00.0: BAR 4: assigned [mem 0x60504000-0x60504fff 64bit pref]
pci 0000:00:01.0: PCI bridge to [bus 02]
pci 0000:00:01.0: bridge window [io 0x1000-0x1fff]
pci 0000:00:01.0: bridge window [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: bridge window [mem 0x60400000-0x605fffff pref]
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
1 cmdlinepart partitions found on MTD device phram0
Creating 1 MTD partitions on "phram0":
0x000000000000-0x0000004c0000 : "rootfs"
mtd: setting mtd0 (rootfs) as root device
phram: phram0 device: 0x4c0000 at 0x86400000 for erasesize 0x10000
spi-mt7621 1e000b00.spi: sys_freq: 220000000
spi-nor spi0.0: en25qh128 (16384 Kbytes)
5 fixed-partitions partitions found on MTD device spi0.0
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000fa0000 : "firmware"
2 uimage-fw partitions found on MTD device firmware
Creating 2 MTD partitions on "firmware":
0x000000000000-0x000000400000 : "kernel"
0x000000400000-0x000000f60000 : "rootfs"
0x000000fa0000-0x000000fb0000 : "config"
0x000000fb0000-0x000000ff0000 : "tplink"
0x000000ff0000-0x000001000000 : "radio"
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
mtk_soc_eth 1e100000.ethernet wan: mediatek frame engine at 0xbe100000, irq 21
i2c_dev: i2c /dev entries driver
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
8021q: 802.1Q VLAN Support v1.8
Loading compiled-in X.509 certificates
Loaded X.509 cert 'Build time autogenerated kernel key: 789853fe9f915480ecda1f1360af6b995c172d12'
Problem parsing in-kernel X.509 certificate list
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=23)
mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=24)
mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=25)
mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=26)
DSA: tree 0 setup
Warning: unable to open an initial console.
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
Freeing unused kernel image (initmem) memory: 1220K
This architecture does not have kernel memory protection.
Run /bin/init as init process
with arguments:
/bin/init
with environment:
HOME=/
TERM=linux
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00006f00
Rebooting in 10 seconds..
```
2024-01-27 12:31:00 +00:00
|
|
|
config = "mipsel-unknown-linux-musl";
|
|
|
|
gcc = {
|
|
|
|
abi = "32";
|
|
|
|
# https://openwrt.org/docs/techref/instructionset/mipsel_24kc
|
2024-01-27 14:59:21 +00:00
|
|
|
arch = "24kc";
|
mipsel architecture
Still fails to execute /bin/init though:
```
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR3
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: SPI Flash
Date:Feb 16 2022 Time:16:26:34
============================================
THIS IS uboot
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 880 MHZ ####
estimate memory size =128 Mbytes
Press '4' or 't' to break the booting process
Press 'x' to enter recovery web server
0
#Reset_MT7530
set LAN/WAN LLLLW
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Feb 16 2022 - 16:26:34)
MT7621 # tftpboot 0x868c3000 result/image
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/image'.
TIMEOUT_COUNT=10,Load address: 0x868c3000
Loading: *T Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
######################################Got ARP REQUEST, return our IP
###########################
#################################################################
#################################################################
#################################################################
###############################
done
Bytes transferred = 2820054 (2b07d6 hex)
LoadAddr=868c3000 NetBootFileXferSize= 002b07d6
MT7621 # tftpboot 0x86400000 result/rootfs
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/rootfs'.
TIMEOUT_COUNT=10,Load address: 0x86400000
Loading: *Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################################
done
Bytes transferred = 4972544 (4be000 hex)
LoadAddr=86400000 NetBootFileXferSize= 004be000
MT7621 # bootm 0x868c3000
## Booting image at 868c3000 ...
Image Name: MIPS Liminix Linux
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2819990 Bytes = 2.7 MB
Load Address: 80001000
Entry Point: 80001000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
nm_init:791
nm_initFwupPtnStruct:276
nm_lib_readPtnTable:738
[NM_Debug](nm_lib_readPtnTable) 00743: NM_PTN_TABLE_BASE = 0xfe0000
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 1054, requried len = 8192
[NM_Debug](nm_lib_readPtnTable) 00751: Reading Partition Table from NVRAM ... OK
[NM_Debug](nm_lib_readPtnTable) 00759: Parsing Partition Table ... OK
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 3, requried len = 3
[NM_Error](nm_api_checkTestMode) 00417: factory boot check testmode flag is not 1.
### test_mode=disable,boot_args:console=ttyS1,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit mtdparts=raspi:256k(uboot),4096k(uImage),11968k@0x440000(rootfs),64k@0xff0000(ART) mem=128M test_mode=disable
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128
Starting kernel ...
Linux version 5.15.137 (nixbld@liminix.builder) (mipsel-unknown-linux-musl-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1 SMP Sat Jan 27 11:47:12 UTC 2024
SoC Type: MediaTek MT7621 ver:1 eco:4
printk: bootconsole [early0] enabled
CPU0 revision is: 0001992f (MIPS 1004Kc)
MIPS: machine is TP-Link Archer AX23 v1
VPE topology {2,2} total 4
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
percpu: Embedded 11 pages/cpu s14544 r8192 d22320 u45056
pcpu-alloc: s14544 r8192 d22320 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists, mobility grouping on. Total pages: 32512
Kernel command line: liminix console=ttyS0,115200 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 root=ubi0:liminix rootfstype=squashfs fw_devlink=off mtdparts=phram0:4980736(rootfs) phram.phram=phram0,2252341248,4980736,65536 root=/dev/mtdblock0
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Writing ErrCtl register=0003003d
Readback ErrCtl register=0003003d
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 119816K/131072K available (6564K kernel code, 622K rwdata, 1244K rodata, 1220K init, 217K bss, 11256K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 256
clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
Console: colour dummy device 80x25
Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU1 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 1: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU2 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 2: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU3 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 3: done.
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
FPU Affinity set after 4688 emulations
vgaarb: loaded
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource GIC
NET: Registered PF_INET protocol family
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
PCI: CLS 0 bytes, default 32
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=15 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler mq-deadline registered
io scheduler kyber registered
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0060000000
mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
mt7621-pci 1e140000.pcie: PCIE0 enabled
mt7621-pci 1e140000.pcie: PCIE1 enabled
PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:01.0: supports D1
pci 0000:00:01.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:01:00.0: [14c3:7916] type 00 class 0x000280
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
pci 0000:02:00.0: [14c3:7915] type 00 class 0x000280
pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:02:00.0: supports D1 D2
pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:02: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)
pci 0000:00:01.0: PCI bridge to [bus 02-ff]
pci 0000:00:01.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x605fffff pref]
pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
pci 0000:00:00.0: BAR 7: assigned [io 0x0000-0x0fff]
pci 0000:00:01.0: BAR 7: assigned [io 0x1000-0x1fff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
pci 0000:01:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
pci 0000:01:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: bridge window [mem 0x60100000-0x602fffff pref]
pci 0000:02:00.0: BAR 0: assigned [mem 0x60400000-0x604fffff 64bit pref]
pci 0000:02:00.0: BAR 2: assigned [mem 0x60500000-0x60503fff 64bit pref]
pci 0000:02:00.0: BAR 4: assigned [mem 0x60504000-0x60504fff 64bit pref]
pci 0000:00:01.0: PCI bridge to [bus 02]
pci 0000:00:01.0: bridge window [io 0x1000-0x1fff]
pci 0000:00:01.0: bridge window [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: bridge window [mem 0x60400000-0x605fffff pref]
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
1 cmdlinepart partitions found on MTD device phram0
Creating 1 MTD partitions on "phram0":
0x000000000000-0x0000004c0000 : "rootfs"
mtd: setting mtd0 (rootfs) as root device
phram: phram0 device: 0x4c0000 at 0x86400000 for erasesize 0x10000
spi-mt7621 1e000b00.spi: sys_freq: 220000000
spi-nor spi0.0: en25qh128 (16384 Kbytes)
5 fixed-partitions partitions found on MTD device spi0.0
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000fa0000 : "firmware"
2 uimage-fw partitions found on MTD device firmware
Creating 2 MTD partitions on "firmware":
0x000000000000-0x000000400000 : "kernel"
0x000000400000-0x000000f60000 : "rootfs"
0x000000fa0000-0x000000fb0000 : "config"
0x000000fb0000-0x000000ff0000 : "tplink"
0x000000ff0000-0x000001000000 : "radio"
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
mtk_soc_eth 1e100000.ethernet wan: mediatek frame engine at 0xbe100000, irq 21
i2c_dev: i2c /dev entries driver
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
8021q: 802.1Q VLAN Support v1.8
Loading compiled-in X.509 certificates
Loaded X.509 cert 'Build time autogenerated kernel key: 789853fe9f915480ecda1f1360af6b995c172d12'
Problem parsing in-kernel X.509 certificate list
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=23)
mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=24)
mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=25)
mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=26)
DSA: tree 0 setup
Warning: unable to open an initial console.
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
Freeing unused kernel image (initmem) memory: 1220K
This architecture does not have kernel memory protection.
Run /bin/init as init process
with arguments:
/bin/init
with environment:
HOME=/
TERM=linux
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00006f00
Rebooting in 10 seconds..
```
2024-01-27 12:31:00 +00:00
|
|
|
};
|
2024-01-25 10:23:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
module = {pkgs, config, lib, lim, ... }:
|
|
|
|
let firmware = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "wlan-firmware";
|
|
|
|
phases = ["installPhase"];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp ${pkgs.linux-firmware}/lib/firmware/mediatek/{mt7915,mt7615,mt7622}* $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [
|
mipsel architecture
Still fails to execute /bin/init though:
```
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR3
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: SPI Flash
Date:Feb 16 2022 Time:16:26:34
============================================
THIS IS uboot
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 880 MHZ ####
estimate memory size =128 Mbytes
Press '4' or 't' to break the booting process
Press 'x' to enter recovery web server
0
#Reset_MT7530
set LAN/WAN LLLLW
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Feb 16 2022 - 16:26:34)
MT7621 # tftpboot 0x868c3000 result/image
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/image'.
TIMEOUT_COUNT=10,Load address: 0x868c3000
Loading: *T Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
######################################Got ARP REQUEST, return our IP
###########################
#################################################################
#################################################################
#################################################################
###############################
done
Bytes transferred = 2820054 (2b07d6 hex)
LoadAddr=868c3000 NetBootFileXferSize= 002b07d6
MT7621 # tftpboot 0x86400000 result/rootfs
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
ETH_STATE_ACTIVE!!
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'result/rootfs'.
TIMEOUT_COUNT=10,Load address: 0x86400000
Loading: *Got ARP REPLY, set server/gtwy eth addr (f8:e4:3b:37:bb:82)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################################
done
Bytes transferred = 4972544 (4be000 hex)
LoadAddr=86400000 NetBootFileXferSize= 004be000
MT7621 # bootm 0x868c3000
## Booting image at 868c3000 ...
Image Name: MIPS Liminix Linux
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2819990 Bytes = 2.7 MB
Load Address: 80001000
Entry Point: 80001000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
nm_init:791
nm_initFwupPtnStruct:276
nm_lib_readPtnTable:738
[NM_Debug](nm_lib_readPtnTable) 00743: NM_PTN_TABLE_BASE = 0xfe0000
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 1054, requried len = 8192
[NM_Debug](nm_lib_readPtnTable) 00751: Reading Partition Table from NVRAM ... OK
[NM_Debug](nm_lib_readPtnTable) 00759: Parsing Partition Table ... OK
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 3, requried len = 3
[NM_Error](nm_api_checkTestMode) 00417: factory boot check testmode flag is not 1.
### test_mode=disable,boot_args:console=ttyS1,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit mtdparts=raspi:256k(uboot),4096k(uImage),11968k@0x440000(rootfs),64k@0xff0000(ART) mem=128M test_mode=disable
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128
Starting kernel ...
Linux version 5.15.137 (nixbld@liminix.builder) (mipsel-unknown-linux-musl-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1 SMP Sat Jan 27 11:47:12 UTC 2024
SoC Type: MediaTek MT7621 ver:1 eco:4
printk: bootconsole [early0] enabled
CPU0 revision is: 0001992f (MIPS 1004Kc)
MIPS: machine is TP-Link Archer AX23 v1
VPE topology {2,2} total 4
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
percpu: Embedded 11 pages/cpu s14544 r8192 d22320 u45056
pcpu-alloc: s14544 r8192 d22320 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists, mobility grouping on. Total pages: 32512
Kernel command line: liminix console=ttyS0,115200 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 root=ubi0:liminix rootfstype=squashfs fw_devlink=off mtdparts=phram0:4980736(rootfs) phram.phram=phram0,2252341248,4980736,65536 root=/dev/mtdblock0
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Writing ErrCtl register=0003003d
Readback ErrCtl register=0003003d
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 119816K/131072K available (6564K kernel code, 622K rwdata, 1244K rodata, 1220K init, 217K bss, 11256K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 256
clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
Console: colour dummy device 80x25
Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU1 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 1: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU2 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 2: done.
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
CPU3 revision is: 0001992f (MIPS 1004Kc)
Synchronize counters for CPU 3: done.
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
FPU Affinity set after 4688 emulations
vgaarb: loaded
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource GIC
NET: Registered PF_INET protocol family
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
PCI: CLS 0 bytes, default 32
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=15 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler mq-deadline registered
io scheduler kyber registered
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621_gpio 1e000600.gpio: registering 32 gpios
mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0060000000
mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
mt7621-pci 1e140000.pcie: PCIE0 enabled
mt7621-pci 1e140000.pcie: PCIE1 enabled
PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
pci 0000:00:01.0: supports D1
pci 0000:00:01.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:01:00.0: [14c3:7916] type 00 class 0x000280
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
pci 0000:02:00.0: [14c3:7915] type 00 class 0x000280
pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
pci 0000:02:00.0: supports D1 D2
pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:02: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)
pci 0000:00:01.0: PCI bridge to [bus 02-ff]
pci 0000:00:01.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x605fffff pref]
pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
pci 0000:00:00.0: BAR 7: assigned [io 0x0000-0x0fff]
pci 0000:00:01.0: BAR 7: assigned [io 0x1000-0x1fff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
pci 0000:01:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
pci 0000:01:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: bridge window [mem 0x60100000-0x602fffff pref]
pci 0000:02:00.0: BAR 0: assigned [mem 0x60400000-0x604fffff 64bit pref]
pci 0000:02:00.0: BAR 2: assigned [mem 0x60500000-0x60503fff 64bit pref]
pci 0000:02:00.0: BAR 4: assigned [mem 0x60504000-0x60504fff 64bit pref]
pci 0000:00:01.0: PCI bridge to [bus 02]
pci 0000:00:01.0: bridge window [io 0x1000-0x1fff]
pci 0000:00:01.0: bridge window [mem 0x60300000-0x603fffff]
pci 0000:00:01.0: bridge window [mem 0x60400000-0x605fffff pref]
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
1 cmdlinepart partitions found on MTD device phram0
Creating 1 MTD partitions on "phram0":
0x000000000000-0x0000004c0000 : "rootfs"
mtd: setting mtd0 (rootfs) as root device
phram: phram0 device: 0x4c0000 at 0x86400000 for erasesize 0x10000
spi-mt7621 1e000b00.spi: sys_freq: 220000000
spi-nor spi0.0: en25qh128 (16384 Kbytes)
5 fixed-partitions partitions found on MTD device spi0.0
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000fa0000 : "firmware"
2 uimage-fw partitions found on MTD device firmware
Creating 2 MTD partitions on "firmware":
0x000000000000-0x000000400000 : "kernel"
0x000000400000-0x000000f60000 : "rootfs"
0x000000fa0000-0x000000fb0000 : "config"
0x000000fb0000-0x000000ff0000 : "tplink"
0x000000ff0000-0x000001000000 : "radio"
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
mtk_soc_eth 1e100000.ethernet wan: mediatek frame engine at 0xbe100000, irq 21
i2c_dev: i2c /dev entries driver
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
8021q: 802.1Q VLAN Support v1.8
Loading compiled-in X.509 certificates
Loaded X.509 cert 'Build time autogenerated kernel key: 789853fe9f915480ecda1f1360af6b995c172d12'
Problem parsing in-kernel X.509 certificate list
mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=23)
mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=24)
mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=25)
mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=26)
DSA: tree 0 setup
Warning: unable to open an initial console.
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
Freeing unused kernel image (initmem) memory: 1220K
This architecture does not have kernel memory protection.
Run /bin/init as init process
with arguments:
/bin/init
with environment:
HOME=/
TERM=linux
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00006f00
Rebooting in 10 seconds..
```
2024-01-27 12:31:00 +00:00
|
|
|
../../modules/arch/mipsel.nix
|
2024-01-25 10:23:02 +00:00
|
|
|
../../modules/outputs/tftpboot.nix
|
2024-01-27 16:47:47 +00:00
|
|
|
../../modules/outputs/tplink.nix
|
2024-01-25 10:23:02 +00:00
|
|
|
];
|
|
|
|
config = {
|
|
|
|
kernel = {
|
|
|
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
|
|
|
name = "linux.tar.gz";
|
|
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.137.tar.gz";
|
|
|
|
hash = "sha256-PkdzUKZ0IpBiWe/RS70J76JKnBFzRblWcKlaIFNxnHQ=";
|
|
|
|
};
|
|
|
|
extraPatchPhase = ''
|
|
|
|
${pkgs.openwrt.applyPatches.ramips}
|
|
|
|
'';
|
|
|
|
config = {
|
get kernel config from openwrt
Now the kernel starts:
```
Starting kernel ...
Linux version 5.15.137 (nixbld@liminix.builder) (mips-unknown-linux-musl-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1 SMP Fri Jan 26 14:47:51 UTC 2024
SoC Type: MediaTek MT7621 ver:1 eco:4
printk: bootconsole [early0] enabled
CPU0 revision is: 0001992f (MIPS 1004Kc)
VPE topology {2,2} total 4
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
OF: fdt: No valid device tree found, continuing without
percpu: Embedded 11 pages/cpu s14544 r8192 d22320 u45056
Built 1 zonelists, mobility grouping on. Total pages: 32512
Kernel command line:
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Writing ErrCtl register=0003003d
Readback ErrCtl register=0003003d
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 119864K/131072K available (6564K kernel code, 622K rwdata, 1244K rodata, 1220K init, 217K bss, 11208K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 256
Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node
---[ end Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node ]---
```
I'm guessing the important bits are:
```
OF: fdt: No valid device tree found, continuing without
Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node
---[ end Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node ]---
```
... due to me booting with 'bootm <image>' instead of 'bootm <image> - <dtm>'
because it seems my version of u-boot doesn't support '-' for the ramdisk.
2024-01-26 15:02:49 +00:00
|
|
|
ARCH_32BIT_OFF_T="y";
|
|
|
|
ARCH_HIBERNATION_POSSIBLE="y";
|
|
|
|
ARCH_KEEP_MEMBLOCK="y";
|
|
|
|
ARCH_MMAP_RND_BITS_MAX="15";
|
|
|
|
ARCH_MMAP_RND_COMPAT_BITS_MAX="15";
|
|
|
|
ARCH_SUSPEND_POSSIBLE="y";
|
|
|
|
AT803X_PHY="y";
|
|
|
|
BLK_MQ_PCI="y";
|
|
|
|
BOARD_SCACHE="y";
|
|
|
|
CEVT_R4K="y";
|
|
|
|
CLKSRC_MIPS_GIC="y";
|
|
|
|
CLK_MT7621="y";
|
|
|
|
CLOCKSOURCE_WATCHDOG="y";
|
|
|
|
CLONE_BACKWARDS="y";
|
|
|
|
CMDLINE_BOOL="y";
|
|
|
|
COMMON_CLK="y";
|
|
|
|
COMPAT_32BIT_TIME="y";
|
|
|
|
CPU_GENERIC_DUMP_TLB="y";
|
|
|
|
CPU_HAS_DIEI="y";
|
|
|
|
CPU_HAS_PREFETCH="y";
|
|
|
|
CPU_HAS_RIXI="y";
|
|
|
|
CPU_HAS_SYNC="y";
|
|
|
|
CPU_LITTLE_ENDIAN="y";
|
|
|
|
CPU_MIPS32="y";
|
|
|
|
CPU_MIPS32_R2="y";
|
|
|
|
CPU_MIPSR2="y";
|
|
|
|
CPU_MIPSR2_IRQ_EI="y";
|
|
|
|
CPU_MIPSR2_IRQ_VI="y";
|
|
|
|
CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS="y";
|
|
|
|
CPU_R4K_CACHE_TLB="y";
|
|
|
|
CPU_RMAP="y";
|
|
|
|
CPU_SUPPORTS_32BIT_KERNEL="y";
|
|
|
|
CPU_SUPPORTS_HIGHMEM="y";
|
|
|
|
CPU_SUPPORTS_MSA="y";
|
|
|
|
CRC16="y";
|
|
|
|
CRYPTO_DEFLATE="y";
|
|
|
|
CRYPTO_HASH_INFO="y";
|
|
|
|
CRYPTO_LIB_BLAKE2S_GENERIC="y";
|
|
|
|
CRYPTO_LIB_POLY1305_RSIZE="2";
|
|
|
|
CRYPTO_LZO="y";
|
|
|
|
CRYPTO_ZSTD="y";
|
|
|
|
CSRC_R4K="y";
|
|
|
|
DIMLIB="y";
|
|
|
|
DMA_NONCOHERENT="y";
|
|
|
|
DTB_RT_NONE="y";
|
|
|
|
DTC="y";
|
|
|
|
EARLY_PRINTK="y";
|
|
|
|
FIXED_PHY="y";
|
|
|
|
FWNODE_MDIO="y";
|
|
|
|
FW_LOADER_PAGED_BUF="y";
|
|
|
|
GENERIC_ATOMIC64="y";
|
|
|
|
GENERIC_CLOCKEVENTS="y";
|
|
|
|
GENERIC_CMOS_UPDATE="y";
|
|
|
|
GENERIC_CPU_AUTOPROBE="y";
|
|
|
|
GENERIC_FIND_FIRST_BIT="y";
|
|
|
|
GENERIC_GETTIMEOFDAY="y";
|
|
|
|
GENERIC_IOMAP="y";
|
|
|
|
GENERIC_IRQ_CHIP="y";
|
|
|
|
GENERIC_IRQ_EFFECTIVE_AFF_MASK="y";
|
|
|
|
GENERIC_IRQ_SHOW="y";
|
|
|
|
GENERIC_LIB_ASHLDI3="y";
|
|
|
|
GENERIC_LIB_ASHRDI3="y";
|
|
|
|
GENERIC_LIB_CMPDI2="y";
|
|
|
|
GENERIC_LIB_LSHRDI3="y";
|
|
|
|
GENERIC_LIB_UCMPDI2="y";
|
|
|
|
GENERIC_PCI_IOMAP="y";
|
|
|
|
GENERIC_PHY="y";
|
|
|
|
GENERIC_PINCONF="y";
|
|
|
|
GENERIC_SCHED_CLOCK="y";
|
|
|
|
GENERIC_SMP_IDLE_THREAD="y";
|
|
|
|
GENERIC_TIME_VSYSCALL="y";
|
|
|
|
GLOB="y";
|
|
|
|
GPIOLIB_IRQCHIP="y";
|
|
|
|
GPIO_CDEV="y";
|
|
|
|
GPIO_GENERIC="y";
|
|
|
|
GPIO_MT7621="y";
|
|
|
|
GRO_CELLS="y";
|
|
|
|
HANDLE_DOMAIN_IRQ="y";
|
|
|
|
HARDWARE_WATCHPOINTS="y";
|
|
|
|
HAS_DMA="y";
|
|
|
|
HAS_IOMEM="y";
|
|
|
|
HAS_IOPORT_MAP="y";
|
|
|
|
I2C="y";
|
|
|
|
I2C_ALGOBIT="y";
|
|
|
|
I2C_BOARDINFO="y";
|
|
|
|
I2C_CHARDEV="y";
|
|
|
|
I2C_GPIO="y";
|
|
|
|
I2C_MT7621="y";
|
|
|
|
ICPLUS_PHY="y";
|
|
|
|
IRQCHIP="y";
|
|
|
|
IRQ_DOMAIN="y";
|
|
|
|
IRQ_DOMAIN_HIERARCHY="y";
|
|
|
|
IRQ_FORCED_THREADING="y";
|
|
|
|
IRQ_MIPS_CPU="y";
|
|
|
|
IRQ_WORK="y";
|
|
|
|
LIBFDT="y";
|
|
|
|
LOCK_DEBUGGING_SUPPORT="y";
|
|
|
|
LZO_COMPRESS="y";
|
|
|
|
LZO_DECOMPRESS="y";
|
|
|
|
MDIO_BUS="y";
|
|
|
|
MDIO_DEVICE="y";
|
|
|
|
MDIO_DEVRES="y";
|
|
|
|
MEDIATEK_GE_PHY="y";
|
|
|
|
MEMFD_CREATE="y";
|
|
|
|
MFD_SYSCON="y";
|
|
|
|
MIGRATION="y";
|
|
|
|
MIKROTIK="y";
|
|
|
|
MIKROTIK_RB_SYSFS="y";
|
|
|
|
MIPS="y";
|
|
|
|
MIPS_ASID_BITS="8";
|
|
|
|
MIPS_ASID_SHIFT="0";
|
|
|
|
MIPS_CLOCK_VSYSCALL="y";
|
|
|
|
MIPS_CM="y";
|
|
|
|
MIPS_CPC="y";
|
|
|
|
MIPS_CPS="y";
|
|
|
|
MIPS_CPU_SCACHE="y";
|
|
|
|
MIPS_GIC="y";
|
|
|
|
MIPS_L1_CACHE_SHIFT="5";
|
|
|
|
MIPS_LD_CAN_LINK_VDSO="y";
|
|
|
|
MIPS_MT="y";
|
|
|
|
MIPS_MT_FPAFF="y";
|
|
|
|
MIPS_MT_SMP="y";
|
|
|
|
MIPS_NR_CPU_NR_MAP="4";
|
|
|
|
MIPS_PERF_SHARED_TC_COUNTERS="y";
|
|
|
|
MIPS_SPRAM="y";
|
|
|
|
MODULES_USE_ELF_REL="y";
|
|
|
|
MTD_CMDLINE_PARTS="y";
|
|
|
|
MTD_NAND_CORE="y";
|
|
|
|
MTD_NAND_ECC="y";
|
|
|
|
MTD_NAND_ECC_SW_HAMMING="y";
|
|
|
|
MTD_NAND_MT7621="y";
|
|
|
|
MTD_NAND_MTK_BMT="y";
|
|
|
|
MTD_RAW_NAND="y";
|
|
|
|
MTD_ROUTERBOOT_PARTS="y";
|
|
|
|
MTD_SERCOMM_PARTS="y";
|
|
|
|
MTD_SPI_NOR="y";
|
|
|
|
MTD_SPLIT_FIT_FW="y";
|
|
|
|
MTD_SPLIT_MINOR_FW="y";
|
|
|
|
MTD_SPLIT_SEAMA_FW="y";
|
|
|
|
MTD_SPLIT_TPLINK_FW="y";
|
|
|
|
MTD_SPLIT_TRX_FW="y";
|
|
|
|
MTD_SPLIT_UIMAGE_FW="y";
|
|
|
|
MTD_UBI="y";
|
|
|
|
MTD_UBI_BEB_LIMIT="20";
|
|
|
|
MTD_UBI_BLOCK="y";
|
|
|
|
MTD_UBI_WL_THRESHOLD="4096";
|
|
|
|
MTD_VIRT_CONCAT="y";
|
|
|
|
NEED_DMA_MAP_STATE="y";
|
|
|
|
NET_DEVLINK="y";
|
|
|
|
NET_DSA="y";
|
|
|
|
NET_DSA_MT7530="y";
|
|
|
|
NET_DSA_MT7530_MDIO="y";
|
|
|
|
NET_DSA_TAG_MTK="y";
|
|
|
|
NET_FLOW_LIMIT="y";
|
|
|
|
NET_MEDIATEK_SOC="y";
|
|
|
|
NET_SELFTESTS="y";
|
|
|
|
NET_SWITCHDEV="y";
|
|
|
|
NET_VENDOR_MEDIATEK="y";
|
|
|
|
NO_HZ_COMMON="y";
|
|
|
|
NO_HZ_IDLE="y";
|
|
|
|
NR_CPUS="4";
|
|
|
|
NVMEM="y";
|
|
|
|
OF="y";
|
|
|
|
OF_ADDRESS="y";
|
|
|
|
OF_EARLY_FLATTREE="y";
|
|
|
|
OF_FLATTREE="y";
|
|
|
|
OF_GPIO="y";
|
|
|
|
OF_IRQ="y";
|
|
|
|
OF_KOBJ="y";
|
|
|
|
OF_MDIO="y";
|
|
|
|
PAGE_POOL="y";
|
|
|
|
PAGE_POOL_STATS="y";
|
|
|
|
PCI="y";
|
|
|
|
PCIE_MT7621="y";
|
|
|
|
PCI_DISABLE_COMMON_QUIRKS="y";
|
|
|
|
PCI_DOMAINS="y";
|
|
|
|
PCI_DOMAINS_GENERIC="y";
|
|
|
|
PCI_DRIVERS_GENERIC="y";
|
|
|
|
PCS_MTK_LYNXI="y";
|
|
|
|
PERF_USE_VMALLOC="y";
|
|
|
|
PGTABLE_LEVELS="2";
|
|
|
|
PHYLIB="y";
|
|
|
|
PHYLINK="y";
|
|
|
|
PHY_MT7621_PCI="y";
|
|
|
|
PINCTRL="y";
|
|
|
|
PINCTRL_AW9523="y";
|
|
|
|
PINCTRL_MT7621="y";
|
|
|
|
PINCTRL_RALINK="y";
|
|
|
|
PINCTRL_SX150X="y";
|
|
|
|
POWER_RESET="y";
|
|
|
|
POWER_RESET_GPIO="y";
|
|
|
|
POWER_SUPPLY="y";
|
|
|
|
PTP_1588_CLOCK_OPTIONAL="y";
|
|
|
|
QUEUED_RWLOCKS="y";
|
|
|
|
QUEUED_SPINLOCKS="y";
|
|
|
|
RALINK="y";
|
|
|
|
RATIONAL="y";
|
|
|
|
REGMAP="y";
|
|
|
|
REGMAP_I2C="y";
|
|
|
|
REGMAP_MMIO="y";
|
|
|
|
REGULATOR="y";
|
|
|
|
REGULATOR_FIXED_VOLTAGE="y";
|
|
|
|
RESET_CONTROLLER="y";
|
|
|
|
RFS_ACCEL="y";
|
|
|
|
RPS="y";
|
|
|
|
RTC_CLASS="y";
|
|
|
|
RTC_DRV_BQ32K="y";
|
|
|
|
RTC_DRV_PCF8563="y";
|
|
|
|
RTC_I2C_AND_SPI="y";
|
|
|
|
SCHED_SMT="y";
|
|
|
|
SERIAL_8250="y";
|
2024-01-27 14:59:21 +00:00
|
|
|
SERIAL_8250_CONSOLE="y";
|
get kernel config from openwrt
Now the kernel starts:
```
Starting kernel ...
Linux version 5.15.137 (nixbld@liminix.builder) (mips-unknown-linux-musl-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1 SMP Fri Jan 26 14:47:51 UTC 2024
SoC Type: MediaTek MT7621 ver:1 eco:4
printk: bootconsole [early0] enabled
CPU0 revision is: 0001992f (MIPS 1004Kc)
VPE topology {2,2} total 4
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
OF: fdt: No valid device tree found, continuing without
percpu: Embedded 11 pages/cpu s14544 r8192 d22320 u45056
Built 1 zonelists, mobility grouping on. Total pages: 32512
Kernel command line:
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Writing ErrCtl register=0003003d
Readback ErrCtl register=0003003d
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Memory: 119864K/131072K available (6564K kernel code, 622K rwdata, 1244K rodata, 1220K init, 217K bss, 11208K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
NR_IRQS: 256
Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node
---[ end Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node ]---
```
I'm guessing the important bits are:
```
OF: fdt: No valid device tree found, continuing without
Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node
---[ end Kernel panic - not syncing: Failed to find mediatek,mt7621-sysc node ]---
```
... due to me booting with 'bootm <image>' instead of 'bootm <image> - <dtm>'
because it seems my version of u-boot doesn't support '-' for the ramdisk.
2024-01-26 15:02:49 +00:00
|
|
|
SERIAL_8250_NR_UARTS="3";
|
|
|
|
SERIAL_8250_RUNTIME_UARTS="3";
|
|
|
|
SERIAL_MCTRL_GPIO="y";
|
|
|
|
SERIAL_OF_PLATFORM="y";
|
|
|
|
SGL_ALLOC="y";
|
|
|
|
SMP="y";
|
|
|
|
SMP_UP="y";
|
|
|
|
SOCK_RX_QUEUE_MAPPING="y";
|
|
|
|
SOC_BUS="y";
|
|
|
|
SOC_MT7621="y";
|
|
|
|
SPI="y";
|
|
|
|
SPI_MASTER="y";
|
|
|
|
SPI_MEM="y";
|
|
|
|
SPI_MT7621="y";
|
|
|
|
SRCU="y";
|
|
|
|
SWPHY="y";
|
|
|
|
SYNC_R4K="y";
|
|
|
|
SYSCTL_EXCEPTION_TRACE="y";
|
|
|
|
SYS_HAS_CPU_MIPS32_R1="y";
|
|
|
|
SYS_HAS_CPU_MIPS32_R2="y";
|
|
|
|
SYS_HAS_EARLY_PRINTK="y";
|
|
|
|
SYS_SUPPORTS_32BIT_KERNEL="y";
|
|
|
|
SYS_SUPPORTS_ARBIT_HZ="y";
|
|
|
|
SYS_SUPPORTS_HIGHMEM="y";
|
|
|
|
SYS_SUPPORTS_HOTPLUG_CPU="y";
|
|
|
|
SYS_SUPPORTS_LITTLE_ENDIAN="y";
|
|
|
|
SYS_SUPPORTS_MIPS16="y";
|
|
|
|
SYS_SUPPORTS_MIPS_CPS="y";
|
|
|
|
SYS_SUPPORTS_MULTITHREADING="y";
|
|
|
|
SYS_SUPPORTS_SCHED_SMT="y";
|
|
|
|
SYS_SUPPORTS_SMP="y";
|
|
|
|
SYS_SUPPORTS_ZBOOT="y";
|
|
|
|
TARGET_ISA_REV="2";
|
|
|
|
TICK_CPU_ACCOUNTING="y";
|
|
|
|
TIMER_OF="y";
|
|
|
|
TIMER_PROBE="y";
|
|
|
|
TREE_RCU="y";
|
|
|
|
TREE_SRCU="y";
|
|
|
|
UBIFS_FS="y";
|
|
|
|
USB_SUPPORT="y";
|
|
|
|
USE_OF="y";
|
|
|
|
WEAK_ORDERING="y";
|
|
|
|
XPS="y";
|
|
|
|
XXHASH="y";
|
|
|
|
ZLIB_DEFLATE="y";
|
|
|
|
ZLIB_INFLATE="y";
|
|
|
|
ZSTD_COMPRESS="y";
|
|
|
|
ZSTD_DECOMPRESS="y";
|
2024-01-25 10:23:02 +00:00
|
|
|
} // lib.optionalAttrs (config.system.service ? watchdog) {
|
|
|
|
RALINK_WDT = "y"; # watchdog
|
|
|
|
MT7621_WDT = "y"; # or it might be this one
|
|
|
|
};
|
|
|
|
};
|
|
|
|
boot = {
|
|
|
|
commandLine = [ "console=ttyS0,115200" ];
|
|
|
|
tftp = {
|
|
|
|
#ipaddr = "10.0.0.8"; # router address
|
|
|
|
#serverip = "10.0.0.1"; # build machine or other tftp server
|
|
|
|
# Should be a segment of free RAM, where the tftp artifact
|
|
|
|
# can be stored before unpacking it to the 'hardware.loadAddress'
|
|
|
|
# The 'hardware.loadAddress' is 0x80001000, which suggests the
|
|
|
|
# RAM would start at 0x8000000 and (being 128MB) go to
|
|
|
|
# to 0x8800000. Let's put it at the 100MB mark at
|
|
|
|
# 0x8000000+0x0640000=0x86400000
|
|
|
|
loadAddress = lim.parseInt "0x86400000";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
filesystem =
|
|
|
|
let inherit (pkgs.pseudofile) dir symlink;
|
|
|
|
in
|
|
|
|
dir {
|
|
|
|
lib = dir {
|
|
|
|
firmware = dir {
|
|
|
|
mediatek = symlink firmware;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware =
|
|
|
|
let
|
|
|
|
openwrt = pkgs.openwrt;
|
|
|
|
mac80211 = pkgs.mac80211.override {
|
|
|
|
drivers = [
|
2024-01-27 19:43:18 +00:00
|
|
|
#"mt7615e"
|
|
|
|
#"mt7915e"
|
2024-01-25 10:23:02 +00:00
|
|
|
];
|
|
|
|
klibBuild = config.system.outputs.kernel.modulesupport;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
#ubi = {
|
|
|
|
# # TODO how to determine?
|
|
|
|
# minIOSize = "2048";
|
|
|
|
# # TODO how to determine?
|
|
|
|
# eraseBlockSize = "126976";
|
|
|
|
# # TODO how to determine?
|
|
|
|
# maxLEBcount = "1024"; # guessing
|
|
|
|
#};
|
|
|
|
# from OEM bootlog (openwrt wiki):
|
|
|
|
# 4 cmdlinepart partitions found on MTD device raspi
|
|
|
|
# Creating 4 MTD partitions on "raspi":
|
|
|
|
# 0x000000000000-0x000000040000 : "uboot"
|
|
|
|
# 0x000000040000-0x000000440000 : "uImage"
|
|
|
|
# 0x000000440000-0x000000ff0000 : "rootfs"
|
|
|
|
# 0x000000ff0000-0x000001000000 : "ART"
|
|
|
|
# from openwrt bootlog (openwrt wiki):
|
|
|
|
# 5 fixed-partitions partitions found on MTD device spi0.0
|
|
|
|
# OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
|
|
|
|
# OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
|
|
|
|
# OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
|
|
|
|
# OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
|
|
|
|
# Creating 5 MTD partitions on "spi0.0":
|
|
|
|
# 0x000000000000-0x000000040000 : "u-boot"
|
|
|
|
# 0x000000040000-0x000000fa0000 : "firmware"
|
|
|
|
# 2 uimage-fw partitions found on MTD device firmware
|
|
|
|
# Creating 2 MTD partitions on "firmware":
|
|
|
|
# 0x000000000000-0x0000002c0000 : "kernel"
|
|
|
|
# 0x0000002c0000-0x000000f60000 : "rootfs"
|
|
|
|
# mtd: setting mtd3 (rootfs) as root device
|
|
|
|
# 1 squashfs-split partitions found on MTD device rootfs
|
|
|
|
# 0x000000640000-0x000000f60000 : "rootfs_data"
|
|
|
|
# 0x000000fa0000-0x000000fb0000 : "config"
|
|
|
|
# 0x000000fb0000-0x000000ff0000 : "tplink"
|
|
|
|
# 0x000000ff0000-0x000001000000 : "radio"
|
|
|
|
flash = {
|
|
|
|
# from the OEM bootlog 'Booting image at bc040000'
|
|
|
|
# (0x40000 from 0xbc000000)
|
|
|
|
address = lim.parseInt "0xbc040000";
|
|
|
|
# 0x000000040000-0x000000fa0000
|
|
|
|
size = lim.parseInt "0xf60000";
|
|
|
|
# TODO how to determine?
|
|
|
|
eraseBlockSize = 65536;
|
|
|
|
};
|
|
|
|
|
|
|
|
# since this is mentioned in the partition table as well?
|
2024-01-27 19:43:18 +00:00
|
|
|
defaultOutput = "tplink";
|
2024-01-25 10:23:02 +00:00
|
|
|
# taken from openwrt sysupgrade image:
|
|
|
|
# openwrt-23.05.2-ramips-mt7621-tplink_archer-ax23-v1-squashfs-sysupgrade.bin: u-boot legacy uImage, MIPS OpenWrt Linux-5.15.137, Linux/MIPS, OS Kernel Image (lzma), 2797386 bytes, Tue Nov 14 13:38:11 2023, Load Address: 0X80001000, Entry Point: 0X80001000, Header CRC: 0X19F74C5B, Data CRC: 0XF685563C
|
|
|
|
loadAddress = lim.parseInt "0x80001000";
|
|
|
|
entryPoint = lim.parseInt "0x80001000";
|
2024-01-27 16:47:47 +00:00
|
|
|
rootDevice = "/dev/mtdblock3";
|
2024-01-25 10:23:02 +00:00
|
|
|
dts = {
|
|
|
|
src = "${openwrt.src}/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts";
|
|
|
|
includes = [
|
|
|
|
"${openwrt.src}/target/linux/ramips/dts"
|
|
|
|
"${config.system.outputs.kernel.modulesupport}/arch/arm64/boot/dts/mediatek/"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
networkInterfaces =
|
|
|
|
let
|
|
|
|
inherit (config.system.service.network) link;
|
|
|
|
inherit (config.system.service) bridge;
|
|
|
|
in rec {
|
|
|
|
lan1 = link.build { ifname = "lan1"; };
|
|
|
|
lan2 = link.build { ifname = "lan2"; };
|
|
|
|
lan3 = link.build { ifname = "lan3"; };
|
|
|
|
lan4 = link.build { ifname = "lan4"; };
|
2024-01-27 19:43:18 +00:00
|
|
|
wan = link.build { ifname = "wan"; };
|
2024-01-25 10:23:02 +00:00
|
|
|
|
2024-01-27 19:43:18 +00:00
|
|
|
wlan = link.build {
|
|
|
|
ifname = "wlan0";
|
|
|
|
dependencies = [ mac80211 ];
|
|
|
|
};
|
|
|
|
wlan5 = link.build {
|
|
|
|
ifname = "wlan1";
|
2024-01-25 10:23:02 +00:00
|
|
|
dependencies = [ mac80211 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|