From e2966b2187f198a6393eacd0019dea5039aaff6f Mon Sep 17 00:00:00 2001 From: EinTim Date: Tue, 4 Aug 2026 02:29:16 +0200 Subject: [PATCH] Make raspberry pi zero 2w buildroot image work on all 64 bit raspberry pis (#451) --- ..._zero2w_64bit.txt => config_raspberrypi_64bit.txt} | 3 --- ..._64_defconfig => vanilla_raspberrypi_64_defconfig} | 11 +++++++---- .../{raspberrypizero2w => raspberrypi64}/Dockerfile | 4 ++-- docker/{raspberrypizero2w => raspberrypi64}/build.sh | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename buildroot/board/raspberrypi/{config_zero2w_64bit.txt => config_raspberrypi_64bit.txt} (92%) rename buildroot/configs/{vanilla_raspberrypizero2w_64_defconfig => vanilla_raspberrypi_64_defconfig} (76%) rename docker/{raspberrypizero2w => raspberrypi64}/Dockerfile (91%) rename docker/{raspberrypizero2w => raspberrypi64}/build.sh (100%) diff --git a/buildroot/board/raspberrypi/config_zero2w_64bit.txt b/buildroot/board/raspberrypi/config_raspberrypi_64bit.txt similarity index 92% rename from buildroot/board/raspberrypi/config_zero2w_64bit.txt rename to buildroot/board/raspberrypi/config_raspberrypi_64bit.txt index 34c18e4..833ab5e 100644 --- a/buildroot/board/raspberrypi/config_zero2w_64bit.txt +++ b/buildroot/board/raspberrypi/config_raspberrypi_64bit.txt @@ -1,6 +1,3 @@ -start_file=start.elf -fixup_file=fixup.dat - kernel=Image # To use an external initramfs file diff --git a/buildroot/configs/vanilla_raspberrypizero2w_64_defconfig b/buildroot/configs/vanilla_raspberrypi_64_defconfig similarity index 76% rename from buildroot/configs/vanilla_raspberrypizero2w_64_defconfig rename to buildroot/configs/vanilla_raspberrypi_64_defconfig index e7056b9..bf0eb0d 100644 --- a/buildroot/configs/vanilla_raspberrypizero2w_64_defconfig +++ b/buildroot/configs/vanilla_raspberrypi_64_defconfig @@ -7,20 +7,22 @@ BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y # BR2_TARGET_GENERIC_GETTY is not set #BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/rootfs" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypizero2w-64/post-build.sh $(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/post_build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypizero2w-64/post-image.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh $(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/post_build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,ac69f097e1fba94502cbd36278db204120a37943)/linux-ac69f097e1fba94502cbd36278db204120a37943.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_VANILLA_PATH)/board/common/linux-5ghz-softmac.config $(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/linux-6.12-5ghz-softmac.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-zero-2-w" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-2-b broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2710-rpi-cm0 broadcom/bcm2710-rpi-cm3 broadcom/bcm2710-rpi-zero-2 broadcom/bcm2710-rpi-zero-2-w broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4 broadcom/bcm2711-rpi-cm4-io broadcom/bcm2711-rpi-cm4s broadcom/bcm2712-rpi-5-b broadcom/bcm2712-rpi-500 broadcom/bcm2712-rpi-cm5-cm4io broadcom/bcm2712-rpi-cm5-cm5io broadcom/bcm2712-rpi-cm5l-cm4io broadcom/bcm2712-rpi-cm5l-cm5io" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_XZ=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y +BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y BR2_PACKAGE_SDL2=y BR2_PACKAGE_SDL2_KMSDRM=y @@ -46,7 +48,8 @@ BR2_PACKAGE_RTW89_MORROWNR=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y -BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="$(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/config_zero2w_64bit.txt" +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="$(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/config_raspberrypi_64bit.txt" BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE="$(BR2_EXTERNAL_VANILLA_PATH)/board/raspberrypi/cmdline.txt" BR2_PACKAGE_ALSA_LIB=y BR2_PACKAGE_OPENSSL=y diff --git a/docker/raspberrypizero2w/Dockerfile b/docker/raspberrypi64/Dockerfile similarity index 91% rename from docker/raspberrypizero2w/Dockerfile rename to docker/raspberrypi64/Dockerfile index fb79e6b..dfb0242 100644 --- a/docker/raspberrypizero2w/Dockerfile +++ b/docker/raspberrypi64/Dockerfile @@ -40,11 +40,11 @@ ENV FORCE_UNSAFE_CONFIGURE=1 # Build everything except for Vanilla COPY buildroot /vanilla/buildroot -RUN make -C /buildroot O=/build BR2_EXTERNAL=/vanilla/buildroot vanilla_raspberrypizero2w_64_defconfig && \ +RUN make -C /buildroot O=/build BR2_EXTERNAL=/vanilla/buildroot vanilla_raspberrypi_64_defconfig && \ /buildroot/utils/config --file /build/.config -d BR2_PACKAGE_VANILLA && \ make -C /buildroot O=/build && \ /buildroot/utils/config --file /build/.config -e BR2_PACKAGE_VANILLA && \ /buildroot/utils/config --file /build/.config -e BR2_PACKAGE_VANILLA_USE_LOCAL && \ /buildroot/utils/config --file /build/.config --set-str BR2_PACKAGE_VANILLA_LOCAL_PATH /vanilla -ENTRYPOINT [ "/vanilla/docker/raspberrypizero2w/build.sh" ] +ENTRYPOINT [ "/vanilla/docker/raspberrypi64/build.sh" ] diff --git a/docker/raspberrypizero2w/build.sh b/docker/raspberrypi64/build.sh similarity index 100% rename from docker/raspberrypizero2w/build.sh rename to docker/raspberrypi64/build.sh