Real-Time Kernel with Orange Pi 4 LTS
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Before installing linuxcnc I need to have a real-time kernel for my orange-pi 4 lts.
I could'nt fine any ready .deb file to install on my board so I've tried to compile one for myself.
But so far I failed over and over again.
I dont know what should I do. Can anyone please help me how can I get through this?
The procedure that I went through:
I've downloaded a 5.10.41 kernel from:
mirrors.edge.kernel.org/pub/linux/kernel/v5.x/
Then I've downloaded the rt patch (5.10.41-rt42) from:
cdn.kernel.org/pub/linux/kernel/projects/rt/5.10/older/
Then I patched it to the kernel, and then used a cross-compiler to compile it:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- xconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 deb-pkg
Then I copied the result created .deb files into my board and then install. but nothing happens and it doesn't switch to new kernel after reboot.
I even manually configure the u-boot settings in order to find and recognize my new kernel files but after doing this the board doesn't boot up at all and just stuck in boot.
what can I do??
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19188
- Thank you received: 6429
uname -a
In a terminal return?
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Linux orangepi4-lts 4.4.179-rk3399 #12 SMP Mon Aug 1 15:20:24 CST 2022 aarch64 GNU/Linux
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19188
- Thank you received: 6429
Run latency-test or latency-histogram , just in case.
Please Log in or Create an account to join the conversation.
Here are the rt config settings that works best for the rk3588:
github.com/orangepi-xunlong/linux-orange...s/rockchip_rt.config
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Yes, I know. I couldnt switch to the rt kernel yet.Nope, not RT, should have RT in the name there.
Run latency-test or latency-histogram , just in case.
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Thnks, I've done all that but didnt work. I chose fully preemptible kernel.Besides patching you should still choose full realtime in the config. After entering "make menuconfig" => General setup => Preemption Model => Fully preemptible kernel
Here are the rt config settings that works best for the rk3588:
github.com/orangepi-xunlong/linux-orange...s/rockchip_rt.config
my problem is after compilation, and after installing the deb file of rt compiled kernel, the kernel doesn't switch to the rt one and still boot with the old kernel. and also I manually changed the boot.cmd file in the boot directory, after doing this the kernel doesnt boot up at all and just stuck in that stage.
by the way, my orange pi 4 lts has rk3399 not rk3588.
Please Log in or Create an account to join the conversation.
I saw that it's a rk3399 indeed, but here it also worked great for a s912 sbc so it might be a good base for yours too.
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Thanks, I've tried to relink the files in boot directory to my new kernel files, still same problem.royka post=314868 userid=31446Check with "ls -l /boot" if all links are correct. With Armbian for example the Image file is a link to the used kernel. To relink you can use "sudo ln -sf your-rt-kernel Image" and also check for the uinitrd link and to use the right dtb for that kernel version.
I saw that it's a rk3399 indeed, but here it also worked great for a s912 sbc so it might be a good base for yours too.
In the source that I compiled from, I noticed that there is no dts and dtsi files and other related files for rk3399 in that source. can it be the problem for not booting after compilation?
if it can be, how can I solve this problem?
is there any other source besides kernel.org?
I tried another thing too, I used another sources like rockchip and orangepi-build. but whenever I wanna patch the real-time patch (got from kernel.org), it fails and says there are conflicts and incompatibility/
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
while a go you've provided a rt kernel for my orange pi 5 plus. can u do the same for this one (orange pi 4 lts) ? i mean a real-time 5.10.43 kernel for rk3399?Check with "ls -l /boot" if all links are correct. With Armbian for example the Image file is a link to the used kernel. To relink you can use "sudo ln -sf your-rt-kernel Image" and also check for the uinitrd link and to use the right dtb for that kernel version.
I saw that it's a rk3399 indeed, but here it also worked great for a s912 sbc so it might be a good base for yours too.
Please Log in or Create an account to join the conversation.