Merge remote-tracking branch 'upstream-pi-gen/arm64' into yunohost-bullseye

This commit is contained in:
Nathanaël HANNEBERT 2022-07-15 16:47:25 +02:00
commit 04250ea50d
9 changed files with 21 additions and 31 deletions

View file

@ -75,16 +75,7 @@ fi
# Modify original build-options to allow config file to be mounted in the docker container # 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@')" 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 ${DOCKER} build --build-arg BASE_IMAGE=debian:bullseye -t pi-gen "${DIR}"
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}"
if [ "${CONTAINER_EXISTS}" != "" ]; then if [ "${CONTAINER_EXISTS}" != "" ]; then
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM

View file

@ -1,18 +1,15 @@
{ {
"description": "NOOBS_DESCRIPTION", "description": "NOOBS_DESCRIPTION",
"feature_level": 35120124,
"kernel": "KERNEL", "kernel": "KERNEL",
"name": "NOOBS_NAME", "name": "NOOBS_NAME",
"password": "raspberry", "password": "raspberry",
"release_date": "UNRELEASED", "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": [ "supported_models": [
"Pi Model", "Pi Zero 2",
"Pi 2",
"Pi Zero",
"Pi 3", "Pi 3",
"Pi 4",
"Pi Compute Module 3", "Pi Compute Module 3",
"Pi 4" "Pi Compute Module 4"
], ],
"url": "http://www.raspbian.org/", "url": "http://www.raspbian.org/",
"username": "pi", "username": "pi",

View file

@ -9,15 +9,16 @@ bootstrap(){
export http_proxy=${APT_PROXY} 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+=(--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+=(--exclude=info)
BOOTSTRAP_ARGS+=(--include=ca-certificates) BOOTSTRAP_ARGS+=(--include=ca-certificates)
BOOTSTRAP_ARGS+=("$@") BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${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 if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}" cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
@ -90,7 +91,7 @@ on_chroot() {
mount --bind /sys "${ROOTFS_DIR}/sys" mount --bind /sys "${ROOTFS_DIR}/sys"
fi fi
setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@" capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
} }
export -f on_chroot export -f on_chroot

View file

@ -14,6 +14,7 @@ fi
cat files/raspberrypi.gpg.key | gpg --dearmor > "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg" cat files/raspberrypi.gpg.key | gpg --dearmor > "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg"
on_chroot << EOF on_chroot << EOF
dpkg --add-architecture armhf
apt-get update apt-get update
apt-get dist-upgrade -y apt-get dist-upgrade -y
EOF EOF

View file

@ -1,3 +1,7 @@
deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi deb http://deb.debian.org/debian RELEASE main contrib non-free
# Uncomment line below then 'apt-get update' to enable 'apt-get source' deb http://security.debian.org/debian-security RELEASE-security main contrib non-free
#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi 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

View file

@ -1,5 +1,5 @@
#!/bin/bash -e #!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ] || [ "${USE_QCOW2}" = "1" ]; then 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 fi

View file

@ -62,6 +62,9 @@ display_auto_detect=1
dtoverlay=vc4-kms-v3d dtoverlay=vc4-kms-v3d
max_framebuffers=2 max_framebuffers=2
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan # Disable compensation for displays with overscan
disable_overscan=1 disable_overscan=1

View file

@ -1 +0,0 @@
raspi-copies-and-fills

View file

@ -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