Spectrum SAX1V1K (Askey RT5010W) OpenWrt Support

Yeah I made a mistake in open.sh.

I pasted a fix in the thread

the final line of the script never ran; from the serial console i had to:

run bootcmd

then success!
@meisterlone , @lytr , @127.0.0.1 , @Ansuel , @robimarko

  • with all your help
    thank you

If you want to stop it from trying TFTP on boot, you can do this

fw_setenv bootcmd "run fix_uboot; run setup_and_boot"

Thatll just boot from the EMMC directly on each boot.

Just dont brick your openwrt somehow after that, because if it fails to boot from EMMC, there is no way back.

If someone knows a way to "try TFTP" before booting from storage, please inform. I couldnt find a way

Thank you!

For RAC2V1K, there's a tutorial in OpenWRT Wiki that installs a recovery initramfs image and automatically try TFTP if both main and recovery OS are corrupt (see link below). I wonder whether SAX1V1K could do something similar to this. Thank you again!

Go to Installation of a recovery OS section.

@meisterlone -
i think that already there is no way back; my setup does not execute the tfftpboot sequence on boot. here is my fw_printenv:

BusyBox v1.36.0 (2023-03-09 04:14:40 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22242-c8c91909d9
 -----------------------------------------------------
root@OpenWrt0:/#
root@OpenWrt0:/# fw_printenv
=atf=1
baudrate=115200
bootargs=console=ttyMSM0,115200n8 mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg root=/dev/mmcblk0p20 rootwait
bootcmd=run fix_uboot; go 4a9647cc || sleep 3; tftpboot recovery.img; bootm || run setup_and_boot
bootdelay=2
eth1addr=88:de:7c:c4:d:cc
eth2addr=88:de:7c:c4:d:cc
eth3addr=88:de:7c:c4:d:cc
eth4addr=88:de:7c:c4:d:cc
ethact=eth0
ethaddr=88:de:7c:c4:d:cb
fdt_high=0x4A200000
fdtcontroladdr=4a985be0
fileaddr=44000000
filesize=1a0
fix_uboot=mw 4a911044 0a000007 1;mw 4a91dfdc 0a000006 1;setenv loadaddr 44000000;setenv ipaddr 192.168.1.1;setenv serverip 192.168.1.9;
flash_type=5
ipaddr=192.168.1.1
loadaddr=44000000
machid=8750106
mmcargs=mmc_mid=0x15
netmask=255.255.255.0
read_hlos_emmc=mmc read 44000000 0x8A22 0x4000
reboot-reason=rea=ffffffff
reboot-time=time=ffffffff
serverip=192.168.1.9
set_custom_bootargs=setenv bootargs console=ttyMSM0,115200n8 mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg root=/dev/mmcblk0p20 rootwait
setup_and_boot=run set_custom_bootargs;run fix_uboot; run read_hlos_emmc; bootm
soc_version_major=2
soc_version_minor=0
stderr=serial@78B3000
stdin=serial@78B3000
stdout=serial@78B3000
root@OpenWrt0:/#

edit: i noticed that some of the fw_seetenv lines end witha semicolon and some do not. particularly, the fix_uboot does end in semicolon. is this preventing tftpboot?

Whats the serial bootlog show?

Maybe just run the script again and check that you are using the correct ips

i changed the ipaddr for my setup to 192.168.1.1 and serverip 192.168.1.9
i dont thnk that's the issue since it loads if i 'run bootcmd'
here is the serial bootlog:

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.BF.3.3.1-00163
S - IMAGE_VARIANT_STRING=HAASANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x000002e3
B -       201 - PBL, Start
B -      2735 - bootable_media_detect_entry, Start
B -     51708 - bootable_media_detect_success, Start
B -     51713 - elf_loader_entry, Start
B -     53138 - auth_hash_seg_entry, Start
B -     91197 - auth_hash_seg_exit, Start
B -    105630 - elf_segs_hash_verify_entry, Start
B -    168264 - PBL, End
B -    264831 - SBL1, Start
B -    341264 - GCC [RstStat:0x10, RstDbg:0x600000] WDog Stat : 0x4
B -    350780 - pm_device_init, Start
B -    535793 - PM_SET_VAL:Skip
D -    183244 - pm_device_init, Delta
B -    538203 - pm_driver_init, Start
D -      5185 - pm_driver_init, Delta
B -    544425 - clock_init, Start
D -      2165 - clock_init, Delta
B -    548573 - boot_flash_init, Start
D -      7869 - boot_flash_init, Delta
B -    560163 - boot_config_data_table_init, Start
D -      1067 - boot_config_data_table_init, Delta - (575 Bytes)
B -    567788 - Boot Setting :  0x00000618
B -    571631 - CDT version:2,Platform ID:8,Major ID:117,Minor ID:1,Subtype:6
B -    578615 - sbl1_ddr_set_params, Start
B -    582458 - CPR configuration: 0x30c
B -    585905 - cpr_init, Start
B -    588680 - Rail:0 Mode: 5 Voltage: 800000
B -    593896 - CL CPR settled at 752000mV
B -    596732 - Rail:1 Mode: 5 Voltage: 880000
B -    600911 - Rail:1 Mode: 7 Voltage: 896000
D -     16531 - cpr_init, Delta
B -    607773 - Pre_DDR_clock_init, Start
B -    611799 - Pre_DDR_clock_init, End
B -    615093 - DDR Type : PCDDR4
B -    621895 - do ddr sanity test, Start
D -      1067 - do ddr sanity test, Delta
B -    625616 - DDR: Start of HAL DDR Boot Training
B -    630343 - DDR: End of HAL DDR Boot Training
B -    636016 - DDR: Checksum to be stored on flash is -789220269
B -    646447 - Image Load, Start
D -    345077 - QSEE Image Loaded, Delta - (1380440 Bytes)
B -    991616 - Image Load, Start
D -       457 - SEC Image Loaded, Delta - (0 Bytes)
B -    999149 - Image Load, Start
D -    287920 - DEVCFG Image Loaded, Delta - (32468 Bytes)
B -   1287130 - Image Load, Start
D -    292892 - RPM Image Loaded, Delta - (93060 Bytes)
B -   1580113 - Image Load, Start
D -    312564 - APPSBL Image Loaded, Delta - (617520 Bytes)
B -   1892799 - QSEE Execution, Start
D -        61 - QSEE Execution, Delta
B -   1898594 - USB D+ check, Start
D -         0 - USB D+ check, Delta
B -   1904999 - SBL1, End
D -   1642456 - SBL1, Delta
S - Flash Throughput, 34491 KB/s  (2124735 Bytes,  61601 us)
S - DDR Frequency, 600 MHz
S - Core 0 Frequency, 1651 MHz


U-Boot 1.3.3 [spf11.1_csu2] (Jan 27 2021 - 09:14:27 +0000)

DRAM:  smem ram ptable found: ver: 1 len: 4
2 GiB
[Askey] Led init ...
NAND:  Could not find nand_gpio in dts, using defaults
Not an ONFI device
ONFI probe failed
ID = ffffffff
Vendor = ff
Device = ff
qpic_nand: unknown NAND device manufacturer: ff device: ff
U-Boot BUG at drivers/mtd/mtdcore.c:420!
SF: Unsupported flash IDs: manuf ff, jedec ffff, ext_jedec ffff
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
0 MiB
MMC:   <NULL>: 0 (eMMC)
In:    serial@78B3000
Out:   serial@78B3000
Err:   serial@78B3000
machid: 8750106
eth5 MAC Address from ART is not valid
Hit space key to stop autoboot:  0
## Starting application at 0x4A9647CC ...
MAC0 addr:88:de:7c:c4:d:cb
PHY ID1: 0x4d
PHY ID2: 0xd0b1
PHY ID1: 0x4d
PHY ID2: 0xd101
EDMA ver 1 hw init
Num rings - TxDesc:1 (0-0) TxCmpl:1 (7-7)
RxDesc:1 (15-15) RxFill:1 (7-7)
ipq807x_edma_alloc_rings: successfull
ipq807x_edma_setup_ring_resources: successfull
ipq807x_edma_configure_rings: successfull
ipq807x_edma_hw_init: successfull
eth0
## Application terminated, rc = 0x1
secure boot fuse is enabled
debug cert - not found
ipq807x_eth_halt: done
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex
eth0 PHY5 Down Speed :10 Half duplex
ipq807x_eth_halt: done
secure boot fuse is enabled
Wrong Image Format for bootm command
ERROR: can't get kernel image!

MMC read: dev # 0, block # 35362, count 16384 ... 16384 blocks read: OK
secure boot fuse is enabled
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@rt5010w-d187-rev6' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.15.98
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x440000e8
     Data Size:    4604026 Bytes = 4.4 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   0d057821
     Hash algo:    sha1
     Hash value:   4d78bca5c451229651bfbf2ef2ad784fc9b1f815
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@rt5010w-d187-rev6' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt askey_rt5010w-d187 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x444642a8
     Data Size:    41845 Bytes = 40.9 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   dea9b9d9
     Hash algo:    sha1
     Hash value:   82f3894f9de7075706476c00c3fc1c56e2934df4
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x444642a8
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4a1f2000, end 4a1ff374 ... OK
Using machid 0x8750106 from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.98 (ubuntu@DESKTOP-F7F31J2) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22236-a6fe02c018) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Thu Mar 9 04:14:40 2023
[    0.000000] Machine model: Askey RT5010W-D187
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000bfffffff]
[    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-0x000000004a3fffff]
[    0.000000]   node   0: [mem 0x000000004a400000-0x00000000510fffff]
[    0.000000]   node   0: [mem 0x0000000051100000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: console=ttyMSM0,115200n8 mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg mmc_mid=0x15 boot_signedimg root=/dev/mmcblk0p20 rootwait
[    0.000000] Unknown kernel command line parameters "boot_signedimg boot_signedimg boot_signedimg mmc_mid=0x15", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1916880K/2097152K available (7488K kernel code, 844K rwdata, 2052K rodata, 1216K init, 273K bss, 180272K 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] GICv2m: range[mem 0x0b00a000-0x0b00affc], SPI[448:479]
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 19.20MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000119] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000135] pid_max: default: 32768 minimum: 301
[    0.000290] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000311] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.001913] rcu: Hierarchical SRCU implementation.
[    0.002087] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.002606] smp: Bringing up secondary CPUs ...
[    0.003199] Detected VIPT I-cache on CPU1
[    0.003262] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.003879] Detected VIPT I-cache on CPU2
[    0.003919] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.004500] Detected VIPT I-cache on CPU3
[    0.004538] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.004605] smp: Brought up 1 node, 4 CPUs
[    0.004632] SMP: Total of 4 processors activated.
[    0.004640] CPU features: detected: 32-bit EL0 Support
[    0.004647] CPU features: detected: CRC32 instructions
[    0.004700] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.004710] CPU: All CPU(s) started at EL1
[    0.004732] alternatives: patching kernel code
[    0.012374] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012409] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.012553] pinctrl core: initialized pinctrl subsystem
[    0.013549] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.014059] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.014117] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.014171] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.014501] thermal_sys: Registered thermal governor 'step_wise'
[    0.015950] cpuidle: using governor menu
[    0.016199] ASID allocator initialised with 65536 entries
[    0.068890] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.077525] SCSI subsystem initialized
[    0.077702] usbcore: registered new interface driver usbfs
[    0.077744] usbcore: registered new interface driver hub
[    0.077779] usbcore: registered new device driver usb
[    0.078164] qcom_scm: convention: smc arm 64
[    0.079358] clocksource: Switched to clocksource arch_sys_counter
[    0.080136] NET: Registered PF_INET protocol family
[    0.080294] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.081685] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.081728] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.081744] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.081906] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    0.082194] TCP: Hash tables configured (established 16384 bind 16384)
[    0.082283] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.082348] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.082544] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.082580] PCI: CLS 0 bytes, default 64
[    0.083706] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.087338] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.087355] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.089129] qcom-qmp-phy 78000.phy: supply vdda-phy not found, using dummy regulator
[    0.089272] qcom-qmp-phy 78000.phy: supply vdda-pll not found, using dummy regulator
[    0.090343] qcom-qmp-phy 78000.phy: Registered Qcom-QMP phy
[    0.091108] qcom-qusb2-phy 79000.phy: supply vdda-pll not found, using dummy regulator
[    0.091247] qcom-qusb2-phy 79000.phy: supply vdda-phy-dpdm not found, using dummy regulator
[    0.091395] qcom-qusb2-phy 79000.phy: Registered Qcom-QUSB2 phy
[    0.095328] bam-dma-engine 704000.dma-controller: num-channels unspecified in dt
[    0.095353] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt
[    0.098979] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.099571] msm_serial 78b3000.serial: msm_serial: detected port #0
[    0.099613] msm_serial 78b3000.serial: uartclk = 3686400
[    0.099660] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 24, base_baud = 230400) is a MSM
[    0.099693] msm_serial: console setup on port #0
[    0.747600] printk: console [ttyMSM0] enabled
[    0.752703] msm_serial: driver initialized
[    0.760453] loop: module loaded
[    0.761643] nand: No NAND device found
[    0.764084] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
[    0.770335] s1: supplied by regulator-dummy
[    0.773364] s2: supplied by regulator-dummy
[    0.777334] vdd_s3: supplied by regulator-dummy
[    0.781653] vdd_s4: supplied by regulator-dummy
[    0.786174] s5: supplied by regulator-dummy
[    0.790542] l1: supplied by regulator-dummy
[    0.794701] l2: supplied by regulator-dummy
[    0.798879] l3: supplied by regulator-dummy
[    0.803049] l4: supplied by regulator-dummy
[    0.807190] l5: supplied by regulator-dummy
[    0.811394] l6: supplied by regulator-dummy
[    0.815530] l7: supplied by regulator-dummy
[    0.819717] l8: supplied by regulator-dummy
[    0.823881] l9: supplied by regulator-dummy
[    0.828140] l11: supplied by regulator-dummy
[    0.832216] l12: supplied by regulator-dummy
[    0.836732] l13: supplied by regulator-dummy
[    0.854310] i2c_dev: i2c /dev entries driver
[    0.858024] sdhci: Secure Digital Host Controller Interface driver
[    0.858067] sdhci: Copyright(c) Pierre Ossman
[    0.863670] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.872076] remoteproc remoteproc0: releasing cd00000.q6v5_wcss
[    0.875963] NET: Registered PF_INET6 protocol family
[    0.880323] Segment Routing with IPv6
[    0.884685] In-situ OAM (IOAM) with IPv6
[    0.888263] NET: Registered PF_PACKET protocol family
[    0.892277] 8021q: 802.1Q VLAN Support v1.8
[    0.899386] mmc0: SDHCI controller on 7824900.mmc [7824900.mmc] using ADMA 64-bit
[    0.912329] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.912622] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    0.918453] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    0.925138] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    0.932725] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    0.940247] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    0.949375] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    0.956316] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 808000 uV
[    0.966298] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 864000 uV
[    0.976114] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 952000 uV
[    0.985973] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 746, quot_offset[ 7]=   0
[    0.995735] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 947, quot_offset[ 7]= 200
[    1.006586] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1043, quot_offset[ 7]=  95
[    1.017523] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1205, quot_offset[ 7]= 160
[    1.028605] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    1.031208] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 19200 KHz, changing to: 1017600 KHz
[    1.039696] mmc0: new HS200 MMC card at address 0001
[    1.047151] remoteproc remoteproc0: cd00000.q6v5_wcss is▒[    1.068631] Alternate GPT is invalid, using primary GPT.
[    1.068695]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38
[    1.074633] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB
[    1.088180] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB
[    1.092833] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (247:0)
[    1.099421] VFS: Mounted root (squashfs filesystem) readonly on device 179:20.
[    1.103924] Freeing unused kernel memory: 1216K
[    1.179424] Run /sbin/init as init process
[    1.265700] init: Console is alive
[    1.265806] init: - watchdog -
[    1.539686] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.629160] ssdk_switch_device_num_init[1335]:INFO:ess-switch dts node number: 1
[    1.629251] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    1.635671] ssdk_dt_parse_access_mode[999]:INFO:switch_access_mode: local bus
[    1.641626] ssdk_dt_parse_access_mode[1012]:INFO:switchreg_base_addr: 0x3a000000
[    1.648913] ssdk_dt_parse_access_mode[1013]:INFO:switchreg_size: 0x1000000
[    1.656381] ssdk_dt_parse_mac_mode[327]:INFO:mac mode = 0xb
[    1.663062] ssdk_dt_parse_mac_mode[336]:INFO:mac mode1 = 0xff
[    1.668527] ssdk_dt_parse_mac_mode[345]:INFO:mac mode2 = 0xc
[    1.674445] ssdk_dt_parse_phy_info[716]:INFO:[PORT 6] port_mac_sel = QGMAC_PORT
[    1.680193] ssdk_dt_parse_uniphy[364]:INFO:ess-uniphy DT exist!
[    1.687281] ssdk_dt_parse_intf_mac[942]:INFO:dp1 MAC 88:de:7c:c4:0d:cc
[    1.693126] ssdk_dt_parse_intf_mac[942]:INFO:dp2 MAC 88:de:7c:c4:0d:cc
[    1.699722] ssdk_dt_parse_intf_mac[942]:INFO:dp3 MAC 88:de:7c:c4:0d:cc
[    1.706230] ssdk_dt_parse_intf_mac[942]:INFO:dp4 MAC 88:de:7c:c4:0d:cc
[    1.712807] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    1.840669] ssdk_gcc_clock_init[1275]:INFO:SSDK gcc clock init successfully!
[    1.841700] malibu_phy_api_ops_init[2846]:INFO:qca probe malibu phy driver succeeded!
[    1.850894] hsl_phy_phydev_get[773]:ERROR:phy_addr 4 phydev is NULL
[    1.855794] qca808x_phy_api_ops_init[2566]:INFO:qca probe qca808x phy driver succeeded!
[    1.861985] regi_init[3953]:INFO:Initializing HPPE!!
[    2.099359] ssdk_ppe_reset_init[1535]:INFO:ppe reset successfully!
[    2.102961] qca_hppe_portctrl_hw_init[126]:INFO:Hawkeye PPE port initializing
[    2.105677] hsl_phy_phydev_get[773]:ERROR:phy_addr 4 phydev is NULL
[    2.112042] hsl_phy_phydev_get[773]:ERROR:phy_addr 4 phydev is NULL
[    2.805451] ssdk_switch_register[2017]:INFO:Chip version 0x1500
[    2.805482] qca_link_polling_select[1487]:INFO:link-polling-required node does not exist
[    2.810181] ssdk_switch_register[2043]:INFO:polling is selected
[    2.818507] regi_init[3957]:INFO:Initializing HPPE Done!!
[    2.824232] ssdk_genl_init[211]:INFO:ssdk genl family register success.
[    2.829713] regi_init[4020]:INFO:qca-ssdk module init succeeded!
[    2.838373] EDMA ver 1 hw init
[    2.842601] EDMA HW Reset completed succesfully
[    2.845266] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    2.849669] RxDesc:1 (15-15) RxFill:1 (7-7)
[    2.855444] Generic PHY 90000.mdio-1:00: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:00, irq=POLL)
[    2.859653] nss-dp 3a001000.dp1 lan4: Registered netdev lan4(qcom-id:1)
[    2.869020] Generic PHY 90000.mdio-1:01: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:01, irq=POLL)
[    2.875660] nss-dp 3a001200.dp2 lan3: Registered netdev lan3(qcom-id:2)
[    2.885190] Generic PHY 90000.mdio-1:02: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:02, irq=POLL)
[    2.891849] nss-dp 3a001400.dp3 lan2: Registered netdev lan2(qcom-id:3)
[    2.901319] Generic PHY 90000.mdio-1:03: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:03, irq=POLL)
[    2.907937] nss-dp 3a001600.dp4 lan1: Registered netdev lan1(qcom-id:4)
[    3.117950] QCA808X ethernet 90000.mdio-1:1c: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:1c, irq=POLL)
[    3.118436] nss-dp 3a007000.dp6-syn wan: Registered netdev wan(qcom-id:6)
[    3.126948] **********************************************************
[    3.133702] * NSS Data Plane driver
[    3.140115] **********************************************************
[    3.153545] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.153599] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    3.158078] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000002010010
[    3.165556] xhci-hcd xhci-hcd.1.auto: irq 91, io mem 0x08a00000
[    3.174942] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.180766] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    3.186322] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    3.194363] hub 1-0:1.0: USB hub found
[    3.200588] hub 1-0:1.0: 1 port detected
[    3.204496] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.208524] hub 2-0:1.0: USB hub found
[    3.216380] hub 2-0:1.0: 1 port detected
[    3.222094] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.231330] init: - preinit -
[    3.416087] random: jshn: uninitialized urandom read (4 bytes read)
[    3.436096] random: jshn: uninitialized urandom read (4 bytes read)
[    3.443108] 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
[    5.549574] EXT4-fs (mmcblk0p24): recovery complete
[    5.550174] EXT4-fs (mmcblk0p24): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
[    5.554302] mount_root: switching to ext4 overlay
[    5.565431] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    5.570335] urandom-seed: Seeding with /etc/urandom.seed
[    5.606779] procd: - early -
[    5.606856] procd: - watchdog -
[    6.132108] procd: - watchdog -
[    6.132801] procd: - ubus -
[    6.156277] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.185073] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.185264] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.192166] procd: - init -
Please press Enter to activate this console.
[    6.309448] urngd: v1.0.2 started.
[    6.325138] random: crng init done
[    6.325168] random: 26 urandom warning(s) missed due to ratelimiting
[    6.331832] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.358460] GACT probability on
[    6.358923] Mirror/redirect action on
[    6.363473] u32 classifier
[    6.364224]     input device check on
[    6.366828]     Actions configured
[    6.376788] Loading modules backported from Linux version v6.1-rc8-0-g76dcd734eca2
[    6.376827] Backport generated by backports.git v5.15.81-1-41-g02e352527db5
[    6.388616] NET: Registered PF_QIPCRTR protocol family
[    6.397709] xt_time: kernel timezone is -0000
[    6.420584] PPP generic driver version 2.4.2
[    6.421299] NET: Registered PF_PPPOX protocol family
[    6.429189] ath11k c000000.wifi: ipq8074 hw2.0
[    6.429220] ath11k c000000.wifi: FW memory mode: 0
[    6.433572] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[    6.446316] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[    7.142708] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[    7.144218] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[    7.149726] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[    7.155178] ath11k c000000.wifi: fw_version 0x250a04a5 fw_build_timestamp 2021-12-20 07:09 fw_build_id WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
[    7.164775] kmodloader: done loading kernel modules from /etc/modules.d/*
[    8.769878] br-lan: port 1(lan1) entered blocking state
[    8.769922] br-lan: port 1(lan1) entered disabled state
[    8.774136] device lan1 entered promiscuous mode
[    8.785215] nss-dp 3a001400.dp3 lan2: PHY Link up speed: 1000
[    8.785803] br-lan: port 2(lan2) entered blocking state
[    8.789984] br-lan: port 2(lan2) entered disabled state
[    8.795171] device lan2 entered promiscuous mode
[    8.803308] br-lan: port 3(lan3) entered blocking state
[    8.805057] br-lan: port 3(lan3) entered disabled state
[    8.810255] device lan3 entered promiscuous mode
[    9.769422] br-lan: port 2(lan2) entered blocking state
[    9.769467] br-lan: port 2(lan2) entered forwarding state
[    9.773968] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready


just found this thread and a tear of happiness fell! The first round of drinks or whatever you fancy @meisterlone if Im ever in your area for just this so far. bravo!

@meisterlone do you plan on opening a PR to add upstream support?

This thread is amazing, fun to read the process of this device being cracked open.

I ended up finding one of these in a gutter, this thread is a good excuse to mess around with it :slight_smile:

I got as far as running open.sh, and heeding the warning, the U-Boot binary is unrecognized: https://share.riseup.net/#fXCGeHBQdZbJ981idC-oEw
I'll spend some time looking into this, but are there any pointers?

Immediately, the U-Boot build is about a year newer:

600607        0x92A1F         U-Boot version string, "U-Boot 1.5.1 [spf11.4_csu2] (Jun 15 2022 - 09:05:59 +0000)"
DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ELF, 32-bit LSB shared object, ARM, version 1 (SYSV)
4552          0x11C8          Certificate in DER format (x509 v3), header length: 4, sequence length: 1223
5779          0x1693          Certificate in DER format (x509 v3), header length: 4, sequence length: 1035
6818          0x1AA2          Certificate in DER format (x509 v3), header length: 4, sequence length: 1000
235252        0x396F4         uImage header, header size: 64 bytes, header CRC: 0x22DE964A, created: 2019-05-17 11:08:58, image size: 1910412874 bytes, Data Address: 0x8CDE964A, Entry Point: 0xFA21974A, data CRC: 0xC97E974A, image name: ""
469524        0x72A14         SHA256 hash constants, little endian
507108        0x7BCE4         CRC32 polynomial table, little endian
508132        0x7C0E4         CRC32 polynomial table, little endian
600607        0x92A1F         U-Boot version string, "U-Boot 1.5.1 [spf11.4_csu2] (Jun 15 2022 - 09:05:59 +0000)"
610976        0x952A0         Flattened device tree, size: 3378 bytes, version: 17
614368        0x95FE0         Flattened device tree, size: 3509 bytes, version: 17
617888        0x96DA0         Flattened device tree, size: 3509 bytes, version: 17
621408        0x97B60         Flattened device tree, size: 3509 bytes, version: 17
624928        0x98920         Flattened device tree, size: 3509 bytes, version: 17
628448        0x996E0         Flattened device tree, size: 3509 bytes, version: 17
631968        0x9A4A0         Flattened device tree, size: 3509 bytes, version: 17
635488        0x9B260         Flattened device tree, size: 3509 bytes, version: 17
0             0x0             ELF, 32-bit LSB shared object, ARM, version 1 (SYSV)
4552          0x11C8          Certificate in DER format (x509 v3), header length: 4, sequence length: 1223
5779          0x1693          Certificate in DER format (x509 v3), header length: 4, sequence length: 1035
6818          0x1AA2          Certificate in DER format (x509 v3), header length: 4, sequence length: 1000
235252        0x396F4         uImage header, header size: 64 bytes, header CRC: 0x22DE964A, created: 2019-05-17 11:08:58, image size: 1910412874 bytes, Data Address: 0x8CDE964A, Entry Point: 0xFA21974A, data CRC: 0xC97E974A, image name: ""
469524        0x72A14         SHA256 hash constants, little endian
507108        0x7BCE4         CRC32 polynomial table, little endian
508132        0x7C0E4         CRC32 polynomial table, little endian
600607        0x92A1F         U-Boot version string, "U-Boot 1.5.1 [spf11.4_csu2] (Jun 15 2022 - 09:05:59 +0000)"
610976        0x952A0         Flattened device tree, size: 3378 bytes, version: 17
614368        0x95FE0         Flattened device tree, size: 3509 bytes, version: 17
617888        0x96DA0         Flattened device tree, size: 3509 bytes, version: 17
621408        0x97B60         Flattened device tree, size: 3509 bytes, version: 17
624928        0x98920         Flattened device tree, size: 3509 bytes, version: 17
628448        0x996E0         Flattened device tree, size: 3509 bytes, version: 17
631968        0x9A4A0         Flattened device tree, size: 3509 bytes, version: 17
635488        0x9B260         Flattened device tree, size: 3509 bytes, version: 17

Ack, missed file hosting constraints. Pushed to a repo: https://git.sr.ht/~jleightcap/sax1v1k-openwrt/blob/main/uboot-partition.img.tar.gz

The hardware is quite pretty, it there any chance to bring this device firmware to official Openwrt CI/CD stream?

Chance, yes - $someone (you?) will 'just' have to complete the porting and submit a pull request. In the absence of such a mystical $someone, no.

any update on whether the exploits to obtain root and boot an unsigned image have been patched?

Video is marked private???

Got a hold of a SAX1V1R - it seems to be the exact same hardware.

Was able to get it to boot with the same initramfs, however after playing around with it for a while it seems to not boot anymore.

Sad!

SAX1V1K -- made by Askey
SAX1V1S -- made by Segemcom
SAX1V1R -- made by Sercomm

@hurrian although SAXV1R looks same hardware, its built from different manufacture and could be slightly different.

Im getting SAX1V1K soon, and hope I can finish the project.

Does anyone have access to any of its factory firmware?
Would be nice if we can find whtever version factory firmware and utilize it as baseline.
Factory firmware should be flashable from warehouse mode.

600607        0x92A1F         U-Boot version string, "U-Boot 1.5.1 [spf11.4_csu2] (Jun 15 2022 - 09:05:59 +0000)"

For your U-Boot, change script open.sh line 22-23 like this

b1=$(hexdump -n 4 -s 0x187E0 -e '4/1 "%x" "\n"' "$ubootpart")
b2=$(hexdump -n 4 -s 0x1D9A8 -e '4/1 "%x" "\n"' "$ubootpart")

And line 46 like this

fw_setenv fix_uboot "mw 4a9115c8 0a000007 1;mw 4a91e534 0a000006 1;setenv loadaddr 44000000;setenv ipaddr 192.168.0.5;setenv serverip 192.168.0.1;"

Lastly line 50

fw_setenv bootcmd "run fix_uboot; go 4a966bc4 || sleep 3; tftpboot recovery.img; bootm || run setup_and_boot"

Its simple JMP patch

Update:
Line 47 might be different for your device tho

fw_setenv read_hlos_emmc "mmc read 44000000 0x8A22 0x4000"

They are using OpenSync for updates. I don't know if you can get the firmware update file.

eMMC dump: Spectrum SAX1V1K (Askey RT5010W) OpenWrt Support - #20 by meisterlone