Repository navigation
Add initial live-build ISO image scripts & integrate into CI workflow #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Christopher Obbard (obbardc)
wants to merge
15
commits into
main
Choose a base branch
from
wip/obbardc/iso-installer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d220150
kernel-configs: add installer fragment
obbardc 16d0258
installer: add debian-installer build infrastructure
obbardc 330ab0d
installer: replace the d-i kernel with a custom kernel
obbardc 0f731c8
installer: add what an offline install needs to the pool
obbardc 290aed9
installer: add the SoC and wifi firmware to the pool
obbardc 95ae003
installer: boot the image and the target through dtb-loader
obbardc dc2e359
installer: offer a network mirror on the target
obbardc 3fc58fb
installer: add a live GNOME system with Calamares
obbardc 8ca4a8a
installer: add scripts to set up a build host and download the kernel
obbardc dfd9d7d
ci: build the installers nightly
obbardc a8326c0
installer: add a script to build in a container
obbardc 9b57021
installer: add a script to run the image in QEMU
obbardc f806281
docs: document the installer
obbardc 3db4cba
HACK: ci: skip PR builds and tests for this branch
obbardc 5a1eefc
HACK: ci: installer: build on pushes to this branch
obbardc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Builds the installer images: | ||
| # - on trixie and forky for the qcom-next kernel | ||
| # - on trixie for the qcom-7.3 kernel | ||
| # | ||
| # See docs/installer.md. | ||
|
|
||
| name: Build installer images | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '00 13 * * *' | ||
| # allow manual runs | ||
| workflow_dispatch: | ||
| # HACK: temporary, drop before merging: build the installers on pushes | ||
| # to the installer branch | ||
| push: | ||
| branches: [wip/obbardc/iso-installer] | ||
|
|
||
| # grant nothing by default; the job below declares the scopes it needs | ||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build: | ||
| # don't run from forks of the main repository or from other branches; | ||
| # manual runs are allowed from any branch of the main repository so | ||
| # that changes to the workflows can be tested before they are merged | ||
| # HACK: temporary, drop before merging: also run on pushes to the | ||
| # installer branch | ||
| if: >- | ||
| github.repository == 'qualcomm-linux/qcom-deb-images' && | ||
| (github.event_name == 'workflow_dispatch' || | ||
| github.ref == 'refs/heads/main' || | ||
| github.ref == 'refs/heads/wip/obbardc/iso-installer') | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - {kernel: qcom-next, suite: trixie} | ||
| - {kernel: qcom-next, suite: forky} | ||
| - {kernel: qcom-7.3, suite: trixie} | ||
| uses: $/.github/workflows/installer.yml | ||
| permissions: | ||
| contents: read | ||
| with: | ||
| kernel: ${{ matrix.kernel }} | ||
| suite: ${{ matrix.suite }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,8 @@ permissions: {} | |
| jobs: | ||
| event-file: | ||
| name: "Upload event file" | ||
| # HACK: temporary, drop before merging: skip PRs from the installer branch | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| if: github.head_ref != 'wip/obbardc/iso-installer' | ||
| runs-on: ubuntu-26.04 | ||
| permissions: | ||
| contents: read # actions/upload-artifact | ||
|
|
@@ -20,6 +22,8 @@ jobs: | |
| path: ${{ github.event_path }} | ||
|
|
||
| build: | ||
| # HACK: temporary, drop before merging: skip PRs from the installer branch | ||
| if: github.head_ref != 'wip/obbardc/iso-installer' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| name: Build installer image | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| kernel: | ||
| description: > | ||
| Kernel the installer boots and installs: qcom-7.3 or qcom-next | ||
| (from the Qualcomm Linux APT repository) | ||
| required: true | ||
| type: string | ||
| suite: | ||
| description: Distribution suite (e.g. trixie, forky) | ||
| type: string | ||
| default: trixie | ||
|
|
||
| outputs: | ||
| artifacts_url: | ||
| description: "URL to retrieve build artifacts" | ||
| value: ${{ jobs.build-installer.outputs.url }} | ||
|
|
||
| # grant nothing by default; every job below declares the scopes it needs. these | ||
| # are also capped by the calling job's permissions: block, so callers have to | ||
| # grant at least as much. | ||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build-installer: | ||
| name: Build and upload installer image (${{ inputs.kernel }}, ${{ inputs.suite }}) | ||
| permissions: | ||
| contents: read # actions/checkout | ||
| outputs: | ||
| url: ${{ steps.upload_artifacts_s3.outputs.url }} | ||
| runs-on: [self-hosted, qcom-u2404, arm64] | ||
| # fail a hung build instead of letting it run to the 6-hour default | ||
| timeout-minutes: 120 | ||
| # build in forky whatever the target suite; see | ||
| # installer/setup-build-host.sh | ||
| container: | ||
| image: public.ecr.aws/debian/debian:forky | ||
| options: --privileged | ||
| env: | ||
| KERNEL: ${{ inputs.kernel }} | ||
| SUITE: ${{ inputs.suite }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # live-build from git, its dependencies, stubble and the Qualcomm | ||
| # Linux APT repository | ||
| - name: Set up build host | ||
| run: | | ||
| set -ux | ||
| installer/setup-build-host.sh --suite "${SUITE}" | ||
|
|
||
| # bmaptool and pigz: stage the image for publishing below | ||
| - name: Install publishing tools | ||
| run: | | ||
| set -ux | ||
| apt-get -y install bmaptool pigz | ||
|
|
||
| - name: Download kernel package | ||
| run: | | ||
| set -ux | ||
| installer/download-kernel.sh "${KERNEL}" kernel | ||
|
|
||
| - name: Build installer image | ||
| run: | | ||
| set -ux | ||
| installer/build-installer.sh --suite "${SUITE}" \ | ||
| --kernel-name "${KERNEL}" \ | ||
| kernel/*.deb | ||
|
|
||
| - name: Stage installer artifacts for publishing | ||
| run: | | ||
| set -ux | ||
| dir="installer-artifacts" | ||
| # every job of a run uploads to the same destination, so name | ||
| # everything after the kernel and suite | ||
| name="installer-${KERNEL}-${SUITE}" | ||
| mkdir -v "${dir}" | ||
| img=$(ls installer/build/"${SUITE}-${KERNEL}"/*.iso) | ||
| bmaptool create "${img}" >"${dir}/${name}.iso.bmap" | ||
| pigz -c "${img}" >"${dir}/${name}.iso.gz" | ||
| # generate sha256sums for all artifacts | ||
| (cd "${dir}" && sha256sum * | tee "${name}-sha256sums.txt") | ||
|
|
||
| # upload to a cloud storage space accessible by Axiom | ||
| - name: Upload private artifacts (S3) | ||
| uses: qualcomm-linux/upload-private-artifact-action@4940e9327cd7386acdb908b61c714c079b7d754b # aws-v4 | ||
| id: upload_artifacts_s3 | ||
| with: | ||
| path: installer-artifacts | ||
| # these should be the defaults | ||
| s3_bucket: qcom-prd-gh-artifacts | ||
| destination: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.run_id }}-${{ github.run_attempt }}/ | ||
|
|
||
| - name: "Print output" | ||
| env: | ||
| build_url: ${{ steps.upload_artifacts_s3.outputs.url }} | ||
| run: | | ||
| echo "Downloads URL: ${build_url}" | ||
| echo "## Download URL" >> $GITHUB_STEP_SUMMARY | ||
| echo "[${build_url}](${build_url})" >> $GITHUB_STEP_SUMMARY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reminder to drop)