|
| 1 | +name: GMSL Kernel Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths-ignore: |
| 6 | + - '.github/**' |
| 7 | + branches: |
| 8 | + - 'gmsl/rpi-6.13.y' |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +env: |
| 12 | + NUM_JOBS: 6 |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + include: |
| 20 | + - name: bcm2711_adi_gmsl |
| 21 | + defconfig: bcm2711_adi_gmsl_defconfig |
| 22 | + kernel: kernel8 |
| 23 | + |
| 24 | + - name: bcm2712_adi_gmsl |
| 25 | + defconfig: bcm2712_adi_gmsl_defconfig |
| 26 | + kernel: kernel_2712 |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Update install |
| 30 | + run: sudo apt-get update |
| 31 | + |
| 32 | + - name: Install toolchain |
| 33 | + run: sudo apt-get install -y gcc-aarch64-linux-gnu flex bison libssl-dev bc libelf-dev |
| 34 | + timeout-minutes: 5 |
| 35 | + |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + with: |
| 38 | + fetch-depth: 1 |
| 39 | + clean: true |
| 40 | + |
| 41 | + - name: Build kernel ${{ matrix.name }} |
| 42 | + run: | |
| 43 | + mkdir ${{ github.workspace }}/build |
| 44 | + export ARCH=arm64 |
| 45 | + export CROSS_COMPILE=aarch64-linux-gnu- |
| 46 | +
|
| 47 | + make O=${{ github.workspace }}/build ${{ matrix.defconfig }} |
| 48 | + make O=${{ github.workspace }}/build -j ${{ env.NUM_JOBS }} Image modules dtbs |
| 49 | +
|
| 50 | + mkdir -p ${{ github.workspace }}/install/boot/overlays |
| 51 | + cp ${{ github.workspace }}/build/arch/arm64/boot/dts/broadcom/*.dtb \ |
| 52 | + ${{ github.workspace }}/install/boot/ |
| 53 | + cp ${{ github.workspace }}/build/arch/arm64/boot/dts/overlays/*.dtb* \ |
| 54 | + ${{ github.workspace }}/install/boot/overlays/ |
| 55 | + cp ${{ github.workspace }}/arch/arm64/boot/dts/overlays/README \ |
| 56 | + ${{ github.workspace }}/install/boot/overlays/ || true |
| 57 | + cp ${{ github.workspace }}/build/arch/arm64/boot/Image \ |
| 58 | + ${{ github.workspace }}/install/boot/${{ matrix.kernel }}.img |
| 59 | +
|
| 60 | + make O=${{ github.workspace }}/build \ |
| 61 | + INSTALL_MOD_PATH=${{ github.workspace }}/install/modules \ |
| 62 | + modules_install |
| 63 | +
|
| 64 | + - name: Upload boot files |
| 65 | + uses: actions/upload-artifact@v4 |
| 66 | + with: |
| 67 | + name: ${{ matrix.name }}_boot |
| 68 | + path: ${{ github.workspace }}/install/boot/ |
| 69 | + retention-days: 30 |
| 70 | + |
| 71 | + - name: Upload modules |
| 72 | + uses: actions/upload-artifact@v4 |
| 73 | + with: |
| 74 | + name: ${{ matrix.name }}_modules |
| 75 | + path: ${{ github.workspace }}/install/modules/lib/modules/ |
| 76 | + retention-days: 30 |
| 77 | + |
| 78 | + package: |
| 79 | + needs: build |
| 80 | + runs-on: ubuntu-latest |
| 81 | + steps: |
| 82 | + - name: Download RPi4 boot files |
| 83 | + uses: actions/download-artifact@v4 |
| 84 | + with: |
| 85 | + name: bcm2711_adi_gmsl_boot |
| 86 | + path: combined/boot/ |
| 87 | + |
| 88 | + - name: Download RPi5 boot files |
| 89 | + uses: actions/download-artifact@v4 |
| 90 | + with: |
| 91 | + name: bcm2712_adi_gmsl_boot |
| 92 | + path: combined/boot/ |
| 93 | + |
| 94 | + - name: Download RPi4 modules |
| 95 | + uses: actions/download-artifact@v4 |
| 96 | + with: |
| 97 | + name: bcm2711_adi_gmsl_modules |
| 98 | + path: combined/modules/ |
| 99 | + |
| 100 | + - name: Download RPi5 modules |
| 101 | + uses: actions/download-artifact@v4 |
| 102 | + with: |
| 103 | + name: bcm2712_adi_gmsl_modules |
| 104 | + path: combined/modules/ |
| 105 | + |
| 106 | + - name: Create combined boot tarball |
| 107 | + run: | |
| 108 | + cd combined/boot |
| 109 | + tar -czf ${{ github.workspace }}/rpi_latest_boot_64bit.tar.gz . |
| 110 | +
|
| 111 | + - name: Create combined modules tarball |
| 112 | + run: | |
| 113 | + cd combined/modules |
| 114 | + tar -czf ${{ github.workspace }}/rpi_modules_64bit.tar.gz . |
| 115 | +
|
| 116 | + - name: Upload combined boot tarball |
| 117 | + uses: actions/upload-artifact@v4 |
| 118 | + with: |
| 119 | + name: rpi_boot_64bit |
| 120 | + path: ${{ github.workspace }}/rpi_latest_boot_64bit.tar.gz |
| 121 | + retention-days: 30 |
| 122 | + |
| 123 | + - name: Upload combined modules tarball |
| 124 | + uses: actions/upload-artifact@v4 |
| 125 | + with: |
| 126 | + name: rpi_modules_64bit |
| 127 | + path: ${{ github.workspace }}/rpi_modules_64bit.tar.gz |
| 128 | + retention-days: 30 |
| 129 | + |
| 130 | + - name: Trigger adi-kuiper-gen build |
| 131 | + run: | |
| 132 | + curl --fail-with-body -s -X POST \ |
| 133 | + -H "Accept: application/vnd.github+json" \ |
| 134 | + -H "Authorization: Bearer ${{ secrets.CROSS_REPO_PAT }}" \ |
| 135 | + https://api.github.com/repos/analogdevicesinc/adi-kuiper-gen/dispatches \ |
| 136 | + -d '{ |
| 137 | + "event_type": "kernel-build-complete", |
| 138 | + "client_payload": { |
| 139 | + "run_id": "${{ github.run_id }}", |
| 140 | + "sha": "${{ github.sha }}", |
| 141 | + "branch": "${{ github.ref_name }}" |
| 142 | + } |
| 143 | + }' |
0 commit comments