Giter Club home page Giter Club logo

rpi3-xenomai's Introduction

Xenomai 3.0.7 on Raspberry Pi 3

This short guide explains how to put Xenomai 3 Cobalt on the Raspberry Pi 3.

System setup

  • Download Raspian from https://www.raspberrypi.org/downloads/raspbian/

  • Use lsblk to discover the flash device. Then, flash the image through:

     dd bs=4M if=2018-04-18-raspbian-stretch.img of=/dev/sdX conv=fsync
    
  • Credentials: pi/raspberry

  • Run rpi-update

  • Run raspi-config for enabling SSH and serial console (in "Interfacing Options")

Kernel build

To configure the kernel (optional) type:

    export CROSS_COMPILE=arm-linux-gnueabihf- (or your specific toolchain)

    make configure

To cross-compile the kernel follow the next steps:

    export CROSS_COMPILE=arm-linux-gnueabihf- (or your specific toolchain)

    make kernel

The cross-compiler binaries must be in the current PATH.

Note that the initial default kernel configuration is available in the kernel/kernel-config file.

Kernel installation

  • Copy the following files to the target:

    • kernel/linux-4.14.36/build/linux/arch/arm/boot/dts/bcm2837-rpi-3-b.dtb -> /boot/
    • kernel/linux-4.14.36/build/linux/arch/arm/boot/zImage -> /boot/kernel-xenomai.img
    • kernel/linux-4.14.36/build/linux/MODULES/ -> /lib/modules
  • Append to /boot/config.txt:

      device_tree=bcm2837-rpi-3-b.dtb
      kernel=kernel-xenomai.img
    
  • Append to /boot/cmdline.txt:

      cma=256M@512M
    

Drivers build

To cross-compile the exemplary drivers follow the next steps:

    export CROSS_COMPILE=arm-linux-gnueabihf- (or your specific toolchain)

    make drivers

User-space tools

To natively compile the Xenomai user-space tools on the Rpi3 target, type:

   make tools

   sudo make tools_install

To run the default benchmark, type

   sudo /usr/xenomai/bin/xeno-test

References

rpi3-xenomai's People

Contributors

claudioscordino 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

Watchers

 avatar  avatar  avatar

rpi3-xenomai's Issues

step User-space tools

in the step User-space tools, the folder most be xenomai-3.0.6

The Xenomai user-space tools can be natively built as follows:

cd xenomai-3.0.6

./configure --enable-smp -with-core=cobalt

make -j4

sudo make install

Kernel panic - not syncing: Attempted to kill init!

I'd follow your steps and on boot raspberry I got Kernel panic. I follow everything on the steps but in the copy parts I did this:

cp build/linux/arch/arm/boot/dts/bcm2837-rpi-3-b-cobalt.dtb /boot/
cp build/linux/arch/arm/boot/zImage/boot/kernel-xenomai.img
cp -r build/linux/MODULES/lib/modules/4.9.51-ipipe /lib/modules ---is this right?

Is the last copy right?

To recover Raspberry to boot I remove the new lines from config.txt

Xenomai "next" branch

Some problems that I found through the steps

the command make configure just worked after this command
xenomai-3.0.6/scripts/prepare-kernel.sh --arch=arm --ipipe=ipipe-core-4.9.51-arm-4.patch --linux=kernel/linux-4.9.51

Without this error was show:
make -C /home/pi/rpi3-xenomai/kernel/linux-4.9.51 ARCH=arm O=build/linux multi_v7_defconfig make[1]: Entering directory '/home/pi/rpi3-xenomai/kernel/linux-4.9.51' make[2]: Entering directory '/home/pi/rpi3-xenomai/kernel/linux-4.9.51/build/linux' GEN ./Makefile init/Kconfig:2162: can't open file "arch/arm/xenomai/Kconfig" /home/pi/rpi3-xenomai/kernel/linux-4.9.51/scripts/kconfig/Makefile:112: recipe for target 'multi_v7_defconfig' failed make[3]: *** [multi_v7_defconfig] Error 1 /home/pi/rpi3-xenomai/kernel/linux-4.9.51/Makefile:546: recipe for target 'multi_v7_defconfig' failed make[2]: *** [multi_v7_defconfig] Error 2 make[2]: Leaving directory '/home/pi/rpi3-xenomai/kernel/linux-4.9.51/build/linux' Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/home/pi/rpi3-xenomai/kernel/linux-4.9.51' Makefile:8: recipe for target '/home/pi/rpi3-xenomai/kernel/linux-4.9.51/build/linux/.config' failed make: *** [/home/pi/rpi3-xenomai/kernel/linux-4.9.51/build/linux/.config] Error 2

error "strncpy" when make tools

error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
strncpy(ifr.ifr_name, txdev, IFNAMSIZ);

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.