stage0: Check whether foreign architecture is needed

This commit is contained in:
Serge Schneider 2023-12-18 11:04:13 +00:00
parent ec04064a55
commit a143895f0a

View File

@ -14,8 +14,13 @@ fi
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" 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/" install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
on_chroot << EOF on_chroot <<- \EOF
ARCH="$(dpkg --print-architecture)"
if [ "$ARCH" = "armhf" ]; then
dpkg --add-architecture arm64 dpkg --add-architecture arm64
elif [ "$ARCH" = "arm64" ]; then
dpkg --add-architecture armhf
fi
apt-get update apt-get update
apt-get dist-upgrade -y apt-get dist-upgrade -y
EOF EOF