Skip to content
Draft
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
20 changes: 16 additions & 4 deletions .github/workflows/debos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ jobs:
- name: Build flashable files with debos
run: |
set -ux
debos -t u_boot_rb1:rb1-boot.img \
debos \
-t u_boot_rb1:rb1-boot.img \
-t "buildid:${BUILD_ID}" \
--print-recipe \
debos-recipes/qualcomm-linux-debian-flash.yaml

Expand Down Expand Up @@ -145,10 +147,20 @@ jobs:
disk-sdcard.img2 \
flash_qrb2210-*

- name: Upload private artifacts
# upload to a cloud storage space accessible by LAVA and developers
- name: Upload private artifacts (GCP)
uses: qualcomm-linux/upload-private-artifact-action@v1
id: upload_artifacts
id: upload_artifacts_gcp
with:
path: debos-artifacts

# upload to a cloud storage space accessible by Axiom
- name: Upload private artifacts (S3)
uses: qualcomm-linux/upload-private-artifact-action@aws-v2
with:
s3_bucket: qcom-prd-gh-artifacts
# should be the default in that action, or ought to reuse BUILD_ID
destination: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.run_id }}-${{ github.run_attempt }}/
path: debos-artifacts

- name: Unpack rootfs to generate SBOM
Expand Down Expand Up @@ -201,7 +213,7 @@ jobs:
path: sboms
- name: "Print output"
env:
build_url: ${{ steps.upload_artifacts.outputs.url }}
build_url: ${{ steps.upload_artifacts_gcp.outputs.url }}
run: |
echo "Downloads URL: ${build_url}"
echo "url=\"${build_url}\"" >> $GITHUB_OUTPUT
Expand Down
19 changes: 19 additions & 0 deletions debos-recipes/qualcomm-linux-debian-flash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{{- if .u_boot_rb1 -}}
{{- $build_rb1 = "true" }}
{{- end -}}
{{- $buildid := or .buildid "" }}

architecture: arm64

Expand Down Expand Up @@ -251,6 +252,13 @@ actions:
"${QCOM_PTOOL}/gen_contents.py" -p ptool-partitions.xml \
-t "$contents" \
-o contents.xml
# XXX insert build_id element before windows_root_path;
# this will be nicer to do when gen_contents.py supports
# setting this; see also:
# https://github.com/qualcomm-linux/qcom-ptool/pull/38
sed -i \
"/windows_root_path/ i \t\t\t\t<build_id>{{$buildid}}</build_id>" \
contents.xml
fi
# generate flashing files from qcom-partitions.xml
"${QCOM_PTOOL}/ptool.py" -x ptool-partitions.xml
Expand All @@ -263,6 +271,17 @@ actions:
# copy platform partition files
cp --preserve=mode,timestamps -v build/ptool/{{ $board.platform }}/* \
"${flash_dir}"
# adjust paths in contents.xml to use board-specific flash_* subdir
if [ -e "${flash_dir}/contents.xml" ]; then
# one set of backslashes for shell quoting, another one for sed
# parsing
windows_path=".\\\\flash_{{ $board.name }}\\\\"
linux_path="./flash_{{ $board.name }}/"
sed -i \
-e "s:<windows_root_path>.*:<windows_root_path>${windows_path}</windows_root_path>:" \
-e "s:<linux_root_path>.*:<linux_root_path>${linux_path}</linux_root_path>:" \
"${flash_dir}/contents.xml"
fi
# remove BLANK_GPT and WIPE_PARTITIONS files as it's common for people
# to run "qdl rawprogram*.xml", mistakingly including these; perhaps
# ptool should have a flag not to generate these; note that there are
Expand Down
Loading