NanoPC-T6 Image (Single Partition) Kernel Upgrade

the overlay loading works…

It actually worked nicely after some trial and error. First I compiled it into the kernel, then I left the kernel untouched and just provided the overlay. The results are the same looking at the log.

I can do the same (compile in or overlay) with my own version of the 5.10.160 kernel, the difference is just that it (rkisp, rkcif, mipi) works there, while it does not on the 6.1.43 armbian… it is not the overlay, it is either something I am missing or something broken in the 6 kernel…

Did you test FriendlyELEC’s Linux 6.1 sources? GitHub - friendlyarm/kernel-rockchip: BSP kernel source
They should be mostly the same compared to what Armbian uses, but just to rule it out. If it fails the same way with that one, you could ask at that repository or FriendlyELEC repo.

It is anyway a little too late now to push Linux 6.1 for RK3588 devices, so I’ll postpone that for next DietPi release, giving us time to debug. I’ll however add it to our repository (and the needed component to RK3588 boards), so users can easily switch, if wanted.

just tried and it also fails with the friendlyelec kernel… 6.1.57 even worse… same error messages… it seems that there is an issue with the 6 branch - will try to investigate and check back with friendlyelec folks… but for the time being, 5.10.160 is the one I have to use… btw, I never observed the switch ETH1 and ETH2 on 5.10.160 - only on 6.1.y

overlay_6.1.57_friendlyelec.log (194.5 KB)

1 Like

Interesting. However, since we want to vendor kernel, let’s hardcode the names. Can you print the output of the following:

udevadm info -a /sys/class/net/eth0 | grep KERNELS
udevadm info -a /sys/class/net/eth1 | grep KERNELS

Sure… this is from the 6.1.43 kernel now…

root@DietPi:~# udevadm info -a /sys/class/net/eth0 | grep KERNELS
    KERNELS=="0002:21:00.0"
    KERNELS=="0002:20:00.0"
    KERNELS=="pci0002:20"
    KERNELS=="fe170000.pcie"
    KERNELS=="platform"

root@DietPi:~# udevadm info -a /sys/class/net/eth1 | grep KERNELS
    KERNELS=="0004:41:00.0"
    KERNELS=="0004:40:00.0"
    KERNELS=="pci0004:40"
    KERNELS=="fe190000.pcie"
    KERNELS=="platform"

btw, I just found that someone has the same problem concerning the cameras:

Please try this:

cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-nanopct6.rules
SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0002:21:00.0", NAME="to_eth0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1"
_EOF_

It is a little hacky solution, but works well here with respective “KERNELS” matches on Orange Pi 5 Plus: Orange Pi 5 Plus | Network interface names can swap on reboot · Issue #6592 · MichaIng/DietPi · GitHub

Thx for taking care of this.

I applied the rules but I can’t really verify yet if it solves the problem… I will do a mass deployment on a multitude of NanoPC-T6 in about 2 weeks from now, so I can tell more about it afterwards… will let you know asap…

PS: I went back to my own kernel for now based on friendlyarm kernel 5.10.160, the nanopi5-v5.10.y_opt branch without overlays… camera stuff seems to work there

1 Like

So today I tried deploying the image to a set of NanoPCs but I encountered an entirely different problem - the mac address of the interfaces is ALWAYS the same… then I stumbled upon your previous discussion

I used a newer Armbian build (your image from today) and the mac address is totally random sometimes after rebooting. I will try to use your previous hacky fix you posted, and will try to move on from there…

I’ll give it a try now again, say 15 months later…

@MichaIng can you please tell me from which repo the current kernel on Trixie is built?

it should be this one

vmlinuz-6.1.115-vendor-rk35xx

but I was not able to find the right git repo or tag. Is it from here

or here

or which one? Thx…

It is the Armbian repo you linked, with the default branch. We enabled static MAC addresses for NanoPi R4/R5/R6 variants in the meantime:

If needed, we can do the same for NanoPC T6, but I do not own the board to test it.

Thx, got it to compile…

same story… 6.1.115 still has the same flaws as 6.1.45 and 6.1.99… means camera and rkisp usage is still limited to 5.10.X kernel…

Are the related kernel modules loaded? There should be a rockchip-isp one if I am not mistaken.
EDIT: Ah nope it has a different name. Maybe the Panthor driver causes issues in this context :thinking:.

Should be even in the mainline kernel:

The armbian kernel rk-6.1-rkr5.1 is still broken - that’s it. works nicely with vendor 6.x kernel…

Hmm, that should be moreless the same kernel, both based on Rockchip Linux sources. Though Armbian is using a patched one from Radxa, which might differ in some FriendlyELEC board device trees or config or some patches from FriendlyELEC. We can try to compare these: GitHub - friendlyarm/kernel-rockchip: BSP kernel source