Skip to content

Commit 4fb531f

Browse files
authored
Merge pull request #21 from lool/rb1-flat-image_v2
Flat images for RB1
2 parents 7c043f5 + 3575d2f commit 4fb531f

File tree

11 files changed

+550
-181
lines changed

11 files changed

+550
-181
lines changed

.github/workflows/debos.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,27 @@ jobs:
3838
image: debian:trixie
3939
volumes:
4040
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
41+
- /srv/gh-runners/quic-yocto/downloads/qcom-deb-images:/fileserver-downloads
4142
options: --privileged
4243
steps:
4344
- uses: actions/checkout@v4
4445
with:
4546
fetch-depth: 0
4647

48+
- name: Copy Linux deb and U-Boot for RB1 from fileserver's downloads
49+
run: |
50+
set -ux
51+
mkdir -v local-debs
52+
# copy linux-image but not the -dbg e.g.
53+
# linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
54+
# linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
55+
find /fileserver-downloads/linux-deb-latest/ \
56+
-name linux-image\*.deb \
57+
-not -name linux-image\*-dbg_\*.deb \
58+
-exec cp -av '{}' local-debs/ \;
59+
# copy U-Boot RB1 binary
60+
cp -av /fileserver-downloads/u-boot-rb1-latest/rb1-boot.img .
61+
4762
# make sure we have latest packages first, to get latest fixes and to
4863
# avoid an automated update while we're building
4964
- name: Update OS packages
@@ -60,7 +75,7 @@ jobs:
6075
run: |
6176
set -x
6277
# start by building the root filesystem
63-
debos qualcomm-linux-debian-rootfs.yaml
78+
debos -t localdebs:local-debs/ qualcomm-linux-debian-rootfs.yaml
6479
# debos tries KVM and UML as backends, and falls back to
6580
# building directly on the host, but that requires loop
6681
# devices; use qemu backend explicitly even if it's slower
@@ -72,7 +87,7 @@ jobs:
7287
debos -b qemu --scratchsize 4GiB -t imagetype:sdcard \
7388
qualcomm-linux-debian-image.yaml
7489
# build flashable files
75-
debos qualcomm-linux-debian-flash.yaml
90+
debos -t u_boot_rb1:rb1-boot.img qualcomm-linux-debian-flash.yaml
7691
7792
- name: Upload artifacts to fileserver
7893
run: |
@@ -91,7 +106,15 @@ jobs:
91106
cp -av dtbs.tar.gz "${dir}"
92107
cp -av disk-ufs.img.gz "${dir}"
93108
cp -av disk-sdcard.img.gz "${dir}"
94-
tar -cvf "${dir}"/flash.tar.gz disk-ufs.img1 disk-ufs.img2 flash_*
109+
# TODO: separate flash_* directories between UFS and eMMC
110+
tar -cvf "${dir}"/flash-ufs.tar.gz \
111+
disk-ufs.img1 \
112+
disk-ufs.img2 \
113+
flash_rb3*
114+
tar -cvf "${dir}"/flash-emmc.tar.gz \
115+
disk-sdcard.img1 \
116+
disk-sdcard.img2 \
117+
flash_rb1*
95118
# instruct fileserver to publish this directory
96119
url="${FILESERVER_URL}/${id}/"
97120
curl -X POST -H 'Accept: text/event-stream' "${url}"

.github/workflows/linux.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build Linux kernel deb
2+
3+
on:
4+
# run weekly on Monday at 8:30am
5+
schedule:
6+
- cron: '30 8 * * 1'
7+
# allow manual runs
8+
workflow_dispatch:
9+
10+
# only need permission to read repository; implicitely set all other
11+
# permissions to none
12+
permissions:
13+
contents: read
14+
15+
env:
16+
# where results will be posted/hosted
17+
FILESERVER_URL: https://quic-yocto-fileserver-1029608027416.us-central1.run.app
18+
# github runs are only unique per repository and may also be re-run; create a
19+
# build id for the current run
20+
BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}
21+
22+
# cancel in progress builds for this workflow triggered by the same ref
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
build-linux-deb:
29+
# for cross-builds
30+
runs-on: [self-hosted, x86]
31+
# alternative for native builds, but overkill to do both
32+
#runs-on: [self-hosted, arm64, debbuilder]
33+
container:
34+
image: debian:trixie
35+
volumes:
36+
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
37+
- /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 0
42+
43+
# make sure we have latest packages first, to get latest fixes, to avoid
44+
# an automated update while we're building, and to prevent version skews
45+
- name: Update OS packages
46+
run: |
47+
set -ux
48+
apt update
49+
apt -y upgrade
50+
apt -y full-upgrade
51+
52+
- name: Build Linux kernel deb
53+
run: |
54+
set -ux
55+
# download arm64 package lists to install cross build-dependencies
56+
if [ "$(dpkg --print-architecture)" != arm64 ]; then
57+
dpkg --add-architecture arm64
58+
apt update
59+
fi
60+
# install build-dependencies; TODO: --no-install-recommends
61+
apt -y install git crossbuild-essential-arm64 make flex bison bc \
62+
libelf-dev libssl-dev libssl-dev:arm64 dpkg-dev \
63+
debhelper-compat kmod python3 rsync coreutils
64+
scripts/build-linux-deb.sh kernel-configs/systemd-boot.config
65+
66+
- name: Upload results to fileserver
67+
run: |
68+
set -ux
69+
# dcmd from devscripts will be used to parse .changes file
70+
apt -y install --no-install-recommends devscripts
71+
# curl will be used to talk to fileserver; should be installed by
72+
# default
73+
apt -y install curl
74+
# copy to fileserver builds and downloads directories
75+
for dir in "/fileserver-builds/${BUILD_ID}" \
76+
"/fileserver-downloads/qcom-deb-images/linux-deb-latest"; do
77+
mkdir -vp "${dir}"
78+
cp -av `dcmd *.changes` "${dir}"
79+
done
80+
# perhaps help NFS sync
81+
sync
82+
# instruct fileserver to publish this directory
83+
url="${FILESERVER_URL}/${BUILD_ID}/"
84+
curl -X POST -H 'Accept: text/event-stream' "${url}"

.github/workflows/u-boot.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build U-Boot for RB1
2+
3+
on:
4+
# allow manual runs
5+
workflow_dispatch:
6+
7+
# only need permission to read repository; implicitely set all other
8+
# permissions to none
9+
permissions:
10+
contents: read
11+
12+
env:
13+
# where results will be posted/hosted
14+
FILESERVER_URL: https://quic-yocto-fileserver-1029608027416.us-central1.run.app
15+
# github runs are only unique per repository and may also be re-run; create a
16+
# build id for the current run
17+
BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}
18+
19+
# cancel in progress builds for this workflow triggered by the same ref
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build-u-boot-rb1:
26+
# for cross-builds
27+
runs-on: [self-hosted, x86]
28+
# alternative for native builds, but overkill to do both
29+
#runs-on: [self-hosted, arm64, debbuilder]
30+
container:
31+
image: debian:trixie
32+
volumes:
33+
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
34+
- /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
# make sure we have latest packages first, to get latest fixes, to avoid
41+
# an automated update while we're building, and to prevent version skews
42+
- name: Update OS packages
43+
run: |
44+
set -ux
45+
apt update
46+
apt -y upgrade
47+
apt -y full-upgrade
48+
49+
- name: Build U-Boot Android boot image for RB1
50+
run: |
51+
set -ux
52+
# install build-dependencies
53+
apt -y install git crossbuild-essential-arm64 make bison flex bc \
54+
libssl-dev gnutls-dev xxd coreutils gzip mkbootimg
55+
scripts/build-u-boot-rb1.sh
56+
57+
- name: Upload results to fileserver
58+
run: |
59+
set -ux
60+
# curl will be used to talk to fileserver; should be installed by
61+
# default
62+
apt -y install curl
63+
for dir in "/fileserver-builds/${BUILD_ID}" \
64+
"/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest"; do
65+
mkdir -vp "${dir}"
66+
cp -av \
67+
u-boot/u-boot-nodtb.bin.gz \
68+
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \
69+
u-boot/u-boot-nodtb.bin.gz-dtb \
70+
u-boot/u-boot.bin \
71+
u-boot/rb1-boot.img \
72+
"${dir}"
73+
done
74+
# perhaps help NFS sync
75+
sync
76+
# instruct fileserver to publish this directory
77+
url="${FILESERVER_URL}/${BUILD_ID}/"
78+
curl -X POST -H 'Accept: text/event-stream' "${url}"
79+

0 commit comments

Comments
 (0)