Skip to content

Commit f00b32b

Browse files
committed
prepare-host: use qemu-user-binfmt on Ubuntu resolute
Ubuntu 26.04 (resolute) split qemu-user-static into qemu-user-binfmt and qemu-user-binfmt-hwe, leaving qemu-user-static as a virtual package with two providers. apt won't auto-pick a provider, so the generated Dockerfile (and any direct ./compile.sh requirements run on a resolute host) fails with: E: Package 'qemu-user-static' has no installation candidate Match the existing python2 pattern (release-conditional host deps) and pick the concrete non-HWE package on resolute. Older releases keep qemu-user-static.
1 parent d55c220 commit f00b32b

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

lib/functions/host/prepare-host.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function adaptative_prepare_host_dependencies() {
175175
ncurses-base ncurses-term # for `make menuconfig`
176176
ntpsec-ntpdate #this is a more secure ntpdate
177177
patchutils pkg-config pv
178-
"qemu-user-static" "arch-test"
178+
"arch-test"
179179
rsync
180180
swig # swig is needed for some u-boot's. example: "bananapi.conf"
181181
u-boot-tools
@@ -213,6 +213,19 @@ function adaptative_prepare_host_dependencies() {
213213
host_dependencies+=("python3-setuptools")
214214
fi
215215

216+
# qemu binfmt + chrooted user emulation.
217+
# Up to and including Ubuntu noble / Debian trixie this is the
218+
# `qemu-user-static` package (real package shipping the static
219+
# /usr/libexec/qemu-binfmt/<arch>-static binaries). Ubuntu resolute
220+
# (26.04) splits that into `qemu-user-binfmt` + `qemu-user-binfmt-hwe`
221+
# and turns `qemu-user-static` into a virtual package — apt then
222+
# refuses to auto-pick a provider, so install the non-HWE concrete
223+
# name explicitly there.
224+
case "${host_release}" in
225+
resolute) host_dependencies+=("qemu-user-binfmt") ;;
226+
*) host_dependencies+=("qemu-user-static") ;;
227+
esac
228+
216229
### Python2 -- required for some older u-boot builds
217230
# Debian newer than 'bookworm' and Ubuntu newer than 'lunar'/'mantic' does not carry python2 anymore; in this case some u-boot's might fail to build.
218231
# Last versions to support python2 were Debian 'bullseye' and Ubuntu 'jammy'

0 commit comments

Comments
 (0)