diff options
author | Helmut Grohne <helmutg@debian.org> | 2023-01-25 13:02:58 +0000 |
---|---|---|
committer | Helmut Grohne <helmutg@debian.org> | 2023-01-25 13:02:58 +0000 |
commit | 8fc38d0ebfaf6f9b01baa3f5d659d1d7175c21ec (patch) | |
tree | 3e64576bd26c6a24b974742d2b5a04c02cbe0ae9 /share/customize-kernel.sh | |
parent | 06b842b6184c62e706515601b974245498c09a66 (diff) | |
parent | caa848fa49aee9cd6962c171ae2e2cad5cb47b0b (diff) | |
download | debvm-8fc38d0ebfaf6f9b01baa3f5d659d1d7175c21ec.tar.gz |
Merge branch 'multiarch' into 'main'
install and use multiarch kernels for sibling architectures
See merge request helmutg/debvm!28
Diffstat (limited to 'share/customize-kernel.sh')
-rwxr-xr-x | share/customize-kernel.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/share/customize-kernel.sh b/share/customize-kernel.sh index 23c2cd0..aef9fa7 100755 --- a/share/customize-kernel.sh +++ b/share/customize-kernel.sh @@ -14,21 +14,31 @@ 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 + *" arm64 "*) KERNEL_ARCH=arm64:arm64 ;; + *" armhf "*) KERNEL_ARCH=armmp:armhf ;; + esac ;; armhf) KERNEL_ARCH=armmp + case "$ARCHITECTURES " in + *" arm64 "*) KERNEL_ARCH=arm64:arm64 ;; + esac ;; hppa) KERNEL_ARCH=parisc ;; i386) KERNEL_ARCH=686-pae + case "$ARCHITECTURES " in + *" amd64 "*) KERNEL_ARCH=amd64:amd64 ;; + esac ;; mips64el) KERNEL_ARCH=5kc-malta |