diff --git a/build-docker.sh b/build-docker.sh index a7f18f1..a44b33f 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -75,16 +75,7 @@ fi # Modify original build-options to allow config file to be mounted in the docker container BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" -# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead -case "$(uname -m)" in - x86_64|aarch64) - BASE_IMAGE=i386/debian:bullseye - ;; - *) - BASE_IMAGE=debian:bullseye - ;; -esac -${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" +${DOCKER} build --build-arg BASE_IMAGE=debian:bullseye -t pi-gen "${DIR}" if [ "${CONTAINER_EXISTS}" != "" ]; then trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM diff --git a/export-noobs/00-release/files/os.json b/export-noobs/00-release/files/os.json index 6cc0e36..0c174d1 100644 --- a/export-noobs/00-release/files/os.json +++ b/export-noobs/00-release/files/os.json @@ -1,18 +1,15 @@ { "description": "NOOBS_DESCRIPTION", - "feature_level": 35120124, "kernel": "KERNEL", "name": "NOOBS_NAME", "password": "raspberry", "release_date": "UNRELEASED", - "supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082", "supported_models": [ - "Pi Model", - "Pi 2", - "Pi Zero", + "Pi Zero 2", "Pi 3", + "Pi 4", "Pi Compute Module 3", - "Pi 4" + "Pi Compute Module 4" ], "url": "http://www.raspbian.org/", "username": "pi", diff --git a/scripts/common b/scripts/common index e476f0f..7151ff2 100644 --- a/scripts/common +++ b/scripts/common @@ -9,15 +9,16 @@ bootstrap(){ export http_proxy=${APT_PROXY} - BOOTSTRAP_ARGS+=(--arch armhf) + BOOTSTRAP_ARGS+=(--arch arm64) + BOOTSTRAP_ARGS+=(--include gnupg) BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") - BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") + #BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") BOOTSTRAP_ARGS+=(--exclude=info) BOOTSTRAP_ARGS+=(--include=ca-certificates) BOOTSTRAP_ARGS+=("$@") printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" - setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true + capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}" @@ -90,7 +91,7 @@ on_chroot() { mount --bind /sys "${ROOTFS_DIR}/sys" fi - setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@" + capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@" } export -f on_chroot diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index 4d0ac92..96e6be3 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -14,6 +14,7 @@ fi cat files/raspberrypi.gpg.key | gpg --dearmor > "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg" on_chroot << EOF +dpkg --add-architecture armhf apt-get update apt-get dist-upgrade -y EOF diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list index 4a5dd8a..51290f6 100644 --- a/stage0/00-configure-apt/files/sources.list +++ b/stage0/00-configure-apt/files/sources.list @@ -1,3 +1,7 @@ -deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi -# Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi +deb http://deb.debian.org/debian RELEASE main contrib non-free +deb http://security.debian.org/debian-security RELEASE-security main contrib non-free +deb http://deb.debian.org/debian RELEASE-updates main contrib non-free +# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source' +#deb-src http://deb.debian.org/debian RELEASE main contrib non-free +#deb-src http://security.debian.org/debian-security RELEASE-security main contrib non-free +#deb-src http://deb.debian.org/debian RELEASE-updates main contrib non-free diff --git a/stage0/prerun.sh b/stage0/prerun.sh index d4dd0a1..e001309 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -1,5 +1,5 @@ #!/bin/bash -e if [ ! -d "${ROOTFS_DIR}" ] || [ "${USE_QCOW2}" = "1" ]; then - bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ + bootstrap ${RELEASE} "${ROOTFS_DIR}" http://deb.debian.org/debian/ fi diff --git a/stage1/00-boot-files/files/config.txt b/stage1/00-boot-files/files/config.txt index 6e072cb..ffdd603 100644 --- a/stage1/00-boot-files/files/config.txt +++ b/stage1/00-boot-files/files/config.txt @@ -62,6 +62,9 @@ display_auto_detect=1 dtoverlay=vc4-kms-v3d max_framebuffers=2 +# Run in 64-bit mode +arm_64bit=1 + # Disable compensation for displays with overscan disable_overscan=1 diff --git a/stage2/00-copies-and-fills/01-packages b/stage2/00-copies-and-fills/01-packages deleted file mode 100644 index 283c290..0000000 --- a/stage2/00-copies-and-fills/01-packages +++ /dev/null @@ -1 +0,0 @@ -raspi-copies-and-fills diff --git a/stage2/00-copies-and-fills/02-run.sh b/stage2/00-copies-and-fills/02-run.sh deleted file mode 100755 index 366ac24..0000000 --- a/stage2/00-copies-and-fills/02-run.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then - mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" -fi -