diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-24 12:06:03 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-24 12:06:03 +0100 |
commit | bc5cf471af5b53ef955eb4c828642bfe591b449a (patch) | |
tree | ac521debb72efc9bca269afe705ed930b579d98c | |
parent | f695cb4c22b57b0fadf76b82abc2324d39763282 (diff) | |
download | debvm-bc5cf471af5b53ef955eb4c828642bfe591b449a.tar.gz |
debvm-create: install better kernels in multiarch case
While this works for armel+armhf by sheer luck, debvm-run fails for
i386+amd64 as it selects qemu-system-i386.
-rwxr-xr-x | share/customize-kernel.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/customize-kernel.sh b/share/customize-kernel.sh index 23c2cd0..3e1d12c 100755 --- a/share/customize-kernel.sh +++ b/share/customize-kernel.sh @@ -14,12 +14,15 @@ if dpkg-query --root="$TARGET" --showformat='${db:Status-Status}\n' --show 'linu exit 0 fi -ARCHITECTURE=$(head -n1 "$TARGET/var/lib/dpkg/arch") +ARCHITECTURES=$(xargs < "$TARGET/var/lib/dpkg/arch") -KERNEL_ARCH="$ARCHITECTURE" -case "$ARCHITECTURE" in +KERNEL_ARCH="${ARCHITECTURES%% *}" +case "$KERNEL_ARCH" in armel) KERNEL_ARCH=rpi + case "$ARCHITECTURES " in *" armhf "*) + KERNEL_ARCH=armmp:armhf + ;; esac ;; armhf) KERNEL_ARCH=armmp @@ -29,6 +32,9 @@ case "$ARCHITECTURE" in ;; i386) KERNEL_ARCH=686-pae + case "$ARCHITECTURES " in *" amd64 "*) + KERNEL_ARCH=amd64:amd64 + ;; esac ;; mips64el) KERNEL_ARCH=5kc-malta |