Git Product home page Git Product logo

rpi-kernel's Introduction

rpi-kernel Circle CI

Build a Raspberry Pi 0/1 and 2/3/3+ kernel with all kernel modules running Docker.

Build inputs

Kernel git commit

In the build script scripts/compile_kernel.sh there is a git commit hash to pin the build to this exact commit to make it reproducible.

If you want to build another kernel version, have a look at the upstream repo https://github.com/raspberrypi/linux and check for a good git commit hash and change the line

LINUX_KERNEL_COMMIT="c8baa9702cc99de9614367d0b96de560944e7ccd"

Kernel configs

In the local directory kernel_configs/ are two configuration files for Pi 0/1 and Pi 2/3/3+.

  • rpi1_docker_defconfig
  • rpi2_3_docker_defconfig

These configuration files are created from an initial make menuconfig and activating all kernel modules we need to run docker on the Raspberry Pi.

The differences to the upstream Raspberry Pi kernel is

$ diff kernel_configs/rpi1_docker_defconfig /var/kernel_build/cache/linux-kernel/arch/arm/configs/bcmrpi_defconfig
16d15
< CONFIG_MEMCG_SWAP=y
18,20d16
< CONFIG_CFS_BANDWIDTH=y
< CONFIG_RT_GROUP_SCHED=y
< CONFIG_CGROUP_PIDS=y
25d20
< CONFIG_CGROUP_PERF=y
354,355d348
< CONFIG_NET_L3_MASTER_DEV=y
< CONFIG_CGROUP_NET_PRIO=y
461d453
< CONFIG_IPVLAN=m

Build outputs

Kernel deb packages

The two relevant kernel deb packages are copied to build_results/kernel/${KERNEL_DATETIME}/.

  • kernel-commit.txt
  • raspberrypi-kernel_${KERNEL_VERSION}_armhf.deb
  • raspberrypi-kernel-headers_${KERNEL_VERSION}_armhf.deb

Build with Vagrant

To build the SD card image locally with Vagrant and VirtualBox, enter

vagrant up

Recompile kernel

Only on first boot the kernel will be compiled automatically. If you want to compile again, use these steps:

vagrant up
vagrant ssh
sudo su
/vagrant/scripts/compile_kernel.sh

Update kernel configs

To update the two kernel config files you can use this steps.

vagrant up
vagrant ssh
sudo su
MENUCONFIG=1 /vagrant/scripts/compile_kernel.sh

This will only call the make menuconfig inside the toolchain and copies the updated kernel configs back to kernel_configs/ folder to be committed to the GitHub repo.

Test kernel

To test the new kernel, copy all DEB packages to your Pi and login as root. Then install the following packages:

dpkg -i raspberrypi-kernel_${KERNEL_DATETIME}_armhf.deb

dpkg -i raspberrypi-kernel-headers_${KERNEL_DATETIME}_armhf.deb

Reboot your Pi.

rpi-kernel's People

Contributors

dieterreuter avatar govinda-fichtner avatar mathiasrenner avatar stefanscherer avatar watson81 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.