Giter Club home page Giter Club logo

rpi4-xeno3's Introduction

rpi4-xeno3

Full guide can be found at http://www.simplerobot.net/2019/12/xenomai-3-for-raspberry-pi-4.html

scripts, guide, pre-built kernel with xenomai 3 for raspberry pi 4

scripts


prebuilt kernel and xenomai for rpi4

built 4.19.y ipipe patched kernel + prebuilt xenomai user-space libraries and tool. Pull down and deploy

Download prebuilt kernel

Download and transfer all files in this directory to rpi4:

 git clone https://github.com/thanhtam-h/rpi4-xeno3.git
 cd rpi4-xeno3/prebuilt

Automatically deploy

Run these commands and deploy automatically, your rasperry pi will be updated and rebooted

 chmod +x deploy.sh
 ./deploy.sh

Post processing

  1. We need to fix Linux header before we can use it to build module native on rpi in future:
     cd /usr/src/linux-headers-4.19.86-v7l-ipipe
     sudo make -i modules_prepare
    

In this step, you may see many errors or even strange printing, just ignore them, your kernel header will work fine.

  1. Disable DWC features which may cause problem for ipipe kernel, add to the end of /boot/cmdline.txt (on a SINGLE line)
    dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0 
    
  2. CPU affinity, adding to the end of /boot/cmdline.txt file (on a SINGLE line)
    isolcpus=0,1 xenomai.supported_cpus=0x3
    

So finally your cmdline.txt file looks like this:

...rootwait splash plymouth.ignore-serial-consoles dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0 isolcpus=0,1 xenomai.supported_cpus=0x3
  1. There is a big issue found on 4G RAM version raspberry pi 4, although LPAE (Large Physical Address Extensions) allows Linux 32 bit can access fully 4G memory, the pcie DMA controller can only access up to 3G RAM. This usually causes problem for USB hub (connected via pcie) especially when user set large GPU memory (GPU always use low memory portion). This become serious on ipipe kernel. Workaround for this issue is to limit usable memory to 3G, add follow line to around beginning of /boot/config.txt file:
    total_mem=3072
    
  • OpenGL driver won't work with Xenomai on raspberry pi, in order to get HDMI display we should disable OpenGL driver, comment out line "dtoverlay=vc4-fkms-v3d" in config.txt file

Finally, reboot raspberry pi.

rpi4-xeno3's People

Contributors

thanhtam-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rpi4-xeno3's Issues

Patch Issue

Hello,
Do you have idea about the ipipe-arm patch with rpi linux as I see the linux version is 6.1.y and ipipe-arm patch does not have latest patch.

pre-built kernel with xenomai CONFIG_HZ_1000 is not set.

hi,
thank you very much for the pre-built kernel, now i can run with xenomai3 in rpi4b.
(disabled the opengl driver with "#dtoverlay=vc4-fkms-v3d" make the hdmi to work.)
when i checked the .config, i found that the .config did not set the timer frequency to 1000Hz.

CONFIG_HZ_100=y
# CONFIG_HZ_1000 is not set

i'm wondering if this is the expected setting.
thanks again.

System halted?

Hi, @thanhtam-h
I try to use this prebuilt kernel but the system will halt after reboot. Could you have a check at your rpi4?
Thanks in advance!

Reboot failure

I run deply.sh on raspberry pi 4B, but my raspberry pi cannot reboot.

the HDMI display cannot work

Hi bro,
There is a situation that after following your REDEME's step,the pi4B ,using the 4.19.86-v7l-ipipe kernel, reboot system, the HDMI display does's work after the raspberry Startup Animation,but i just can use the ssh to login the pi4B,there still is can not use "sudo startx" to let HDMI display work. I need your help!

Thanks a lot!

Best regards

After following Your step, i got Boot black screen

hi bro,
i used pi4,and i just do the "prebuilt" thing, then i reboot the system, and final i got a Boot black screen issue. i just wanna to know how can i fix it, and i can't locate issues, i need your help!
Thanks a lot!

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.