1 From baa2e8235af7143148d8799c5caed2a2eefd9107 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 11 Nov 2022 17:09:32 +0000
4 Subject: [PATCH] .github/workflows: Create workflow to CI kernel
7 Builds the bcmrpi, bcm2709, bcm2711, and bcm2835 32 bit kernels,
8 and defconfig and bcm2711 64bit kernels, saving the artifacts for
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 .github/workflows/kernel-build.yml | 266 +++++++++++++++++++++++++++++
14 1 file changed, 266 insertions(+)
15 create mode 100644 .github/workflows/kernel-build.yml
18 +++ b/.github/workflows/kernel-build.yml
20 +name: Pi kernel build tests
26 + branches: [ "rpi-*" ]
30 + branches: [ "rpi-*" ]
39 + runs-on: ubuntu-latest
42 + - name: Update install
46 + - name: Install toolchain
48 + sudo apt-get install gcc-arm-linux-gnueabihf
51 + - uses: actions/checkout@v3
56 + - name: Build kernel
58 + mkdir ${{github.workspace}}/build
59 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig
60 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs
61 + mkdir -p ${{github.workspace}}/install/boot
62 + make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
63 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
64 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
65 + cp ${{github.workspace}}/build/arch/arm/boot/Image ${{github.workspace}}/install/boot/
68 + run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install .
70 + - name: Upload results
71 + uses: actions/upload-artifact@v3
74 + path: bcm2835_build.tar
79 + runs-on: ubuntu-latest
82 + - name: Update install
86 + - name: Install toolchain
88 + sudo apt-get install gcc-aarch64-linux-gnu
91 + - uses: actions/checkout@v3
96 + - name: Build kernel
98 + mkdir ${{github.workspace}}/build
99 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig
100 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
101 + mkdir -p ${{github.workspace}}/install/boot
102 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
103 + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
104 + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
105 + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
108 + run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install .
110 + - name: Upload results
111 + uses: actions/upload-artifact@v3
114 + path: arm64_build.tar
119 + runs-on: ubuntu-latest
122 + - name: Update install
124 + sudo apt-get update
126 + - name: Install toolchain
128 + sudo apt-get install gcc-arm-linux-gnueabihf
131 + - uses: actions/checkout@v3
136 + - name: Build kernel
138 + mkdir ${{github.workspace}}/build
139 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
140 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
141 + mkdir -p ${{github.workspace}}/install/boot
142 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
143 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
144 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
145 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
148 + run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install .
150 + - name: Upload results
151 + uses: actions/upload-artifact@v3
154 + path: bcmrpi_build.tar
159 + runs-on: ubuntu-latest
162 + - name: Update install
164 + sudo apt-get update
166 + - name: Install toolchain
168 + sudo apt-get install gcc-arm-linux-gnueabihf
171 + - uses: actions/checkout@v3
176 + - name: Build kernel
178 + mkdir ${{github.workspace}}/build
179 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig
180 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
181 + mkdir -p ${{github.workspace}}/install/boot
182 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
183 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
184 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
185 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
188 + run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install .
190 + - name: Upload results
191 + uses: actions/upload-artifact@v3
193 + name: bcm2709_build
194 + path: bcm2709_build.tar
199 + runs-on: ubuntu-latest
202 + - name: Update install
204 + sudo apt-get update
206 + - name: Install toolchain
208 + sudo apt-get install gcc-arm-linux-gnueabihf
211 + - uses: actions/checkout@v3
216 + - name: Build kernel
218 + mkdir ${{github.workspace}}/build
219 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
220 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
221 + mkdir -p ${{github.workspace}}/install/boot
222 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
223 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
224 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
225 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
228 + run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install .
230 + - name: Upload results
231 + uses: actions/upload-artifact@v3
233 + name: bcm2711_build
234 + path: bcm2711_build.tar
237 + build-bcm2711-arm64:
239 + runs-on: ubuntu-latest
242 + - name: Update install
244 + sudo apt-get update
246 + - name: Install toolchain
248 + sudo apt-get install gcc-arm-linux-gnueabihf
251 + - uses: actions/checkout@v3
256 + - name: Install toolchain
258 + sudo apt-get install gcc-aarch64-linux-gnu
261 + - uses: actions/checkout@v3
266 + - name: Build kernel
268 + mkdir ${{github.workspace}}/build
269 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig
270 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
271 + mkdir -p ${{github.workspace}}/install/boot
272 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
273 + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
274 + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
275 + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
278 + run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install .
280 + - name: Upload results
281 + uses: actions/upload-artifact@v3
283 + name: bcm2711_arm64_build
284 + path: bcm2711_arm64_build.tar