Skip to content

Commit 04c4c87

Browse files
authored
Merge pull request #77 from lool/matrix-kernel-builds
Build and test images for various kernels
2 parents f72bb70 + 80c18d0 commit 04c4c87

File tree

5 files changed

+105
-15
lines changed

5 files changed

+105
-15
lines changed

.github/workflows/debos.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ name: Build debos recipe
22

33
on:
44
workflow_call:
5+
inputs:
6+
mainline_kernel:
7+
description: Whether to use a mainline kernel deb
8+
type: boolean
9+
default: false
10+
overlays:
11+
description: List of overlays to use
12+
type: string
13+
default: qsc-deb-releases
14+
kernelpackage:
15+
description: Name of kernel package to use
16+
type: string
17+
default: linux-image-6.16.0-rc3-qcom1
18+
519
outputs:
620
artifacts_url:
721
description: "URL to retrieve build artifacts"
@@ -48,15 +62,17 @@ jobs:
4862
- name: Copy Linux deb and U-Boot for RB1 from fileserver space for downloads
4963
run: |
5064
set -ux
51-
mkdir -v debos-recipes/local-debs
5265
dir="/fileserver-downloads/qcom-deb-images"
53-
# copy linux-image but not the -dbg e.g.
54-
# linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
55-
# linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
56-
find "${dir}/linux-deb-latest/" \
57-
-name linux-image\*.deb \
58-
-not -name linux-image\*-dbg_\*.deb \
59-
-exec cp -av '{}' debos-recipes/local-debs/ \;
66+
if [ "${{ inputs.mainline_kernel }}" = true ]; then
67+
mkdir -v debos-recipes/local-debs
68+
# copy linux-image but not the -dbg e.g.
69+
# linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
70+
# linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
71+
find "${dir}/linux-deb-latest/" \
72+
-name linux-image\*.deb \
73+
-not -name linux-image\*-dbg_\*.deb \
74+
-exec cp -av '{}' debos-recipes/local-debs/ \;
75+
fi
6076
# copy U-Boot RB1 binary
6177
cp -av "${dir}/u-boot-rb1-latest/rb1-boot.img" .
6278
@@ -67,7 +83,17 @@ jobs:
6783
- name: Build rootfs with debos
6884
run: |
6985
set -ux
70-
debos -t xfcedesktop:true -t localdebs:local-debs/ \
86+
localdebs=""
87+
if [ -d debos-recipes/local-debs ]; then
88+
localdebs="-t localdebs:local-debs/"
89+
fi
90+
debos \
91+
-t overlays:'${{ inputs.overlays }}' \
92+
-t experimentalkernel:true \
93+
-t xfcedesktop:true \
94+
${localdebs} \
95+
-t kernelpackage:'${{ inputs.kernelpackage }}' \
96+
--print-recipe \
7197
debos-recipes/qualcomm-linux-debian-rootfs.yaml
7298
7399
- name: Build UFS and SD card images with debos
@@ -80,15 +106,18 @@ jobs:
80106
# whole build is done from memory and the out of memory killer
81107
# gets triggered
82108
debos -b qemu --scratchsize 4GiB -t imagetype:ufs \
109+
--print-recipe \
83110
debos-recipes/qualcomm-linux-debian-image.yaml
84111
debos -b qemu --scratchsize 4GiB -t imagetype:sdcard \
112+
--print-recipe \
85113
debos-recipes/qualcomm-linux-debian-image.yaml
86114
87115
- name: Build flashable files with debos
88116
run: |
89117
set -ux
90118
debos -t u_boot_rb1:rb1-boot.img \
91-
debos-recipes/qualcomm-linux-debian-flash.yaml
119+
--print-recipe \
120+
debos-recipes/qualcomm-linux-debian-flash.yaml
92121
93122
- name: Stage debos artifacts for publishing
94123
run: |

.github/workflows/linux.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Linux kernel deb
1+
name: Build Linux kernel deb and debos image
22

33
on:
44
# run weekly on Monday at 8:30am
@@ -9,7 +9,10 @@ on:
99

1010
# implicitely set all other permissions to none
1111
permissions:
12-
contents: read # actions/checkout
12+
contents: read # actions/checkout debos.yml test.yml
13+
contents: read # debos.yml lava-schema-check.yml test.yml
14+
packages: read # test.yml
15+
pull-requests: write # test.yml
1316

1417
env:
1518
# where results will be posted/hosted
@@ -90,3 +93,16 @@ jobs:
9093
with:
9194
path: artifacts
9295

96+
debos-mainline-linux:
97+
needs: build-linux-deb
98+
uses: ./.github/workflows/debos.yml
99+
with:
100+
mainline_kernel: true
101+
102+
test-mainline-linux:
103+
uses: ./.github/workflows/test.yml
104+
needs: debos-mainline-linux
105+
secrets: inherit
106+
with:
107+
url: ${{ needs.debos-mainline-linux.outputs.artifacts_url }}
108+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-----BEGIN PGP PUBLIC KEY BLOCK-----
2+
3+
mDMEaGwEMxYJKwYBBAHaRw8BAQdAg8Nfdby/c9Y6bctGLnGJrhMhedCGfYzrp9Sa
4+
RWtQgDe0NXFzY19hcHRfcmVwby0wNzA3MjAyNSA8YXJ0aWZhY3RvcnkuY29yZUBx
5+
dWFsY29tbS5jb20+iJkEExYKAEEWIQRyQhNJGZOZvf1sqY3IwASzX5SqWwUCaGwE
6+
MwIbAwUJBaOagAULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgAAKCRDIwASzX5Sq
7+
W0k4AQCzVUgf+ydkoHdxKiHzwZjDowL38lAp92zlvQqK2r+9kQEAxZYBhPQ4ZVo9
8+
RL2bOrJexNAJyYqRamtrU+jkBn1wjQq4OARobAQzEgorBgEEAZdVAQUBAQdASOGZ
9+
gHVoc7BboK7yCC3bSib9NLBlrsA47RRvT7fPHhoDAQgHiH4EGBYKACYWIQRyQhNJ
10+
GZOZvf1sqY3IwASzX5SqWwUCaGwEMwIbDAUJBaOagAAKCRDIwASzX5SqWzH3AP94
11+
HDue14QrgcEsyXCElAAZxYqiDMFu663G3ki0lGB1vAEAz0tqLiapgthdSt/c/2YQ
12+
tej7g/77RkEpjjhnWiLMiAM=
13+
=7H+M
14+
-----END PGP PUBLIC KEY BLOCK-----
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# QArtifactory qsc-deb-releases repository
2+
# NB: publishing Sources indices for deb-src isn't supported by Artifactory,
3+
# but sources are published with other packages files
4+
Types: deb
5+
URIs: https://qartifactory-edge.qualcomm.com/artifactory/qsc-deb-releases
6+
Suites: trixie-overlay
7+
Components: main
8+
Signed-By: /etc/apt/keyrings/qsc-deb-releases.asc
9+
Enabled: yes

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{- $xfcedesktop := or .xfcedesktop "false" }}
22
{{- $experimentalkernel := or .experimentalkernel "false" }}
33
{{- $localdebs := or .localdebs "none" }}
4+
{{- $kernelpackage := or .kernelpackage "linux-image-arm64" }}
45

56
architecture: arm64
67

@@ -24,6 +25,14 @@ actions:
2425
apt -y modernize-sources
2526
rm -v /etc/apt/sources.list.bak
2627
28+
{{- if .overlays }}
29+
{{- range $overlay := split "," .overlays }}
30+
- action: overlay
31+
description: Apply overlay {{$overlay}}
32+
source: overlays/{{$overlay}}
33+
{{- end }}
34+
{{- end }}
35+
2736
- action: apt
2837
description: Install foundational packages
2938
recommends: true
@@ -175,13 +184,26 @@ actions:
175184
update-locale LANG=en_US.UTF-8
176185
fi
177186
187+
# usually these packages are pulled by Pre-Depends/Depends/Recommends of
188+
# Debian's linux-image, but kernel packages generated with the upstream
189+
# deb-pkg target don't have these dependencies, so install these before
190+
# installing kernels; this is a separate step because of the Pre-Depends
191+
- action: apt
192+
description: Install kernel dependencies
193+
recommends: true
194+
packages:
195+
- apparmor
196+
- initramfs-tools
197+
- kmod
198+
- linux-base
199+
178200
- action: apt
179201
description: Install kernel and firmware packages
180202
recommends: true
181203
packages:
182204
- firmware-atheros
183205
- firmware-qcom-soc
184-
- linux-image-arm64
206+
- {{$kernelpackage}}
185207

186208
# XXX this is a workaround until firmware-non-free migrates to testing; it
187209
# might make sense to have a generic mechanism to do this
@@ -198,7 +220,7 @@ actions:
198220
Components: main non-free-firmware
199221
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
200222
EOF
201-
# update and install kernel from experimental
223+
# update and install firmware from unstable
202224
apt update
203225
apt -y install -t unstable firmware-atheros firmware-qcom-soc
204226
# remove sid APT sources and update again
@@ -224,7 +246,7 @@ actions:
224246
EOF
225247
# update and install kernel from experimental
226248
apt update
227-
apt -y install -t experimental linux-image-arm64
249+
apt -y install -t experimental {{$kernelpackage}}
228250
# disable experimental from APT sources
229251
sed -i "1s/^/Enabled: no\n/" \
230252
/etc/apt/sources.list.d/debian-experimental.sources

0 commit comments

Comments
 (0)