How to obtain the kernel-rt kernel source code for openEuler 2403 SP3

Currently, the openEuler 2403 SP3 operating system is being booted using u-boot, with the kernel replaced by an RT kernel installed via dnf. However, this RT kernel fails to properly load the root partition when booted by u-boot.

The RT kernel source code cannot be found in the openEuler kernel source repository. Is there any official way to obtain the RT kernel source code or RT patch package?

The RT kernel package files and patches are located in the src-openeuler/kernel repository, not in the standalone RT branch under openeuler/kernel. The 24.03 LTS SP3 corresponds to this branch, and the key components to review are:

  • kernel-rt.spec: Build rules for the RT kernel; the %prep section shows the patch application process.
  • patch-6.6.0-6.0.0-rt20.patch: The RT patch.
  • patch-6.6.0-6.0.0-rt20.patch-openeuler_defconfig.patch: Accompanying kernel configuration adjustments.

Although the patch filenames still use the old rt20 naming convention, the current branch now uses rt47 versioning in the spec file — so do not rely solely on the patch filename to determine the version.

If the original system can still boot, you can check which source package corresponds to the installed RT kernel:

rpm -q kernel-rt --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\nSource RPM: %{SOURCERPM}\n'

Then download the source package from the corresponding release’s source repository. For example, the EPOL repository for SP3 provides:

kernel-rt-6.6.0-132.0.0.rt47.11.oe2403sp3.src.rpm

The SRPM contains the source archive, spec file, and patches. After unpacking, you need to apply the patches according to the spec. If you want to directly view the source code with patches already applied, there is also a kernel-rt-source subpackage for the same version — installing it places the code in /usr/src/linux-…/. Be sure to select the version matching your installed RT kernel; do not replace it with the latest source code from the current branch.

Regarding the issue where U-Boot fails to load the root partition, could you please provide additional details such as the board model, the kernel version obtained above, the actual kernel/initramfs/DTS files loaded, boot parameters, and serial console logs before and after the error? At this stage, we cannot yet determine whether the issue lies with root device or filesystem support, or with mismatched boot files — and it may not require modifying the kernel source code immediately.

Sure, thank you very much.

The reason we need to compile from source is that we are using the Phytium S5000C CPU platform. We’ve already tried loading initramfs, but it failed to load properly and couldn’t correctly parse the initramfs file. Later, by compiling the non-RT kernel source code from openeuler/kernel, we found that without loading initramfs, the NVMe/SATA drivers must be directly compiled into the kernel image for the system to boot normally. Therefore, we hope to find the RT kernel corresponding to the operating system version, manually compile the disk drivers into the kernel image, so that U-Boot can successfully boot the operating system.