arne_f
(Arne.F)
30 January 2022 09:12
41
I have pushed my changes to nightly yesterday.
It has still a small bug with the leds at shutdown but it works:
https://nightly.ipfire.org/next/2022-01-29%2020:36:23%20+0000-2ebbe5e1/aarch64/
Unpack the Flashimage to a µSD card and mount the 3rd partition to copy the R4S bootloader from usr/share/u-boot/nanopi-r4s/
with
dd if=u-boot-rockchip.bin of=/dev/“your card dev” bs=1k seek=32
Then this image should work. (As usual with 115200 baud)
1 Like
roberto
(Roberto Peña)
30 January 2022 13:16
42
Hello @arne_f .
You can forgive now, but apparently I’m very clumsy…
I have followed all your procedure (I have dumped the image from Windows 10 and the “dd if=…” from Lubuntu) but putting the corresponding serial port with 115200, the following appears:
I’ve waited a long time but nothing.
Maybe it’s USB-TTL problem. Which do you use?
Greetings and thanks for your effort.
1 Like
spikerguy
(Furkan K)
30 January 2022 14:01
43
No as I am facing the same issue.
There is no output from the uboot, so I think R2S uboot is still there in the start of the sdcard
I tried my uboot and it boots fine. I think the u-boot-rockchip.bin is not right.
roberto
(Roberto Peña)
30 January 2022 15:30
44
spikerguy:
No as I am facing the same issue.
There is no output from the uboot, so I think R2S uboot is still there in the start of the sdcard
I tried my uboot and it boots fine. I think the u-boot-rockchip.bin is not right.
Hi @spikerguy .
I am trying it with the NanoPI R4S. With the NanoPI R2S, I have the problem that it does not boot if the USB-TTL is not connected and with the NanoPI R2C, an interface did not work.
Greetings and thanks.
arne_f
(Arne.F)
30 January 2022 15:32
45
Ups. the board has stolen the target device from my dd commandline…
i use sdc in this example… So the partition to mount is /dev/sdc3 and the target is /dev/sdc
mount /dev/sdc3 /mnt
cd /mnt/usr/share/u-boot/nanopi-r4s
dd if=u-boot-rockchip.bin of=/dev/sdc bs=1k seek=32
sync
umount /mnt
sync
it may also mmcblk0 in this case the partition is /dev/mmcblk0p3 and the target /dev/mmcblk0
edit: add sync and umount
spikerguy
(Furkan K)
30 January 2022 16:08
46
arne_f:
i use sdc in this example… So the partition to mount is /dev/sdc3 and the target is /dev/sdc
mount /dev/sdc3 /mnt
cd /mnt/usr/share/u-boot/nanopi-r4s
dd if=u-boot-rockchip.bin of=/dev/sdc bs=1k seek=32
Yes Ofcourse I am aware of that. I used the same. I did exactly the same as explained above.
I pulled the u-boot-rockchip.in from third partition and flashed it on the sd card.
It doesn’t seem to boot at all.
arne_f
(Arne.F)
30 January 2022 16:18
47
please try to run sync after writing and wait a bit to make sure the write is finished. I have tried the binary from nightly again and it boots.
1 Like
spikerguy
(Furkan K)
30 January 2022 16:19
48
I have a habit of syncing it manually before ejecting the sdcard
I will try it once again as you advice then get back to you.
Ok My bad I think I pulled R2S uboot as thats 8.7mb while R4S is 8.8mb
Sorry, booted fine.
Sadly Only 1 NIC
Only onboard is read. PCIe Lan is not visible. My board is NanoPi R4S - 4GB
arne_f
(Arne.F)
30 January 2022 16:32
49
Same board here.
[root@NanoPi-R4S ~]# lspci
00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
[root@NanoPi-R4S ~]#
Is the device visible with lspci ?
spikerguy
(Furkan K)
30 January 2022 16:48
50
How can I access shell without completing the wizard ?
It is not allow me to proceed by ignoring the missing stuff
Ok proceeding now, let me check from lspci
here
[root@NanoPiR4S ~]# lspci
[root@NanoPiR4S ~]# sudo dmesg | grep pci
[root@NanoPiR4S ~]# sudo dmesg | grep dwmac
[ 166.535531] rk_gmac-dwmac fe300000.ethernet green0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=84)
[ 166.537852] rk_gmac-dwmac fe300000.ethernet green0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 166.549629] rk_gmac-dwmac fe300000.ethernet green0: No Safety Features support found
[ 166.549660] rk_gmac-dwmac fe300000.ethernet green0: PTP not supported by HW
[ 166.550525] rk_gmac-dwmac fe300000.ethernet green0: configuring for phy/rgmii link mode
[root@NanoPiR4S ~]#
Board Model: 2103
PCIE Chip is RTL8111H same like yours.
arne_f
(Arne.F)
30 January 2022 16:53
51
run
grep pci /var/log/bootlog
grep r816 /var/log/bootlog
spikerguy
(Furkan K)
30 January 2022 16:57
52
[root@NanoPiR4S ~]# grep pci /var/log/bootlog
[ 2.696219] ehci-pci: EHCI PCI platform driver
[ 2.851502] ohci-pci: OHCI PCI platform driver
[ 9.581359] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[ 9.581431] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[ 9.581462] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[ 9.598266] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[ 10.104937] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[ 10.105056] rockchip-pcie: probe of f8000000.pcie failed with error -110
arne_f
(Arne.F)
30 January 2022 17:01
53
I got the same 12V regulator not found and after this it works normally
[ 2.702798] ehci-pci: EHCI PCI platform driver
[ 2.859810] ohci-pci: OHCI PCI platform driver
[ 8.791662] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[ 8.791715] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[ 8.791740] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[ 8.792489] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[ 8.807369] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00
[ 8.807392] pci_bus 0000:00: root bus resource [bus 00-1f]
[ 8.807406] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff]
[ 8.807421] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff])
[ 8.807476] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400
[ 8.807625] pci 0000:00:00.0: supports D1
[ 8.807636] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 8.813597] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 8.814038] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[ 8.814117] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[ 8.814130] pci 0000:01:00.0: reg 0x10: [io size 0x0100]
[ 8.814219] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
[ 8.814279] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[ 8.814351] pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 128 (was 256, max 256)
[ 8.814377] pci 0000:01:00.0: Max Payload Size set to 128 (was 128, max 128)
[ 8.814865] pci 0000:01:00.0: supports D1 D2
[ 8.814880] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 8.824550] pci_bus 0000:01: busn_res: [bus 01-1f] end is updated to 01
[ 8.824642] pci 0000:00:00.0: BAR 8: assigned [mem 0xfa000000-0xfa0fffff]
[ 8.824673] pci 0000:01:00.0: BAR 4: assigned [mem 0xfa000000-0xfa003fff 64bit]
[ 8.824736] pci 0000:01:00.0: BAR 2: assigned [mem 0xfa004000-0xfa004fff 64bit]
[ 8.824791] pci 0000:01:00.0: BAR 0: no space for [io size 0x0100]
[ 8.824844] pci 0000:01:00.0: BAR 0: failed to assign [io size 0x0100]
[ 8.824866] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 8.824886] pci 0000:00:00.0: bridge window [mem 0xfa000000-0xfa0fffff]
[ 8.825378] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[ 8.826504] pcieport 0000:00:00.0: PME: Signaling with IRQ 83
[ 8.830315] pcieport 0000:00:00.0: AER: enabled with IRQ 83
arne_f
(Arne.F)
30 January 2022 17:02
54
Are other distributions working on this board?
spikerguy
(Furkan K)
30 January 2022 17:13
55
Yes I have OpnSense image working fine, I will try Manjaro just to make sure linux work. Will use Latest kernel though .
Update:
root@Manjaro-R4S ~]# dmesg | grep pci
[ 0.296914] ehci-pci: EHCI PCI platform driver
[ 0.360493] ohci-pci: OHCI PCI platform driver
[ 0.847487] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[ 0.847518] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[ 0.847534] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[ 0.847898] rockchip-pcie f8000000.pcie: no bus scan delay, default to 0 ms
[ 0.847930] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[ 0.889148] rockchip-pcie f8000000.pcie: wait 0 ms (from device tree) before bus scan
[ 0.889314] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00
[ 0.889324] pci_bus 0000:00: root bus resource [bus 00-1f]
[ 0.889335] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff]
[ 0.889345] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff])
[ 0.889392] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400
[ 0.889503] pci 0000:00:00.0: supports D1
[ 0.889510] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 0.894560] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.894851] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[ 0.894924] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[ 0.894935] pci 0000:01:00.0: reg 0x10: [io size 0x0100]
[ 0.895016] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
[ 0.895071] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[ 0.895127] pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 128 (was 256, max 256)
[ 0.895149] pci 0000:01:00.0: Max Payload Size set to 128 (was 128, max 128)
[ 0.895502] pci 0000:01:00.0: supports D1 D2
[ 0.895511] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.923947] pci_bus 0000:01: busn_res: [bus 01-1f] end is updated to 01
[ 0.924011] pci 0000:00:00.0: BAR 14: assigned [mem 0xfa000000-0xfa0fffff]
[ 0.924038] pci 0000:01:00.0: BAR 4: assigned [mem 0xfa000000-0xfa003fff 64bit]
[ 0.924089] pci 0000:01:00.0: BAR 2: assigned [mem 0xfa004000-0xfa004fff 64bit]
[ 0.924135] pci 0000:01:00.0: BAR 0: no space for [io size 0x0100]
[ 0.924147] pci 0000:01:00.0: BAR 0: failed to assign [io size 0x0100]
[ 0.924161] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.924173] pci 0000:00:00.0: bridge window [mem 0xfa000000-0xfa0fffff]
[ 0.924417] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[ 0.924765] pcieport 0000:00:00.0: PME: Signaling with IRQ 84
[ 0.925573] pcieport 0000:00:00.0: AER: enabled with IRQ 84
[root@Manjaro-R4S ~]#
[root@Manjaro-R4S ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether c2:cb:43:ce:52:88 brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 22:1f:13:af:cc:0e brd ff:ff:ff:ff:ff:ff
[root@Manjaro-R4S ~]# inxi -N
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
Device-2: rk3399-gmac driver: rk_gmac_dwmac
[root@Manjaro-R4S ~]#
I used your uboot with Manjaro-NanoPC-T4 Image for testing ofcourse with r4s dtb
Both Lan works fine on Manjaro
arne_f
(Arne.F)
30 January 2022 17:48
56
core162 use upstream linux-5.15.6 dtb for the r4s and for the nightly i have added some patches for the mac address and the led’s to 5.15.17.
https://git.ipfire.org/?p=people/arne_f/kernel.git;a=shortlog;h=refs/heads/v5.15.y-multi
Have Manjaro added patches for the rockchip, r8169 or the dtb?
spikerguy
(Furkan K)
30 January 2022 17:52
57
No, for R4S it is pure upstream dts as we do not maintain support for R4S.
arne_f
(Arne.F)
31 January 2022 07:10
58
Which kernel version use Manjaro?
roberto
(Roberto Peña)
31 January 2022 08:33
59
Hi.
I have tried again following the steps of @arne_f and it works perfectly. The only thing, on reboots, this error appears:
It is solved by turning off the board and turning it on again. The leds work perfectly for me.
Thank you all for your dedication.
Greetings.
arne_f
(Arne.F)
31 January 2022 08:35
60
This depends on the used SD card. I think i have a patch for this found but not tested yet…
Not in the image from yesteday. If you shutdown the sys led is turned off too early. It should stay solid until the board is ready to turn off. I have fixed this in the latest build.
1 Like