-
Notifications
You must be signed in to change notification settings - Fork 4
/
.cirrus.yml
405 lines (369 loc) · 19.5 KB
/
.cirrus.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder
platform: linux
cpu: 4
memory: 16G
env:
CROSS_COMPILE: riscv64-linux-gnu-
ARCH: riscv
SKIP_INSTALL_PACKAGE: no
HOME: /tmp/cirrus-ci-build/
OUT_DIR: /tmp/cirrus-ci-build/output
DEVICE: /dev/loop100
DISTURB: deepin
DEEPIN_REPO: https://mirror.iscas.ac.cn/deepin-riscv/deepin-stage1/
DEEPIN_BASE_ROOTFS: https://mirror.iscas.ac.cn/deepin-riscv/deepin-stage1/deepin-beige-stage1-dde.tar.gz
KBUILD_BUILD_USER: deepin-riscv-sig
KBUILD_BUILD_HOST: deepin-riscv-builder
GITHUB_TOKEN: ENCRYPTED[7aafa8514d8601470288e2ca86822fba2941bf8504b44c611731a5f22151f9ed4c807842a56f3a8a028e1e65ed1d3a03]
task:
machine_init_script: |
scripts/machine_init.sh
install_qemu_script: |
scripts/qemu_setup.sh
install_build_script: |
scripts/install_deps.sh
download_root_tarball_script: |
wget -O deepin-rootfs.tar.gz ${DEEPIN_BASE_ROOTFS}
create_rootfsimg_script: |
if [ x"${base_path}" = x"visionfive" ]; then
sfdisk rootfs.img < common/part-table.conf
losetup -P "${DEVICE}" rootfs.img
mkfs.ext4 "${DEVICE}"p3
mkfs.ext4 "${DEVICE}"p4
mkfs.vfat -F32 "${DEVICE}"p2
mount "${DEVICE}"p4 rootfs
mkdir rootfs/boot
mount "${DEVICE}"p3 rootfs/boot
mkdir rootfs/boot/efi
mount "${DEVICE}"p2 rootfs/boot/efi
elif [ x"${base_path}" = x"visionfive-2" ]; then
sfdisk rootfs.img < common/part-table.conf
losetup -P "${DEVICE}" rootfs.img
mkfs.vfat -F32 "${DEVICE}"p3
mkfs.ext4 "${DEVICE}"p4
mkfs.vfat -F32 "${DEVICE}"p2
mount "${DEVICE}"p4 rootfs
mkdir rootfs/boot
mount "${DEVICE}"p3 rootfs/boot
mkdir rootfs/boot/efi
mount "${DEVICE}"p2 rootfs/boot/efi
elif [ x"${base_path}" = x"d1" ]; then
losetup -P "${DEVICE}" rootfs.img
parted -s -a optimal -- "${DEVICE}" mklabel gpt
parted -s -a optimal -- "${DEVICE}" mkpart primary fat32 40MiB 500MiB
parted -s -a optimal -- "${DEVICE}" set 1 esp on
parted -s -a optimal -- "${DEVICE}" mkpart primary ext4 500MiB 1000MiB
parted -s -a optimal -- "${DEVICE}" mkpart primary ext4 1000MiB 100%
partprobe "${DEVICE}"
mkfs.vfat -F32 -n efi "${DEVICE}p1"
mkfs.ext4 -F -L boot "${DEVICE}p2"
mkfs.ext4 -F -L root "${DEVICE}p3"
mount "${DEVICE}p3" rootfs
mkdir rootfs/boot
mount "${DEVICE}p2" rootfs/boot
mkdir rootfs/boot/efi
mount "${DEVICE}p1" rootfs/boot/efi
elif [ x"${base_path}" = x"sifive" ]; then
losetup -P "${DEVICE}" rootfs.img
parted -s -a optimal -- "${DEVICE}" mklabel gpt
parted -s -a optimal -- "${DEVICE}" mkpart primary fat32 40MiB 500MiB
parted -s -a optimal -- "${DEVICE}" set 1 esp on
parted -s -a optimal -- "${DEVICE}" mkpart primary ext4 500MiB 1000MiB
parted -s -a optimal -- "${DEVICE}" mkpart primary ext4 1000MiB 100%
partprobe "${DEVICE}"
mkfs.vfat -F32 -n efi "${DEVICE}p1"
mkfs.ext4 -F -L boot "${DEVICE}p2"
mkfs.ext4 -F -L root "${DEVICE}p3"
mount "${DEVICE}p3" rootfs
mkdir rootfs/boot
mount "${DEVICE}p2" rootfs/boot
mkdir rootfs/boot/efi
mount "${DEVICE}p1" rootfs/boot/efi
fi
unpack_root_tarball_script: |
pushd rootfs
tar xpvf ../deepin-rootfs.tar.gz --xattrs-include='*.*' --numeric-owner
popd
mount_and_setup_script: |
scripts/rootfs_setup.sh
update_root_tarball_script: |
scripts/update_rootfs.sh
matrix:
- name: sifive
env:
base_path: sifive
kernel_branch: linux-6.0.y
kernel_git: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
kernel_config: defconfig
opensbi_branch: v1.1
opensbi_git: https://github.com/riscv-software-src/opensbi.git
uboot_branch: v2023.01-rc1
uboot_git: https://github.com/u-boot/u-boot.git
uboot_config: sifive_unmatched_defconfig
kernel_script: |
cp -v ./rootfs/boot/config-* ./rootfs/boot/latest-config
echo "Skip & install maintain-kernel"
# git clone --depth=1 -b ${kernel_branch} ${kernel_git} kernel
# pushd kernel
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv ${kernel_config}
# if [ -f ../${base_path}/kernelconfig ]; then
# cp -v ../${base_path}/kernelconfig .config
# fi
# sed -i '/CONFIG_LOCALVERSION_AUTO/d' .config && echo "CONFIG_LOCALVERSION_AUTO=n" >> .config
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j$(nproc)
# if [ x"$(cat .config | grep CONFIG_MODULES=y)" = x"CONFIG_MODULES=y" ]; then
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_MOD_PATH=../rootfs/ modules_install -j$(nproc)
# fi
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_PATH=../rootfs/boot install -j$(nproc)
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv bindeb-pkg -j$(nproc)
# # Install DTB
# cp -v arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dtb ../rootfs/boot/
# # Copy kernel Deb to root HOME
# cp -v ../*.deb ../rootfs/root/
# cp -v .config ../rootfs/boot/latest-config
# ls -al ../rootfs/boot/
# popd
uboot_script: |
DIR='opensbi'
git clone --depth=1 -b ${opensbi_branch} ${opensbi_git} ${DIR}
pushd ${DIR}
make CROSS_COMPILE="${CROSS_COMPILE}" PLATFORM=generic
popd
cp opensbi/build/platform/generic/firmware/fw_dynamic.bin ${OUT_DIR}
DIR='u-boot'
git clone --depth=1 -b ${uboot_branch} ${uboot_git} ${DIR}
pushd ${DIR}
make CROSS_COMPILE="${CROSS_COMPILE}" ARCH="${ARCH}" ${uboot_config}
make CROSS_COMPILE="${CROSS_COMPILE}" ARCH="${ARCH}" OPENSBI="${OUT_DIR}/fw_dynamic.bin" -j$(nproc)
popd
cp ${DIR}/spl/u-boot-spl.bin "${OUT_DIR}"
cp ${DIR}/u-boot.itb "${OUT_DIR}"
install_grub_script: |
mkdir -p rootfs/boot/efi/efi/boot
cp -v common/grubriscv64.efi rootfs/boot/efi/efi/boot/bootriscv64.efi
export kernel_version=$(ls rootfs/boot/ | grep vmlinux- | sed 's/vmlinux-//' | head -n 1 )
cp -v $base_path/grub.cfg rootfs/boot/
sed -i "s/custom_kernel_version/$kernel_version/g" rootfs/boot/grub.cfg
- name: visionfive
env:
base_path: visionfive
kernel_branch: visionfive
kernel_git: https://github.com/starfive-tech/linux.git
kernel_config: visionfive_defconfig
kernel_script: |
git clone --depth=1 -b ${kernel_branch} ${kernel_git} kernel
pushd kernel
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv ${kernel_config}
if [ -f ../${base_path}/kernelconfig ]; then
cp -v ../${base_path}/kernelconfig .config
fi
sed -i '/CONFIG_LOCALVERSION_AUTO/d' .config && echo "CONFIG_LOCALVERSION_AUTO=n" >> .config
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j$(nproc)
if [ x"$(cat .config | grep CONFIG_MODULES=y)" = x"CONFIG_MODULES=y" ]; then
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_MOD_PATH=../rootfs/ modules_install -j$(nproc)
fi
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_PATH=../rootfs/boot install -j$(nproc)
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv bindeb-pkg -j$(nproc)
# Install DTB
cp -v arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dtb ../rootfs/boot/
cp -v arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dtb ../rootfs/boot/
# Copy kernel Deb to root HOME
cp -v ../*.deb ../rootfs/root/
cp -v .config ../rootfs/boot/latest-config
ls -al ../rootfs/boot/
popd
install_grub_script: |
mkdir -p rootfs/boot/efi/EFI/${DISTURB}
cp -v common/grubriscv64.efi rootfs/boot/efi/EFI/${DISTURB}/
mkdir -p rootfs/boot/boot
cp -v $base_path/uEnv.txt rootfs/boot/boot
export kernel_version=$(ls rootfs/boot/ | grep vmlinuz- | sed 's/vmlinuz-//' | head -n 1 )
cp -v $base_path/grub.cfg rootfs/boot/
sed -i "s/custom_kernel_version/$kernel_version/g" rootfs/boot/grub.cfg
- name: visionfive-2
env:
base_path: visionfive-2
kernel_branch: JH7110_VisionFive2_devel
kernel_git: https://github.com/starfive-tech/linux.git
kernel_config: starfive_visionfive2_defconfig
kernel_script: |
git clone --depth=1 -b ${kernel_branch} ${kernel_git} kernel
pushd kernel
wget https://github.com/starfive-tech/linux/commit/2f75442523e4b44bdea4ae5bc2e95137d0303c8b.patch
git am 2f75442523e4b44bdea4ae5bc2e95137d0303c8b.patch
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv ${kernel_config}
if [ -f ../${base_path}/kernelconfig ]; then
cp -v ../${base_path}/kernelconfig .config
fi
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j$(nproc)
if [ x"$(cat .config | grep CONFIG_MODULES=y)" = x"CONFIG_MODULES=y" ]; then
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_MOD_PATH=../rootfs/ modules_install -j$(nproc)
fi
# make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_PATH=../rootfs/boot zinstall -j$(nproc)
# Install DTB
cp -v arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtb ../rootfs/boot/
cp -v .config ../rootfs/boot/latest-config
# Install Kernel
cp -v arch/riscv/boot/Image ../rootfs/boot/
cp -v arch/riscv/boot/Image.gz ../rootfs/boot/
ls -al ../rootfs/boot/
popd
install_uboot_script: |
cp -v $base_path/vf2_uEnv.txt rootfs/boot/
- name: d1
env:
base_path: d1
kernel_branch: riscv/d1-wip
kernel_git: https://github.com/smaeul/linux.git
kernel_config: nezha_defconfig
opensbi_branch: d1-wip
opensbi_git: https://github.com/smaeul/opensbi.git
uboot_branch: d1-wip
uboot_git: https://github.com/smaeul/u-boot.git
uboot_config: nezha_defconfig
kernel_script: |
git clone --depth=1 -b ${kernel_branch} ${kernel_git} kernel
pushd kernel
export DIR=$PWD
echo "CONFIG_LOCALVERSION=${KERNEL_RELEASE}" >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_WIRELESS=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_CFG80211=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable /proc/config.gz
echo 'CONFIG_IKCONFIG=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_IKCONFIG_PROC=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# There is no LAN. so let there be USB-LAN
echo 'CONFIG_USB_NET_DRIVERS=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_CATC=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_KAWETH=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_PEGASUS=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_RTL8150=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_RTL8152=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_LAN78XX=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_USBNET=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_AX8817X=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_AX88179_178A=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDCETHER=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDC_EEM=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDC_NCM=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_HUAWEI_CDC_NCM=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDC_MBIM=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_DM9601=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_SR9700=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_SR9800=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_SMSC75XX=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_SMSC95XX=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_GL620A=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_NET1080=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_PLUSB=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_MCS7830=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_RNDIS_HOST=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDC_SUBSET_ENABLE=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CDC_SUBSET=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_ALI_M5632=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_AN2720=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_BELKIN=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_ARMLINUX=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_EPSON2888=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_KC2190=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_ZAURUS=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CX82310_ETH=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_KALMIA=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_QMI_WWAN=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_INT51X1=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_IPHETH=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_SIERRA_NET=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_VL600=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_CH9200=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_NET_AQC111=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_USB_RTL8153_ECM=m' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable systemV IPC (needed by fakeroot during makepkg)
echo 'CONFIG_SYSVIPC=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_SYSVIPC_SYSCTL=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable swap
echo 'CONFIG_SWAP=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_ZSWAP=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable Cedrus VPU Drivers
echo 'CONFIG_MEDIA_SUPPORT=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_MEDIA_CONTROLLER=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_MEDIA_CONTROLLER_REQUEST_API=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_V4L_MEM2MEM_DRIVERS=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_VIDEO_SUNXI_CEDRUS=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable binfmt_misc
echo 'CONFIG_BINFMT_MISC=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable EFI
echo 'CONFIG_EFI=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_EFI_ZBOOT=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
# enable fat
echo 'CONFIG_VFAT_FS=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_FAT_DEFAULT_UTF8=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_EXFAT_FS=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_NLS_CODEPAGE_437=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_NLS_ISO8859_15=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_NLS_DEFAULT="utf8"' >> ${DIR}/arch/riscv/configs/nezha_defconfig
echo 'CONFIG_NLS_UTF8=y' >> ${DIR}/arch/riscv/configs/nezha_defconfig
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv ${kernel_config}
sed -i '/CONFIG_LOCALVERSION_AUTO/d' .config && echo "CONFIG_LOCALVERSION_AUTO=n" >> .config
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j$(nproc)
if [ x"$(cat .config | grep CONFIG_MODULES=y)" = x"CONFIG_MODULES=y" ]; then
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_MOD_PATH=../rootfs/ modules_install -j$(nproc)
fi
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_PATH=../rootfs/boot install -j$(nproc)
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv dtbs
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv bindeb-pkg -j$(nproc)
# Install DTB
cp -v arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dtb ../rootfs/boot/
cp -v arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dtb ../rootfs/boot/
cp -v arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dtb ../rootfs/boot/
# Copy kernel Deb to root HOME
cp -v ../*.deb ../rootfs/root/
# Backup kernel build config
cp -v .config ../rootfs/boot/latest-config
ls -al ../rootfs/boot/
git clone https://github.com/lwfinger/rtl8723ds.git
pushd rtl8723ds
make CROSS_COMPILE=${CROSS_COMPILE} ARCH=${ARCH} KSRC=../ -j$(nproc) modules || true
popd
for kernel_version in $(ls ../rootfs/lib/modules/);
do
install -D -p -m 644 "rtl8723ds/8723ds.ko" \
"../rootfs/lib/modules/${kernel_version}/kernel/drivers/net/wireless/8723ds.ko"
depmod -a -b "../rootfs" "${kernel_version}"
echo '8723ds' >> 8723ds.conf
mv 8723ds.conf "../rootfs/etc/modules-load.d/"
done
popd
uboot_script: |
DIR='opensbi'
git clone --depth=1 -b ${opensbi_branch} ${opensbi_git} ${DIR}
pushd ${DIR}
make CROSS_COMPILE="${CROSS_COMPILE}" PLATFORM=generic FW_PIC=y FW_OPTIONS=0x2
popd
cp opensbi/build/platform/generic/firmware/fw_dynamic.bin ${OUT_DIR}
DIR='u-boot'
git clone --depth=1 -b ${uboot_branch} ${uboot_git} ${DIR}
pushd ${DIR}
make CROSS_COMPILE="${CROSS_COMPILE}" ARCH="${ARCH}" ${uboot_config}
make CROSS_COMPILE="${CROSS_COMPILE}" ARCH="${ARCH}" OPENSBI="${OUT_DIR}/fw_dynamic.bin" -j$(nproc)
popd
cp ${DIR}/u-boot-sunxi-with-spl.bin "${OUT_DIR}"
flash_boot_spl_script: |
dd if="${OUT_DIR}/u-boot-sunxi-with-spl.bin" of="${DEVICE}" bs=1024 seek=128
install_grub_script: |
mkdir -p rootfs/boot/efi/efi/boot/
cp -v common/grubriscv64.efi rootfs/boot/efi/efi/boot/bootriscv64.efi
mkdir -p rootfs/boot/boot
cp -v $base_path/uEnv.txt rootfs/boot/boot
export kernel_version=$(ls rootfs/boot/ | grep vmlinuz- | sed 's/vmlinuz-//' | head -n 1 )
cp -v $base_path/grub.cfg rootfs/boot/
sed -i "s/custom_kernel_version/$kernel_version/g" rootfs/boot/grub.cfg
clean_rootfs_script: |
scripts/clean_rootfs.sh
upload_publish_script: |
scripts/publish.sh
kernel_build_artifacts:
path: "${DISTURB}-kernel-${base_path}-*.tar.zst"
upload_artifacts:
path: "${DISTURB}-*-*.img.zst*"