-
-
Notifications
You must be signed in to change notification settings - Fork 9
199 lines (199 loc) · 6.73 KB
/
build-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Build Quartz64 Images
on: push
jobs:
build_uboot:
strategy:
matrix:
boards: [
{
name: "Quartz64 Model A",
uboot-config: "quartz64-a-rk3566_defconfig",
uboot-name: "quartz64a"
},
{
name: "Quartz64 Model B",
uboot-config: "quartz64-b-rk3566_defconfig",
uboot-name: "quartz64b"
},
{
name: "SOQuartz Blade",
uboot-config: "soquartz-blade-rk3566_defconfig",
uboot-name: "soquartz-blade"
},
{
name: "SOQuartz CM4IO",
uboot-config: "soquartz-cm4-rk3566_defconfig",
uboot-name: "soquartz-cm4io"
},
{
name: "SOQuartz Model A",
uboot-config: "soquartz-model-a-rk3566_defconfig",
uboot-name: "soquartz-model-a"
},
{
name: "EVB",
uboot-config: "evb-rk3568_defconfig",
uboot-name: "evb-rk3568"
},
]
runs-on: ubuntu-22.04
steps:
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install build-essential crossbuild-essential-arm64 device-tree-compiler python3-pyelftools
#- name: Clone rkbin repository
# uses: actions/checkout@v3
# with:
# repository: 'rockchip-linux/rkbin'
# path: 'rkbin'
- name: Clone workflow repository
uses: actions/checkout@v3
with:
submodules: true
- name: Clean u-boot
run: |
cd u-boot-quartz64
make mrproper
- name: Fetch rkbins
run: |
wget -q https://github.com/rockchip-linux/rkbin/raw/d6ccfe401ca84a98ca3b85c12b9554a1a43a166c/bin/rk35/rk3568_bl31_v1.42.elf -O u-boot-quartz64/rk3568_bl31_v1.42.elf
wget -q https://github.com/rockchip-linux/rkbin/raw/d6ccfe401ca84a98ca3b85c12b9554a1a43a166c/bin/rk35/rk3566_ddr_1056MHz_v1.16.bin -O u-boot-quartz64/rk3566_ddr_1056MHz_v1.16.bin
- name: Build u-boot
run: |
cd u-boot-quartz64
export ROCKCHIP_TPL=rk3566_ddr_1056MHz_v1.16.bin
export BL31=rk3568_bl31_v1.42.elf
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ${{ matrix.boards.uboot-config }}
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
- name: Archive u-boot artifacts
uses: actions/upload-artifact@v3
with:
name: u-boot-${{ matrix.boards.uboot-name }}
path: |
u-boot-quartz64/u-boot-rockchip.bin
u-boot-quartz64/u-boot-rockchip-spi.bin
# build_kernel:
# runs-on: self-hosted
# steps:
# - name: Clone workflow repository
# uses: actions/checkout@v3
# - name: Install toolchain
# run: |
# sudo apt-get -yq update && sudo apt-get -yq upgrade
# sudo apt-get -yq install build-essential crossbuild-essential-arm64 device-tree-compiler \
# autoconf bc bison flex ccache cpio dkms fakeroot kmod quilt rsync dh-exec \
# libssl-dev libncurses-dev libelf-dev libudev-dev libpci-dev libiberty-dev
# - name: Clone kernel repository
# uses: actions/checkout@v3
# with:
# repository: 'CounterPillow/linux'
# ref: 'quartz64-deploy'
# path: 'linux'
# - name: Make config
# run: |
# cp config linux/.config
# cd linux
# make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olddefconfig
# - name: Build kernel
# run: |
# cd linux
# make -j$(nproc) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- deb-pkg
# - name: Archive kernel artifacts
# uses: actions/upload-artifact@v3
# with:
# name: linux-kernel
# path: |
# linux-image-*.deb
# linux-libc-dev*.deb
# !linux-image-*dbg*.deb
build_image:
strategy:
matrix:
boards: [
{
name: "Quartz64 Model A",
debos-yaml: "debian-quartz64a.yaml",
uboot-name: "quartz64a"
},
{
name: "Quartz64 Model B",
debos-yaml: "debian-quartz64b.yaml",
uboot-name: "quartz64b"
},
{
name: "SOQuartz CM4 IO Board",
debos-yaml: "debian-soquartz-cm4.yaml",
uboot-name: "soquartz-cm4io"
},
{
name: "SOQuartz Blade",
debos-yaml: "debian-soquartz-blade.yaml",
uboot-name: "soquartz-blade"
},
{
name: "SOQuartz Model A",
debos-yaml: "debian-soquartz-model-a.yaml",
uboot-name: "soquartz-model-a"
},
]
runs-on: ubuntu-22.04
needs:
- build_uboot
# - build_kernel
env:
GOPATH: /opt/src/gocode
steps:
- name: Clone workflow repository
uses: actions/checkout@v3
- name: Download u-boot artifacts
uses: actions/download-artifact@v3
with:
name: u-boot-${{ matrix.boards.uboot-name}}
path: debos-recipes/u-boot/
# - name: Download kernel artifacts
# uses: actions/download-artifact@v3
# with:
# name: linux-kernel
# path: debos-recipes/overlays/linux-kernel/
- name: Install debos dependencies
run: |
sudo apt-get update
sudo apt-get install golang git libglib2.0-dev libostree-dev \
qemu-system-x86 qemu-user-static debootstrap \
systemd-container
- name: Install debos
run: go install -v github.com/go-debos/debos/cmd/debos@latest
- name: Build ${{ matrix.boards.name }} Image
run: sudo /opt/src/gocode/bin/debos --disable-fakemachine debos-recipes/${{ matrix.boards.debos-yaml }}
- name: Archive image artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.boards.name }} Image
path: |
*.img.xz
do_release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- build_image
steps:
- name: Clone workflow repository
uses: actions/checkout@v3
- name: Download image artifacts
uses: actions/download-artifact@v3
with:
path: artifacts/
- name: Generate checksums
run: |
./generate-release-checksums.sh artifacts/
- name: Tar up u-boot binaries
run: |
tar -caf u-boot.tar.gz artifacts/u-boot*
- name: Make release
uses: softprops/action-gh-release@v0.1.15
with:
files: |
artifacts/**/plebian*.img.xz
artifacts/**/plebian*.img.xz.sha256
u-boot.tar.gz