Real-Time Kernel with Orange Pi 4 LTS

More
19 Nov 2024 11:48 #314833 by Hossein74Majidi
Real-Time Kernel with Orange Pi 4 LTS was created by Hossein74Majidi
Hi
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
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Nov 2024 11:58 #314837 by tommylight
Replied by tommylight on topic Real-Time Kernel with Orange Pi 4 LTS
What does
uname -a
In a terminal return?
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
19 Nov 2024 12:46 #314838 by Hossein74Majidi
Replied by Hossein74Majidi on topic Real-Time Kernel with Orange Pi 4 LTS
This is what I get now cause now I was trying on 4.4.179 kernel, however his one failed too:
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
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Nov 2024 14:16 #314846 by tommylight
Replied by tommylight on topic Real-Time Kernel with Orange Pi 4 LTS
Nope, not RT, should have RT in the name there.
Run latency-test or latency-histogram , just in case.
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
19 Nov 2024 15:26 #314853 by royka
Replied by royka on topic Real-Time Kernel with Orange Pi 4 LTS
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
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
19 Nov 2024 16:14 #314858 by Hossein74Majidi
Replied by Hossein74Majidi on topic Real-Time Kernel with Orange Pi 4 LTS

Nope, not RT, should have RT in the name there.
Run latency-test or latency-histogram , just in case.
 

Yes, I know. I couldnt switch to the rt kernel yet.

Please Log in or Create an account to join the conversation.

More
19 Nov 2024 16:18 #314859 by Hossein74Majidi
Replied by Hossein74Majidi on topic Real-Time Kernel with Orange Pi 4 LTS

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
 

Thnks, I've done all that but didnt work. I chose fully preemptible kernel.
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.

More
19 Nov 2024 19:23 #314868 by royka
Replied by royka on topic Real-Time Kernel with Orange Pi 4 LTS
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.
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
20 Nov 2024 05:52 #314886 by Hossein74Majidi
Replied by Hossein74Majidi on topic Real-Time Kernel with Orange Pi 4 LTS

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.

 

Thanks, I've tried to relink the files in boot directory to my new kernel files, still same problem.
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.

More
20 Nov 2024 08:47 #314889 by Hossein74Majidi
Replied by Hossein74Majidi on topic Real-Time Kernel with Orange Pi 4 LTS

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.

 

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?

Please Log in or Create an account to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum