Builds .deb packages for multiple kernel sources to be used on the Citronics Lime (Fairphone 2) board.
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev bc fakeroot git libelf-dev debhelper kmod libdw-dev
For cross-compilation from x86/amd64:
sudo dpkg --add-architecture armhf
sudo apt-get install gcc-arm-linux-gnueabihf libssl-dev:armhf
On Ubuntu, archive.ubuntu.com doesn't carry armhf packages. You need to add ports.ubuntu.com as a source for armhf and restrict the main sources to amd64. See Ubuntu MultiArch for details.
Kernel sources are defined in kernels.conf. Each line specifies a kernel name, repository URL, and branch:
msm8974-6.12.y https://github.com/msm8974-mainline/linux qcom-msm8974-6.12.y
msm8x74-6.15.y https://github.com/mlainez/linux-msm8x74 staging
Each entry must have a matching config file in configs/<name>.config.
Tag the commit and run the build script:
git tag v2.0
./build-all-kernels.sh
This clones/fetches each kernel source into sources/, builds with the matching config, and produces linux-image and linux-headers .deb packages in output/<name>/. Debug and linux-libc-dev packages are automatically excluded.
To build a single kernel only:
./build-all-kernels.sh msm8x74-6.15.y
- Add a line to
kernels.confwith the name, repo URL, and branch - Create a matching config file in
configs/<name>.config - Run
./build-all-kernels.sh <name>to test the build
To build and publish a release to GitHub in one step:
git tag v2.0
git push origin v2.0
./release.sh
To build and release only a specific kernel:
./release.sh msm8x74-6.15.y
release.sh calls build-all-kernels.sh, then uploads the image and headers .deb files to a GitHub Release. After releasing, trigger the deb-packages workflow to update the APT repository:
gh workflow run update-repo.yml --repo Citronics/deb-packages
Note: kernel compilation requires significant time and resources. You need a cross-compilation toolchain if not building on armhf natively.