|
| 1 | +name: Build images |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + strategy: |
| 8 | + fail-fast: false |
| 9 | + matrix: |
| 10 | + include: |
| 11 | + - device: sm7150-google-sunfish |
| 12 | + - device: sm7150-xiaomi-davinci |
| 13 | + - device: sm7150-xiaomi-surya-huaxing |
| 14 | + - device: sm7150-xiaomi-surya-tianma |
| 15 | + - device: sm7150-xiaomi-sweet |
| 16 | + |
| 17 | + name: Build ${{ matrix.device }} |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout sources |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + sudo apt update |
| 27 | + sudo apt install -y --no-install-recommends gcc-aarch64-linux-gnu libgnutls28-dev |
| 28 | +
|
| 29 | + # mkbootimg in Ubuntu repos is broken, so use the forked C variant |
| 30 | + - name: Build mkbootimg |
| 31 | + run: | |
| 32 | + git clone https://github.com/osm0sis/mkbootimg |
| 33 | + cd mkbootimg |
| 34 | + CFLAGS=-Wstringop-overflow=0 make mkbootimg |
| 35 | + cd .. |
| 36 | +
|
| 37 | + - name: Configure U-Boot |
| 38 | + run: | |
| 39 | + make CROSS_COMPILE=aarch64-linux-gnu- O=.output qcom_defconfig qcom-phone.config |
| 40 | +
|
| 41 | + - name: Build U-Boot |
| 42 | + run: | |
| 43 | + make CROSS_COMPILE=aarch64-linux-gnu- O=.output -j$(nproc) CONFIG_DEFAULT_DEVICE_TREE=qcom/${{ matrix.device }} |
| 44 | +
|
| 45 | + - name: Assemble Android boot.img |
| 46 | + run: | |
| 47 | + gzip .output/u-boot-nodtb.bin -c > .output/u-boot-nodtb.bin.gz |
| 48 | + cat .output/u-boot-nodtb.bin.gz .output/dts/upstream/src/arm64/qcom/${{ matrix.device }}.dtb > .output/uboot-dtb |
| 49 | + ./mkbootimg/mkbootimg --base '0x0' --kernel_offset '0x00008000' --pagesize '4096' --kernel .output/uboot-dtb -o .output/u-boot.img |
| 50 | +
|
| 51 | + - name: Upload artifact |
| 52 | + uses: actions/upload-artifact@v4 |
| 53 | + with: |
| 54 | + name: u-boot-${{ matrix.device }}.img |
| 55 | + path: .output/u-boot.img |
0 commit comments