Adding OpenWrt support for QNAP QHora-301W

Same problem here: OpenWrt support for Linksys MX8500 - #136 by lytr

2 Likes

Well, now I have this as well which is weird as it used to work.

Why do I have a feeling that SSDK C45 got broken since kernel split the ops and you cannot just pass the magic bit to indicate C45

unsure if it helps - but qca have a commit that provides 10G support where they introduced a number of c45 functions (like qcaphy_c45_get_eee_status)

also support 6.6

I found the root cause, as suspected its because kernel 6.3 has finally split out the C45 MDIO read and write operations out of C22 ones and the old way of marking C45 ops via BIT(30) in the register field doesn't work anymore so it cannot read the PHY ID of C45 only PHY-s.

I have an working fix, just refreshing it now to make a PR.

PR is here, please test:

5 Likes

I get this

[    1.409217] init: - watchdog -
[    2.077509] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.151525] Key type encrypted registered
[    2.246030] Aquantia AQR113C 90000.mdio-1:00: loading firmware version 'v5.4.C CIG WF-1945_0x0 060120 02:47:48' from 'NVMEM'
[   11.234546] hwmon hwmon0: temp1_input not attached to any thermal zone
[   11.323911] Aquantia AQR113C 90000.mdio-1:08: loading firmware version 'v5.4.C CIG WF-1945_0x8 060120 02:47:48' from 'NVMEM'
[   13.481674] init: - preinit -
[   15.136325] random: crng init done
[   17.294908] Starting lvm2 during preinit
[   17.570805] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[   17.690547] mount_root: loading kmods from internal overlay
[   17.703562] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   17.735218] gpio_button_hotplug: loading out-of-tree module taints kernel.
[   17.763483] ssdk_dt_parse_interrupt[935]:INFO:intr-gpio does not exist
[   17.771599] aquantia_phy_api_ops_init[2241]:INFO:qca probe aquantia phy driver succeeded!
[   19.656403] regi_init[3603]:INFO:Initializing HPPE Done!!
[   19.656515] regi_init[3662]:INFO:qca-ssdk module init succeeded!
[   19.662578] EDMA ver 1 hw init
[   19.667086] EDMA HW Reset completed succesfully
[   19.669763] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[   19.674156] RxDesc:1 (15-15) RxFill:1 (7-7)
[   20.409148] hwmon hwmon1: temp1_input not attached to any thermal zone
[   20.562864] **********************************************************
[   20.562902] * NSS Data Plane driver

but the PC connected to the port still doesn't get IP. At least on NSS build and QNAP stock 10G FW.

[  102.624316] nss-dp 3a001200.dp2 lan3: PHY Link is down
[  102.630211] br-lan: port 4(lan3) entered disabled state
[  118.944732] nss-dp 3a007000.dp6-syn 10g-2: PHY Link up speed: 1000
[  118.944920] br-lan: port 2(10g-2) entered blocking state
[  118.949862] br-lan: port 2(10g-2) entered forwarding state
[  270.496752] nss-dp 3a007000.dp6-syn 10g-2: PHY Link is down
[  270.497075] br-lan: port 2(10g-2) entered disabled state
[  276.641072] nss-dp 3a001800.dp5 10g-1: PHY Link up speed: 1000
[  276.641227] br-lan: port 1(10g-1) entered blocking state
[  276.645825] br-lan: port 1(10g-1) entered forwarding state
[  277.125926] uniphy autoneg time out!

Honestly, I dont care about the NSS version at all.

Tested on both 10g-1 and 10g-2 and it just worked at 10G.

1 Like

long shot but have you tried to load the aqr113c firmware via u-boot ?

Thanks a lot for your great work as always.
I've just tested it with the MBN header FW loaded from U-Boot.
Both 10G ports work even with NSS build.

I've just did it. No issues.

[   20.710015] br-lan: port 3(lan2) entered forwarding state
[   21.729675] Qualcomm QCA8075 90000.mdio-1:10: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[   21.729743] nss-dp 3a001000.dp1 lan4: PHY Link up speed: 100
[   21.740838] br-vlan: port 1(lan4) entered blocking state
[   21.746317] br-vlan: port 1(lan4) entered forwarding state
[   74.976238] nss-dp 3a001200.dp2 lan3: PHY Link is down
[   74.976529] br-lan: port 4(lan3) entered disabled state
[   88.223820] nss-dp 3a007000.dp6-syn 10g-2: PHY Link up speed: 1000
[   88.226295] br-lan: port 2(10g-2) entered blocking state
[   88.228921] br-lan: port 2(10g-2) entered forwarding state
[  146.590119] nss-dp 3a007000.dp6-syn 10g-2: PHY Link is down
[  146.590381] br-lan: port 2(10g-2) entered disabled state
[  179.357867] nss-dp 3a001800.dp5 10g-1: PHY Link up speed: 1000
[  179.358012] br-lan: port 1(10g-1) entered blocking state
[  179.362613] br-lan: port 1(10g-1) entered forwarding state
[  501.917619] nss-dp 3a001800.dp5 10g-1: PHY Link is down
[  501.917890] br-lan: port 1(10g-1) entered disabled state
[  518.301906] nss-dp 3a007000.dp6-syn 10g-2: PHY Link up speed: 1000
[  518.302007] br-lan: port 2(10g-2) entered blocking state
[  518.307003] br-lan: port 2(10g-2) entered forwarding state

@robimarko Just a curiosity question - are you using QNAP stock or MBN header 10G firmware.

1 Like

anyone look into the cause / a possible fix to the coil whine these 301w give off?

i have 2, and they both whine like crazy especially when pushing the cpu / wifi hard.

btw what i mean by coil whine is umm, "the sound of electricity flowing" heh.

I heard the coil whine on my unit several months ago for the first time and after that read the same on another forum. But for me it can only be heard in a very quiet room mostly at night and from no more than one meter from the unit. It's most audible when WiFi is used for high speed transfers.

I see another glitch with 10G ports. If the cable is plugged in and out several times (5-6 times) into any of the 10G ports, the port stops making a connection (LED is off too) and I have to reboot the router in order to recover from this situation.

I need help to set the environment variables properly, and make it boot.
Thank you all for your help.

                               
IPQ807x# bootm                                                                  
## Loading kernel from FIT Image at 44000000 ...                                
   Using 'config@hk01' configuration                                            
   Trying 'kernel-1' kernel subimage                                            
     Description:  ARM64 OpenWrt Linux-6.1.82                                   
     Type:         Kernel Image                                                 
     Compression:  gzip compressed                                              
     Data Start:   0x440000e8                                                   
     Data Size:    5122563 Bytes = 4.9 MiB                                      
     Architecture: AArch64                                                      
     OS:           Linux                                                        
     Load Address: 0x41000000                                                   
     Entry Point:  0x41000000                                                   
     Hash algo:    crc32                                                        
     Hash value:   9be3b12c                                                     
     Hash algo:    sha1                                                         
     Hash value:   a4705be7c4425d6558d48ffe3b82d27a7ca537f5                     
   Verifying Hash Integrity ... crc32+ sha1+ OK                                 
## Loading fdt from FIT Image at 44000000 ...                                   
   Using 'config@hk01' configuration                                            
   Trying 'fdt-1' fdt subimage                                                  
     Description:  ARM64 OpenWrt qnap_301w device tree blob                     
     Type:         Flat Device Tree                                             
     Compression:  uncompressed                                                 
     Data Start:   0x444e2c28                                                   
     Data Size:    47152 Bytes = 46 KiB                                         
     Architecture: AArch64                                                      
     Hash algo:    crc32                                                        
     Hash value:   7020f746                                                     
     Hash algo:    sha1                                                         
     Hash value:   8b31de02f2d212be788fc3f2d320fa1d202a30fb                     
   Verifying Hash Integrity ... crc32+ sha1+ OK                                 
   Booting using the fdt blob at 0x444e2c28                                     
   Uncompressing Kernel Image ... OK                                            
   Loading Device Tree to 4a3f1000, end 4a3ff82f ... OK                         
fdt-fixup: unable to find compatible node                                       
mtdids not defined, no default present                                          
Using machid 0x8010000 from environment                                         
                                                                                
Starting kernel ...                                                             
                                                                                
Jumping to AARCH64 kernel via monitor                                           
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]          
[    0.000000] Linux version 6.1.82 (builder@buildhost) (aarch64-openwrt-linux-4
[    0.000000] Machine model: QNAP 301w                                         
[    0.000000] Zone ranges:                                                     
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]           
[    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-0x000000007fffffff]          
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff] 
[    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 18 pages/cpu s34664 r8192 d30872 u73728         
[    0.000000] Detected VIPT I-cache on CPU0                                    
[    0.000000] alternatives: applying boot alternatives                         
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048    
[    0.000000] Kernel command line: console=ttyMSM0,115200n8                    
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, l)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off          
[    0.000000] Memory: 887128K/1048576K available (8128K kernel code, 890K rwda)
[    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 ji.
[    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] rcu: srcu_init: Setting srcu_struct sizes based on contention.   
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 19.20MHz (virt/vir.
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycless
[    0.000000] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398s
[    0.000124] Calibrating delay loop (skipped), value calculated using timer f)
[    0.000138] pid_max: default: 32768 minimum: 301                             
[    0.000607] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, lin)
[    0.000621] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.002474] cblist_init_generic: Setting adjustable number of callback queue.
[    0.002483] cblist_init_generic: Setting shift to 2 and lim to 1.            
[    0.002672] rcu: Hierarchical SRCU implementation.                           
[    0.002676] rcu:     Max phase no-delay instances is 1000.                   
[    0.003490] smp: Bringing up secondary CPUs ...                              
[    0.004121] Detected VIPT I-cache on CPU1                                    
[    0.004258] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]       
[    0.004914] Detected VIPT I-cache on CPU2                                    
[    0.005018] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]       
[    0.005630] Detected VIPT I-cache on CPU3                                    
[    0.005728] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]       
[    0.005794] smp: Brought up 1 node, 4 CPUs                                   
[    0.005802] SMP: Total of 4 processors activated.                            
[    0.005807] CPU features: detected: 32-bit EL0 Support                       
[    0.005811] CPU features: detected: CRC32 instructions                       
[    0.005873] CPU features: emulated: Privileged Access Never (PAN) using TTBRg
[    0.005878] CPU: All CPU(s) started at EL1                                   
[    0.005881] alternatives: applying system-wide alternatives                  
[    0.016821] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.016847] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)   
[    0.017064] pinctrl core: initialized pinctrl subsystem                      
[    0.018479] NET: Registered PF_NETLINK/PF_ROUTE protocol family              
[    0.018997] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations 
[    0.019037] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic alls
[    0.019085] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic as
[    0.019453] thermal_sys: Registered thermal governor 'step_wise'             
[    0.019638] cpuidle: using governor menu                                     
[    0.019888] ASID allocator initialised with 65536 entries                    
[    0.074154] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count4
[    0.083168] SCSI subsystem initialized                                       
[    0.083353] usbcore: registered new interface driver usbfs                   
[    0.083405] usbcore: registered new interface driver hub                     
[    0.083464] usbcore: registered new device driver usb                        
[    0.083886] qcom_scm: convention: smc arm 64                                 
[    0.085396] clocksource: Switched to clocksource arch_sys_counter            
[    0.086564] NET: Registered PF_INET protocol family                          
[    0.086706] IP idents hash table entries: 16384 (order: 5, 131072 bytes, lin)
[    0.088126] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192)
[    0.088149] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes,)
[    0.088176] TCP established hash table entries: 8192 (order: 4, 65536 bytes,)
[    0.088264] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linea)
[    0.088537] TCP: Hash tables configured (established 8192 bind 8192)         
[    0.088637] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)      
[    0.088673] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) 
[    0.088887] NET: Registered PF_UNIX/PF_LOCAL protocol family                 
[    0.088923] PCI: CLS 0 bytes, default 64                                     
[    0.090313] workingset: timestamp_bits=46 max_order=18 bucket_order=0        
[    0.095299] squashfs: version 4.0 (2009/01/31) Phillip Lougher               
[    0.095313] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORI.
[    0.096370] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[    0.098409] qcom-qmp-usb-phy 58000.phy: supply vdda-phy not found, using dumr
[    0.098569] qcom-qmp-usb-phy 58000.phy: supply vdda-pll not found, using dumr
[    0.100006] qcom-qmp-usb-phy 78000.phy: supply vdda-phy not found, using dumr
[    0.100126] qcom-qmp-usb-phy 78000.phy: supply vdda-pll not found, using dumr
[    0.101829] qcom-qusb2-phy 59000.phy: supply vdd not found, using dummy regur
[    0.101949] qcom-qusb2-phy 59000.phy: supply vdda-pll not found, using dummyr
[    0.102016] qcom-qusb2-phy 59000.phy: supply vdda-phy-dpdm not found, using r
[    0.102173] qcom-qusb2-phy 59000.phy: Registered Qcom-QUSB2 phy              
[    0.102368] qcom-qusb2-phy 79000.phy: supply vdd not found, using dummy regur
[    0.102492] qcom-qusb2-phy 79000.phy: supply vdda-pll not found, using dummyr
[    0.102563] qcom-qusb2-phy 79000.phy: supply vdda-phy-dpdm not found, using r
[    0.102738] qcom-qusb2-phy 79000.phy: Registered Qcom-QUSB2 phy              
[    0.107403] bam-dma-engine 704000.dma-controller: num-channels unspecified it
[    0.107418] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt  
[    0.111975] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled         
[    0.114036] msm_serial 78b3000.serial: msm_serial: detected port #0          
[    0.114089] msm_serial 78b3000.serial: uartclk = 3686400                     
[    0.114203] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 20, base_baud =M
[    0.114233] msm_serial: console setup on port #0                             
[    0.816833] printk: console [ttyMSM0] enabled                                
[    0.822006] msm_serial: driver initialized                                   
[    0.830889] loop: module loaded                                              
[    0.832173] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 
[    0.833740] spi-nor spi0.0: w25q64dw (8192 Kbytes)                           
[    0.840472] 13 fixed-partitions partitions found on MTD device spi0.0        
[    0.844749] Creating 13 MTD partitions on "spi0.0":                          
[    0.851259] 0x000000000000-0x000000050000 : "0:sbl1"                         
[    0.856510] 0x000000050000-0x000000060000 : "0:mibib"                        
[    0.861643] 0x000000060000-0x0000001e0000 : "0:qsee"                         
[    0.866600] 0x0000001e0000-0x0000001f0000 : "0:devcfg"                       
[    0.871597] 0x0000001f0000-0x000000200000 : "0:apdp"                         
[    0.876580] 0x000000200000-0x000000240000 : "0:rpm"                          
[    0.881657] 0x000000240000-0x000000250000 : "0:cdt"                          
[    0.886417] 0x000000250000-0x000000270000 : "0:appsblenv"                    
[    0.891109] 0x000000250000-0x000000350000 : "0:appsbl"                       
[    0.896693] 0x000000370000-0x0000003b0000 : "0:art"                          
[    0.901764] 0x0000003b0000-0x000000430000 : "0:ethphyfw1"                    
[    0.906561] 0x000000430000-0x0000004b0000 : "0:ethphyfw2"                    
[    0.912054] 0x0000004b0000-0x000000800000 : "reserved"                       
[    0.922472] spmi spmi-0: PMIC arbiter version v2 (0x20010000)                
[    0.948427] i2c_dev: i2c /dev entries driver                                 
[    0.954717] sdhci: Secure Digital Host Controller Interface driver           
[    0.954759] sdhci: Copyright(c) Pierre Ossman                                
[    0.960011] sdhci-pltfm: SDHCI platform and OF driver helper                 
[    0.966299] remoteproc remoteproc0: releasing cd00000.q6v5_wcss              
[    0.973228] NET: Registered PF_INET6 protocol family                         
[    0.976866] Segment Routing with IPv6                                        
[    0.980837] In-situ OAM (IOAM) with IPv6                                     
[    0.984438] NET: Registered PF_PACKET protocol family                        
[    0.988463] bridge: filtering via arp/ip/ip6tables is no longer available by.
[    0.993440] 8021q: 802.1Q VLAN Support v1.8                                  
[    0.995409] mmc0: SDHCI controller on 7824900.mmc [7824900.mmc] using ADMA 6t
[    1.028727] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count4
[    1.029106] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0      
[    1.034852] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revisio1
[    1.041470] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse valu0
[    1.049157] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fusee
[    1.056632] cpr3_mem_acc_init: apc: not using memory accelerator regulator   
[    1.062337] mmc0: new HS200 MMC card at address 0001                         
[    1.065763] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fuseV
[    1.065772] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fuseV
[    1.073431] mmcblk0: mmc0:0001 Q2J54A 3.64 GiB                               
[    1.077834] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fuseV
[    1.077842] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fuseV
[    1.089617]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9                             
[    1.097492] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused 0
[    1.103158] mmcblk0boot0: mmc0:0001 Q2J54A 2.00 MiB                          
[    1.111776] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused 0
[    1.111786] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused 5
[    1.122358] mmcblk0boot1: mmc0:0001 Q2J54A 2.00 MiB                          
[    1.126186] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused 0
[    1.137469] mmcblk0rpmb: mmc0:0001 Q2J54A 512 KiB, chardev (246:0)           
[    1.142259] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop    
[    1.182793] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequv
[    1.204530] VFS: Cannot open root device "(null)" or unknown-block(0,0): err6
[    1.207514] Please append a correct "root=" boot option; here are the availa:
[    1.215058] 1f00             320 mtdblock0                                   
[    1.215062]  (driver?)                                                       
[    1.227366] 1f01              64 mtdblock1                                   
[    1.227369]  (driver?)                                                       
[    1.233870] 1f02            1536 mtdblock2                                   
[    1.233873]  (driver?)                                                       
[    1.240381] 1f03              64 mtdblock3                                   
[    1.240383]  (driver?)                                                       
[    1.246895] 1f04              64 mtdblock4                                   
[    1.246898]  (driver?)                                                       
[    1.253401] 1f05             256 mtdblock5                                   
[    1.253404]  (driver?)                                                       
[    1.259913] 1f06              64 mtdblock6                                   
[    1.259916]  (driver?)                                                       
[    1.266427] 1f07             128 mtdblock7                                   
[    1.266430]  (driver?)                                                       
[    1.272933] 1f08            1024 mtdblock8                                   
[    1.272936]  (driver?)                                                       
[    1.279448] 1f09             256 mtdblock9                                   
[    1.279451]  (driver?)                                                       
[    1.285958] 1f0a             512 mtdblock10                                  
[    1.285961]  (driver?)                                                       
[    1.292812] 1f0b             512 mtdblock11                                  
[    1.292814]  (driver?)                                                       
[    1.299413] 1f0c            3392 mtdblock12                                  
[    1.299415]  (driver?)                                                       
[    1.306010] b300         3817472 mmcblk0                                     
[    1.306013]  driver: mmcblk                                                  
[    1.312256]   b301           16384 mmcblk0p1 1a373c3c-588e-eff4-5182-68ad83ee
[    1.312259]                                                                  
[    1.322502]   b302           16384 mmcblk0p2 7d35f31d-0980-2220-edfd-62285952
[    1.322505]                                                                  
[    1.331442]   b303           16384 mmcblk0p3 964e7e67-6666-7303-312a-291b7578
[    1.331445]                                                                  
[    1.340384]   b304          524288 mmcblk0p4 2a213133-47f8-80a1-5d66-1d565a26
[    1.340387]                                                                  
[    1.349323]   b305          524288 mmcblk0p5 77f91baf-6750-e138-dbe5-434eaedd
[    1.349326]                                                                  
[    1.358265]   b306          524288 mmcblk0p6 8530d17c-21e3-f82b-12ec-87fd429e
[    1.358269]                                                                  
[    1.367205]   b307            4096 mmcblk0p7 9420c4b0-ba83-2b38-6ba6-2839be02
[    1.367209]                                                                  
[    1.376150]   b308           16384 mmcblk0p8 e590e607-3410-795e-afbc-888e9b2b
[    1.376153]                                                                  
[    1.385084]   b309         2153472 mmcblk0p9 d1402149-3e8e-0709-99d9-170bfabc
[    1.385087]                                                                  
[    1.394031] b320            2048 mmcblk0boot0                                
[    1.394033]  (driver?)                                                       
[    1.399843] b340            2048 mmcblk0boot1                                
[    1.399845]  (driver?)                                                       
[    1.406618] Kernel panic - not syncing: VFS: Unable to mount root fs on unkn)
[    1.408971] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 6.1.82 #0              
[    1.417209] Hardware name: QNAP 301w (DT)                                    
[    1.423022] Call trace:                                                      
[    1.427186]  dump_backtrace.part.0+0xbc/0xd0                                 
[    1.429447]  show_stack+0x18/0x30                                            
[    1.433959]  dump_stack_lvl+0x6c/0x88                                        
[    1.437171]  dump_stack+0x18/0x34                                            
[    1.440816]  panic+0x148/0x2ec                                               
[    1.444113]  mount_block_root+0x15c/0x20c                                    
[    1.447067]  mount_root+0x194/0x1b4                                          
[    1.451145]  prepare_namespace+0x144/0x180                                   
[    1.454446]  kernel_init_freeable+0x274/0x29c                                
[    1.458613]  kernel_init+0x28/0x130                                          
[    1.463037]  ret_from_fork+0x10/0x20                                         
[    1.466339] SMP: stopping secondary CPUs                                     
[    1.470162] Kernel Offset: disabled                                          
[    1.474061] CPU features: 0x00000,00000000,0000400b                          
[    1.477276] Memory Limit: none                                               
[    1.482137] Rebooting in 1 seconds..                                         
                                                                                
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-00158                                 
S - IMAGE_VARIANT_STRING=HAABANAZA                                              
S - OEM_IMAGE_VERSION_STRING=CRM                                                
S - Boot Config, 0x000002e1                                                     
B -       203 - PBL, Start                                                      
B -      2741 - bootable_media_detect_entry, Start                              
B -      2888 - bootable_media_detect_success, Start                            
B -      2892 - elf_loader_entry, Start                                         
B -     11441 - auth_hash_seg_entry, Start                                      
B -     11681 - auth_hash_seg_exit, Start                                       
B -    252798 - elf_segs_hash_verify_entry, Start                               
B -    313469 - PBL, End                                                        
B -    488701 - SBL1, Start                                                     
B -    566659 - GCC [RstStat:0x10, RstDbg:0x600000] WDog Stat : 0x4             
B -    576358 - pm_device_init, Start                                           
B -    757376 - PM_SET_VAL:Skip                                                 
D -    179126 - pm_device_init, Delta                                           
B -    759785 - pm_driver_init, Start                                           
D -      5368 - pm_driver_init, Delta                                           
B -    766190 - clock_init, Start                                               
D -      2104 - clock_init, Delta                                               
B -    770094 - boot_flash_init, Start                                          
D -     16104 - boot_flash_init, Delta                                          
B -    789980 - boot_config_data_table_init, Start                              
D -      1006 - boot_config_data_table_init, Delta - (575 Bytes)                
B -    797636 - Boot Setting :  0x00000618                                      
B -    801357 - CDT version:2,Platform ID:8,Major ID:1,Minor ID:0,Subtype:0     
B -    808280 - sbl1_ddr_set_params, Start                                      
B -    812093 - CPR configuration: 0x30c                                        
B -    815539 - cpr_init, Start                                                 
B -    818315 - Rail:0 Mode: 5 Voltage: 808000                                  
B -    823561 - CL CPR settled at 760000mV                                      
B -    826367 - Rail:1 Mode: 5 Voltage: 880000                                  
B -    830545 - Rail:1 Mode: 7 Voltage: 912000                                  
D -     16531 - cpr_init, Delta                                                 
B -    837438 - Pre_DDR_clock_init, Start                                       
B -    841464 - Pre_DDR_clock_init, End                                         
B -    844758 - DDR Type : PCDDR3                                               
B -    850492 - do ddr sanity test, Start                                       
D -      1037 - do ddr sanity test, Delta                                       
B -    855342 - DDR: Start of HAL DDR Boot Training                             
B -    859978 - DDR: End of HAL DDR Boot Training                               
B -    865651 - DDR: Checksum to be stored on flash is -1553865925              
B -    876173 - Image Load, Start                                               
D -    335958 - QSEE Image Loaded, Delta - (1376448 Bytes)                      
B -   1212222 - Image Load, Start                                               
D -        30 - SEC Image Loaded, Delta - (0 Bytes)                             
B -   1219908 - Image Load, Start                                               
D -      9760 - DEVCFG Image Loaded, Delta - (26008 Bytes)                      
B -   1229760 - Image Load, Start                                               
D -     25955 - RPM Image Loaded, Delta - (86584 Bytes)                         
B -   1255807 - Image Load, Start                                               
D -    136579 - APPSBL Image Loaded, Delta - (556008 Bytes)                     
B -   1392508 - QSEE Execution, Start                                           
D -        61 - QSEE Execution, Delta                                           
B -   1398303 - USB D+ check, Start                                             
D -         0 - USB D+ check, Delta                                             
B -   1404708 - SBL1, End                                                       
D -    918325 - SBL1, Delta                                                     
S - Flash Throughput, 4428 KB/s  (2045623 Bytes,  461884 us)                    
S - DDR Frequency, 466 MHz                                                      
S - Core 0 Frequency, 1651 MHz                                                  
                                                                                
                                                                                
U-Boot 2016.01 (Aug 18 2020 - 16:35:27 +0800)                                   
                                                                                
DRAM:  smem ram ptable found: ver: 1 len: 4                                     
1 GiB                                                                           
NAND:  Could not find nand_gpio in dts, no defaults defined                     
Nand Flash error. Status = 80                                                   
Reset cmd status failed                                                         
SPI_ADDR_LEN=3                                                                  
SF: Detected W25Q64DW with page size 256 Bytes, erase size 4 KiB, total 8 MiB   
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x800000                  
8 MiB                                                                           
MMC:   <NULL>: 0                                                                
In:    serial@78B3000                                                           
Out:   serial@78B3000                                                           
Err:   serial@78B3000                                                           
machid: 8010000                                                                 
Hit any key to stop autoboot:  0                                                
                                                                                
Net:   MAC0 addr:24:5e:be:55:11:72                                              
PHY ID1: 0x0                                                                    
PHY ID2: 0x0                                                                    
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                                                                            
IPQ807x# 


IPQ807x# printenv                                                               
BMAC=245EBE551172                                                               
CC=US                                                                           
FWMode=Normal                                                                   
HV=0x01                                                                         
MD=2021/01/25 10:00                                                             
MF=0x01                                                                         
MN=A03                                                                          
NMAC=8                                                                          
PLN=IPQ8072a                                                                    
PN=X6QHora-301W                                                                 
QSN=Q211Q00912                                                                  
SSID=QHora-301W_1172                                                            
VN=0x01                                                                         
autostart=yes                                                                   
baudrate=115200                                                                 
boot_0=bad                                                                      
boot_1=bad                                                                      
boot_2=good                                                                     
bootargs=console=ttyMSM0,115200n8                                               
bootcmd=aq_load_fw 0 && aq_load_fw 8 && bootipq                                 
bootdelay=0                                                                     
bootfile=fw.bin                                                                 
current_entry=0                                                                 
eth1addr=24:5e:be:55:11:73                                                      
eth2addr=24:5e:be:55:11:74                                                      
eth3addr=24:5e:be:55:11:75                                                      
eth4addr=24:5e:be:55:11:76                                                      
eth5addr=24:5e:be:55:11:77                                                      
ethact=eth0                                                                     
ethaddr=24:5e:be:55:11:72                                                       
fdt_high=0x4A400000                                                             
fdtcontroladdr=4a96c8d0                                                         
flash_type=8                                                                    
fw_type=router                                                                  
ipaddr=192.168.1.1                                                              
machid=8010000                                                                  
netmask=255.255.255.0                                                           
scan_ramoops_history_done=1                                                     
serverip=192.168.1.120                                                          
soc_version_major=2                                                             
soc_version_minor=0                                                             
stderr=serial@78B3000                                                           
stdin=serial@78B3000                                                            
stdout=serial@78B3000                                                           
                                                                                
Environment size: 897/131068 bytes 

I need help to fix this specific issue. What device is the root device? Where is it identified, ie. U-boot or ? What is the correct syntax?
Please help me fix this router. At least it isn't bricked, yet.

I got access to the original qnap os, so I want to mark this topic solved. Who knows, I might need help again. I'm 67 now, so I can't aggravate you guys much longer :smile:

@sppmaster

edit : nevermind, i now know the way.

hi! i noticed you are using the new method of loading the 10g firmware.

since im doing all this upgrading with the nss build i fgured might as well do this as well.

i have a question:

ive noticed that the firmware for 0x0 and 0x8 (10g-1 and 10g-2?) differs. but there is only 1 mtd slot ( mtd10: 00080000 00010000 "0:ETHPHYFW" ). does this mean if we want to use the correct firmware we cannot use nvmem?

check the above repo, he has the 5.4.C dumps from the 301w, i did a bindiff and they are different. there is even some plain text in there saying 0x0 and 0x8.

i wonder how we force the driver to load from /lib/firmware if the firmware is already in mtd10. i know how to disable uboot loading (remove the fw_setevn params)... but then wont the driver just load from nvmem?

big thanks for this.

i've been running both interfaces off the old 301w install instructions, which mention nothing of:

a) different firmware for 10g-1 vs 10g-2
b) recommend writing 5.6.7 to mtd10

thanks!

You found the right instructions to load the stock firmware from NVMEM. There are a few other excellent posts form MusikJunk. One being about extracting the 10G FW from QNAP firmware.
I really wonder why there are two different stock firmwares for each 10G port.
Please let us know if that method works OK for you with NSS builds.
It wasn't working for me neither before nor after the robimarko's fix. 10G-1 port simply doesn't work with NSS builds. I still believe that "just NSS" is not the only reason for this but obviously fixing it requires the knowledge and spare time that just a few people here have.
See this if you haven't already seen it.

hey so i got it all figured out and tried flashing one of my 301ws with 5.4.C.

everything initially went fine, removed the aq_load via fw_setenv etc.

devices booted fine, dmesg showed the driver was loading from nvmem (0x0 and 0x8).

i then moved my cable to 10g-1 and it was not working, uniphy autoneg time out!.

i know about the fix, here is the funny thing:

i am still running the last 6.1.82 build, right before qosmio pushed it to 6.6.


root@OPENWRT-SALON:~# uname -a
Linux OPENWRT-SALON 6.1.82 #0 SMP Fri Mar 29 06:22:24 2024 aarch64 GNU/Linux

anyways not a huge deal,

i flashed mtd10 back to the firmware in the initial 301w install guide and added the params back to fw_setenv and everything came back to life.

1 Like

I've been able to load the 10g-1 and 10g-2 firmware using the aq-fw-download command.

I am unsure if this is because of the recent changes to allow NVMEM + file system loading of the firmware but here goes:

The adapter resets (in dmesg) after this and comes back up, so something is happening :smiley: 10g-2 is the same but 0x0 in the filename + 0 at the end of the command. Note though, I am not 100% sure if I am loading the correct firmware (10g-1 -> 0x8, 10g-2 -> 0x0) or not.

root@OPENWRT-SALON:/etc/scripts# ./aq-fw-download AQR-G4_v5.4.C-AQR_CIG_WF-1945_0x8_ID44776_VER1630.cld 10g-1 8
CRC check good on image file (0x71C0)

Segment Addresses and Sizes as read from the PHY ROM image header:

Primary Iram Address: 0x5400
Primary Iram Size: 0x3c0c8
Primary Dram Address: 0x41600
Primary Dram Size: 0x1e55c


Loading IRAM:

    Byte: 800:
    Byte: 1000:
    Byte: 1800:
    Byte: 2000:
    Byte: 2800:
    Byte: 3000:
    Byte: 3800:
    Byte: 4000:
    Byte: 4800:
    Byte: 5000:
    Byte: 5800:
    Byte: 6000:
    Byte: 6800:
    Byte: 7000:
    Byte: 7800:
    Byte: 8000:
    Byte: 8800:
    Byte: 9000:
    Byte: 9800:
    Byte: A000:
    Byte: A800:
    Byte: B000:
    Byte: B800:
    Byte: C000:
    Byte: C800:
    Byte: D000:
    Byte: D800:
    Byte: E000:
    Byte: E800:
    Byte: F000:
    Byte: F800:
    Byte: 10000:
    Byte: 10800:
    Byte: 11000:
    Byte: 11800:
    Byte: 12000:
    Byte: 12800:
    Byte: 13000:
    Byte: 13800:
    Byte: 14000:
    Byte: 14800:
    Byte: 15000:
    Byte: 15800:
    Byte: 16000:
    Byte: 16800:
    Byte: 17000:
    Byte: 17800:
    Byte: 18000:
    Byte: 18800:
    Byte: 19000:
    Byte: 19800:
    Byte: 1A000:
    Byte: 1A800:
    Byte: 1B000:
    Byte: 1B800:
    Byte: 1C000:
    Byte: 1C800:
    Byte: 1D000:
    Byte: 1D800:
    Byte: 1E000:
    Byte: 1E800:
    Byte: 1F000:
    Byte: 1F800:
    Byte: 20000:
    Byte: 20800:
    Byte: 21000:
    Byte: 21800:
    Byte: 22000:
    Byte: 22800:
    Byte: 23000:
    Byte: 23800:
    Byte: 24000:
    Byte: 24800:
    Byte: 25000:
    Byte: 25800:
    Byte: 26000:
    Byte: 26800:
    Byte: 27000:
    Byte: 27800:
    Byte: 28000:
    Byte: 28800:
    Byte: 29000:
    Byte: 29800:
    Byte: 2A000:
    Byte: 2A800:
    Byte: 2B000:
    Byte: 2B800:
    Byte: 2C000:
    Byte: 2C800:
    Byte: 2D000:
    Byte: 2D800:
    Byte: 2E000:
    Byte: 2E800:
    Byte: 2F000:
    Byte: 2F800:
    Byte: 30000:
    Byte: 30800:
    Byte: 31000:
    Byte: 31800:
    Byte: 32000:
    Byte: 32800:
    Byte: 33000:
    Byte: 33800:
    Byte: 34000:
    Byte: 34800:
    Byte: 35000:
    Byte: 35800:
    Byte: 36000:
    Byte: 36800:
    Byte: 37000:
    Byte: 37800:
    Byte: 38000:
    Byte: 38800:
    Byte: 39000:
    Byte: 39800:
    Byte: 3A000:
    Byte: 3A800:
    Byte: 3B000:
    Byte: 3B800:
    Byte: 3C000:

CRC-16 after loading IRAM: 0x7011

Loading DRAM:

    Byte: 800:
    Byte: 1000:
    Byte: 1800:
    Byte: 2000:
    Byte: 2800:
    Byte: 3000:
    Byte: 3800:
    Byte: 4000:
    Byte: 4800:
    Byte: 5000:
    Byte: 5800:
    Byte: 6000:
    Byte: 6800:
    Byte: 7000:
    Byte: 7800:
    Byte: 8000:
    Byte: 8800:
    Byte: 9000:
    Byte: 9800:
    Byte: A000:
    Byte: A800:
    Byte: B000:
    Byte: B800:
    Byte: C000:
    Byte: C800:
    Byte: D000:
    Byte: D800:
    Byte: E000:
    Byte: E800:
    Byte: F000:
    Byte: F800:
    Byte: 10000:
    Byte: 10800:
    Byte: 11000:
    Byte: 11800:
    Byte: 12000:
    Byte: 12800:
    Byte: 13000:
    Byte: 13800:
    Byte: 14000:
    Byte: 14800:
    Byte: 15000:
    Byte: 15800:
    Byte: 16000:
    Byte: 16800:
    Byte: 17000:
    Byte: 17800:
    Byte: 18000:
    Byte: 18800:
    Byte: 19000:
    Byte: 19800:
    Byte: 1A000:
    Byte: 1A800:
    Byte: 1B000:
    Byte: 1B800:
    Byte: 1C000:
    Byte: 1C800:
    Byte: 1D000:
    Byte: 1D800:
    Byte: 1E000:

0th port: Image load good - mailbox CRC-16 matches (0x646)
Image load good - mailbox CRC-16 matches
1 Like

Btw, the inspiration for this came from:

https://openwrt.org/inbox/toh/netgear/netgear_rax120_nighthawk_ax12

They use the command to load the firmware after OpenWrt is installed.

1 Like