Add support for ipq60xx based devices

Hello everybody. Couple of weeks ago i've tried to add support for my Yuncore AX840 (ipq6010) access point. At the moment there is similar chipset already added to owrt master branch ipq8071A (xiaomi ax3600).

So based on this commit i've made a commit for yuncore ax840.

Unfortunately, all I managed to do was get the firmware to compile and then boot the device. The kernel starts, but neither etnernet nor wireless work.

If somehow get the firmware work, then we can add support for a whole bunch of devices:

cig_wf188n
hfcl_ion4xe
hfcl_ion4x
hfcl_ion4x_2
hfcl_ion4xi
edgecore_eap101
indio_um-310ax-v1
indio_um-510axp-v1
indio_um-510axm-v1
wallys_dr6018
wallys_dr6018_v4
qcom_cp01_c1
glinet_ax1800
glinet_axt1800
yuncore_ax840
plasmacloud_common_64k

If this is interesting, community please help

1 Like

ipq60xx is similar to ipq807x, but not the same - it probably needs its own (sub-)target (at least). There is some work ongoing for it (https://github.com/mrnuke/openwrt/tree/ipq6018-devel and https://github.com/mrnuke/openwrt/tree/ipq6018-devel-broken), but I have no idea how close to being functional they are.

1 Like

Thanks. This fork is working. I've made my own based on it.

Now there is another problem:
Empty FW is working. But if i try to add or replace some packages device reboots just before kernel starts loading:

IPQ6018# bootm
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@cp03-c1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.15.94
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x440000e8
     Data Size:    42678280 Bytes = 40.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   740c0f3d
     Hash algo:    sha1
     Hash value:   03303752a17efc741f1310af59fd43d25bb11844
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@cp03-c1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt yuncore_ax840 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468b3a30
     Data Size:    26495 Bytes = 25.9 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   50c301b1
     Hash algo:    sha1
     Hash value:   200381468ec0d8afddd9edf3070a39c7785aae49
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x468b3a30
   Loading Kernel Image ... OK

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.0.3-00077-IPQ60xxLZB-2
S - IMAGE_VARIANT_STRING=IPQ6018LA
S - OEM_IMAGE_VERSION_STRING=crm-ubuntu64
S - Boot Interface: SPI
S - Secure Boot: Off
S - Boot Config @ 0x000a602c = 0x000002e1
S - JTAG ID @ 0x000a607c = 0x001390e1
S - OEM ID @ 0x000a6080 = 0x00000000
S - Serial Number @ 0x000a4128 = 0x72a56280
S - OEM Config Row 0 @ 0x000a4188 = 0x0000000000000000
S - OEM Config Row 1 @ 0x000a4190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x000a4130 = 0x0000800018200021
S - Feature Config Row 1 @ 0x000a4138 = 0x02c3e83783000009
S - PBL Patch Ver: 1
S - I-cache: On

I can't figure out what is causing this. This happens when i add these packages:
+libopenssl

Maybe compiled initramfs becomes too big?

@Ansuel @robimarko @mrnuke
Any ideas?

Linksys MR7350 accidentally won one of these on eBay, I see there's a partial toh and unofficial support by coolsnowwolf.

While I wait for it to arrive, what's needed to add support for the ipq60xx based devices?

40MB is definitely to large. Around 15MB is the max size for an initramfs image.
Use a basic config and zstd compression for the initramfs image.

1 Like

Another problem:

incorrect nand spi layout:

Now i got this:

[    0.705258] spi_qup soc:spi@78b5000: invalid resource
[    0.707535] spi_qup: probe of soc:spi@78b5000 failed with error -22
[    0.805421] i2c_dev: i2c /dev entries driver

[    0.909979] 18 qcomsmem partitions found on MTD device qcom_nand.0
[    0.913769] Creating 18 MTD partitions on "qcom_nand.0":
[    0.919863] 0x000000000000-0x000000180000 : "0:sbl1"
[    0.926730] 0x000000180000-0x0000001a0000 : "0:mibib"
[    0.930624] 0x0000001a0000-0x0000001e0000 : "0:bootconfig"
[    0.935679] 0x0000001e0000-0x000000220000 : "0:bootconfig1"
[    0.941051] 0x000000560000-0x0000008a0000 : "0:qsee"
[    0.948497] 0x000000220000-0x000000560000 : "0:qsee_1"
[    0.953600] 0x0000008c0000-0x0000008e0000 : "0:devcfg"
[    0.956630] 0x0000008a0000-0x0000008c0000 : "0:devcfg_1"
[    0.961692] 0x000000960000-0x0000009e0000 : "0:rpm"
[    0.967437] 0x0000008e0000-0x000000960000 : "0:rpm_1"
[    0.972013] 0x000000a00000-0x000000a20000 : "0:cdt"
[    0.976992] 0x0000009e0000-0x000000a00000 : "0:cdt_1"
[    0.981640] 0x000000a20000-0x000000a40000 : "0:appsblenv"
[    0.986891] 0x000000b80000-0x000000cc0000 : "0:appsbl"
[    0.992957] 0x000000a40000-0x000000b80000 : "0:appsbl_1"
[    0.998031] 0x000000cc0000-0x000000d40000 : "0:art"
[    1.002981] 0x000003c00000-0x000007800000 : "rootfs"
[    1.046499] mtd: setting mtd16 (rootfs) as root device
[    1.046768] mtdsplit: no squashfs found in "rootfs"
[    1.050558] 0x000000000000-0x000003c00000 : "rootfs_1"
[    1.104399] remoteproc remoteproc0: cd00000.remoteproc is available
[    1.104921] ubi0: attaching mtd16
[    1.378416] ubi0: scanning is finished
[    1.384667] ubi0: attached mtd16 (name "rootfs", size 60 MiB)
[    1.384709] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.389400] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.396191] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.403029] ubi0: good PEBs: 480, bad PEBs: 0, corrupted PEBs: 0

Expected:

[    0.867340] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.870897] 2 fixed-partitions partitions found on MTD device qcom_nand.0
[    0.878508] Creating 2 MTD partitions on "qcom_nand.0":
[    0.885354] 0x000000000000-0x000003c00000 : "rootfs_1"
[    0.938805] 0x000003c00000-0x000007800000 : "rootfs"
[    0.987611] mtd: device 1 (rootfs) set to be root filesystem
[    0.987886] mtdsplit: no squashfs found in "rootfs"
[    0.992995] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.997514] spi-nor spi0.0: found mx25u6435f, expected n25q128a11
[    1.004485] spi-nor spi0.0: mx25u6435f (8192 Kbytes)
[    1.010300] 16 fixed-partitions partitions found on MTD device spi0.0
[    1.015247] Creating 16 MTD partitions on "spi0.0":
[    1.021596] 0x000000000000-0x0000000c0000 : "0:SBL1"
[    1.026861] 0x0000000c0000-0x0000000d0000 : "0:MIBIB"
[    1.032014] 0x0000000d0000-0x0000000f0000 : "0:BOOTCONFIG"
[    1.037012] 0x0000000f0000-0x000000110000 : "0:BOOTCONFIG1"
[    1.042334] 0x000000110000-0x0000002b0000 : "0:QSEE_1"
[    1.047834] 0x0000002b0000-0x000000450000 : "0:QSEE"
[    1.053004] 0x000000450000-0x000000460000 : "0:DEVCFG_1"
[    1.058166] 0x000000460000-0x000000470000 : "0:DEVCFG"
[    1.063430] 0x000000470000-0x0000004b0000 : "0:RPM_1"
[    1.068394] 0x0000004b0000-0x0000004f0000 : "0:RPM"
[    1.073536] 0x0000004f0000-0x000000500000 : "0:CDT_1"
[    1.078202] 0x000000500000-0x000000510000 : "0:CDT"
[    1.083388] 0x000000510000-0x000000520000 : "0:APPSBLENV"
[    1.088102] 0x000000520000-0x0000005c0000 : "0:APPSBL_1"
[    1.093623] 0x0000005c0000-0x000000660000 : "0:APPSBL"
[    1.099074] 0x000000660000-0x0000006a0000 : "0:ART"

Looking for kernel options that are responsible for this.

This is succesfull bootlog:

Could not find PCI in device tree
Using machid 0x8030200 from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x51af8014]
[    0.000000] Linux version 5.15.94 (ruslan@radar-prod1) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22167-1272cb0a0d) 12.2.0, GNU ld (GNU Binutils) 2.39) #0 SMP Tue Feb 28 12:15:05 2023
[    0.000000] Machine model: Yuncore AX840
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000040ffffff]
[    0.000000]   node   0: [mem 0x0000000041000000-0x000000004a0fffff]
[    0.000000]   node   0: [mem 0x000000004a100000-0x000000004fffffff]
[    0.000000]   node   0: [mem 0x0000000050000000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 17 pages/cpu s30360 r8192 d31080 u69632
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
[    0.000000] Kernel command line: console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait ubi.block=0,rootfs root=/dev/ubiblock0_1
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 388304K/524288K available (7360K kernel code, 974K rwdata, 2080K rodata, 1280K init, 271K bss, 135984K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 24.00MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000155] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000172] pid_max: default: 32768 minimum: 301
[    0.000316] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.000332] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.001918] rcu: Hierarchical SRCU implementation.
[    0.002081] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.002484] smp: Bringing up secondary CPUs ...
[    0.003080] Detected VIPT I-cache on CPU1
[    0.003142] CPU1: Booted secondary processor 0x0000000001 [0x51af8014]
[    0.003746] Detected VIPT I-cache on CPU2
[    0.003783] CPU2: Booted secondary processor 0x0000000002 [0x51af8014]
[    0.004356] Detected VIPT I-cache on CPU3
[    0.004392] CPU3: Booted secondary processor 0x0000000003 [0x51af8014]
[    0.004458] smp: Brought up 1 node, 4 CPUs
[    0.004484] SMP: Total of 4 processors activated.
[    0.004492] CPU features: detected: 32-bit EL0 Support
[    0.004499] CPU features: detected: CRC32 instructions
[    0.004554] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.004564] CPU: All CPU(s) started at EL1
[    0.004585] alternatives: patching kernel code
[    0.009918] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009953] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.010108] pinctrl core: initialized pinctrl subsystem
[    0.011166] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.011660] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.011702] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.011740] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.012055] thermal_sys: Registered thermal governor 'step_wise'
[    0.012377] cpuidle: using governor menu
[    0.012565] ASID allocator initialised with 65536 entries
[    0.072205] SCSI subsystem initialized
[    0.072378] usbcore: registered new interface driver usbfs
[    0.072419] usbcore: registered new interface driver hub
[    0.072454] usbcore: registered new device driver usb
[    0.072708] qcom_scm: convention: smc arm 64
[    0.073857] clocksource: Switched to clocksource arch_sys_counter
[    0.074483] NET: Registered PF_INET protocol family
[    0.074617] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.075203] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.075229] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.075244] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.075296] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.075376] TCP: Hash tables configured (established 4096 bind 4096)
[    0.075459] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.075491] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.075644] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.075675] PCI: CLS 0 bytes, default 64
[    0.076697] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    0.080298] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.080316] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.085529] bam-dma-engine 704000.dma-controller: num-channels unspecified in dt
[    0.085554] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt
[    0.089045] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.089516] msm_serial 78b1000.serial: msm_serial: detected port #0
[    0.089545] msm_serial 78b1000.serial: uartclk = 1843200
[    0.089578] 78b1000.serial: ttyMSM0 at MMIO 0x78b1000 (irq = 20, base_baud = 115200) is a MSM
[    0.089605] msm_serial: console setup on port #0
[    0.669127] printk: console [ttyMSM0] enabled
[    0.674264] msm_serial: driver initialized
[    0.682083] loop: module loaded
[    0.683328] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xa1
[    0.685104] nand: Macronix MX30UF1G18AC
[    0.691676] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.695266] Block protection check failed
[    0.703576] spi_qup soc:spi@78b5000: invalid resource
[    0.706981] spi_qup: probe of soc:spi@78b5000 failed with error -22
[    0.815119] i2c_dev: i2c /dev entries driver
[    0.820751] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 24000 KHz, changing to: 864000 KHz
[    0.821503] sdhci: Secure Digital Host Controller Interface driver
[    0.830361] sdhci: Copyright(c) Pierre Ossman
[    0.836336] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.844084] remoteproc remoteproc0: releasing cd00000.remoteproc
[    0.847857] NET: Registered PF_INET6 protocol family
[    0.853154] Segment Routing with IPv6
[    0.857474] In-situ OAM (IOAM) with IPv6
[    0.861027] NET: Registered PF_PACKET protocol family
[    0.865019] 8021q: 802.1Q VLAN Support v1.8
[    0.882362] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xa1
[    0.882397] nand: Macronix MX30UF1G18AC
[    0.887845] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.891360] Block protection check failed
[    0.899244] 18 qcomsmem partitions found on MTD device qcom_nand.0
[    0.903060] Creating 18 MTD partitions on "qcom_nand.0":
[    0.909147] 0x000000000000-0x000000180000 : "0:sbl1"
[    0.916028] 0x000000180000-0x0000001a0000 : "0:mibib"
[    0.919919] 0x0000001a0000-0x0000001e0000 : "0:bootconfig"
[    0.924946] 0x0000001e0000-0x000000220000 : "0:bootconfig1"
[    0.930311] 0x000000560000-0x0000008a0000 : "0:qsee"
[    0.937715] 0x000000220000-0x000000560000 : "0:qsee_1"
[    0.942868] 0x0000008c0000-0x0000008e0000 : "0:devcfg"
[    0.945879] 0x0000008a0000-0x0000008c0000 : "0:devcfg_1"
[    0.950968] 0x000000960000-0x0000009e0000 : "0:rpm"
[    0.956703] 0x0000008e0000-0x000000960000 : "0:rpm_1"
[    0.961283] 0x000000a00000-0x000000a20000 : "0:cdt"
[    0.966284] 0x0000009e0000-0x000000a00000 : "0:cdt_1"
[    0.970955] 0x000000a20000-0x000000a40000 : "0:appsblenv"
[    0.976172] 0x000000b80000-0x000000cc0000 : "0:appsbl"
[    0.982259] 0x000000a40000-0x000000b80000 : "0:appsbl_1"
[    0.987325] 0x000000cc0000-0x000000d40000 : "0:art"
[    0.992270] 0x000003c00000-0x000007800000 : "rootfs"
[    1.035352] mtd: setting mtd16 (rootfs) as root device
[    1.035613] mtdsplit: no squashfs found in "rootfs"
[    1.039414] 0x000000000000-0x000003c00000 : "rootfs_1"
[    1.092034] remoteproc remoteproc0: cd00000.remoteproc is available
[    1.092545] ubi0: attaching mtd16
[    1.283609] ubi0: scanning is finished
[    1.289789] ubi0: attached mtd16 (name "rootfs", size 60 MiB)
[    1.289831] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.294537] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.301295] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.308160] ubi0: good PEBs: 480, bad PEBs: 0, corrupted PEBs: 0
[    1.314930] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.321175] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1677586505
[    1.328222] ubi0: available PEBs: 0, total reserved PEBs: 480, PEBs reserved for bad PEB handling: 20
[    1.337513] ubi0: background thread "ubi_bgt0d" started, PID 410
[    1.338038] block ubiblock0_1: created from ubi0:1(rootf▒[    1.368522] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.369139] Freeing unused kernel memory: 1280K
[    1.433970] Run /sbin/init as init process
[    1.686486] init: Console is alive
[    1.686618] init: - watchdog -
[    2.263395] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.392355] ssdk_switch_device_num_init[1335]:INFO:ess-switch dts node number: 1
[    2.392451] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    2.398867] ssdk_dt_parse_access_mode[999]:INFO:switch_access_mode: local bus
[    2.404827] ssdk_dt_parse_access_mode[1012]:INFO:switchreg_base_addr: 0x3a000000
[    2.412113] ssdk_dt_parse_access_mode[1013]:INFO:switchreg_size: 0x1000000
[    2.419585] ssdk_dt_parse_mac_mode[327]:INFO:mac mode = 0x0
[    2.426265] ssdk_dt_parse_mac_mode[336]:INFO:mac mode1 = 0xff
[    2.431730] ssdk_dt_parse_mac_mode[345]:INFO:mac mode2 = 0xff
[    2.437684] ssdk_dt_parse_uniphy[364]:INFO:ess-uniphy DT exist!
[    2.443486] ssdk_dt_parse_intf_mac[942]:INFO:dp1 MAC 44:d1:fa:bc:0e:5d
[    2.449139] ssdk_dt_parse_intf_mac[942]:INFO:dp2 MAC 44:d1:fa:bc:0e:5c
[    2.455825] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    2.574952] ssdk_gcc_clock_init[1275]:INFO:SSDK gcc clock init successfully!
[    2.575627] malibu_phy_api_ops_init[2846]:INFO:qca probe malibu phy driver succeeded!
[    2.583268] regi_init[3953]:INFO:Initializing HPPE!!
[    2.823861] ssdk_ppe_reset_init[1535]:INFO:ppe reset successfully!
[    2.827003] qca_hppe_portctrl_hw_init[123]:INFO:Cypress PPE port initializing
[    2.944265] __adpt_hppe_uniphy_psgmii_mode_set[1067]:INFO:uniphy 0 psgmii channel selection
[    3.169954] adpt_hppe_port_mux_mac_type_set[2787]:WARN:port 1 need not to configure mux and mac type
[    3.169981] adpt_hppe_port_mux_mac_type_set[2787]:WARN:port 2 need not to configure mux and mac type
[    3.178152] adpt_hppe_port_mux_mac_type_set[2787]:WARN:port 3 need not to configure mux and mac type
[    3.187304] ssdk_switch_register[2017]:INFO:Chip version 0x1501
[    3.196383] qca_link_polling_select[1487]:INFO:link-polling-required node does not exist
[    3.202015] ssdk_switch_register[2043]:INFO:polling is selected
[    3.210354] regi_init[3957]:INFO:Initializing HPPE Done!!
[    3.216070] ssdk_genl_init[211]:INFO:ssdk genl family register success.
[    3.221549] regi_init[4020]:INFO:qca-ssdk module init succeeded!
[    3.230155] EDMA ver 1 hw init
[    3.234446] EDMA HW Reset completed succesfully
[    3.237104] Num rings - TxDesc:1 (23-23) TxCmpl:1 (23-23)
[    3.241507] RxDesc:1 (15-15) RxFill:1 (7-7)
[    3.247601] Generic PHY 90000.mdio-1:03: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:03, irq=POLL)
[    3.251647] nss-dp 3a001600.dp1 eth0: Registered netdev eth0(qcom-id:4)
[    3.261083] Generic PHY 90000.mdio-1:04: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:04, irq=POLL)
[    3.267803] nss-dp 3a001800.dp2 eth1: Registered netdev eth1(qcom-id:5)
[    3.277037] **********************************************************
[    3.283349] * NSS Data Plane driver
[    3.289948] **********************************************************
[    3.294743] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.300627] init: - preinit -
[    3.625947] random: jshn: uninitialized urandom read (4 bytes read)
[    3.651961] random: jshn: uninitialized urandom read (4 bytes read)
[    3.662454] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.703882] random: crng init done
[    4.703916] random: 1 urandom warning(s) missed due to ratelimiting
[    5.750020] UBIFS (ubi0:2): default file-system created
[    5.750488] UBIFS (ubi0:2): Mounting in unauthenticated mode
[    5.754220] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 544
[    5.806341] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    5.806381] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    5.813160] UBIFS (ubi0:2): FS size: 43806720 bytes (41 MiB, 345 LEBs), max 355 LEBs, journal size 2158592 bytes (2 MiB, 17 LEBs)
[    5.823080] UBIFS (ubi0:2): reserved for root: 2069099 bytes (2020 KiB)
[    5.834696] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID FD077EC4-710D-41A5-8206-4A45EAAABD4E, small LPT model
[    5.842590] mount_root: overlay filesystem has not been fully initialized yet
[    5.852827] mount_root: switching to ubifs overlay
[    5.861964] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    5.865774] urandom-seed: Seed file not found (/etc/urandom.seed)
[    5.912486] procd: - early -
[    5.912599] procd: - watchdog -
[    6.449180] procd: - watchdog -
[    6.449544] procd: - ubus -
[    6.508591] procd: - init -
Please press Enter to activate this console.
[    6.646092] urngd: v1.0.2 started.
[    6.661213] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.696655] Loading modules backported from Linux version v6.1-rc8-0-g76dcd734eca2
[    6.696693] Backport generated by backports.git v5.15.81-1-41-g02e352527db5
[    6.709321] NET: Registered PF_QIPCRTR protocol family
[    6.738955] PPP generic driver version 2.4.2
[    6.739683] NET: Registered PF_PPPOX protocol family
[    6.743650] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    6.747320] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    6.761668] ath11k c000000.wifi: ipq6018 hw1.0
[    6.764539] ath11k c000000.wifi: FW memory mode: 0
[    6.769109] remoteproc remoteproc0: powering up cd00000.remoteproc
[    6.789035] remoteproc remoteproc0: Booting fw image IPQ6018/q6_fw.mdt, size 7340
[    7.675287] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[    7.679117] kmodloader: done loading kernel modules from /etc/modules.d/*
[    7.719112] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[    7.727340] ath11k c000000.wifi: chip_id 0x0 chip_family 0x4 board_id 0xff soc_id 0xffffffff
[    7.727378] ath11k c000000.wifi: fw_version 0x270206d0 fw_build_timestamp 2022-08-04 13:11 fw_build_id WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1



BusyBox v1.36.0 (2023-02-26 22:45:07 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22171-4dbe739282
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):/# [   13.240719] nss-dp 3a001800.dp2 eth1: PHY Link up speed: 100
[   13.241555] br-lan: port 1(eth1) entered blocking state
[   13.245512] br-lan: port 1(eth1) entered disabled state
[   13.250635] device eth1 entered promiscuous mode
[   13.263342] br-mgmt: port 1(eth0) entered blocking state
[   13.263389] br-mgmt: port 1(eth0) entered disabled state
[   13.268038] device eth0 entered promiscuous mode
[   14.313994] br-lan: port 1(eth1) entered blocking state
[   14.314039] br-lan: port 1(eth1) entered forwarding state
[   14.318963] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

root@AP_44D1FABC0E5C:/#

I've tried to gzip initramfs. So now it is only ~15M. But still the same reboot on start. I'm able to flash and start same FW from memory chip.

check this forum ...

For figuring out very early boot crashes, one may set earlycon. Assuming the board uses blsp_uart3 for console, the u-boot command would look like:

setenv bootargs earlycon=msm_serial_dm,0x78b1000
bootm

@rmandrad, the Xiaomi AX1800 forum seems to use linux-v4.6. The point of the this thread is to use a modern kernel.

1 Like

Same (

Filename 'master.bin'.
Load address: 0x44000000
Loading: *
Got TFTP_OACK: TFTP remote port: changes from 69 to 64120
#################################################################
         #################################################################
         290 KiB/s
done
Bytes transferred = 14902860 (e3664c hex)
ipq6018_eth_halt: done
IPQ6018# setenv bootargs earlycon=msm_serial_dm,0x78b1000
IPQ6018# bootm
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@cp03-c1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.15.94
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x440000e8
     Data Size:    14874462 Bytes = 14.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   78b948c4
     Hash algo:    sha1
     Hash value:   0a7cb94b28910a13c2eaac5e94e206b913eff859
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@cp03-c1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt yuncore_ax840 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x44e2f988
     Data Size:    26487 Bytes = 25.9 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   516b7027
     Hash algo:    sha1
     Hash value:   aea4190deecc9412b4f950688543f721f5fd04ab
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x44e2f988
   Uncompressing Kernel Image ... OK

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.0.3-00077-IPQ60xxLZB-2
S - IMAGE_VARIANT_STRING=IPQ6018LA
S - OEM_IMAGE_VERSION_STRING=crm-ubuntu64
S - Boot Interface: SPI
S - Secure Boot: Off
S - Boot Config @ 0x000a602c = 0x000002e1
S - JTAG ID @ 0x000a607c = 0x001390e1
S - OEM ID @ 0x000a6080 = 0x00000000
S - Serial Number @ 0x000a4128 = 0x72a56280
S - OEM Config Row 0 @ 0x000a4188 = 0x0000000000000000
S - OEM Config Row 1 @ 0x000a4190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x000a4130 = 0x0000800018200021
S - Feature Config Row 1 @ 0x000a4138 = 0x02c3e83783000009
S - PBL Patch Ver: 1
S - I-cache: On
S - D-cache: On
B -      3413 - PBL, Start
B -       592 - bootable_media_detect_entry, Start
B -      4340 - bootable_media_detect_success, Start
B -      4436 - elf_loader_entry, Start
B -      4608 - auth_hash_seg_entry, Start
B -     10854 - auth_hash_seg_exit, Start
B -     11349 - elf_segs_hash_verify_entry, Start
B -    383786 - elf_segs_hash_verify_exit, Start
B -    388213 - auth_xbl_sec_hash_seg_entry, Start
B -    388355 - auth_xbl_sec_hash_seg_exit, Start
B -    394903 - xbl_sec_segs_hash_verify_entry, Start
B -    394904 - xbl_sec_segs_hash_verify_exit, Start
B -    395833 - PBL, End
B -    316681 - SBL1, Start
B -    456707 - GCC [RstStat:0x0, RstDbg:0x600000] WDog Stat : 0x4
B -    459147 - clock_init, Start
D -      2958 - clock_init, Delta
B -    467809 - boot_flash_init, Start
D -      8601 - boot_flash_init, Delta
B -    479521 - sbl1_ddr_set_default_params, Start
D -       244 - sbl1_ddr_set_default_params, Delta
B -    486139 - boot_config_data_table_init, Start
D -      1921 - boot_config_data_table_init, Delta - (575 Bytes)
B -    495259 - CDT Version:2,Platform ID:8,Major ID:3,Minor ID:2,Subtype:0
B -    500810 - Image Load, Start
D -      6618 - OEM_MISC Image Loaded, Delta - (0 Bytes)
B -    510143 - Image Load, Start
D -      5063 - PMIC Image Loaded, Delta - (0 Bytes)
B -    518012 - sbl1_ddr_set_params, Start
B -    522983 - CPR configuration: 0x366
B -    526186 - Pre_DDR_clock_init, Start
D -       183 - Pre_DDR_clock_init, Delta
D -         0 - sbl1_ddr_set_params, Delta
B -    563091 - Image Load, Start
D -       427 - APDP Image Loaded, Delta - (0 Bytes)
B -    576145 - Image Load, Start
D -       457 - QTI_MISC Image Loaded, Delta - (0 Bytes)
B -    578554 - Image Load, Start
D -       854 - Auth Metadata
D -       671 - Segments hash check
D -     28853 - QSEE Dev Config Image Loaded, Delta - (36354 Bytes)
B -    609390 - Image Load, Start
D -      6558 - Auth Metadata
D -     10553 - Segments hash check
D -    818711 - QSEE Image Loaded, Delta - (1470632 Bytes)
B -   1428589 - Image Load, Start
D -       732 - Auth Metadata
D -       976 - Segments hash check
D -     63379 - RPM Image Loaded, Delta - (102664 Bytes)
B -   1493615 - Image Load, Start
D -       640 - Auth Metadata
D -      3020 - Segments hash check
D -    291580 - APPSBL Image Loaded, Delta - (531928 Bytes)
B -   1800842 - SBL1, End
D -   1484466 - SBL1, Delta
S - Flash Throughput, 1000 KB/s  (2142825 Bytes,  1118484 us)
S - Core 0 Frequency, 800 MHz
S - DDR Frequency, 466 MHz


U-Boot 2016.01 (Nov 12 2020 - 11:42:00 +0800)

DRAM:  smem ram ptable found: ver: 2 len: 4
sys led OK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
512 MiB
NAND:  ONFI device found
ID = 1580a1c2
Vendor = c2
Device = a1
SPI_ADDR_LEN=3
SF: Detected MX25U6435F with page size 256 Bytes, erase size 64 KiB, total 8 MiB
ipq_spi: page_size: 0x100, sector_size: 0x10000, size: 0x800000
136 MiB
MMC:   sdhci: Node Not found, skipping initialization

PCI0 is not defined in the device tree
In:    serial@78B1000
Out:   serial@78B1000
Err:   serial@78B1000
machid: 8030200
eth2 MAC Address from ART is not valid
eth3 MAC Address from ART is not valid
eth4 MAC Address from ART is not valid
eth5 MAC Address from ART is not valid
Hit any key to stop autoboot:  0

Net:   MAC0 addr:44:d1:fa:bc:e:5c
PHY ID1: 0x4d
PHY ID2: 0xd0b1
EDMA ver 1 hw init
Num rings - TxDesc:1 (0-0) TxCmpl:1 (0-0)
RxDesc:1 (15-15) RxFill:1 (7-7)
ipq6018_edma_alloc_rings: successfull
ipq6018_edma_setup_ring_resources: successfull
ipq6018_edma_configure_rings: successfull
ipq6018_edma_hw_init: successfull
eth0
IPQ6018#

Setting earlycon as bootargs is not enough AFAIK, you need to set the kernel command line in the kernel config (boot options) and enable "force command line"

Try using ZSTD compressed initramfs

hi, i've tried to add support to the wallystech dr6018-v4.

my github is https://github.com/okoklets/openwrt/tree/ipq6018-devel

i haven't quite got the dts right, is what my instincts are telling me.

it errors here:

[    0.219521] pc : msm_readl_ctl+0x1c/0x40
[    0.226286] lr : msm_gpio_get_direction+0x30/0x60
[    0.230453] sp : ffffffc009d3b7c0
[    0.235052] x29: ffffffc009d3b7c0 x28: ffffff80032e0320 x27: 0000000000000320
[    0.238359] x26: 0000000000000000 x25: ffffff8003357408 x24: 0000000000000014
[    0.245476] x23: 00000000000001b0 x22: ffffffc009c7cf58 x21: 0000000000000000
[    0.252594] x20: ffffff80032e8090 x19: ffffffc00877d7a0 x18: 0000000000000000
[    0.259712] x17: ffffffc009cab7c0 x16: ffffffc009cab750 x15: ffffffffffffffff
[    0.266830] x14: ffffff8003262e8a x13: 006c7274636e6970 x12: 2e30303030303031
[    0.273949] x11: 0000000000000004 x10: 0101010101010101 x9 : 0000000000000000
[    0.281067] x8 : 7f7f7f7f7f7f7f7f x7 : fefefeff646c606d x6 : 0911040aade8efe7
[    0.288186] x5 : ffffffc009d0e338 x4 : 0000000000000000 x3 : 0000000000014000
[    0.295302] x2 : 1065000102406008 x1 : 000000000000008a x0 : ffffffc00a814000
[    0.302421] Call trace:
[    0.309530]  msm_readl_ctl+0x1c/0x40
[    0.311789]  gpiochip_add_data_with_key+0x750/0xdb0
[    0.315611]  msm_pinctrl_probe+0x494/0x610
[    0.320210]  ipq6018_pinctrl_probe+0x18/0x30
[    0.324377]  platform_probe+0x68/0xc0
[    0.328802]  really_probe.part.0+0x9c/0x30c
[    0.332363]  __driver_probe_device+0x98/0x144
[    0.336356]  driver_probe_device+0x44/0x11c
[    0.340870]  __device_attach_driver+0xb8/0x134
[    0.344863]  bus_for_each_drv+0x68/0xb0
[    0.349376]  __device_attach+0xa0/0x194
[    0.353108]  device_initial_probe+0x14/0x20
[    0.356928]  bus_probe_device+0x98/0xa0
[    0.361095]  device_add+0x360/0x860
[    0.364914]  of_device_add+0x54/0x6c
[    0.368386]  of_platform_device_create_pdata+0x9c/0xf4
[    0.372208]  of_platform_bus_create+0xec/0x334
[    0.377154]  of_platform_bus_create+0x134/0x334
[    0.381582]  of_platform_populate+0x50/0xcc
[    0.386009]  of_platform_default_populate_init+0xa8/0xc8
[    0.390178]  do_one_initcall+0x50/0x1c0
[    0.395730]  kernel_init_freeable+0x234/0x29c
[    0.399291]  kernel_init+0x24/0x120
[    0.403802]  ret_from_fork+0x10/0x20
[    0.407106] Code: 92400441 91022821 f8617800 8b030000 (b9400000) 
[    0.410942] ---[ end trace b5d0b2c33d466f02 ]---
[    0.416914] Kernel panic - not syncing: synchronous external abort: Fatal exception
[    0.421606] SMP: stopping secondary CPUs
[    0.428983] Rebooting in 1 seconds..
````````

You are using a qsdk specific DTS. That won't work in OpenWrt upstream kernel.
Just drop that entire DTS and copy a known working DTS (eap610 or MR7350 for example) and add /update the device specific stuff.

Hello , did you get your compile working on the device yet ?

1 Like

I am looking for OpenWrt release 22.03 for ZBT Z600 IPQ6000 model (ZBT Z600 routers)

was/is anyone able to make openwrt support for this router?

That is pretty much guaranteed not to happen. There isn't even ipq60xx support in master, it won't be there for the upcoming openwrt-23.05 and will take months+ at best to eventually/ hopefully make it to master (and ipq6000 (rather than ipq601x and upwards) is even more questionable to 'ever' get support, 256 MB RAM is pretty much guaranteed to be impossible as well.

If you want to see ipq60xx support -for devices with ipq601x and >=512 MB- in a stable release, help working on getting it into master, so it will end up in the next release afterwards quite naturally. Backporting whole targets to already branched releases is not going to happen.

tl;dr: chances for this device to ever get OpenWrt support are close to zero, even less for 22.03.x.

--
256 MB RAM and ath11k is a hard no-go, as ath11k is quite memory hungry and already needs to be pretty lobotomized to deal with 'just' 512 MB RAM.

1 Like

I would love to help of course, that also is why I asked first if there is some work going on so I do not want to reinvent the wheel.

Will see first what I can do after checking what others (@Ansuel @robimarko @mrnuke) did, although I am tooo busy to start at the moment.

Thanks for info. in all cases!

I have (512MB RAM and 256MB Flash) router version.