Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Kernel build

Kernel build #45

Workflow file for this run

name: Kernel build
on:
# run daily at 00:00
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
NUM_JOBS: 3
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: bcm2835
arch: arm
defconfig: bcm2835_defconfig
kernel: kernel
- name: arm64
arch: arm64
defconfig: defconfig
kernel: kernel8
- name: bcmrpi
arch: arm
defconfig: bcmrpi_defconfig
kernel: kernel
- name: bcm2709
arch: arm
defconfig: bcm2709_defconfig
kernel: kernel7
- name: bcm2711
arch: arm
defconfig: bcm2711_defconfig
kernel: kernel7l
- name: bcm2711_arm64
arch: arm64
defconfig: bcm2711_defconfig
kernel: kernel8
- name: bcm2712
arch: arm64
defconfig: bcm2712_defconfig
kernel: kernel_2712
steps:
- name: Update install
run:
sudo apt-get update
- name: Install toolchain
run:
if [[ "${{matrix.arch}}" == "arm64" ]]; then
sudo apt-get install gcc-aarch64-linux-gnu;
else
sudo apt-get install gcc-arm-linux-gnueabihf;
fi
timeout-minutes: 5
- uses: actions/checkout@v3
with:
fetch-depth: 1
clean: true
- name: Clone rpi linux kernel source
run: git clone --depth=1 https://github.com/raspberrypi/linux ./rpi-linux
- name: Build kernel ${{matrix.name}}
run: |
cd ./rpi-linux
mkdir ./build
export ARCH=${{matrix.arch}}
if [[ "$ARCH" == "arm64" ]]; then
export CROSS_COMPILE=aarch64-linux-gnu-
export DTS_SUBDIR=broadcom
export IMAGE=Image.gz
else
export CROSS_COMPILE=arm-linux-gnueabihf-
export DTS_SUBDIR=
export IMAGE=zImage
fi
make O=./build ${{matrix.defconfig}}
scripts/config --file ./build/.config --set-val CONFIG_WERROR y
# enable serpent crypto support
scripts/config --file ./build/.config --set-val CONFIG_CRYPTO_SERPENT m
make O=./build -j ${{env.NUM_JOBS}} $IMAGE modules dtbs
mkdir -p ./install/boot/overlays
make O=./build INSTALL_MOD_PATH=$(pwd)/install modules_install
cp ./build/arch/${ARCH}/boot/dts/${DTS_SUBDIR}/*.dtb ./install/boot/
cp ./build/arch/${ARCH}/boot/dts/overlays/*.dtb* ./install/boot/overlays/
cp ./arch/${ARCH}/boot/dts/overlays/README ./install/boot/overlays/
cp ./build/arch/${ARCH}/boot/$IMAGE ./install/boot/${{matrix.kernel}}.img
- name: Tar build
run: tar -cvf ${{matrix.name}}_build.tar -C ./rpi-linux/install .
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: ${{matrix.name}}_build
path: ${{matrix.name}}_build.tar
retention-days: 90