From 5cd225cf155dbeb442661a1116dcad47891e57b3 Mon Sep 17 00:00:00 2001 From: Andrei Kholodnyi Date: Mon, 15 Jul 2024 14:28:52 +0200 Subject: [PATCH 1/4] update to 24.04 --- .config-fragment | 2 + .github/workflows/build-stable.yaml | 12 +-- .github/workflows/rpi4-kernel-build.yml | 2 + Dockerfile | 108 ++++++++++++++---------- README.md | 44 +++++----- 5 files changed, 94 insertions(+), 74 deletions(-) diff --git a/.config-fragment b/.config-fragment index 0e7d020..621a0c6 100644 --- a/.config-fragment +++ b/.config-fragment @@ -26,3 +26,5 @@ CONFIG_PERF_EVENTS=y CONFIG_DEBUG_INFO=n CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y +CONFIG_SYSTEM_TRUSTED_KEYS="" +CONFIG_SYSTEM_REVOCATION_KEYS="" diff --git a/.github/workflows/build-stable.yaml b/.github/workflows/build-stable.yaml index 3a6bc60..aac40cd 100644 --- a/.github/workflows/build-stable.yaml +++ b/.github/workflows/build-stable.yaml @@ -4,19 +4,19 @@ on: workflow_dispatch: inputs: kernel_version: - description: 'Raspi kernel version, 5.4.0|5.15.0' - default: '5.15.0' + description: 'Raspi kernel version, 6.8.0' + default: '6.8.0' required: false type: string ubuntu_version: - description: 'Ubuntu version, focal|jammy' - default: 'jammy' + description: 'Ubuntu version, jammy|noble' + default: 'noble' required: false type: string uname_r: - description: 'raspi release in a form of <5.15.0-1012-raspi>' + description: 'raspi release in the form of <6.8.0-1005-raspi>' required: true - default: '5.15.0-1012-raspi' + default: '6.8.0-1005-raspi' type: string lttng_version: description: 'LTTNG version 2.13' diff --git a/.github/workflows/rpi4-kernel-build.yml b/.github/workflows/rpi4-kernel-build.yml index fce075b..dce2609 100644 --- a/.github/workflows/rpi4-kernel-build.yml +++ b/.github/workflows/rpi4-kernel-build.yml @@ -55,6 +55,8 @@ jobs: - name: Get available space run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet cd / df -H diff --git a/Dockerfile b/Dockerfile index 6052d49..bc839d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,42 +1,42 @@ -# A Dockerfile to build an RT kernel for the RPI4 based on Ubuntu 20.04 or 22.04 RPI4 kernel +# A Dockerfile to build an RT kernel for the Raspberry Pi based on Ubuntu 24.04 # -# If run without parameters the Docker image is created to built RT_PREEMPT patched version of the latest 5.15 raspi kernel +# If run without parameters the Docker image is created to built RT_PREEMPT patched version of the latest 6.8 raspi kernel # The Docker build command accepts the following build arguments: # $ docker build [--build-arg UBUNTU_VERSION=] [--build-arg KERNEL_VERSION=] # [--build-arg UNAME_R=] [--build-arg RT_PATCH=] # [--build-arg LTTNG_VERSION=] -t rtwg-image . # # where -# is jammy or focal, default is jammy -# is 5.4.0 or 5.15.0, default is 5.15.0 -# is in a form of 5.15.0-1023-raspi, if not defined the lastest version is taken +# is noble, default is noble +# is in a form of 6.8.0, default is 6.8.0 +# is in a form of 6.8.0-1005-raspi, if not defined the lastest version is taken # see http://ports.ubuntu.com/pool/main/l/linux-raspi/ -# is in a form of 5.15.76-rt53, if not defined the closest to the defined is taken -# see http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older +# is in a form of 6.8.2-rt11, if not defined the closest to the defined is taken +# see https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.8/ # is 2.13, default is 2.13 # -# To build a Docker image for the latest 5.15 raspi kernel run +# To build a Docker image for the latest raspi kernel, run # $ docker build -t rtwg-image . # -# To build a Docker image for the latest 5.4 raspi kernel run -# $ docker build --build-arg UBUNTU_VERSION=focal --build-arg KERNEL_VERSION=5.4.0 -t rtwg-image . +# To build a Docker image for the stable raspi kernel, run +# $ docker build --build-arg UBUNTU_VERSION=noble --build-arg KERNEL_VERSION=6.8.0 --build-arg UNAME_R=6.8.0-1005-raspi -t rtwg-image . # # After that the Docker image is prepared and ready to run # $ docker run -it rtwg-image bash # # and then inside the docker -# $ cd $HOME/linux_build/linux-raspi +# $ cd /linux_build/linux-raspi # $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LOCALVERSION=-raspi -j `nproc` bindeb-pkg # -# user ~/linux_build/linux-raspi $ ls -la ../*.deb -# -rw-r--r-- 1 user user 8123580 Jan 16 16:34 ../linux-headers-5.15.74-rt53-raspi_5.15.74-rt53-raspi-1_arm64.deb -# -rw-r--r-- 1 user user 58802024 Jan 16 16:34 ../linux-image-5.15.74-rt53-raspi_5.15.74-rt53-raspi-1_arm64.deb -# -rw-r--r-- 1 user user 1185420 Jan 16 16:34 ../linux-libc-dev_5.15.74-rt53-raspi-1_arm64.deb +# user /linux_build/linux-raspi $ ls -la ../*.deb +# -rw-r--r-- 1 user user 9355162 Jul 1 16:44 ../linux-headers-6.8.4-rt11-raspi_6.8.4-g75867ff0890f-4_arm64.deb +# -rw-r--r-- 1 user user 70457678 Jul 1 16:44 ../linux-image-6.8.4-rt11-raspi_6.8.4-g75867ff0890f-4_arm64.deb +# -rw-r--r-- 1 user user 1377154 Jul 1 16:44 ../linux-libc-dev_6.8.4-g75867ff0890f-4_arm64.deb # -# copy deb packages to the host, or directly to the RPI4 target +# copy deb packages to the host, or directly to the Raspberry Pi target # $ scp ../*.deb @172.17.0.1:/home//. -FROM ubuntu:focal +FROM ubuntu:noble USER root ARG DEBIAN_FRONTEND=noninteractive @@ -51,8 +51,8 @@ ARG ARCH=arm64 ARG UNAME_R ARG RT_PATCH ARG triple=aarch64-linux-gnu -ARG KERNEL_VERSION=5.15.0 -ARG UBUNTU_VERSION=jammy +ARG KERNEL_VERSION=6.8.0 +ARG UBUNTU_VERSION=noble ARG LTTNG_VERSION=2.13 ARG KERNEL_DIR=linux-raspi @@ -61,13 +61,18 @@ RUN apt-get update && apt-get install -q -y \ gcc-${triple} \ && dpkg --add-architecture ${ARCH} \ && sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list \ - && add-apt-repository -n -s "deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -s -c) main universe restricted" \ - && add-apt-repository -n -s "deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -s -c)-updates main universe restricted" \ + && sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list.d/* \ + && sed -i '/Components/a\Architectures: amd64' /etc/apt/sources.list.d/*.sources \ + && echo "deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -s -c) main universe restricted" >> /etc/apt/sources.list.d/ubuntu-ports.list \ + && echo "deb-src [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -s -c) main universe restricted" >> /etc/apt/sources.list.d/ubuntu-ports.list \ + && echo "deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -s -c)-updates main universe restricted" >> /etc/apt/sources.list.d/ubuntu-ports.list \ && rm -rf /var/lib/apt/lists/* # setup environment -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 +ENV UID=1000 +ENV GID=1000 # install build deps RUN apt-get update && apt-get build-dep -q -y linux \ @@ -76,18 +81,32 @@ RUN apt-get update && apt-get build-dep -q -y linux \ fakeroot \ && rm -rf /var/lib/apt/lists/* +# remove ubuntu user to set our own +RUN userdel -r ubuntu + # setup user RUN apt-get update && apt-get install -q -y sudo \ - && useradd -m -d /home/user -s /bin/bash user \ + && groupadd -g $GID user \ + && useradd -m -d /home/user -s /bin/bash -u $UID -g $GID user \ && gpasswd -a user sudo \ && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ && echo 'user\nuser\n' | passwd user \ && rm -rf /var/lib/apt/lists/* # install extra packages needed for the patch handling -RUN apt-get update && apt-get install -q -y wget curl gzip git time \ +RUN apt-get update && apt-get install -q -y wget curl gzip git bash-completion time \ && rm -rf /var/lib/apt/lists/* +# install lttng dependencies +RUN sudo apt-get update \ + && sudo apt-get install -y libuuid1 libpopt0 libxml2 numactl + +# Create a directory and set permissions +RUN mkdir -p /linux_build && chown user:user /linux_build + +# Define the volume +VOLUME /linux_build + USER user # find the latest UNAME_R and store it locally for the later usage @@ -95,37 +114,34 @@ USER user RUN if test -z $UNAME_R; then UNAME_R=`curl -s http://ports.ubuntu.com/pool/main/l/linux-raspi/ | grep linux-buildinfo | grep -o -P '(?<=l)' | grep ${ARCH} | grep ${KERNEL_VERSION} | sort | tail -n 1 | cut -d '-' -f 3-4`-raspi; fi \ && echo $UNAME_R > /home/user/uname_r +# Set the working directory +WORKDIR /linux_build + # install linux sources from git -RUN mkdir /home/user/linux_build \ - && cd /home/user/linux_build \ - && git config --global https.postBuffer 1048576000 \ - && time git clone -b master --depth 1 --single-branch https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-raspi/+git/${UBUNTU_VERSION} ${KERNEL_DIR} \ +RUN git config --global https.postBuffer 1048576000 \ + && git clone -b master --depth 1 --single-branch --jobs=$(($(nproc) * 2)) --progress https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-raspi/+git/${UBUNTU_VERSION} ${KERNEL_DIR} \ && cd ${KERNEL_DIR} \ && git fetch --tag # checkout necessary tag -RUN cd /home/user/linux_build/${KERNEL_DIR} \ - && git tag -l *`cat /home/user/uname_r | cut -d '-' -f 2`* | sort -V | tail -1 > /home/user/linux_build/tag \ - && git checkout `cat /home/user/linux_build/tag` +RUN cd /linux_build/${KERNEL_DIR} \ + && git tag -l *`cat /home/user/uname_r | cut -d '-' -f 2`* | sort -V | tail -1 > /linux_build/tag \ + && git checkout `cat /linux_build/tag` # install buildinfo to retieve `raspi` kernel config RUN cd /home/user \ - && wget http://ports.ubuntu.com/pool/main/l/linux-raspi/linux-buildinfo-${KERNEL_VERSION}-`cat /home/user/uname_r | cut -d '-' -f 2`-raspi_${KERNEL_VERSION}-`cat /home/user/linux_build/tag | cut -d '-' -f 4`_${ARCH}.deb \ + && wget http://ports.ubuntu.com/pool/main/l/linux-raspi/linux-buildinfo-${KERNEL_VERSION}-`cat /home/user/uname_r | cut -d '-' -f 2`-raspi_${KERNEL_VERSION}-`cat /linux_build/tag | cut -d '-' -f 4`_${ARCH}.deb \ && dpkg -X *.deb /home/user/ -# install lttng dependencies -RUN sudo apt-get update \ - && sudo apt-get install -y libuuid1 libpopt0 liburcu6 libxml2 numactl - COPY ./getpatch.sh /home/user/ # get the nearest RT patch to the kernel SUBLEVEL # if $RT_PATCH is set via --build-arg, take it -RUN cd /home/user/linux_build/${KERNEL_DIR} \ +RUN cd /linux_build/${KERNEL_DIR} \ && if test -z $RT_PATCH; then /home/user/getpatch.sh `make kernelversion` > /home/user/rt_patch; else echo $RT_PATCH > /home/user/rt_patch; fi # download and unzip RT patch -RUN cd /home/user/linux_build \ +RUN cd /linux_build \ && wget http://cdn.kernel.org/pub/linux/kernel/projects/rt/`echo ${KERNEL_VERSION} | cut -d '.' -f 1-2`/older/patch-`cat /home/user/rt_patch`.patch.gz \ && gunzip patch-`cat /home/user/rt_patch`.patch.gz @@ -138,25 +154,25 @@ RUN cd /home/user/ \ # run lttng built-in script to configure RT kernel RUN set -x \ && cd `ls -d /home/user/lttng-modules-*` \ - && ./scripts/built-in.sh ${HOME}/linux_build/${KERNEL_DIR} + && ./scripts/built-in.sh /linux_build/${KERNEL_DIR} # patch kernel, do not fail if some patches are skipped -RUN cd /home/user/linux_build/${KERNEL_DIR} \ +RUN cd /linux_build/${KERNEL_DIR} \ && OUT="$(patch -p1 --forward < ../patch-`cat $HOME/rt_patch`.patch)" || echo "${OUT}" | grep "Skipping patch" -q || (echo "$OUT" && false); # setup build environment -RUN cd /home/user/linux_build/${KERNEL_DIR} \ +RUN cd /linux_build/${KERNEL_DIR} \ && export $(dpkg-architecture -a${ARCH}) \ && export CROSS_COMPILE=${triple}- \ && fakeroot debian/rules clean \ && LANG=C fakeroot debian/rules printenv -COPY ./.config-fragment /home/user/linux_build/. +COPY ./.config-fragment /linux_build/. # config RT kernel and merge config fragment -RUN cd /home/user/linux_build/${KERNEL_DIR} \ +RUN cd /linux_build/${KERNEL_DIR} \ && cp /home/user/usr/lib/linux/`cat /home/user/uname_r`/config .config \ - && ARCH=${ARCH} CROSS_COMPILE=${triple}- ./scripts/kconfig/merge_config.sh .config $HOME/linux_build/.config-fragment + && ARCH=${ARCH} CROSS_COMPILE=${triple}- ./scripts/kconfig/merge_config.sh .config /linux_build/.config-fragment -RUN cd /home/user/linux_build/${KERNEL_DIR} \ +RUN cd /linux_build/${KERNEL_DIR} \ && fakeroot debian/rules clean diff --git a/README.md b/README.md index ca3b869..d3338d2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# Build ```RT_PREEMPT``` kernel for Raspberry Pi 4 +# Build ```RT_PREEMPT``` kernel for Raspberry Pi -[![RPI4 RT Kernel build](https://github.com/ros-realtime/linux-real-time-kernel-builder/actions/workflows/rpi4-kernel-build.yml/badge.svg)](https://github.com/ros-realtime/linux-real-time-kernel-builder/actions/workflows/rpi4-kernel-build.yml) +[![RPI RT Kernel build](https://github.com/ros-realtime/linux-real-time-kernel-builder/actions/workflows/rpi4-kernel-build.yml/badge.svg)](https://github.com/ros-realtime/linux-real-time-kernel-builder/actions/workflows/rpi4-kernel-build.yml) ## Introduction -This README describes necessary steps to build and install ```RT_PREEMPT``` Linux kernel for the Raspberry Pi4 board. RT Kernel is a part of the ROS2 real-time system setup. Raspberry Pi4 is a reference board used by the ROS 2 real-time community for the development. RT Kernel is configured as described in [Kernel configuration section](#kernel-configuration). Kernel is built automatically by the Github action, and the artifacts are located under the [```build stable```](https://github.com/razr/linux-real-time-kernel-builder/actions/workflows/build-stable.yaml). Please follow [installation instructions](#deploy-new-kernel-on-raspberry-pi4) to deploy a new kernel to the RPI4 board. +This README describes necessary steps to build and install ```RT_PREEMPT``` Linux kernel for the Raspberry Pi board. RT Kernel is a part of the ROS2 real-time system setup. Raspberry Pi is a reference board used by the ROS 2 real-time community for the development. RT Kernel is configured as described in [Kernel configuration section](#kernel-configuration). Kernel is built automatically by the Github action, and the artifacts are located under the [```build stable```](https://github.com/ros-realtime/linux-real-time-kernel-builder/actions/workflows/build-stable.yaml). Please follow [installation instructions](#deploy-new-kernel-on-raspberry-pi) to deploy a new kernel to the RPI board. -## Raspberry Pi 4 RT Linux kernel +## Raspberry Pi RT Linux kernel -Ubuntu ```raspi``` kernel is modified to produce an RT Linux kernel. Ubuntu is a ROS 2 Tier 1 platform and Ubuntu kernel was selected to align to it. It is possible to build the raspi kernel for both Ubuntu LTS releases 20.04 and 22.04. +Ubuntu ```raspi``` kernel is modified to produce an RT Linux kernel. Ubuntu is a ROS 2 Tier 1 platform and Ubuntu kernel was selected to align to it. It is possible to build the raspi kernel for Ubuntu LTS release 24.04. ## Download ready-to-use RT Kernel ```deb``` packages @@ -16,7 +16,7 @@ RT Kernel is configured using configuration parameters from the [](.config-fragm ### Using GUI -Go to the ```Action``` tab, find the ```Build stable```, go inside the latest workflow run, download, and unzip artifacts called ```RPI4 RT Kernel deb packages```. This archive contains three debian packages. Follow [instructions](#deploy-new-kernel-on-raspberry-pi4) to deploy them on the RPI4. +Go to the ```Action``` tab, find the ```Build stable```, go inside the latest workflow run, download, and unzip artifacts called ```RPI4 RT Kernel deb packages```. This archive contains three debian packages. Follow [instructions](#deploy-new-kernel-on-raspberry-pi) to deploy them on the RPI. ### Using command line @@ -35,9 +35,9 @@ $ curl -u :$token -L -H "Accept: application/vnd.github.v3+json" $ unzip rpi4_rt_kernel.zip ``` -## Raspberry Pi 4 RT Linux kernel build +## Raspberry Pi RT Linux kernel build -Ubuntu 20.04 ```x86_64``` based ```Dockerfile``` is developed to cross-compile a new kernel. +Ubuntu 24.04 ```x86_64``` based ```Dockerfile``` is developed to cross-compile a new kernel. ### Build environment @@ -66,10 +66,10 @@ docker build [--no-cache] [--build-arg UBUNTU_VERSION=] [--build-ar where: -* `````` is `jammy` or `focal`, default is `jammy` -* `````` is `5.15.0` or `5.4.0`, default is `5.15.0` -* `````` is in a form of ```5.15.0-1023-raspi```, see [Ubuntu raspi Linux kernels](http://ports.ubuntu.com/pool/main/l/linux-raspi) -* `````` is in a form of ```5.15.76-rt53```, see [RT patches](http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older) +* `````` is `noble`, default is `noble` +* `````` is `6.8.0`, default is `6.8.0` +* `````` is in a form of `6.8.0-1005-raspi`, see [Ubuntu raspi Linux kernels](http://ports.ubuntu.com/pool/main/l/linux-raspi) +* `````` is in a form of `6.8.2-rt11`, see [RT patches](https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.8/) * `````` is `2.13`, default is `2.13` ```bash @@ -112,19 +112,19 @@ You need 16GB free disk space to build it, it takes a while, and the results are ```bash raspi:~/linux_build/linux-raspi $ ls -la ../*.deb --rw-r--r-- 1 user user 8123580 Jan 16 16:34 ../linux-headers-5.15.74-rt53-raspi_5.15.74-rt53-raspi-1_arm64.deb --rw-r--r-- 1 user user 58802024 Jan 16 16:34 ../linux-image-5.15.74-rt53-raspi_5.15.74-rt53-raspi-1_arm64.deb --rw-r--r-- 1 user user 1185420 Jan 16 16:34 ../linux-libc-dev_5.15.74-rt53-raspi-1_arm64.deb +-rw-r--r-- 1 user user 9355162 Jul 1 16:44 ../linux-headers-6.8.4-rt11-raspi_6.8.4-g75867ff0890f-4_arm64.deb +-rw-r--r-- 1 user user 70457678 Jul 1 16:44 ../linux-image-6.8.4-rt11-raspi_6.8.4-g75867ff0890f-4_arm64.deb +-rw-r--r-- 1 user user 1377154 Jul 1 16:44 ../linux-libc-dev_6.8.4-g75867ff0890f-4_arm64.deb ``` -## Deploy new kernel on Raspberry Pi4 +## Deploy new kernel on Raspberry Pi -### Download and install Ubuntu 22.04 server image +### Download and install Ubuntu 24.04 server image -Follow these links to download and install Ubuntu 22.04 on your Raspberry Pi4 +Follow these links to download and install Ubuntu 24.04 on your Raspberry Pi * [Install Ubuntu on a Raspberry Pi](https://ubuntu.com/download/raspberry-pi) -* [Download Ubuntu Raspberry Pi server image](https://ubuntu.com/download/raspberry-pi/thank-you?version=22.04.1&architecture=server-arm64+raspi) +* [Download Ubuntu Raspberry Pi server image](https://ubuntu.com/download/raspberry-pi/thank-you?version=24.04&architecture=server-arm64+raspi) * [Create an Ubuntu image for a Raspberry Pi on Ubuntu](https://ubuntu.com/tutorials/create-an-ubuntu-image-for-a-raspberry-pi-on-ubuntu#2-on-your-ubuntu-machine) ```bash @@ -163,7 +163,7 @@ After reboot you should see a new RT kernel installed and real-time enabled ```bash ubuntu@ubuntu:~$ uname -a -Linux ubuntu 5.15.74-rt53-raspi #1 SMP PREEMPT_RT Mon Jan 16 14:10:16 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux +Linux ubuntu 6.8.4-rt11-raspi #1 SMP PREEMPT_RT Mon Jul 1 14:10:16 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux ubuntu@ubuntu:~$ cat /sys/kernel/realtime 1 @@ -183,6 +183,6 @@ As this repository is within the `ros-realtime` organization it can be assumed t * [ROS Real-Time Working group documentation](https://ros-realtime.github.io/Guides/Real-Time-Operating-System-Setup/Real-Time-Linux/rt_linux_index.html) * [Ubuntu raspi linux images](http://ports.ubuntu.com/pool/main/l/linux-raspi) -* [RT patches](http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older) -* [Download Ubuntu raspi server image](https://ubuntu.com/download/raspberry-pi/thank-you?version=22.04.1&architecture=server-arm64+raspi) +* [RT patches](https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.8/) +* [Download Ubuntu raspi server image](https://ubuntu.com/download/raspberry-pi/thank-you?version=24.04&architecture=server-arm64+raspi) * [Building Realtime ```RT_PREEMPT``` kernel for ROS 2](https://index.ros.org/doc/ros2/Tutorials/Building-Realtime-rt_preempt-kernel-for-ROS-2/) From a80c076842b6b9ea8fc22cd6f0f75edc6c36ec19 Mon Sep 17 00:00:00 2001 From: Andrei Kholodnyi Date: Mon, 15 Jul 2024 15:02:46 +0200 Subject: [PATCH 2/4] fix linux_build path --- .github/workflows/rpi4-kernel-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rpi4-kernel-build.yml b/.github/workflows/rpi4-kernel-build.yml index dce2609..bdf31fa 100644 --- a/.github/workflows/rpi4-kernel-build.yml +++ b/.github/workflows/rpi4-kernel-build.yml @@ -1,9 +1,9 @@ -# This is a callable workflow for the RPI4 RT kernel build. It is based on the Dockerfile located in the repo +# This is a callable workflow for the Raspberry Pi RT kernel build. It is based on the Dockerfile located in the repo # Workflow can be started from another workflow -# The build takes 1.5 hours and artifacts are available under workflow artifacts +# The build takes 2 hours and artifacts are available under workflow artifacts # - kernel .deb packages # TODO: -# - create Docker image and push it to the packages +# - create a Docker image and push it to the packages name: 'RPI4 RT Kernel build' @@ -87,7 +87,7 @@ jobs: image: rtwg-image:22.04 options: -v ${{ github.workspace }}:/work run: | - cd /home/user/linux_build/linux-raspi + cd /linux_build/linux-raspi make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LOCALVERSION=-raspi -j `nproc` bindeb-pkg sudo cp ../*.deb /work From bdfe78168c13508bdf4fb62adccec4e8edc460df Mon Sep 17 00:00:00 2001 From: Andrei Kholodnyi Date: Mon, 23 Sep 2024 09:21:09 +0200 Subject: [PATCH 3/4] use free-disk-space --- .github/workflows/rpi4-kernel-build.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rpi4-kernel-build.yml b/.github/workflows/rpi4-kernel-build.yml index bdf31fa..56063e5 100644 --- a/.github/workflows/rpi4-kernel-build.yml +++ b/.github/workflows/rpi4-kernel-build.yml @@ -53,12 +53,21 @@ jobs: # Checks-out repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - name: Get available space - run: | - sudo rm -rf /usr/local/lib/android - sudo rm -rf /usr/share/dotnet - cd / - df -H + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: true + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: Print input params run: | From f2c62aafad305fabd29976050879b3b14867a544 Mon Sep 17 00:00:00 2001 From: Andrei Kholodnyi Date: Mon, 23 Sep 2024 09:57:10 +0200 Subject: [PATCH 4/4] docker-images: false --- .github/workflows/rpi4-kernel-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rpi4-kernel-build.yml b/.github/workflows/rpi4-kernel-build.yml index 56063e5..63de9a6 100644 --- a/.github/workflows/rpi4-kernel-build.yml +++ b/.github/workflows/rpi4-kernel-build.yml @@ -66,7 +66,7 @@ jobs: dotnet: true haskell: true large-packages: true - docker-images: true + docker-images: false swap-storage: true - name: Print input params