Code Monkey home page Code Monkey logo

kernelbakery's Introduction

We have moved to GitLab! Read this for more information.

We have recently moved our repositories to GitLab. You can find kernelbakery here: https://gitlab.com/revolutionpi/kernelbakery
All repositories on GitHub will stay up-to-date by being synchronised from GitLab.

We still maintain a presence on GitHub but our work happens over at GitLab. If you want to contribute to any of our projects we would prefer this contribution to happen on GitLab, but we also still accept contributions on GitHub if you prefer that.

Revolution Pi Kernelbakery

This is a fork of the repository used by the Foundation to build kernel and firmware packages for the Raspberry Pi: https://github.com/RPi-Distro/firmware

We use it to build kernels for the Revolution Pi and are providing it here as a service to our users to allow building custom kernels. The resulting deb packages serve as drop-in replacements for the Foundation's packages. Installation with deb packages is cleaner than just copying the kernel and modules to the bare filesystem.

Unfortunately the Foundation's repo is huge (currently 5 GByte) as it includes all their kernels and modules in binary form dating back to 2012. That's why this repo was stripped of the git history as well as files which can be rebuilt from the kernel source tree.

Intended usage

This procedure was tested successfully on Debian buster amd64, but YMMV. Building the kernel with update.sh is idempotent. If it fails, e.g. due to compiler errors in piControl, just start it afresh. You are also welcome to ask your questions in our community forum: https://revolutionpi.de/forum/

Note that since bullseye armv6 is no longer officially supported and is thus disabled by default.

Install build tools

apt-get install device-tree-compiler
apt-get install build-essential:native debhelper quilt bc
apt-get install bison flex libssl-dev rsync git

In addition a cross-compiler needs to be installed. The package depends on the desired target architecture of the kernel:

Packages for 32-bit kernel builds (v6 / v7 / v7l):

apt-get install gcc-arm-linux-gnueabihf

Packages for 64-bit kernel builds (v8):

apt-get install gcc-aarch64-linux-gnu

Get source code

NOTE: The repositories are cloned with truncated history, in order to make fetching faster. If you need the full history, remove --depth 1 from the git commands.

git clone --depth 1 -b revpi-6.1 https://github.com/RevolutionPi/linux
git clone --depth 1 -b master https://github.com/RevolutionPi/piControl
git clone --depth 1 -b master https://github.com/RevolutionPi/kernelbakery

Build kernel and packages

The 32-bit kernel runs on all Revolution Pi devices and is shipped with our official images. As an alternative a 64-bit kernel can be built, which also runs on all Revolution Pi devices with the exception of the first Core devices (based on first generation of Raspberry Pi Compute Module).

Build 32-bit kernel (v6 / v7 / v7l)

cd kernelbakery
LINUXDIR=$PWD/../linux PIKERNELMODDIR=$PWD/../piControl/src debian/update.sh
dpkg-buildpackage -a armhf -b -us -uc

NOTE: The source layout of the piControl repository changed after raspberrypi-kernel_1%9.20240205+1-6.1.46-1-revpi11+1 and the sources files have been moved to the src/ folder. Make sure to use the correct PIKERNELMODDIR!

To build the kernel for armv6, add -a armv6.

Build 64-bit kernel (v8)

cd kernelbakery
ARCH=arm64 LINUXDIR=$PWD/../linux PIKERNELMODDIR=$PWD/../piControl/src debian/update.sh
dpkg-buildpackage -a arm64 -b -us -uc

NOTE: The source layout of the piControl repository changed after raspberrypi-kernel_1%9.20240205+1-6.1.46-1-revpi11+1 and the sources files have been moved to the src/ folder. Make sure to use the correct PIKERNELMODDIR!

kernelbakery's People

Contributors

ferdrich-kunbus avatar iluminat23 avatar l1k avatar linosanfilippo-kunbus avatar mduckeck avatar naruxde avatar nbuchwitz avatar tboehler1 avatar xeduardx avatar zhan-kunbus avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.