Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions .github/workflows/debos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,43 @@ jobs:
with:
fetch-depth: 0

- name: Copy Linux deb and U-Boot for RB1 from fileserver space for downloads
run: |
set -ux
dir="/fileserver-downloads/qcom-deb-images"
if [ "${{ inputs.mainline_kernel }}" = true ]; then
mkdir -v debos-recipes/local-debs
# copy linux-image but not the -dbg e.g.
# linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
# linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
find "${dir}/linux-deb-latest/" \
-name linux-image\*.deb \
-not -name linux-image\*-dbg_\*.deb \
-exec cp -av '{}' debos-recipes/local-debs/ \;
fi
# copy U-Boot RB1 binary
cp -av "${dir}/u-boot-rb1-latest/rb1-boot.img" .
- name: Copy U-Boot for RB1 from fileserver space for downloads
run: cp -av "/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest/rb1-boot.img" .

# mtools is needed for the flash recipe
- name: Install debos and dependencies of the recipes
run: apt -y install debos mtools

- name: Setup local APT repo
run: |
set -ux -o pipefail

# needed for apt-ftparchive
apt -y install --no-install-recommends apt-utils
mkdir -v local-apt-repo

# optionally, copy mainline kernel debs
if [ "${{ inputs.mainline_kernel }}" = true ]; then
mkdir -v local-apt-repo/linux-deb-latest
# get mainline kernel from the fileserver space for downloads
cp -av /fileserver-downloads/qcom-deb-images/linux-deb-latest/*.deb \
local-apt-repo/linux-deb-latest
fi

(
cd local-apt-repo
apt-ftparchive packages . >Packages
apt-ftparchive release . >Release
)

- name: Build rootfs with debos
run: |
set -ux
localdebs=""
if [ -d debos-recipes/local-debs ]; then
localdebs="-t localdebs:local-debs/"
fi
debos \
-t overlays:'${{ inputs.overlays }}' \
-t experimentalkernel:true \
-t xfcedesktop:true \
${localdebs} \
-t aptlocalrepo:${PWD}/local-apt-repo \
-t kernelpackage:'${{ inputs.kernelpackage }}' \
--print-recipe \
debos-recipes/qualcomm-linux-debian-rootfs.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
uses: ./.github/workflows/debos.yml
with:
mainline_kernel: true
kernelpackage: linux-image-6.17.0-rc3

test-mainline-linux:
uses: ./.github/workflows/test.yml
Expand Down
44 changes: 44 additions & 0 deletions debos-recipes/qualcomm-linux-debian-rootfs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- $xfcedesktop := or .xfcedesktop "false" }}
{{- $experimentalkernel := or .experimentalkernel "false" }}
{{- $localdebs := or .localdebs "none" }}
{{- $aptlocalrepo := or .aptlocalrepo "none" }}
{{- $kernelpackage := or .kernelpackage "linux-image-arm64" }}

architecture: arm64
Expand All @@ -17,6 +18,31 @@ actions:
mirror: http://deb.debian.org/debian
variant: minbase

{{- if ne $aptlocalrepo "none" }}
- action: run
description: Setup bind mount of local APT repository
chroot: false
command: |
set -eux
mkdir -v "${ROOTDIR}/media/apt-local-repo"
mount --bind {{$aptlocalrepo}} "${ROOTDIR}/media/apt-local-repo"

- action: run
description: APT update and upgrade with local APT repository
chroot: true
command: |
set -eux
cat >/etc/apt/sources.list.d/apt-local-repo.sources <<EOF
Types: deb
URIs: file:///media/apt-local-repo
Suites: /
Trusted: true
EOF

apt update
apt -y upgrade
{{- end }}

- action: run
description: Modernize APT sources
chroot: true
Expand Down Expand Up @@ -290,6 +316,24 @@ actions:
rm -vf /root/*.deb
{{- end }}

{{- if ne $aptlocalrepo "none" }}
- action: run
description: Remove bind mount of local APT repository
chroot: false
command: |
set -eux
umount "${ROOTDIR}/media/apt-local-repo"
rmdir -v "${ROOTDIR}/media/apt-local-repo"

- action: run
description: APT update without local APT repository
chroot: true
command: |
set -eux
rm -v /etc/apt/sources.list.d/apt-local-repo.sources
apt update
{{- end }}

- action: run
description: Create DTBs tarball
chroot: false
Expand Down
Loading