Need a help to understand xenomai 4
Hello Dear Support Team,
I hope you are doing well.
I am Akshay, a master thesis student. I got your email from mailmap file of denx(Xenomai 4). I am adding linux-evl to my raspberry pi 4B. I have already inbuild kernel 6.1(64 bit Debian GNU/Linux 11 (bullseye)). I have added 6.10(linux-evl) and lib-evl to run some programs in xenomai 4 realtime. Everything is working fine but the problems are kernel headers, When I add linux-evl image to linux kernel at that time Raspberry pi loses menu, camera does not work, Chromium does not work. Only I can run my programs and could not run other softwares and libraries.
I have written whole process that How I compile my linux-evl on raspberry pi. Could You please suggest me solution Or suggestions what should I do to run this properly? Am I doing something wrong?
Please see the file and please help me if I am making any mistake or doing it in wrong way.
My final linux-evl kernel(uname -r) output looks like this(6.10.06.10.0-00734-g81ec9bb82a9f)
Also, linux-evl does not provide overlays, So Is it problem or do we have to generate it? Because in internet there is nothing for generating overlays for linux-evl.
Thanks and regards,
Akshay
Deutsches Zentrum für Luft- und Raumfahrt e.V.(DLR) German Aerospace Center
Institute of Software Technology | Flight Software | Lilenthalüplatz 7 | 38108 |Braunschweig | Germany
Akshay Vaghasiya | Software Engineer (Master Thesis)
Process How I load the linux evl
Built Kernel Xenomai 4 on Raspberry 4
1. Add packages
- sudo apt install git bc bison flex libssl-dev make libncurses-dev
2. Clone the evl git project for with xenomai 4
- git clone https://source.denx.de/Xenomai/xenomai4/linux-evl
3. Check out the the base version and compile kernel
- cd linux-evl
4.
5. Make de config
- make defconfig
6. Make menu Config
- make menuconfig
7. Select these options and make changes in your raspberry pi
- General setup
o Local version
o Kernel .config support
o Enable access to .config through /proc/config.gz
- Kernel Features
o EVL real-time core
Debug support
o Timer frequency 1000Hz
- CPU Power Management
o CPU Frequency scaling
Default CPUFreq gorvernor
• performance
8. Please set other options according to your needs. After setting up, you can start building
- make -j4 Image modules dtbs
(This can take more than 1.30 hours)
9. Put up the build.
- sudo make modules_install
- sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/
- sudo cp arch/arm64/boot/Image /boot/nameKERNEL.img
10. Modify /boot/config.txt to make sure the system boots into our kernel(if it is already added in default setting).
- #Add this line
- kernel=kernel8.img
11. Reboot the system and the fire uname -r Command, Output will show new kernel version.
- My output looks like this.
- pi@raspberrypi:~ $ uname -r
6.10.06.10.0-00734-g81ec9bb82a9f
12. After rebooting, you can see the following message listed in dmesg
- dmesg | grep EVL
- [ 0.123482] IRQ pipeline: high-priority EVL stage added.
- [ 0.125676] EVL: core started [DEBUG]
(You can see that the EVL core has been successfully opened)
Libevl for process (Just for knowledge)
13. Download libevl
- git clone https://source.denx.de/Xenomai/xenomai4/libevl
14. Compile and install, here you will need to use the header of linux-evl, here please modify the UAPI parameter to the corresponding folder.
- cd libevl
- mkdir /home/pi/libevl-build
- cd /home/pi/libevl-build
(Please set up the path according to your path)
- meson setup -Dbuildtype=release -Dprefix=/usr/local -Duapi=/home/pi/linux-evl /home/pi/libevl
- meson compile
- sudo ninja install
15. Verify the Installation
- ls /usr/local/lib | grep libevl
- ls /usr/local/bin | grep evl
You should see libevl.so in the /usr/local/lib directory and evl utilities in the /usr/local/bin directory
16. Testing the Installation
Just open this path/usr/local/bin
Run these tests to see result
./evl
./latmus
17. Now, lets check the all libraries are installed and works successfully. (https://evlproject.org/core/testing/ refer this link to see the results)
- Just go to the folder where your elv tests are available ($prefix/tests as part of building libevl)
- Cd /libevl/tests
- Sudo evl test
Finish
If you get the error of permission or error of empty lib directory then this could be the solution. Add /usr/local/lib to the Library Path:
- echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libevl.conf
- sudo ldconfig
Check if the library path is correctly set and if the system can now find libevl.so.4.
- ldconfig -p | grep libevl
Set the LD_LIBRARY_PATH Environment Variable:
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
You can add this line to your .bashrc or .bash_profile file to make it persistent across sessions:
- echo "export LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
- source ~/.bashrc
Run the Utilities Again:
- ./evl
- ./latmus
To run other files, we need different meson set up and its files.(without meson build file)
Quoted 38 lines · On 12/09/24 13:53, [email protected] wrote:
Hello Dear Support Team,
I hope you are doing well.
I am Akshay, a master thesis student. I got your email from mailmap file of denx(Xenomai 4). I am adding linux-evl to my raspberry pi 4B. I have already inbuild kernel 6.1(64 bit Debian GNU/Linux 11 (bullseye)). I have added 6.10(linux-evl) and lib-evl to run some programs in xenomai 4 realtime. Everything is working fine but the problems are kernel headers, When I add linux-evl image to linux kernel at that time Raspberry pi loses menu, camera does not work, Chromium does not work. Only I can run my programs and could not run other softwares and libraries.
I have written whole process that How I compile my linux-evl on raspberry pi. Could You please suggest me solution Or suggestions what should I do to run this properly? Am I doing something wrong?
Please see the file and please help me if I am making any mistake or doing it in wrong way.My final linux-evl kernel(uname -r) output looks like this(6.10.06.10.0-00734-g81ec9bb82a9f)
Also, linux-evl does not provide overlays, So Is it problem or do we have to generate it? Because in internet there is nothing for generating overlays for linux-evl.Thanks and regards,
AkshayDeutsches Zentrum für Luft- und Raumfahrt e.V.(DLR) German Aerospace Center
Institute of Software Technology | Flight Software | Lilenthalüplatz 7 | 38108 |Braunschweig | Germany
Akshay Vaghasiya | Software Engineer (Master Thesis)
Process How I load the linux evl
Built Kernel Xenomai 4 on Raspberry 4
1. Add packages
(quoted diff) +0
-1- sudo apt install git bc bison flex libssl-dev make libncurses-dev2. Clone the evl git project for with xenomai 4
(quoted diff) +0
-1- git clone https://source.denx.de/Xenomai/xenomai4/linux-evl3. Check out the the base version and compile kernel
(quoted diff) +0
-1- cd linux-evl4.
5. Make de config
Review
Quoted 1 line
(quoted diff) +0
-1- make defconfig
Hi,
you should use the kernel configuration shipped with Debian kernel to have all the Debian functionalities in.
Copy it (it should be in/boot) in the sources folder and rename it as .config, then proceed with the menuconfig step enabling all the Xenomai related stuff.
Regards
Signature · 1 line
Mauro S.
Quoted 85 lines
6. Make menu Config
(quoted diff) +0
-2- make menuconfig > 7. Select these options and make changes in your raspberry pi - General setupo Local version
o Kernel .config support
o Enable access to .config through/proc/config.gz(quoted diff) +0
-1- Kernel Featureso EVL real-time core
Debug support
o Timer frequency 1000Hz(quoted diff) +0
-1- CPU Power Managemento CPU Frequency scaling
Default CPUFreq gorvernor
• performance8. Please set other options according to your needs. After setting up, you can start building
(quoted diff) +0
-1- make -j4 Image modules dtbs(This can take more than 1.30 hours)
9. Put up the build.(quoted diff) +0
-3- sudo make modules_install - sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/ - sudo cp arch/arm64/boot/Image /boot/nameKERNEL.img10. Modify
/boot/config.txtto make sure the system boots into our kernel(if it is already added in default setting).(quoted diff) +0
-2- #Add this line - kernel=kernel8.img11. Reboot the system and the fire uname -r Command, Output will show new kernel version.
(quoted diff) +0
-2- My output looks like this. - pi@raspberrypi:~ $ uname -r6.10.06.10.0-00734-g81ec9bb82a9f
12. After rebooting, you can see the following message listed in dmesg(quoted diff) +0
-3- dmesg | grep EVL - [ 0.123482] IRQ pipeline: high-priority EVL stage added. - [ 0.125676] EVL: core started [DEBUG](You can see that the EVL core has been successfully opened)
Libevl for process (Just for knowledge)
13. Download libevl(quoted diff) +0
-1- git clone https://source.denx.de/Xenomai/xenomai4/libevl14. Compile and install, here you will need to use the header of linux-evl, here please modify the UAPI parameter to the corresponding folder.
- cd libevl
- mkdir/home/pi/libevl-build
- cd/home/pi/libevl-build
(Please set up the path according to your path)(quoted diff) +0
-3- meson setup -Dbuildtype=release -Dprefix=/usr/local -Duapi=/home/pi/linux-evl /home/pi/libevl - meson compile - sudo ninja install15. Verify the Installation
(quoted diff) +0
-2- ls /usr/local/lib | grep libevl - ls /usr/local/bin | grep evlYou should see libevl.so in the
/usr/local/libdirectory and evl utilities in the/usr/local/bindirectory16. Testing the Installation
Just open this path/usr/local/bin
Run these tests to see result
./evl
./latmus17. Now, lets check the all libraries are installed and works successfully. (https://evlproject.org/core/testing/ refer this link to see the results)
(quoted diff) +0
-3- Just go to the folder where your elv tests are available ($prefix/tests as part of building libevl) - Cd /libevl/tests - Sudo evl testFinish
If you get the error of permission or error of empty lib directory then this could be the solution. Add/usr/local/libto the Library Path:(quoted diff) +0
-2- echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libevl.conf - sudo ldconfigCheck if the library path is correctly set and if the system can now find libevl.so.4.
(quoted diff) +0
-1- ldconfig -p | grep libevlSet the
LD_LIBRARY_PATHEnvironment Variable:(quoted diff) +0
-1- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATHYou can add this line to your .bashrc or .bash_profile file to make it persistent across sessions:
(quoted diff) +0
-2- echo "export LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc - source ~/.bashrcRun the Utilities Again:
(quoted diff) +0
-2- ./evl - ./latmusTo run other files, we need different meson set up and its files.(without meson build file)