diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000000000000000000000000000000000..e7f7a4a927a941f7ca8ac910052d12c90744ea6c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,5 @@
+output/
+work/
+deploy/
+apt-cacher-ng/
+.git/objects/*
diff --git a/.gitignore b/.gitignore
index 7ab15b2e3ba3be8c5a0545a6985a4e87fc5841e6..d84439d9e6df786a4fc9d023a9660cd45315572b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,11 @@
-/deploy
-API_KEY
\ No newline at end of file
+API_KEY
+deploy/*
+work/*
+config
+postrun.sh
+SKIP
+SKIP_IMAGES
+.pc
+*-pc
+apt-cacher-ng/
+
diff --git a/Dockerfile b/Dockerfile
index 837e430a61ffc3075eb4fd5d203c8a0be59f0078..e7fc561b799ad1a91e246ca9683e7b9f5a10e0f6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-ARG BASE_IMAGE=debian:buster
+ARG BASE_IMAGE=debian:bullseye
 FROM ${BASE_IMAGE}
 
 ENV DEBIAN_FRONTEND noninteractive
diff --git a/README.md b/README.md
index d033ab642cf398db741c3fe1d86f24415894778b..5eba353fe82513c96ea5125fb7abad0228095b90 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ The following environment variables are supported:
    but you should use something else for a customized version.  Export files
    in stages may add suffixes to `IMG_NAME`.
 
-* `USE_QCOW2`(Default: `1` )
+* `USE_QCOW2` **EXPERIMENTAL** (Default: `0` )
 
     Instead of using traditional way of building the rootfs of every stage in
     single subdirectories and copying over the previous one to the next one,
@@ -60,9 +60,9 @@ The following environment variables are supported:
     that the network block device is not disconnected correctly after the Docker process has
     ended abnormally. In that case see [Disconnect an image if something went wrong](#Disconnect-an-image-if-something-went-wrong)
 
-* `RELEASE` (Default: buster)
+* `RELEASE` (Default: bullseye)
 
-   The release version to build images against. Valid values are jessie, stretch
+   The release version to build images against. Valid values are jessie, stretch,
    buster, bullseye, and testing.
 
  * `APT_PROXY` (Default: unset)
@@ -431,7 +431,7 @@ If that happens go through the following steps:
    
    Note: The `imagetool.sh` command will cleanup any /dev/nbdX that is not connected to a running `qemu-nbd` daemon. Be careful if you use network block devices for other tasks utilizing NBDs on your build machine as well.
 
-Now you should be able to start a new build without running into troubles again. Most of the time, especially when using Docker build, you will only need no. 3 to get everything up and running again.
+Now you should be able to start a new build without running into troubles again. Most of the time, especially when using Docker build, you will only need no. 3 to get everything up and running again. 
 
 # gitlab-release-upload script
 ## Prerequesites:
diff --git a/build-docker.sh b/build-docker.sh
index 01fd5173fd95f802717294e357c47c81b91535f3..85200e4c1a4f886dc35b8d6d1915d0b94a0ba93b 100755
--- a/build-docker.sh
+++ b/build-docker.sh
@@ -78,10 +78,10 @@ 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:buster
+    BASE_IMAGE=i386/debian:bullseye
     ;;
   *)
-    BASE_IMAGE=debian:buster
+    BASE_IMAGE=debian:bullseye
     ;;
 esac
 ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"
diff --git a/build.sh b/build.sh
index f70c6fbc79c1573ff4a11153ac48c033edec6d86..bcfdeb69ff4e8a48f7f50e05d92cb48af7a71430 100755
--- a/build.sh
+++ b/build.sh
@@ -99,7 +99,7 @@ run_stage(){
 	STAGE_WORK_DIR="${WORK_DIR}/${STAGE}"
 	ROOTFS_DIR="${STAGE_WORK_DIR}"/rootfs
 
-	if [ "${USE_QCOW2}" = "1" ]; then 
+	if [ "${USE_QCOW2}" = "1" ]; then
 		if [ ! -f SKIP ]; then
 			load_qimage
 		fi
@@ -109,7 +109,7 @@ run_stage(){
 			unmount "${WORK_DIR}/${STAGE}"
 		fi
 	fi
-	
+
 	if [ ! -f SKIP_IMAGES ]; then
 		if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ]; then
 			EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}"
@@ -207,7 +207,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}
 
 export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
 export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry}
-export RELEASE=${RELEASE:-buster}
+export RELEASE=${RELEASE:-bullseye}
 export WPA_ESSID
 export WPA_PASSWORD
 export WPA_COUNTRY
@@ -253,7 +253,7 @@ source "${SCRIPT_DIR}/common"
 source "${SCRIPT_DIR}/dependencies_check"
 
 export NO_PRERUN_QCOW2="${NO_PRERUN_QCOW2:-1}"
-export USE_QCOW2="${USE_QCOW2:-1}"
+export USE_QCOW2="${USE_QCOW2:-0}"
 export BASE_QCOW2_SIZE=${BASE_QCOW2_SIZE:-12G}
 source "${SCRIPT_DIR}/qcow2_handling"
 if [ "${USE_QCOW2}" = "1" ]; then
diff --git a/config b/config
index cae9c93510ef9aba4102c762e8e294169b07216b..51aa9e9fd5fe09a375a283f243e688a85c4039bb 100644
--- a/config
+++ b/config
@@ -1,2 +1,5 @@
-IMG_NAME='Raspbian-BPSE'
-DEPLOY_ZIP=1
\ No newline at end of file
+IMG_NAME='64bit-Raspbian-BPSE'
+DEPLOY_ZIP=1
+KEYBOARD_KEYMAP='de'
+USE_QCOW2=1
+RELEASE=bullseye
diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt
index 6e9db375a4e6e83ac182e865cbf7ddffd34fae1f..516f7f7180b896b8eda491d1046ac40be96c1cbc 100644
--- a/export-noobs/00-release/files/release_notes.txt
+++ b/export-noobs/00-release/files/release_notes.txt
@@ -1,4 +1,52 @@
 UNRELEASED:
+  * Based on Debian version 11 (bullseye)
+  * Desktop components (lxpanel and all plugins, libfm, pcmanfm) now built against GTK+3
+  * Applications (piwiz, pipanel, rc_gui, lxinput) now built against GTK+3
+  * PiXflat GTK+3 theme updated with numerous changes to support the above
+  * GTK+3 : toolbar icon size setting added
+  * GTK+3 : ability to request client-side decoration on windows added
+  * GTK+3 : setting for indent for frame labels in custom style added
+  * mutter window manager used instead of openbox on devices with 2GB or more of RAM
+  * mutter : title bar icon behaviour and appearance modified to match openbox
+  * mutter : additional keyboard shortcuts added
+  * mutter : various performance enhancements
+  * mutter compatibility added to screen magnifier
+  * Numerous changes to Appearance Settings application to support GTK+3 and mutter
+  * Updater plugin added to lxpanel to detect and install software updates
+  * File manager view options simplified to either list or icons, with separate menu option for thumbnails
+  * New file manager toolbar icons
+  * KMS used as default display driver
+  * Modifications to HDMI audio output selection to support the above
+  * xcompmgr enabled when openbox is running under KMS
+  * New default camera subsystem based on libcamera
+  * New camera demo applications (libcamera-still and libcamera-vid) have replaced raspistill and raspivid
+  * Legacy camera subsystem removed from 64-bit RPi OS (still available on 32-bit)
+  * Chromium upgraded to version 92.0.4515.98
+  * VLC media player upgraded to version 3.0.16
+  * Spurious drive removal warning after use of SD card copier removed
+  * Bookshelf application now includes Custom PC magazine
+  * Various translation updates - Italian, Korean, Polish, German, Armenian
+  * Startup wizard now installs Japanese fonts if needed
+  * Progress and information dialog boxes for lxpanel plugins now common to lxpanel, rather than in individual plugins
+  * Icon handling code for lxpanel plugins now common to lxpanel
+  * Package with 4K version of Raspberry Pi wallpaper added to Recommended Software
+  * Python Games and Minecraft removed from Recommended Software - neither is compatible with bullseye
+  * Bluetooth pairing and connection dialogs updated for compatibility with more devices
+  * Bluetooth devices always disconnected before removal to speed up removal process
+  * Bluetooth pairing dialog now only shows devices which offer services which are usable by Pi
+  * Separate Bluetooth unpair dialog removed - unpair now an option for each individual device
+  * Bug fix - mutter : header bar colours not updating when theme is changed
+  * Bug fix - GTK+3 : tooltips being displayed incorrectly at bottom of screen
+  * Bug fix - lxpanel : crash when using keyboard shortcut to enable magnifier when magnifier not installed
+  * Bug fix - lxpanel : lockup in Bluetooth plugin when connecting to certain devices
+  * Bug fix - lxpanel : discoverable mode icon could get out of sync with underlying Bluetooth system state
+  * Bug fix - piwiz : missing cities in timezone list
+  * Bug fix - piwiz : country-specific language packages not being installed
+  * Bug fix - bookshelf : now waits for longer between packets before timing out
+  * Bug fix - accented characters now displayed correctly in localisation dialogs
+  * Raspberry Pi firmware e2bab29767e51c683a312df20014e3277275b8a6
+  * Linux kernel 5.10.63
+2021-05-07:
   * Chromium upgraded to version 88.0.4324.187
   * NuScratch upgraded to version 20210507
   * Node-RED upgraded to version 1.3.4
diff --git a/gitlab-release-upload.sh b/gitlab-release-upload.sh
index 6b93af8f7ddad228a83eee7b0c63dbfefca04371..0120de3abbf275504a9dc4dd8bb79fbc495cd39d 100755
--- a/gitlab-release-upload.sh
+++ b/gitlab-release-upload.sh
@@ -19,7 +19,7 @@ echo "Desktop Image download link: ${DESKTOP_LINK}"
 
 # create new release tag
 DATE=$(date +%Y-%m-%d_%H-%M)
-TAG="Release-${DATE}"
+TAG="Release-64bit-${DATE}"
 
 # json for POST request
 DATA=$(cat<<EOF
diff --git a/imagetool.sh b/imagetool.sh
index e8467e1873cafbc010d5df7c045215fb31100117..002b50bc3496c2542c07a26668de7bec1a843867 100755
--- a/imagetool.sh
+++ b/imagetool.sh
@@ -25,7 +25,7 @@ Usage:
      -p, --mount-point    mount point for image
 
    This tool will use /dev/nbd1 as default for mounting an image. If you want to use another device, execute like this:
-   NBD_DEV=/dev/nbd2 ./$progname --mount --image <your image> --mount-point <your path>
+   NBD_DEV=/dev/nbd2 ./$progname --mount --image-name <your image> --mount-point <your path>
 
 HEREDOC
 }
diff --git a/scripts/common b/scripts/common
index 300d30b1e7a17c4a3bb1471162b5835b28881a61..394b398af41b32eceefc14f56d102da0a6539e10 100644
--- a/scripts/common
+++ b/scripts/common
@@ -7,19 +7,21 @@ bootstrap(){
 	local BOOTSTRAP_CMD=debootstrap
 	local BOOTSTRAP_ARGS=()
 
-	export http_proxy=${APT_PROXY}
+	#export http_proxy=${APT_PROXY}
 
-	if [ "$(dpkg --print-architecture)" !=  "armhf" ] && [ "$(dpkg --print-architecture)" !=  "aarch64" ]; then
+	if [ "$(dpkg --print-architecture)" !=  "armhf" ] && [ "$(dpkg --print-architecture)" !=  "arm64" ]; then
 		BOOTSTRAP_CMD=qemu-debootstrap
 	fi
 
-	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+=("$@")
 	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}"
@@ -92,7 +94,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 d10a49f174d4f3e88b60cacb5091637f12eaf5d0..651d154d4316b94b0811ac33af0e4f28200e4018 100755
--- a/stage0/00-configure-apt/00-run.sh
+++ b/stage0/00-configure-apt/00-run.sh
@@ -14,6 +14,7 @@ fi
 
 on_chroot apt-key add - < files/raspberrypi.gpg.key
 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 4a5dd8a9fd1799f2480104870689eeabfeed6581..51290f6806d1c1b533a9f15319f910d04e81c3a7 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 d4dd0a1fb68eca4f8b81a39bbb48fa045ae29a18..e001309a115a5105ce734f25a0a3be92157dbbc7 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 548f4accc250b9b572789ce14af9d47b4ee4466c..ffdd603eb8d3f88914304d91ae05956ae77321d8 100644
--- a/stage1/00-boot-files/files/config.txt
+++ b/stage1/00-boot-files/files/config.txt
@@ -5,10 +5,6 @@
 # uncomment if you get no picture on HDMI for a default "safe" mode
 #hdmi_safe=1
 
-# uncomment this if your display has a black border of unused pixels visible
-# and your display can output without overscan
-#disable_overscan=1
-
 # uncomment the following to adjust overscan. Use positive numbers if console
 # goes off screen, and negative if there is too much border
 #overscan_left=16
@@ -56,10 +52,32 @@
 # Enable audio (loads snd_bcm2835)
 dtparam=audio=on
 
-[pi4]
-# Enable DRM VC4 V3D driver on top of the dispmanx display stack
-dtoverlay=vc4-fkms-v3d
+# Automatically load overlays for detected cameras
+camera_auto_detect=1
+
+# Automatically load overlays for detected DSI displays
+display_auto_detect=1
+
+# Enable DRM VC4 V3D driver
+dtoverlay=vc4-kms-v3d
 max_framebuffers=2
 
+# Run in 64-bit mode
+arm_64bit=1
+
+# Disable compensation for displays with overscan
+disable_overscan=1
+
+[cm4]
+# Enable host mode on the 2711 built-in XHCI USB controller.
+# This line should be removed if the legacy DWC2 controller is required
+# (e.g. for USB device mode) or if USB support is not required.
+otg_mode=1
+
+[all]
+
+[pi4]
+# Run as fast as firmware / board allows
+arm_boost=1
+
 [all]
-#dtoverlay=vc4-fkms-v3d
diff --git a/stage1/01-sys-tweaks/00-packages b/stage1/01-sys-tweaks/00-packages
new file mode 100644
index 0000000000000000000000000000000000000000..9e91ea1ae3276bb6fe677ab9c21ad5f7faf9f0f8
--- /dev/null
+++ b/stage1/01-sys-tweaks/00-packages
@@ -0,0 +1 @@
+raspi-config
diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh
index 4943cabf0d7a9298bce42a71188b9dac19b67798..95dfbdc5b7d66dbb2ab0808199f386d920500fdc 100755
--- a/stage1/02-net-tweaks/00-run.sh
+++ b/stage1/02-net-tweaks/00-run.sh
@@ -3,4 +3,6 @@
 echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
 echo "127.0.1.1		${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"
 
-ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"
+on_chroot << EOF
+	SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1
+EOF
diff --git a/stage1/03-install-packages/00-packages b/stage1/03-install-packages/00-packages
index e8c148c0b50c813fe5cca73222a02f89cd056806..73edcc901ce9286941ac7aac5a18ac08989a5d71 100644
--- a/stage1/03-install-packages/00-packages
+++ b/stage1/03-install-packages/00-packages
@@ -1 +1 @@
-libraspberrypi-bin libraspberrypi0 raspi-config
+libraspberrypi-bin libraspberrypi0
diff --git a/stage2/00-copies-and-fills/01-packages b/stage2/00-copies-and-fills/01-packages
deleted file mode 100644
index 283c29057064c10396de2963dea94669f80eb304..0000000000000000000000000000000000000000
--- 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 366ac248b2b1e1ce79c87148dc80a8f50662c017..0000000000000000000000000000000000000000
--- 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
-
diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages
index a1f4b5957369319f367873e27b9ee7f300afb68a..55f845140ce37a806d8d7f19362e15a8ac2b2643 100644
--- a/stage2/01-sys-tweaks/00-packages
+++ b/stage2/01-sys-tweaks/00-packages
@@ -1,8 +1,8 @@
 ssh less fbset sudo psmisc strace ed ncdu crda
 console-setup keyboard-configuration debconf-utils parted unzip
-build-essential manpages-dev python bash-completion gdb pkg-config
-python-rpi.gpio v4l-utils
-python-gpiozero
+build-essential manpages-dev bash-completion gdb pkg-config
+python-is-python3
+python3-rpi.gpio v4l-utils
 python3-gpiozero
 avahi-daemon
 lua5.1
@@ -26,7 +26,6 @@ policykit-1
 ssh-import-id
 rng-tools
 ethtool
-vl805fw
 ntfs-3g
 pciutils
 rpi-eeprom
diff --git a/stage2/01-sys-tweaks/00-packages-nr b/stage2/01-sys-tweaks/00-packages-nr
index 5acef540d0f9b76b91a6c378eb098e82adae4c35..83a1e0ceea3d45369a14967f4c9878483ca6fa35 100644
--- a/stage2/01-sys-tweaks/00-packages-nr
+++ b/stage2/01-sys-tweaks/00-packages-nr
@@ -1 +1,2 @@
 cifs-utils
+libcamera-apps-lite
diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh
index c1836f9ca6d1a33fc4b40fc7b879dd3f657ff9f0..bb3e11ac0888aab5ec17f1810fb86f5b18d76db9 100755
--- a/stage2/01-sys-tweaks/01-run.sh
+++ b/stage2/01-sys-tweaks/01-run.sh
@@ -52,7 +52,7 @@ on_chroot <<EOF
 for GRP in input spi i2c gpio; do
 	groupadd -f -r "\$GRP"
 done
-for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
+for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev render; do
   adduser $FIRST_USER_NAME \$GRP
 done
 EOF
diff --git a/stage2/02-net-tweaks/00-packages b/stage2/02-net-tweaks/00-packages
index 6e46c71781fc572a268301aa810c3cfe42c4414b..cc4a68e670fb5fcacc14390123b20dc9fa511ab3 100644
--- a/stage2/02-net-tweaks/00-packages
+++ b/stage2/02-net-tweaks/00-packages
@@ -1,4 +1,4 @@
 wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
 raspberrypi-net-mods
 dhcpcd5
-net-tools
\ No newline at end of file
+net-tools
diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh
index d82381b1b78678b9dfd5936c110294aea1064ab6..837e86135e301666434e526689f6469760016e1e 100755
--- a/stage2/02-net-tweaks/01-run.sh
+++ b/stage2/02-net-tweaks/01-run.sh
@@ -1,11 +1,12 @@
 #!/bin/bash -e
 
-install -v -d					"${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
-install -v -m 644 files/wait.conf		"${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"
-
 install -v -d					"${ROOTFS_DIR}/etc/wpa_supplicant"
 install -v -m 600 files/wpa_supplicant.conf	"${ROOTFS_DIR}/etc/wpa_supplicant/"
 
+on_chroot << EOF
+	SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 0
+EOF
+
 if [ -v WPA_COUNTRY ]; then
 	echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
 fi
diff --git a/stage2/02-net-tweaks/files/wait.conf b/stage2/02-net-tweaks/files/wait.conf
deleted file mode 100644
index 595cc2d9e125a9074f66ed855ee655a30af0daf3..0000000000000000000000000000000000000000
--- a/stage2/02-net-tweaks/files/wait.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[Service]
-ExecStart=
-ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w
diff --git a/stage2/04-ai-on-the-edge/02-run.sh b/stage2/04-ai-on-the-edge/02-run.sh
index 8961f9d2e3d003ee12ff3086aeecc1a4394e6d5c..27551ca8505859f4182ffb2cc9ce7052f2f35437 100755
--- a/stage2/04-ai-on-the-edge/02-run.sh
+++ b/stage2/04-ai-on-the-edge/02-run.sh
@@ -1,5 +1,5 @@
 #!/bin/bash -e
 on_chroot << EOF
 echo "Starting ansible"
-ansible-pull -U https://code.fbi.h-da.de/pse-ai-at-the-edge/raspberry-pi-setup.git
+ansible-pull --purge -U https://code.fbi.h-da.de/pse-ai-at-the-edge/raspberry-pi-setup.git
 EOF
diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages
index 482299e6136d42755d1d160bf7c1d1c504064a63..c88cf4c95a9262512c4186fb1b028f89e2809ebc 100644
--- a/stage3/00-install-packages/00-packages
+++ b/stage3/00-install-packages/00-packages
@@ -1,8 +1,7 @@
-gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
+gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
 qpdfview gtk2-engines alsa-utils
 desktop-base
-omxplayer
-raspberrypi-artwork
+git
 policykit-1
 gvfs
 rfkill
@@ -12,3 +11,5 @@ fonts-droid-fallback
 fonts-liberation2
 obconf
 arandr
+libcamera-tools
+libcamera-apps
diff --git a/stage3/00-install-packages/00-packages-nr b/stage3/00-install-packages/00-packages-nr
index ffc324bf4aed35e91adac56f49d4847dcacd70e0..f8bff31b5162939e1a8a59d58ee297ccb9154d92 100644
--- a/stage3/00-install-packages/00-packages-nr
+++ b/stage3/00-install-packages/00-packages-nr
@@ -1,6 +1,6 @@
-xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo
+xserver-xorg xinit
 mousepad
 lxde lxtask menu-xdg
 zenity xdg-utils
 gvfs-backends gvfs-fuse
-lightdm gnome-themes-standard-data gnome-icon-theme
+lightdm gnome-themes-standard gnome-icon-theme
diff --git a/stage3/00-install-packages/01-run.sh b/stage3/00-install-packages/01-run.sh
deleted file mode 100755
index 92ff2fce0ae9da313b1c5f2fa1e14b117465687a..0000000000000000000000000000000000000000
--- a/stage3/00-install-packages/01-run.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash -e
-
-on_chroot << EOF
-update-alternatives --install /usr/bin/x-www-browser \
-  x-www-browser /usr/bin/chromium-browser 86
-update-alternatives --install /usr/bin/gnome-www-browser \
-  gnome-www-browser /usr/bin/chromium-browser 86
-EOF
\ No newline at end of file
diff --git a/stage3/01-tweaks/00-run.sh b/stage3/01-tweaks/00-run.sh
index 5da7c1a1971c7c94009285dad469439b1b4b2aa8..79b749e3974c2951e993fa184d2f336754feb43f 100755
--- a/stage3/01-tweaks/00-run.sh
+++ b/stage3/01-tweaks/00-run.sh
@@ -1,3 +1,5 @@
 #!/bin/bash -e
 
-rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf"
+on_chroot << EOF
+	SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1
+EOF
diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages
index 85a9f806f81f5f8062c62081b6afc730dbac7590..559e3d2f1a2af2c982971b5dcf0f167fbc18bdbf 100644
--- a/stage4/00-install-packages/00-packages
+++ b/stage4/00-install-packages/00-packages
@@ -1,11 +1,10 @@
-python python3-pygame python-pygame python-tk
-python3 python3-tk thonny
+python3-pygame
+python3-tk thonny
 python3-pgzero
-python-serial python3-serial
-python-picamera python3-picamera
+python3-serial
 debian-reference-en dillo
 raspberrypi-net-mods raspberrypi-ui-mods
-python-pip python3-pip
+python3-pip
 python3-numpy
 pypy
 alacarte rc-gui sense-hat
@@ -13,11 +12,11 @@ tree
 libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
 geany
 piclone
-wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python3-rpi.gpio
-python-spidev python3-spidev
-python-twython python3-twython
-python-smbus python3-smbus
-python-flask python3-flask
+pigpio python3-pigpio raspi-gpio python3-rpi.gpio
+python3-spidev
+python3-twython
+python3-smbus
+python3-flask
 pprompt
 piwiz
 rp-prefapps
diff --git a/stage4/00-install-packages/01-packages b/stage4/00-install-packages/01-packages
index fdf5e7346e423f380e281007e9ad4daae643fc03..5441d9dd167ed34da0bb6cdb16a8ca4802fefe29 100644
--- a/stage4/00-install-packages/01-packages
+++ b/stage4/00-install-packages/01-packages
@@ -1,22 +1,22 @@
-python-automationhat python3-automationhat
-python-blinkt python3-blinkt
-python-cap1xxx python3-cap1xxx
-python-drumhat python3-drumhat
-python-envirophat python3-envirophat
-python-explorerhat python3-explorerhat
-python-fourletterphat python3-fourletterphat
-python-microdotphat python3-microdotphat
-python-mote python3-mote
-python-motephat python3-motephat
-python-phatbeat python3-phatbeat
-python-pianohat python3-pianohat
-python-piglow python3-piglow
-python-rainbowhat python3-rainbowhat
-python-scrollphat python3-scrollphat
-python-scrollphathd python3-scrollphathd
-python-sn3218 python3-sn3218
-python-skywriter python3-skywriter
-python-touchphat python3-touchphat
-python-buttonshim python3-buttonshim
-python-unicornhathd  python3-unicornhathd
-python-pantilthat python3-pantilthat
+python3-automationhat
+python3-blinkt
+python3-cap1xxx
+python3-drumhat
+python3-envirophat
+python3-explorerhat
+python3-fourletterphat
+python3-microdotphat
+python3-mote
+python3-motephat
+python3-phatbeat
+python3-pianohat
+python3-piglow
+python3-rainbowhat
+python3-scrollphat
+python3-scrollphathd
+python3-sn3218
+python3-skywriter
+python3-touchphat
+python3-buttonshim
+python3-unicornhathd
+python3-pantilthat
diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages
index 38c5c8d57ddd42f0f402f70e9a29534ce7ab541a..d137955b27889ea23754d9ea90907e71f69b89d2 100644
--- a/stage5/00-install-extras/00-packages
+++ b/stage5/00-install-extras/00-packages
@@ -1,16 +1,14 @@
 mu-editor
-sonic-pi
-scratch nuscratch scratch3
+#sonic-pi
+#scratch nuscratch scratch3
 smartsim
 
-minecraft-pi python-minecraftpi python-picraft python3-picraft
-python-sense-emu sense-emu-tools python-sense-emu-doc
+python3-sense-emu sense-emu-tools python-sense-emu-doc
 
-wolfram-engine
+#wolfram-engine
 claws-mail
 greenfoot-unbundled bluej
-nodered
+#nodered
 realvnc-vnc-viewer
 
-python-games
 code-the-classics
diff --git a/stage5/EXPORT_IMAGE b/stage5/EXPORT_IMAGE
deleted file mode 100644
index a81a844fe4ee95ea38ab6575e82ff94c409c8ab0..0000000000000000000000000000000000000000
--- a/stage5/EXPORT_IMAGE
+++ /dev/null
@@ -1,4 +0,0 @@
-IMG_SUFFIX="-full"
-if [ "${USE_QEMU}" = "1" ]; then
-	export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
-fi
diff --git a/stage5/SKIP_IMAGE b/stage5/SKIP_IMAGE
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391