Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a057341

Browse files
committed
Add a GitHub workflow for building images
Signed-off-by: Jens Reidel <[email protected]>
1 parent 9f99746 commit a057341

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/build-images.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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

Comments
 (0)