Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

咨询:如何为Openwrt的R2S固件增加R2S Plus的rtl8822cs SDIO WiFi支持? #54

Open
nanmu42 opened this issue May 3, 2024 · 10 comments

Comments

@nanmu42
Copy link

nanmu42 commented May 3, 2024

各位老师好,我在为新买的R2S Plus套装折腾OpenWRT固件,目前的构想是在R2S的固件上引入rtl8822cs SDIO WiFi的支持,我想这样应该就可以工作?但是rtl8822cs的驱动应该如何引入呢?和scripts/wifi/add_rtl8852be.sh有关吗?我希望得到一些指导,非常感谢。

我明白这个repo的关注点是FriendlyWRT而不是OpenWRT,但是我感觉这里是离答案最近的地方,如有打扰,非常抱歉。

@friendlyarm
Copy link
Owner

R2S plus上rtl8822cs SDIO WiFi的支持,需要一个内核补丁才能支持sdio uhs模式,否则性能会受限sdio接口的性能
可参考我们提供的6.1内核中以下提交:
friendlyarm/kernel-rockchip@aee62cf
如果是自己移植到其它不同内核版本中,则需要特别注意可能出现的冲突并修复
dts请参考以下提交:
friendlyarm/kernel-rockchip@11a4504
其中rtl8822cs的支持主要是以下节点:
&sdmmc_ext {
vmmc-supply = <&vcc_io>;
vqmmc-supply = <&vcc_18>;
max-frequency = <150000000>;
sd-uhs-sdr104;
status = "okay";

/delete-node/ bcrmf@1;
rtl8822cs@1 {
	reg = <1>;
	compatible = "realtek,rtl8822cs";
};

};

@nanmu42
Copy link
Author

nanmu42 commented May 7, 2024

非常感谢,我试试看!

@kxjhwbb
Copy link

kxjhwbb commented Jun 4, 2024

非常感谢,我试试看!

大佬,请问您解决了吗?我只是希望用zerotier,官方固件没有,第三方固件又用不了无线

@nanmu42
Copy link
Author

nanmu42 commented Jun 15, 2024

@friendlyarm 老师您好,我按您的提示基于OpenWRT v23.05.3做了一些修改(diff)

  • 增加sdmmc_ext dts节点
  • 加上内核补丁
  • 照搬R2S的uboot platdata

成功编译出了openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-plus-ext4-sysupgrade.img.gz(下载).

然后尝试用它启动我的R2S Plus:

  1. 下载MiniLoaderAll.bin(RK3328)
  2. 刷入img到emmc:
    sudo rkdeveloptool db Friendly-RK3328-MiniLoaderAll.bin
    sudo rkdeveloptool ef
    sudo rkdeveloptool ul Friendly-RK3328-MiniLoaderAll.bin
    sudo rkdeveloptool wl 0 openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-plus-ext4-sysupgrade.img
  3. 启动时debug serial输出了这样的错误:
    U-Boot TPL 2021.07-OpenWrt-r23809-234f1a2efa (Mar 22 2024 - 22:09:42)
    DDR4, 333MHz
    BW=32 Col=10 Bk=4 BG=2 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
    Trying to boot from BOOTROM
    Returning to boot ROM...
    
    U-Boot SPL 2021.07-OpenWrt-r23809-234f1a2efa (Mar 22 2024 - 22:09:42 +0000)
    Trying to boot from MMC1
    Card did not respond to voltage select! : -110
    spl: mmc init failed with error: -95
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###
    

我也尝试了从SD启动:

  1. 重置emmc:
    sudo rkdeveloptool db Friendly-RK3328-MiniLoaderAll.bin
    sudo rkdeveloptool ef
    sudo rkdeveloptool ul Friendly-RK3328-MiniLoaderAll.bin
  2. 写SD卡:sudo dd if=openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-plus-ext4-sysupgrade.img of=/dev/sda bs=4M status=progress oflag=sync conv=fdatasync
  3. 插入SD卡后上电,但是感觉无论有没有插入SD卡,报错都是下面这样:
点我展开
DDR version 1.16 20190528
ID:0x805 N
In
SRX
DDR4
333MHz
Bus Width=32 Col=10 Bank=4 Bank Group=2 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:14
OUT
Boot1 Release Time: May 13 2019 17:34:36, version: 2.50
ChipType = 0x11, 326
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=29600MB
FwPartOffset=2000 , 2000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=60906MB
FwPartOffset=2000 , 0
StorageInit ok = 46893
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT 0x337a9f0 signature is wrong
recovery gpt...
GPT 0x337a9f0 signature is wrong
recovery gpt fail!
LoadTrust Addr:0x4000
LoadTrust Addr:0x4400
LoadTrust Addr:0x4800
LoadTrust Addr:0x4c00
LoadTrust Addr:0x5000
LoadTrust Addr:0x5400
LoadTrust Addr:0x5800
LoadTrust Addr:0x5c00
Addr:0x4000 No find trust.img!
LoadTrustBL error:-3
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)                                                 
GPT 0x337a9f0 signature is wrong                                           
recovery gpt...                                                            
GPT 0x337a9f0 signature is wrong                                           
recovery gpt fail!                                                         
LoadTrust Addr:0x4000
LoadTrust Addr:0x4400
LoadTrust Addr:0x4800
LoadTrust Addr:0x4c00
LoadTrust Addr:0x5000
LoadTrust Addr:0x5400
LoadTrust Addr:0x5800
LoadTrust Addr:0x5c00
Addr:0x4000 No find trust.img!
LoadTrustBL error:-3
UsbHook ...81862
powerOn 746324
DDR version 1.16 20190528
ID:0x805 N
In
DDR4
333MHz
Bus Width=32 Col=10 Bank=4 Bank Group=2 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:14
OUT
Boot1 Release Time: May 13 2019 17:34:36, version: 2.50
ChipType = 0x11, 248
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=29600MB
FwPartOffset=2000 , 2000
SdmmcInit=0 NOT PRESENT
StorageInit ok = 10407
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804

您方便看看我接下应该怎么做比较好吗?

非常感谢。

@lawrencetg
Copy link
Contributor

@nanmu42
Copy link
Author

nanmu42 commented Jun 16, 2024

@lawrencetg

感谢老师,我表述有误,重置设备倒是没问题,在尝试过程中我重置过很多次了。主要烦恼的是构建出的系统为什么没有正确引导和启动。

@nanmu42
Copy link
Author

nanmu42 commented Jun 22, 2024

更新进展:基于OpenWRT的main分支(内核版本6.6)重新尝试(git diff),现在可以进系统了,不过板载WiFi没能正常识别。还在找原因……

固件下载:openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-plus-ext4-sysupgrade.img.gz

点我展开启动日志
U-Boot TPL 2024.04-OpenWrt-r3-78a2c20132 (Jun 20 2024 - 16:22:06)
DDR4, 333MHz
BW=32 Col=10 Bk=4 BG=2 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2024.04-OpenWrt-r3-78a2c20132 (Jun 20 2024 - 16:22:06 +0000)
Trying to boot from MMC2
NOTICE:  BL31: v2.10.0  (release):OpenWrt v2.10-1 (rk3328)
NOTICE:  BL31: Built : 13:38:57, Jun 20 2024
NOTICE:  BL31:Rockchip release version: v1.2


U-Boot 2024.04-OpenWrt-r3-78a2c20132 (Jun 20 2024 - 16:22:06 +0000)

Model: FriendlyElec NanoPi R2S Plus
DRAM:  1 GiB (effective 1022 MiB)
PMIC:  RK8050 (on=0x40, off=0x00)
Core:  243 devices, 24 uclasses, devicetree: separate
MMC:   mmc@ff500000: 1, mmc@ff520000: 0, mmc@ff5f0000: 2
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: FriendlyElec NanoPi R2S Plus
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0 
Card did not respond to voltage select! : -110
** Booting bootflow 'mmc@ff520000.bootdev.part_1' with script
4619588 bytes read in 105 ms (42 MiB/s)
## Loading kernel from FIT Image at 02080000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.6.34
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x020800e8
     Data Size:    4579742 Bytes = 4.4 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x03200000
     Entry Point:  0x03200000
     Hash algo:    crc32
     Hash value:   eafa53ba
     Hash algo:    sha1
     Hash value:   71d39f17fdcf4b9348b314229ea808cebdcdf0f3
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 02080000 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt friendlyarm_nanopi-r2s-plus device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x024de3d4
     Data Size:    37920 Bytes = 37 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   c344ed54
     Hash algo:    sha1
     Hash value:   72df6c8b5d1b7698525f2f95ebbeb52fe4b4b2d5
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x24de3d4
Working FDT set to 24de3d4
   Uncompressing Kernel Image to 3200000
   Loading Device Tree to 000000003cf0c000, end 000000003cf1841f ... OK
Working FDT set to 3cf0c000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.34 (nanmu@rockgiant) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r1+2-0a07a3a13d) 13.3.0,4
[    0.000000] Machine model: FriendlyElec NanoPi R2S Plus
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000ff130000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x000000003fffffff]
[    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 0x0000000000200000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x000000003fffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 16 MiB at 0x000000003dc00000 on node -1
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 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.4
[    0.000000] percpu: Embedded 19 pages/cpu s37928 r8192 d31704 u77824
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=5452574f-02 rw rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 257544
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x000000003da80000-0x000000003db80000] (1MB)
[    0.000000] Memory: 990988K/1046528K available (9216K kernel code, 2414K rwdata, 2824K rodata, 2176K init, 721K bss, 39156K res)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    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.001366] Console: colour dummy device 80x25
[    0.001850] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.002818] pid_max: default: 32768 minimum: 301
[    0.010351] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.011056] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.018227] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.019042] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.020077] rcu: Hierarchical SRCU implementation.
[    0.020529] rcu:     Max phase no-delay instances is 1000.
[    0.022468] smp: Bringing up secondary CPUs ...
[    0.023758] Detected VIPT I-cache on CPU1
[    0.023942] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.025028] Detected VIPT I-cache on CPU2
[    0.025199] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.026194] Detected VIPT I-cache on CPU3
[    0.026357] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.026530] smp: Brought up 1 node, 4 CPUs
[    0.029894] SMP: Total of 4 processors activated.
[    0.030336] CPU features: detected: 32-bit EL0 Support
[    0.030817] CPU features: detected: CRC32 instructions
[    0.031432] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.032210] CPU: All CPU(s) started at EL2
[    0.032591] alternatives: applying system-wide alternatives
[    0.048025] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.049053] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.053247] pinctrl core: initialized pinctrl subsystem
[    0.056839] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.059139] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.059981] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.060856] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.062876] thermal_sys: Registered thermal governor 'step_wise'
[    0.062892] thermal_sys: Registered thermal governor 'power_allocator'
[    0.063540] cpuidle: using governor menu
[    0.064706] ASID allocator initialised with 65536 entries
[    0.066142] Serial: AMBA PL011 UART driver
[    0.083899] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.085054] rockchip-gpio ff210000.gpio: probed /pinctrl/gpio@ff210000
[    0.086402] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.087485] rockchip-gpio ff220000.gpio: probed /pinctrl/gpio@ff220000
[    0.088556] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.089727] rockchip-gpio ff230000.gpio: probed /pinctrl/gpio@ff230000
[    0.090789] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.091868] rockchip-gpio ff240000.gpio: probed /pinctrl/gpio@ff240000
[    0.096948] Modules: 28384 pages in range for non-PLT usage
[    0.096975] Modules: 519904 pages in range for PLT usage
[    0.099387] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.100597] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.101184] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.101814] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.102395] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.103021] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.103609] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.104235] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.107986] cryptd: max_cpu_qlen set to 1000
[    0.113262] iommu: Default domain type: Passthrough
[    0.114355] SCSI subsystem initialized
[    0.115215] usbcore: registered new interface driver usbfs
[    0.115808] usbcore: registered new interface driver hub
[    0.116060] gpio-regulator sdmmcio-regulator: Failed to register regulator: -517
[    0.116393] usbcore: registered new device driver usb
[    0.117982] pps_core: LinuxPPS API ver. 1 registered
[    0.118458] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.119320] PTP clock support registered
[    0.120214] scmi_core: SCMI protocol bus registered
[    0.123112] clocksource: Switched to clocksource arch_sys_counter
[    0.127085] VFS: Disk quotas dquot_6.6.0
[    0.127707] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.136872] NET: Registered PF_INET protocol family
[    0.137650] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.141804] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.142698] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.143467] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.144297] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.145362] TCP: Hash tables configured (established 8192 bind 8192)
[    0.146211] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.146885] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.148092] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.148703] PCI: CLS 0 bytes, default 64
[    0.151580] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.163071] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.163686] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.171827] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.172865] io scheduler mq-deadline registered
[    0.178292] gpio-syscon ff100000.syscon:gpio: can't read the data register offset!
[    0.184447] dma-pl330 ff1f0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.185183] dma-pl330 ff1f0000.dma-controller:       DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.187326] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.190754] printk: console [ttyS2] disabled
[    0.191779] ff130000.serial: ttyS2 at MMIO 0xff130000 (irq = 21, base_baud = 1500000) is a 16550A
[    0.192711] printk: console [ttyS2] enabled
[    0.192711] printk: console [ttyS2] enabled
[    0.193552] printk: bootconsole [uart8250] disabled
[    0.193552] printk: bootconsole [uart8250] disabled
[    0.224494] loop: module loaded
[    0.224819] mtip32xx Version 1.3.1
[    0.231397] rk_gmac-dwmac ff540000.ethernet: IRQ eth_wake_irq not found
[    0.232026] rk_gmac-dwmac ff540000.ethernet: IRQ eth_lpi not found
[    0.232753] rk_gmac-dwmac ff540000.ethernet: PTP uses main clock
[    0.236081] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    0.236636] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    0.237535] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000008002000010
[    0.238446] xhci-hcd xhci-hcd.0.auto: irq 25, io mem 0xff600000
[    0.238522] ehci-platform ff5c0000.usb: EHCI Host Controller
[    0.238542] ohci-platform ff5d0000.usb: Generic Platform OHCI controller
[    0.238571] ohci-platform ff5d0000.usb: new USB bus registered, assigned bus number 2
[    0.238716] ohci-platform ff5d0000.usb: irq 27, io mem 0xff5d0000
[    0.239241] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    0.239499] ehci-platform ff5c0000.usb: new USB bus registered, assigned bus number 3
[    0.240077] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 4
[    0.240869] ehci-platform ff5c0000.usb: irq 26, io mem 0xff5c0000
[    0.241296] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    0.245151] hub 1-0:1.0: USB hub found
[    0.245537] hub 1-0:1.0: 1 port detected
[    0.246428] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    0.247793] hub 4-0:1.0: USB hub found
[    0.248170] hub 4-0:1.0: 1 port detected
[    0.249121] usbcore: registered new interface driver usb-storage
[    0.250018] i2c_dev: i2c /dev entries driver
[    0.259949] rk808-regulator rk808-regulator.2.auto: there is no dvs0 gpio
[    0.260604] rk808-regulator rk808-regulator.2.auto: there is no dvs1 gpio
[    0.263235] ehci-platform ff5c0000.usb: USB 2.0 started, EHCI 1.00
[    0.264900] hub 3-0:1.0: USB hub found
[    0.265323] hub 3-0:1.0: 1 port detected
[    0.287026] rk808-rtc rk808-rtc.4.auto: registered as rtc0
[    0.289258] rk808-rtc rk808-rtc.4.auto: setting system clock to 2016-01-21T08:50:09 UTC (1453366209)
[    0.292045] input: rk805 pwrkey as /devices/platform/ff160000.i2c/i2c-1/1-0018/rk805-pwrkey.6.auto/input/input0
[    0.297775] dw_wdt ff1a0000.watchdog: No valid TOPs array specified
[    0.300860] cpu cpu0: EM: created perf domain
[    0.303739] sdhci: Secure Digital Host Controller Interface driver
[    0.304318] sdhci: Copyright(c) Pierre Ossman
[    0.304706] Synopsys Designware Multimedia Card Interface Driver
[    0.305492] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.306249] dwmmc_rockchip ff500000.mmc: IDMAC supports 32-bit address mode.
[    0.306399] dwmmc_rockchip ff520000.mmc: IDMAC supports 32-bit address mode.
[    0.306929] dwmmc_rockchip ff500000.mmc: Using internal DMA controller.
[    0.307550] dwmmc_rockchip ff520000.mmc: Using internal DMA controller.
[    0.307908] hub 2-0:1.0: USB hub found
[    0.307980] hub 2-0:1.0: 1 port detected
[    0.308105] dwmmc_rockchip ff500000.mmc: Version ID is 270a
[    0.308353] dwmmc_rockchip ff5f0000.mmc: IDMAC supports 32-bit address mode.
[    0.308398] dwmmc_rockchip ff5f0000.mmc: Using internal DMA controller.
[    0.308407] dwmmc_rockchip ff5f0000.mmc: Version ID is 270a
[    0.308486] dwmmc_rockchip ff5f0000.mmc: DW MMC controller at irq 42,32 bit host data width,256 deep fifo
[    0.308689] dwmmc_rockchip ff520000.mmc: Version ID is 270a
[    0.309083] dwmmc_rockchip ff500000.mmc: DW MMC controller at irq 40,32 bit host data width,256 deep fifo
[    0.309411] dwmmc_rockchip ff520000.mmc: DW MMC controller at irq 41,32 bit host data width,256 deep fifo
[    0.314803] ledtrig-cpu: registered to indicate activity on CPUs
[    0.315797] mmc_host mmc1: card is non-removable.
[    0.317479] NET: Registered PF_INET6 protocol family
[    0.319599] Segment Routing with IPv6
[    0.319983] In-situ OAM (IOAM) with IPv6
[    0.320402] NET: Registered PF_PACKET protocol family
[    0.321285] 8021q: 802.1Q VLAN Support v1.8
[    0.323319] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    0.329165] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    0.355017] rk_gmac-dwmac ff540000.ethernet: IRQ eth_wake_irq not found
[    0.355629] rk_gmac-dwmac ff540000.ethernet: IRQ eth_lpi not found
[    0.356348] rk_gmac-dwmac ff540000.ethernet: PTP uses main clock
[    0.357077] rk_gmac-dwmac ff540000.ethernet: clock input or output? (input).
[    0.357702] rk_gmac-dwmac ff540000.ethernet: TX delay(0x24).
[    0.358201] rk_gmac-dwmac ff540000.ethernet: RX delay(0x18).
[    0.358710] rk_gmac-dwmac ff540000.ethernet: integrated PHY? (no).
[    0.359282] rk_gmac-dwmac ff540000.ethernet: clock input from PHY
[    0.364835] rk_gmac-dwmac ff540000.ethernet: init for RGMII
[    0.365913] rk_gmac-dwmac ff540000.ethernet: User ID: 0x10, Synopsys ID: 0x35
[    0.366564] rk_gmac-dwmac ff540000.ethernet:         DWMAC1000
[    0.367030] rk_gmac-dwmac ff540000.ethernet: DMA HW capability register supported
[    0.367686] rk_gmac-dwmac ff540000.ethernet: RX Checksum Offload Engine supported
[    0.368342] rk_gmac-dwmac ff540000.ethernet: COE Type 2
[    0.368802] rk_gmac-dwmac ff540000.ethernet: TX Checksum insertion supported
[    0.369417] rk_gmac-dwmac ff540000.ethernet: Wake-Up On Lan supported
[    0.369987] rk_gmac-dwmac ff540000.ethernet: Normal descriptors
[    0.370507] rk_gmac-dwmac ff540000.ethernet: Ring mode enabled
[    0.371020] rk_gmac-dwmac ff540000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.440366] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)
[    0.441289] mmc_host mmc1: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[    0.540208] clk: Disabling unused clocks
[    0.540619] dwmmc_rockchip ff500000.mmc: IDMAC supports 32-bit address mode.
[    0.541312] dwmmc_rockchip ff500000.mmc: Using internal DMA controller.
[    0.541935] dwmmc_rockchip ff500000.mmc: Version ID is 270a
[    0.542514] dwmmc_rockchip ff500000.mmc: DW MMC controller at irq 40,32 bit host data width,256 deep fifo
[    0.544069] dw-apb-uart ff130000.serial: forbid DMA for kernel console
[    0.562406] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    0.576547] Waiting for root device PARTUUID=5452574f-02...
[    0.585459] dwmmc_rockchip ff520000.mmc: Successfully tuned phase to 193
[    0.586167] mmc1: new HS200 MMC card at address 0001
[    0.588253] mmcblk1: mmc1:0001 A3A551 28.9 GiB
[    0.590776]  mmcblk1: p1 p2
[    0.592006] mmcblk1boot0: mmc1:0001 A3A551 4.00 MiB
[    0.594431] mmcblk1boot1: mmc1:0001 A3A551 4.00 MiB
[    0.596093] mmcblk1rpmb: mmc1:0001 A3A551 16.0 MiB, chardev (245:0)
[    0.613302] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    0.621318] EXT4-fs (mmcblk1p2): recovery complete
[    0.621982] EXT4-fs (mmcblk1p2): mounted filesystem ff313567-e9f1-5a5d-9895-3ba130b4a864 r/w with ordered data mode. Quota mode.
[    0.623219] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    0.625038] Freeing unused kernel memory: 2176K
[    0.625545] Run /sbin/init as init process
[    0.663065] init: Console is alive
[    0.663863] init: - watchdog -
[    0.746442] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    0.751686] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    0.754935] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    0.766462] init: - preinit -
[    0.967989] random: jshn: uninitialized urandom read (4 bytes read)
[    0.998474] random: jshn: uninitialized urandom read (4 bytes read)
[    1.054662] 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
[    3.391808] mount_root: mounting /dev/root with options 
[    3.613690] EXT4-fs (mmcblk1p2): re-mounted ff313567-e9f1-5a5d-9895-3ba130b4a864 r/w. Quota mode: none.
[    3.728124] EXT4-fs (mmcblk1p1): mounted filesystem 84173db5-fa99-e35a-95c6-28613cc79ea9 r/w without journal. Quota mode: none.
[    3.734804] EXT4-fs (mmcblk1p1): unmounting filesystem 84173db5-fa99-e35a-95c6-28613cc79ea9.
[    3.738510] urandom-seed: Seeding with /etc/urandom.seed
[    3.760378] procd: - early -
[    3.760785] procd: - watchdog -
[    4.310354] rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'hevc', val=0x88220
[    4.316054] procd: - watchdog -
[    4.321412] procd: - ubus -
[    4.380343] random: ubusd: uninitialized urandom read (4 bytes read)
[    4.472470] random: ubusd: uninitialized urandom read (4 bytes read)
[    4.474089] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.553115] random: crng init done
[   16.553449] random: 14 urandom warning(s) missed due to ratelimiting
[   16.555233] procd: - init -
Please press Enter to activate this console.
[   16.920983] kmodloader: loading kernel modules from /etc/modules.d/*
[   17.109301] urngd: v1.0.2 started.
[   17.131033] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
[   17.131724] Backport generated by backports.git 193becf2
[   17.158917] usbcore: registered new device driver r8152-cfgselector
[   17.412865] r8152-cfgselector 4-1: reset SuperSpeed USB device number 2 using xhci-hcd
[   17.466998] r8152 4-1:1.0 eth1: v1.12.13
[   17.467717] usbcore: registered new interface driver r8152
[   17.486525] xt_time: kernel timezone is -0000
[   17.488496] usbcore: registered new interface driver cdc_ether
[   17.491524] r8152 4-1:1.0: load rtl8153b-2 v2 04/27/23 successfully
[   17.491851] usbcore: registered new interface driver cdc_ncm
[   17.564256] PPP generic driver version 2.4.2
[   17.566091] NET: Registered PF_PPPOX protocol family
[   17.584431] kmodloader: done loading kernel modules from /etc/modules.d/*
[   21.352997] br-lan: port 1(eth1) entered blocking state
[   21.353582] br-lan: port 1(eth1) entered disabled state
[   21.354120] r8152 4-1:1.0 eth1: entered allmulticast mode
[   21.354896] r8152 4-1:1.0 eth1: entered promiscuous mode
[   21.358174] br-lan: port 1(eth1) entered blocking state
[   21.358680] br-lan: port 1(eth1) entered forwarding state
[   21.381680] rk_gmac-dwmac ff540000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   21.573348] rk_gmac-dwmac ff540000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
[   21.583797] rk_gmac-dwmac ff540000.ethernet eth0: No Safety Features support found
[   21.584529] rk_gmac-dwmac ff540000.ethernet eth0: PTP not supported by HW
[   21.585849] rk_gmac-dwmac ff540000.ethernet eth0: configuring for phy/rgmii link mode
[   22.393550] br-lan: port 1(eth1) entered disabled state
[   24.552830] r8152 4-1:1.0 eth1: Promiscuous mode enabled
[   24.553602] r8152 4-1:1.0 eth1: carrier on
[   24.554632] br-lan: port 1(eth1) entered blocking state
[   24.555119] br-lan: port 1(eth1) entered forwarding state



BusyBox v1.36.1 (2024-06-20 13:38:57 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r3-78a2c20132
 -----------------------------------------------------
=== 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@OpenWrt:/# 

@friendlyarm
Copy link
Owner

应该是 sdmmc_ext 节点的配置不完整导致,请参照以下链接检查并增加缺失的配置。
https://github.com/friendlyarm/kernel-rockchip/blob/nanopi-r2-v6.1.y/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2-common.dtsi
https://github.com/friendlyarm/kernel-rockchip/blob/nanopi-r2-v6.1.y/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2-rev24.dts
除了 sdmmc_ext 外,还有相应的 pinctrl 配置 和 sdio_pwrseq 节点。

@nanmu42
Copy link
Author

nanmu42 commented Jun 24, 2024

非常感谢老师,我周末再试试。 🙇

@szdosar
Copy link

szdosar commented Sep 3, 2024

非常感谢,我试试看!

大佬,请问您解决了吗?我只是希望用zerotier,官方固件没有,第三方固件又用不了无线

我移植自lede正常使用。
方法:假设你的lede已经正常./scripts/feeds update -a && ./scripts/feeds install -a
移植:
cp -r ~/lede/feeds/luci/applications/{luci-app-zerotier,luci-app-vlmcsd} feeds/luci/applications/
cp -r ~/lede/feeds/packages/net/{zerotier,vlmcsd} feeds/packages/net/
然后再./scripts/feeds update -a && ./scripts/feeds install -a一次。
接着make menuconfig后编译。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants