Skip to content

Commit d38efa4

Browse files
authored
Merge pull request #42 from razr/Ubuntu-22.04
add Ubuntu 22.04 build support
2 parents f6ae7d6 + 4516fda commit d38efa4

File tree

5 files changed

+59
-10
lines changed

5 files changed

+59
-10
lines changed

.config-fragment

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
CONFIG_VIRTUALIZATION=n
12
CONFIG_PREEMPT_RT=y
23
CONFIG_LOCKUP_DETECTOR=n
34
CONFIG_DETECT_HUNG_TASK=n
@@ -23,3 +24,5 @@ CONFIG_PERF_EVENTS=y
2324
# CONFIG_KRETPROBES is not set
2425
# CONFIG_KALLSYMS_ALL is not set
2526
CONFIG_DEBUG_INFO=n
27+
CONFIG_IKCONFIG=y
28+
CONFIG_IKCONFIG_PROC=y

.github/workflows/build-latest.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,24 @@ name: 'Build latest'
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
kernel_version:
7+
description: 'Raspi kernel version, 5.4.0|5.15.0'
8+
required: false
9+
type: string
10+
ubuntu_version:
11+
description: 'Ubuntu version, focal|jammy'
12+
required: false
13+
type: string
14+
lttng_version:
15+
description: 'LTTNG version, 2.12|2.13'
16+
required: false
17+
type: string
518

619
jobs:
720
call-rpi4-kernel-build:
821
uses: ./.github/workflows/rpi4-kernel-build.yml
22+
with:
23+
kernel_version: ${{ github.event.inputs.kernel_version }}
24+
ubuntu_version: ${{ github.event.inputs.ubuntu_version }}
25+
lttng_version: ${{ github.event.inputs.lttng_version }}

.github/workflows/build-stable.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,28 @@ name: 'Build stable'
33
on:
44
workflow_dispatch:
55
inputs:
6+
kernel_version:
7+
description: 'Raspi kernel version, 5.4.0|5.15.0'
8+
required: false
9+
type: string
10+
ubuntu_version:
11+
description: 'Ubuntu version, focal|jammy'
12+
required: false
13+
type: string
614
uname_r:
715
description: 'raspi release in a form of <5.4.0-1058-raspi>'
816
required: true
917
default: '5.4.0-1058-raspi'
1018
type: string
1119
lttng_version:
12-
description: 'LTTNG version e.g. 2.12'
20+
description: 'LTTNG version 2.12|2.13'
1321
required: false
1422
type: string
1523
jobs:
1624
call-rpi4-kernel-build:
1725
uses: ./.github/workflows/rpi4-kernel-build.yml
1826
with:
1927
uname_r: ${{ github.event.inputs.uname_r }}
28+
kernel_version: ${{ github.event.inputs.kernel_version }}
29+
ubuntu_version: ${{ github.event.inputs.ubuntu_version }}
2030
lttng_version: ${{ github.event.inputs.lttng_version }}

Dockerfile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
# docker image to build an RT kernel for the RPI4 based on Ubuntu 20.04 RPI4 image
1+
# A Dockerfile to build an RT kernel for the RPI4 based on Ubuntu 20.04 or 22.04 RPI4 kernel
22
#
3-
# By default it finds and takes the latest raspi image and the RT_PREEMPT patch closest to it
4-
# if the build arguments defined it will build the corresponding version instead
5-
# $ docker build [--build-arg UNAME_R=<raspi release>] [--build-arg RT_PATCH=<RT patch>] -t rtwg-image .
3+
# If run without parameters the Docker image is created to built RT_PREEMPT patched version of the latest 5.4 raspi kernel
4+
# The Docker build command accepts the following build arguments:
5+
# $ docker build [--build-arg UBUNTU_VERSION=<ubuntu name>] [--build-arg KERNEL_VERSION=<kernel version>]
6+
# [--build-arg UNAME_R=<raspi release>] [--build-arg RT_PATCH=<RT patch>]
7+
# [--build-arg LTTNG_VERSION=<LTTNG version>] -t rtwg-image .
68
#
7-
# where <raspi release> is in a form of 5.4.0-1058-raspi,
9+
# where
10+
# <ubuntu name> is jammy or focal, default is focal
11+
# <kernel version> is 5.4.0 or 5.15.0, default is 5.4.0
12+
# <raspi release> is in a form of 5.4.0-1058-raspi, if not defined the lastest version is taken
813
# see http://ports.ubuntu.com/pool/main/l/linux-raspi/
9-
# and <RT patch> is in a form of 5.4.177-rt69,
14+
# <RT patch> is in a form of 5.4.177-rt69, if not defined the closest to the defined <raspi release> is taken
1015
# see http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/older
16+
# <LTTNG version> is 2.12 or 2.13, default is 2.12
1117
#
18+
# To build a Docker image for the latest 5.4 raspi kernel run
19+
# $ docker build -t rtwg-image .
20+
#
21+
# To build a Docker image for the latest 5.15 raspi kernel run
22+
# $ docker build --build-arg UBUNTU_VERSION=jammy --build-arg KERNEL_VERSION=5.15.0 --build-arg LTTNG_VERSION=2.13 -t rtwg-image .
23+
#
24+
# After that the Docker image is prepared and ready to run
1225
# $ docker run -it rtwg-image bash
1326
#
1427
# and then inside the docker

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This README describes necessary steps to build and install ```RT_PREEMPT``` Linu
88

99
## Raspberry Pi 4 RT Linux kernel
1010

11-
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.
11+
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.
1212

1313
## Download ready-to-use RT Kernel ```deb``` packages
1414

@@ -61,13 +61,16 @@ cd linux-real-time-kernel-builder
6161
```
6262

6363
```bash
64-
docker build [--no-cache] [--build-arg UNAME_R=<raspi release>] [--build-arg RT_PATCH=<RT patch>] -t rtwg-image .
64+
docker build [--no-cache] [--build-arg UBUNTU_VERSION=<ubuntu name>] [--build-arg KERNEL_VERSION=<kernel version>] [--build-arg UNAME_R=<raspi release>] [--build-arg RT_PATCH=<RT patch>] [--build-arg LTTNG_VERSION=<LTTNG version>] -t rtwg-image .
6565
```
6666

6767
where:
6868

69+
* ```<ubuntu name>``` is `jammy` or `focal`, default is `focal`
70+
* ```<kernel version>``` is `5.4.0` or `5.15.0`, default is `5.4.0`
6971
* ```<raspi release>``` is in a form of ```5.4.0-1058-raspi```, see [Ubuntu raspi Linux kernels](http://ports.ubuntu.com/pool/main/l/linux-raspi)
7072
* ```<RT patch>``` is in a form of ```5.4.177-rt69```, see [RT patches](http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/older)
73+
* ```<LTTNG version>``` is `2.12` or `2.13`, default is `2.12`
7174

7275
```bash
7376
docker run -t -i rtwg-image bash
@@ -156,11 +159,14 @@ sudo dpkg -i linux-image-*.deb
156159
sudo reboot
157160
```
158161

159-
After reboot you should see a new RT kernel installed
162+
After reboot you should see a new RT kernel installed and real-time enabled
160163

161164
```bash
162165
ubuntu@ubuntu:~$ uname -a
163166
Linux ubuntu 5.4.174-rt69-raspi #1 SMP PREEMPT_RT Mon Apr 8 14:10:16 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
167+
168+
ubuntu@ubuntu:~$ cat /sys/kernel/realtime
169+
1
164170
```
165171

166172
## Intel UP2 board RT kernel build

0 commit comments

Comments
 (0)