Giter VIP home page Giter VIP logo

rowhit / linux-rt-rpi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emlid/linux-rt-rpi

0.0 2.0 0.0 1.81 GB

Real-time preemptible kernel for Raspberry Pi

Home Page: http://www.emlid.com

License: Other

Makefile 0.28% C 96.64% Assembly 2.02% C++ 0.57% Objective-C 0.29% Shell 0.03% Perl 0.10% Clojure 0.01% Awk 0.01% SourcePawn 0.01% Python 0.03% Yacc 0.02% Lex 0.01% UnrealScript 0.01% Scilab 0.01%

linux-rt-rpi's Introduction

Real-time kernel for Raspberry Pi

This repository holds a fork of Raspberry Pi Linux kernel patched with rt-patch and configured as a fully preemtible kernel. Instructions on compiling, setting up and testing the kernel are provided below.

Cross-compiling the rt kernel on Linux

Download Raspberry Pi tools:

git clone https://github.com/raspberrypi/tools.git

Download kernel sources and switch to rt branch:

git clone -b rpi-3.18.9-rt5 https://github.com/emlid/linux-rt-rpi.git
cd linux-rt-rpi

Export the following variables to specify cross-compilation options:

export ARCH=arm 
export CROSS_COMPILE=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-

If you compile on a x64-machine you need to change the last export to

export CROSS_COMPILE=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-

For Raspberry Pi:

make bcmrpi_rt_defconfig

For Raspberry Pi 2:

make bcm2709_rt_defconfig

Optional: make changes to the config

make menuconfig

Compile the kernel:

make -j5

Install modules, will result in "lib" folder with modules and firmware:

mkdir kernel-rt
INSTALL_MOD_PATH=kernel-rt make modules_install

Setting up an SD card with the compiled rt kernel

Copy kernel:

For Raspberry Pi:

Copy arch/arm/boot/Image to /boot/kernel.img on SD card.
Copy arch/arm/boot/dts/bcm2708-rpi-b.dtb to /boot/bcm2708-rpi-b.dtb on SD card
Copy arch/arm/boot/dts/bcm2708-rpi-b-plus.dtb to /boot/bcm2708-rpi-b-plus.dtb on SD card
Copy (merge if necessary) kernel-rt/lib to / on SD card.

For Raspberry Pi 2:

Copy arch/arm/boot/Image to /boot/kernel7.img on SD card.
Copy arch/arm/boot/dts/bcm2709-rpi-2-b.dtb to /boot/bcm2709-rpi-2-b.dtb on SD card
Copy (merge if necessary) kernel-rt/lib to / on SD card.

Now you can insert an SD card into your Raspberry Pi and check if it boots. If something is wrong it is recommended to observe serial console.

Testing real-time capabilites using cyclictest utility

Installing cyclictest utility on Raspberry Pi:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git 
cd rt-tests
make all
cp ./cyclictest /usr/bin/
cd ~

Testing real-time:

sudo cyclictest -l1000000 -m -n -a0 -t1 -p99 -i400 -h400 -q

linux-rt-rpi's People

Contributors

acmel avatar adrianbunk avatar arndb avatar axellin avatar bigguiness avatar broonie avatar bzolnier avatar danvet avatar davem330 avatar dhowells avatar ebiederm avatar gregkh avatar heicarst avatar htejun avatar hverkuil avatar ickle avatar jmberg avatar jmberg-intel avatar joeperches avatar kaber avatar larsclausen avatar linvjw avatar neilbrown avatar olofj avatar ozbenh avatar pmundt avatar ralfbaechle avatar rddunlap avatar tiwai avatar torvalds avatar

Watchers

 avatar  avatar

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.