the as21 phy driver have set phydev->phy-id for all phys and assigned 0 to the mt7988 internal 1G phy, so phy driver was not probed and so did not initialize the led
i applied an earlier fix from 6.19 which got “reverted” by the 1.9.1 driver version and was not backported to 6.18 yet…phy led on mgmt interface now working for me.
in 6.19 i applied a patch from @rmandrad which gives more detail than my “quick fix” (which i have reverted to keep in tree - will be removed in 6.20-rc)
@Michal_Zygmunt you do not need rebuild/reflash image, just pull 6.18 kernel-tree, rebuild kernel only and use install option of build.sh for sdcard or wait till my pipeline has finished and then install the kernel (itb should be enough as as21 phy driver is builtin and kernel version has not changed).
you can also install like this:
maybe just adjust your mountpoints
kernelfile=<filename>
sudo tar -xzf $kernelfile --strip-components=1 -C /media/$USER/BPI-BOOT BPI-BOOT
sudo tar -xzf $kernelfile --strip-components=2 -C /media/$USER/BPI-ROOT/lib/. BPI-ROOT/lib/
(commands copied from buildimg.sh with changed mountpoints where card is mounted by default in ubuntu)
also - side question - can you enable KEXEC by default in your build?
I am planning to use the following setup:
/boot on eMMC that has custom initramfw + custom boot.cfg
that initramfs has custom /init script with options of different kernels, different partitions etc
that /init in initramfs loads the kernel from specific partition and use kexec to move execution to this kernel
I am planning to use two-kernel boot approach to have my boot loaded doing some more advanced stuff (ex. checking from network which kernel to boot, and then booting either full ubuntu or openwrt etc).
That’s why kexec would be beneficial to have in the ubuntu kernel that is being used with uboot.
You can just build with board=bpi-r4 in build.conf
The bpi-r4pro there is only an alias to set names for e.g. upload function,open dts source and such.seems there is a bug. Basicly the r4 defconfig is used for all R4 boards with all dts(o). Uboot chooses right config based on isr4pro var and i have only 8x support.
You want to boot openwrt from running ubuntu? Or how can i imagine this? You can check this in uboot and either boot openwrt initramfs/recovery or ubuntu.
I have tried kexec on the R3 before, it has never been done before and the drivers and/or hardware was not compatible. It did not work, they are not designed with kexec in mind, I think. At least two years ago…
Thanks! Will try the r4 for the compilation variant.
I just tried kexec on 6.18-main (with modifications).
It works for me. Can send you updated config.
I see two kernels booting one after another.
The only thing that I’m still ‘fixing’ is the kernel modules.
This is just packaging problem.
So I’m very close to make it fully work.
TL;DR; i want to install your kernel in nand or eMMC. In a way that is ‘untouchable’ later (never need to worry about it) with custom initrd that has script that parses custom boot.config.
So in a way have high-end bootloader that have access to networking drivers, nvma, custom startup scripts etc.
And then based on boot.config it can load any kernel from any location via kexec.
So I can then install Openwrt, different versions on different partitions, Ubuntu etc and can also update everything locally inside nvme and don’t need to worry if repackaging kernel back to eMMC.
So Ubuntu feels like full installed Ubuntu.
I’m also enabling wireguard on second kernel etc.
So far got everything working, including two kernels booting one after another. Just dealing with kernel modules packaging. But it’s mostly because the compilation of RPI Linux I’m doing in docker containers and first was getting this bin placing ‘cp’ issues (as I noticed config has pro variant so was trying to use it), and now have similar problems with modules packaging.
But I would say 99% is solved:-)
Though not options are required, however I believe the ARM64_VA_BITS=48 is what before I had problems with. Once I set it to 48 the kexec started working for me.
Good news it works. I tried about 2 years ago, if I remember correctly it was the PCIe driver that did not function anymore. Or perhaps even it was the PCIe device that was failing. Good news now it is working.
yeah… the PCIe driver is not starting up after kexec.
This is what I thought is module issue, but it seems kexec that is exiting kernel is putting the PCIe in some strange mode where it cannot reinitialize it.
So the PCIe - you were able to make it work after kexec? What exactly did you do?
As this is last remaining piece that I am struggling with.
to be honest, thinking now about disabling PCIe via some dtb overlay, so first kernel boots, but then using full dtb in second kernel.
That would do the work, however first kernel would not be able to use the PCIe (and nvme).
So this is not a go for me.
The only option I can think of now is possibly try to play with driver code itself and create some patch there.
but U-Boot @frank-w , @ericwoud , from what I noticed also does not support enumerating nvmes to boot directly from there, as the pcie scan and nvme scan does not return anything when going inside the u-boot console…
as with r4-pro and nvme that you can put there (ex. 1TB), it just “begs” to have the kernel boot directly from nvme via u-boot, and even to have more then 1 kernel there, so you can switch between ubuntu, openwrt, and even have nice way to upgrade ubuntu kernel without touching the main u-boot loaded in NAND/eMMC, by having kernel actually not part of itb, but being part of actual /boot partition of nvme drive.
this is a r4pro specific issue…it works for me when chainloading u-boot.bin, but packed same binary into bl3 and flashed it does not work…i guess something is blocking the gpio-hog or it is applied too late. did same changes in openwrt and there it works in uboot…really strange
got it…CONFIG_GPIO_HOG was missing, strange that it was working on chainloading
BPI-R4P> version
U-Boot 2026.01-bpi-00051-g89fed6af1cd4-dirty (Feb 17 2026 - 07:36:49 +0100)
aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
GNU ld (GNU Binutils for Ubuntu) 2.42
BPI-R4P> pcie enum
Unknown command 'pcie' - try 'help'
BPI-R4P> pci enum
BPI-R4P> pci scan
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.00.00 0x14c3 0x7988 Bridge device 0x04
01.00.00 0x1e4b 0x1202 Mass storage controller 0x08
BPI-R4P> nvme scan
BPI-R4P> nvme info
Device 0: Vendor: 0x1e4b Rev: GTdecda1 Prod: 1OXUW7Y39WJPT7YGL4QE
Type: Hard Disk
Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
BPI-R4P>
and only cn14 works on R4Po as the other key-m slot requires xsphy driver
I did experiment with arm-trusted-firmware some more, and that did work, but it is really hacking into arm-trusted-firmware. I already have a version that can boot a linux kernel directly, but then I hacked it into using a preloaded linux found in memory.
Anyway, that was experimental, it is not in my final atf version anymore. I saved it here:
So bpir-kexec.sh can be run from initrd (it runs from busybox), loading kernel and initrd and dtb into the reserved memory. Then you need to reboot, and arm-trusted-firmware will find them (checking with crc, which will be cleared after usage), then atf will boot this kernel.
Do you still need such komplex structure, now that nvme is detected in ubuntu uboot? Just boot from sdcard,create partitions/filesystem and copy all from sdcard and configure uboot to use the rootfs from nvme
I have already prepared most things in uboot builtin environment,so maybe you just need to update some vars there (uenv.txt in sdcard-boot partition).