Real-Time Kernel with Orange Pi 4 LTS

More
1 year 10 months ago #315821 by royka
You can try this image, with desktop and gpu hw acceleration but under 1GB:
drive.google.com/file/d/1PCetphqJUFfS3aL...eD7/view?usp=sharing

Please Log in to join the conversation.

More
1 year 10 months ago #315857 by Hossein74Majidi

As far as I know it shouldn't matter if you install it during compilation, otherwise it would be fixed with "apt reinstall linuxcnc-uspace".
What do you see with: uname -a ?
What do you see in the terminal when you start with: latency-histogram ?
 
The output of uname -a:
root@orangepi4-lts:~# uname -a
Linux orangepi4-lts 6.12.1-edge-rockchip64 #2 SMP PREEMPT_RT Fri Nov 22 18:00:26 +0330 2024 aarch64 GNU/Linux

and when running latency-histogram I get:
Note: Using POSIX Realtime

and just this, seems like waiting for something and nothing shows up any more

Please Log in to join the conversation.

More
1 year 10 months ago #315864 by royka
Perhaps something wrong with the kernel config? You could try to install the kernel deb that I uploaded to see if that helps. Otherwise you might need to install more software, just install a complete desktop will be the fastest route to find out.

Please Log in to join the conversation.

More
1 year 10 months ago #315867 by Hossein74Majidi

Perhaps something wrong with the kernel config? You could try to install the kernel deb that I uploaded to see if that helps. Otherwise you might need to install more software, just install a complete desktop will be the fastest route to find out.
 
I compiled a desktop one and I've installed the deb kernel real time, and that fixed it. I didnt change much in config file, the only change was enabling fully preemption and I added the patch you provided and set the gpu governor to performance.

Please Log in to join the conversation.

More
1 year 10 months ago #315914 by PatJac

You can try this image, with desktop and gpu hw acceleration but under 1GB:
drive.google.com/file/d/1PCetphqJUFfS3aL...eD7/view?usp=sharing
It's laughable...did not worked tweaking & reweaking to modified it for opi4 ...
your image simply worked as is ...lesson learned here..
i dont understand , if armbian image for opi4 lts work on opi4 why the hell armbian link to non lts ?!?
You tell me , because everything seem to be good .
Trying some isolcpu 1,2 , no latency miracle ,should be ok , cutting air .
Let'see if i can install 2.9.3 now.

Good job Roya ..

Please Log in to join the conversation.

More
1 year 10 months ago #315915 by royka
No idea, also didn't see an option to compile for non lts, sometimes things are easier than they seem
Better to set isolcpus=5 or 2-5 because linuxcnc always takes the last core and the quad core a53 is after the 2xa72

Ideally you would set isolcpus=1 but then you need to set the rt tasks to core 1 manually, via a script or change the source of linuxcnc.

Please Log in to join the conversation.

More
1 year 10 months ago #315942 by PatJac
Everytimes things seem easier , for you , coders , compiling included , tried once compiling linuxcnc , 12 years ago,gave up ,
as i always found some up-to-date debs and managed with missing dependencies .
No non lts option ? hmm , i guess where armbian step aside ''standard support'' is the broken pcie of first opi4.
I did not test the whole compatibilities yet , ethernet is one and could i end up with problem ,does log error for the missing NPU (weird it's on b ?! ).
May i suggest , dont do upgrade , or know what you choose to with your rt image ,as i did broke repo & reinstall,quick fix .
Tar.xz does wonders , 4.7gb to 1 ,amazing .
isol 2-5 , i'll check , tested a lots of combinations , lazy me , did not note them ...
Armbian-config use to have cpu settings options ? it's gone?

Please Log in to join the conversation.

More
1 year 10 months ago #315948 by royka
Did you change the the dtb in /boot/armbianEnv.txt
fdtfile=rockchip/rk3399-orangepi-4-lts.dtb
-> fdtfile=rockchip/rk3399-orangepi-4.dtb
+ extraargs=isolcpus=5 or 2-5

And what result do you get?

To prevent the rt kernel from getting overwritten you could hold the package with: sudo apt-mark hold packagename

Please Log in to join the conversation.

More
1 year 10 months ago #316099 by PatJac

And what result do you get?
Did all those,yes ,first change i made ,fdtfile=rockchip/rk3399-orangepi-4.dtb, simply would not make it to login prompt ,i test again ,it hang led blink ,there is usb power but frozen kernel.
lts is fine ,no change needed .
I never tried another armbian opi4lts image on this 4 ,your's only.
Results are not good , is it the gpu acceleration or rt or both ,i get random results ,lags,oops & hangs sometimes at boot & shutdown with isolcpu ,
system is snappy without cpu isolation ,did tested a lot , probably too many isolcpu combinations ,had fun installing all the lightest i could,one is jwm ,minimal desktop.
Logs i saw show knowed es8316 sound error at boot ,and memory allocation or cache management at shutdown (when oops&hangs) .
isolcpu=4,5 seems the best (or a little more stable) ,with wifi/ethernet(7i92 )/3 x glxgears ,
histogram state base/servo 48/37uSec stable, open firefox ,it spike to 120/130 .
Never detailed , it's an opi4 4gb 16gb emmc v1.4 ,
tested here from emmc install .Well powered(branded 4Amp ps) with heatsink&fan .

@roya , if you work on this image or optimize another one 6.12 , i'll be glad to test some more , and i guess there should be some fixes in 6.12 , or regressions...
Thanks for sharing your work .

Please Log in to join the conversation.

More
1 year 10 months ago #316174 by Hossein74Majidi

Perhaps something wrong with the kernel config? You could try to install the kernel deb that I uploaded to see if that helps. Otherwise you might need to install more software, just install a complete desktop will be the fastest route to find out.
 
from then I tried so much and still couldn't compiled a real-time image which linuxcnc be installed and its latency shows up.
Could you please guide me after placing patch (patch-6.6.63-rt43) in the /patch/kernel/archive/rockchip64-6.6 and configuring fully preemption option, what changes do I need to do?
 

Please Log in to join the conversation.

Time to create page: 0.896 seconds
Powered by Kunena Forum