950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. From baa2e8235af7143148d8799c5caed2a2eefd9107 Mon Sep 17 00:00:00 2001
  2. From: Dave Stevenson <[email protected]>
  3. Date: Fri, 11 Nov 2022 17:09:32 +0000
  4. Subject: [PATCH] .github/workflows: Create workflow to CI kernel
  5. builds
  6. Builds the bcmrpi, bcm2709, bcm2711, and bcm2835 32 bit kernels,
  7. and defconfig and bcm2711 64bit kernels, saving the artifacts for
  8. 7 days.
  9. Signed-off-by: Dave Stevenson <[email protected]>
  10. ---
  11. .github/workflows/kernel-build.yml | 266 +++++++++++++++++++++++++++++
  12. 1 file changed, 266 insertions(+)
  13. create mode 100644 .github/workflows/kernel-build.yml
  14. --- /dev/null
  15. +++ b/.github/workflows/kernel-build.yml
  16. @@ -0,0 +1,266 @@
  17. +name: Pi kernel build tests
  18. +
  19. +on:
  20. + pull_request:
  21. + paths-ignore:
  22. + - '.github/**'
  23. + branches: [ "rpi-*" ]
  24. + push:
  25. + paths-ignore:
  26. + - '.github/**'
  27. + branches: [ "rpi-*" ]
  28. + workflow_dispatch:
  29. +
  30. +env:
  31. + NUM_JOBS: 3
  32. +
  33. +jobs:
  34. + build-bcm2835:
  35. +
  36. + runs-on: ubuntu-latest
  37. +
  38. + steps:
  39. + - name: Update install
  40. + run:
  41. + sudo apt-get update
  42. +
  43. + - name: Install toolchain
  44. + run:
  45. + sudo apt-get install gcc-arm-linux-gnueabihf
  46. + timeout-minutes: 5
  47. +
  48. + - uses: actions/checkout@v3
  49. + with:
  50. + fetch-depth: 1
  51. + clean: true
  52. +
  53. + - name: Build kernel
  54. + run: |
  55. + mkdir ${{github.workspace}}/build
  56. + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig
  57. + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs
  58. + mkdir -p ${{github.workspace}}/install/boot
  59. + make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  60. + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
  61. + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  62. + cp ${{github.workspace}}/build/arch/arm/boot/Image ${{github.workspace}}/install/boot/
  63. +
  64. + - name: Tar build
  65. + run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install .
  66. +
  67. + - name: Upload results
  68. + uses: actions/upload-artifact@v3
  69. + with:
  70. + name: bcm2835_build
  71. + path: bcm2835_build.tar
  72. + retention-days: 7
  73. +
  74. + build-arm64:
  75. +
  76. + runs-on: ubuntu-latest
  77. +
  78. + steps:
  79. + - name: Update install
  80. + run:
  81. + sudo apt-get update
  82. +
  83. + - name: Install toolchain
  84. + run:
  85. + sudo apt-get install gcc-aarch64-linux-gnu
  86. + timeout-minutes: 5
  87. +
  88. + - uses: actions/checkout@v3
  89. + with:
  90. + fetch-depth: 1
  91. + clean: true
  92. +
  93. + - name: Build kernel
  94. + run: |
  95. + mkdir ${{github.workspace}}/build
  96. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig
  97. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
  98. + mkdir -p ${{github.workspace}}/install/boot
  99. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  100. + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
  101. + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  102. + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
  103. +
  104. + - name: Tar build
  105. + run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install .
  106. +
  107. + - name: Upload results
  108. + uses: actions/upload-artifact@v3
  109. + with:
  110. + name: arm64_build
  111. + path: arm64_build.tar
  112. + retention-days: 7
  113. +
  114. + build-bcmrpi:
  115. +
  116. + runs-on: ubuntu-latest
  117. +
  118. + steps:
  119. + - name: Update install
  120. + run:
  121. + sudo apt-get update
  122. +
  123. + - name: Install toolchain
  124. + run:
  125. + sudo apt-get install gcc-arm-linux-gnueabihf
  126. + timeout-minutes: 5
  127. +
  128. + - uses: actions/checkout@v3
  129. + with:
  130. + fetch-depth: 1
  131. + clean: true
  132. +
  133. + - name: Build kernel
  134. + run: |
  135. + mkdir ${{github.workspace}}/build
  136. + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
  137. + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
  138. + mkdir -p ${{github.workspace}}/install/boot
  139. + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  140. + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
  141. + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  142. + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
  143. +
  144. + - name: Tar build
  145. + run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install .
  146. +
  147. + - name: Upload results
  148. + uses: actions/upload-artifact@v3
  149. + with:
  150. + name: bcmrpi_build
  151. + path: bcmrpi_build.tar
  152. + retention-days: 7
  153. +
  154. + build-bcm2709:
  155. +
  156. + runs-on: ubuntu-latest
  157. +
  158. + steps:
  159. + - name: Update install
  160. + run:
  161. + sudo apt-get update
  162. +
  163. + - name: Install toolchain
  164. + run:
  165. + sudo apt-get install gcc-arm-linux-gnueabihf
  166. + timeout-minutes: 5
  167. +
  168. + - uses: actions/checkout@v3
  169. + with:
  170. + fetch-depth: 1
  171. + clean: true
  172. +
  173. + - name: Build kernel
  174. + run: |
  175. + mkdir ${{github.workspace}}/build
  176. + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig
  177. + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
  178. + mkdir -p ${{github.workspace}}/install/boot
  179. + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  180. + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
  181. + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  182. + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
  183. +
  184. + - name: Tar build
  185. + run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install .
  186. +
  187. + - name: Upload results
  188. + uses: actions/upload-artifact@v3
  189. + with:
  190. + name: bcm2709_build
  191. + path: bcm2709_build.tar
  192. + retention-days: 7
  193. +
  194. + build-bcm2711:
  195. +
  196. + runs-on: ubuntu-latest
  197. +
  198. + steps:
  199. + - name: Update install
  200. + run:
  201. + sudo apt-get update
  202. +
  203. + - name: Install toolchain
  204. + run:
  205. + sudo apt-get install gcc-arm-linux-gnueabihf
  206. + timeout-minutes: 5
  207. +
  208. + - uses: actions/checkout@v3
  209. + with:
  210. + fetch-depth: 1
  211. + clean: true
  212. +
  213. + - name: Build kernel
  214. + run: |
  215. + mkdir ${{github.workspace}}/build
  216. + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
  217. + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
  218. + mkdir -p ${{github.workspace}}/install/boot
  219. + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  220. + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
  221. + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  222. + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
  223. +
  224. + - name: Tar build
  225. + run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install .
  226. +
  227. + - name: Upload results
  228. + uses: actions/upload-artifact@v3
  229. + with:
  230. + name: bcm2711_build
  231. + path: bcm2711_build.tar
  232. + retention-days: 7
  233. +
  234. + build-bcm2711-arm64:
  235. +
  236. + runs-on: ubuntu-latest
  237. +
  238. + steps:
  239. + - name: Update install
  240. + run:
  241. + sudo apt-get update
  242. +
  243. + - name: Install toolchain
  244. + run:
  245. + sudo apt-get install gcc-arm-linux-gnueabihf
  246. + timeout-minutes: 5
  247. +
  248. + - uses: actions/checkout@v3
  249. + with:
  250. + fetch-depth: 1
  251. + clean: true
  252. +
  253. + - name: Install toolchain
  254. + run:
  255. + sudo apt-get install gcc-aarch64-linux-gnu
  256. + timeout-minutes: 5
  257. +
  258. + - uses: actions/checkout@v3
  259. + with:
  260. + fetch-depth: 1
  261. + clean: true
  262. +
  263. + - name: Build kernel
  264. + run: |
  265. + mkdir ${{github.workspace}}/build
  266. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig
  267. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
  268. + mkdir -p ${{github.workspace}}/install/boot
  269. + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
  270. + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
  271. + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
  272. + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
  273. +
  274. + - name: Tar build
  275. + run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install .
  276. +
  277. + - name: Upload results
  278. + uses: actions/upload-artifact@v3
  279. + with:
  280. + name: bcm2711_arm64_build
  281. + path: bcm2711_arm64_build.tar
  282. + retention-days: 7