SysProg Posted Monday at 06:40 AM Posted Monday at 06:40 AM (edited) Hello. I'm looking for a PREEMPT_RT patch for your linux-rockchip kernel. I've tried to apply an rt101 patch for 5.10.209 (branch rk-5.10-rkr8), but it has so many differences (especially, scheduler-related)... I've spend a lot of time resolving the conflicts manually but my kernel keeps crashing on start. Please, help me... Edited Monday at 06:42 AM by SysProg branch 0 Quote
Werner Posted Monday at 06:54 AM Posted Monday at 06:54 AM The kernel you are trying to modify is a heavily modified vendor bsp kernel that is some sort of weird mixture of Android and Linux. My suggestion is don't waste your time... You may have better chances with 6.1.y vendor bsp since it is some sort of proper Linux. 0 Quote
SysProg Posted Monday at 07:05 AM Author Posted Monday at 07:05 AM (edited) @Werner thank you for your reply. I haven't seen a 6.1.y kernel from rockchip, only v5.10 and below. May I ask you for a link? Or do you mean v6.1.y of mainline linux kernel? Edited Monday at 07:06 AM by SysProg typo 0 Quote
Werner Posted Monday at 07:53 AM Posted Monday at 07:53 AM Sure thing: https://github.com/armbian/linux-rockchip 0 Quote
Seihan Posted Tuesday at 10:51 AM Posted Tuesday at 10:51 AM (edited) @SysProg I'm also looking for a way to got a PREEMPT_RT kernel for Armbian. I followed the instructions from **indianajones** https://forum.armbian.com/topic/11491-real-time-operating-system/ to include a rt patch and running the `compile.sh` script. The patching and kernel compilation works, but the `compile.sh` script fails because of wrong references of filenames. Steps to reproduce: - Build environment: Docker - Board: lime2 - Kernel Release: jammy (22.04) - Kernel version: 6.6.75 - RT-Patch: patch-6.6.74-rt48.patch.xz https://www.kernel.org/pub/linux/kernel/projects/rt/6.6/older/patch-6.6.74-rt48.patch.xz Packaging linux-image [ sunxi linux-sunxi-current ] [🐳|🔨] [ 14M] /armbian/.tmp/work-faa9b4e0-5171-48e1-a64e-1437de80d285/kernel_dest_install_dir-GxS0c/image/boot [🐳|🔨] ├── [211K] config-6.6.75-rt48-current-sunxi [🐳|🔨] ├── [3.6M] System.map-6.6.75-rt48-current-sunxi [🐳|🔨] └── [ 10M] vmlinuz-6.6.75-rt48-current-sunxi [🐳|🔨] [🐳|🔨] 14M used in 0 directories, 3 files [🐳|🌱] Kernel-built image filetype [ vmlinuz-6.6.75-current-sunxi: cannot open `/armbian/.tmp/work-faa9b4e0-5171-48e1-a64e-1437de80d285/kernel_dest_install_dir-GxS0c/image/boot/vmlinuz-6.6.75-current-sunxi' (No such file or directory) ] [🐳|🔨] ls: cannot access '/armbian/.tmp/work-faa9b4e0-5171-48e1-a64e-1437de80d285/kernel_dest_install_dir-GxS0c/image/boot/vmlinuz-6.6.75-current-sunxi': No such file or directory The related function is `kernel_package_callback_linux_image()` inside `kernel-debs.sh`. I'm still try to find out how to solve this failure. The hook `call_extension_method "pre_package_kernel_image"` is maybe to key, or some extra build commands like *KERNEL_CONFIGURE*. I tried this quick and dirty extension, but no success so far: function pre_package_kernel_image__600_set_kernel_name() { # Determine the correct kernel image file name kernel_image_file=$(ls "${kernel_pre_package_path}/vmlinuz-6.6.75-*" 2>/dev/null) if [ -z "$kernel_image_file" ]; then echo "Error: Kernel image file not found!" >&2 run_host_command_logged ls -la "${kernel_pre_package_path}" exit 1 fi # Set the correct kernel image name kernel_image_pre_package_path="$kernel_image_file" echo "Using kernel image file: $kernel_image_pre_package_path" } Any help will be welcome. Edited Tuesday at 01:07 PM by Seihan 0 Quote
SysProg Posted Tuesday at 11:53 AM Author Posted Tuesday at 11:53 AM (edited) Hi @Werner! I configured the 6.1 kernel (manually added an RT-patch too), but I have problems booting it, it only detects mmcblk0boot* partitions from my card and no rootfs/user partitions. My uboot is a slightly modified old rockchip-uboot of 2017. Does kernel 6.1 require a newer uboot? If so, which one should I take? Nevermind, my bad! I've missed a CONFIG_EFI_PARTITION... @Seihan, sorry, I cannot use 6.6 for some reasons, only 6.1 and below, so I can't be any of help Edited Tuesday at 01:42 PM by SysProg 0 Quote
Seihan Posted Tuesday at 01:41 PM Posted Tuesday at 01:41 PM @SysProg can you please provide instructions how you patched the kernel? As mentoined, I used the armbian build script. The RT patch is the last of 8 patches in my case. I'm trying to solve the issue with an extension hook. I use a second extension to modify the partitions on the image, this may solve your problem. The hooks format_partitions, and prepare_image_size are used for this as described here 0 Quote
SysProg Posted Tuesday at 01:43 PM Author Posted Tuesday at 01:43 PM @Seihan for kernel 6.1 i've just used git am. There were some conflicts, but I manually fixed them in half an hour 0 Quote
Seihan Posted yesterday at 08:39 AM Posted yesterday at 08:39 AM I successfully built an armbian image with PREEMPT_RT kernel, by changing line 52 in armbian/lib/functions/compilation/kernel-debs.sh into: declare kernel_version_family="${kernel_version}-rt48-${BRANCH}-${LINUXFAMILY}" This isn't a valid solution, but it worked for me, for this moment. root@lime2 ~ # uname -a Linux lime2 6.6.75-rt48-current-sunxi #19 SMP Sat Feb 1 17:37:57 UTC 2025 armv7l armv7l armv7l GNU/Linux Limitations: - works only for rt48 - kernel 6.6.75 - patch-6.6.74-rt48.patch.xz It is not possible to pin the build process to specific kernel version tags. The option exists, but it has no effect. Any hints on how to pin the builder to a specific kernel would be helpful to reproduce this build in the future. 0 Quote
going Posted 14 hours ago Posted 14 hours ago 10.03.2025 в 09:40, SysProg сказал: I'm looking for a PREEMPT_RT patch for your linux-rockchip kernel. I've tried to apply an rt101 patch for 5.10.209 (branch rk-5.10-rkr8), but it has so many differences (especially, scheduler-related)... I've spend a lot of time resolving the conflicts manually but my kernel keeps crashing on start. Maybe you can describe the problem/goal that you want to solve using RT Core. First you need to figure out what is required. There are several real-time Cores. And each solves its own problems. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.