diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2023-12-18 11:04:13 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2024-01-17 16:20:55 +0000 |
| commit | a143895f0a465ffcd20323264e648cba3f39ccc6 (patch) | |
| tree | 9fb9ac3ff9158de0017ae1c7d81d3d0dc904bb77 | |
| parent | ec04064a552372b64a2cb7a1feb1bbda0c86ecac (diff) | |
stage0: Check whether foreign architecture is needed
| -rwxr-xr-x | stage0/00-configure-apt/00-run.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index fa4f59f..926c4c6 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -14,8 +14,13 @@ fi cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/" -on_chroot << EOF -dpkg --add-architecture arm64 -apt-get update -apt-get dist-upgrade -y +on_chroot <<- \EOF + ARCH="$(dpkg --print-architecture)" + if [ "$ARCH" = "armhf" ]; then + dpkg --add-architecture arm64 + elif [ "$ARCH" = "arm64" ]; then + dpkg --add-architecture armhf + fi + apt-get update + apt-get dist-upgrade -y EOF |
