Skip to content

Fix image build: skip full OS upgrade that stalls/hangs under QEMU - #5

Open
mrribbits wants to merge 9 commits into
interactionresearchstudio:mainfrom
mrribbits:fix/skip-os-upgrade-in-build
Open

Fix image build: skip full OS upgrade that stalls/hangs under QEMU#5
mrribbits wants to merge 9 commits into
interactionresearchstudio:mainfrom
mrribbits:fix/skip-os-upgrade-in-build

Conversation

@mrribbits

Copy link
Copy Markdown

Problem

The Build Image workflow fails against the pinned base image
(2024-11-19-raspios-bookworm-armhf-lite) in two ways:

  1. The system apt-get upgrade hits an interactive dpkg prompt about the
    modified /etc/initramfs-tools/initramfs.conf. With no TTY in CI it aborts
    with end of file on stdin at conffile prompt, and set -e fails the build.
  2. With that suppressed, the upgrade pulls a large kernel bump (6.6 → 6.12) and
    then hangs indefinitely generating the arm64 (v8) initramfs, because the
    32-bit armhf QEMU emulation can't run the 64-bit binaries update-initramfs
    invokes.

Fix

Don't run a full system upgrade during the image build. The base image's kernel
runs the camera fine, and the packages the project needs are installed explicitly.

  • os/config: ADMIN_TOOLKIT_UPDATE_PACKAGES=no so admin-toolkit skips its upgrade.
  • install.sh: remove apt-get upgrade/dist-upgrade (kept apt-get update and
    the explicit installs); make apt/dpkg non-interactive so the install steps can't
    stall on a conffile prompt.

Tradeoff

The image ships with the base snapshot's package versions. Users can run
sudo apt update && sudo apt full-upgrade on real hardware (no emulation, no hang).

Tested: the full Build Image run completes and produces a bootable image.

Refactor apt-get commands to use Dpkg options for upgrades.
Refactor install script to improve non-interactive apt handling and streamline installation process.
Patched apt upgrade command in CustomPiOS to be non-interactive during build.
Updated install.sh to clarify upgrade process and avoid kernel issues.
Removed non-interactive upgrade patching step for CustomPiOS.
Add a newline at the end of the build-image.yml file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant