new file mode 100644
@@ -0,0 +1,23 @@
+# Please note that this is only a sample, we recommend you to change it to fit
+# your needs.
+# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
+# See http://buildroot.org/manual.html#rootfs-custom
+# and http://elinux.org/RPiconfig for a description of config.txt syntax
+
+start_file=start4.elf
+fixup_file=fixup4.dat
+
+kernel=zImage
+
+# To use an external initramfs file
+#initramfs rootfs.cpio.gz
+
+# Disable overscan assuming the display supports displaying the full resolution
+# If the text shown on the screen disappears off the edge, comment this out
+disable_overscan=1
+
+# How much memory in MB to assign to the GPU on Pi models having
+# 256, 512 or 1024 MB total memory
+gpu_mem_256=100
+gpu_mem_512=100
+gpu_mem_1024=100
@@ -102,6 +102,7 @@ After building, you should obtain this tree:
| +-- fixup4.dat [1]
| +-- start.elf [1]
| +-- start4.elf [1]
+ | +-- start5.elf [1]
| `-- overlays/ [2]
+-- sdcard.img
+-- Image [1]
new file mode 120000
@@ -0,0 +1 @@
+raspberrypi
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,38 @@
+BR2_arm=y
+BR2_cortex_a76_a55=y
+BR2_ARM_FPU_VFPV4=y
+
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 5.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,feb4ea51e77af09c1a4c7c3e5dd33237750f95cd)/linux-feb4ea51e77af09c1a4c7c3e5dd33237750f95cd.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2712-rpi-5-b"
+
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI5=y
+BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi5/config_5.txt"
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi5/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi5/post-image.sh"
This configuration builds a 32-bit image for RaspberryPi 5. Note: It reuses the Pi4'S defconfig as there is no specific defconfig for BCM2712 on ARM 32-bit. On ARM 64-bit, the main difference is the BCM2712 uses 16k pages while the BC2711 uses 4k pages. See the difference below between the two ARM64 defconfigs: gportay@archlinux ~/src/linux-raspberrypi $ diff -Nurd arch/arm64/configs/bcm271* --- arch/arm64/configs/bcm2711_defconfig 2023-10-08 11:45:20.470238993 +0200 +++ arch/arm64/configs/bcm2712_defconfig 2023-10-08 11:45:20.470238993 +0200 @@ -1,4 +1,4 @@ -CONFIG_LOCALVERSION="-v8" +CONFIG_LOCALVERSION="-v8_16k" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y @@ -41,6 +41,7 @@ # CONFIG_CAVIUM_ERRATUM_22375 is not set # CONFIG_CAVIUM_ERRATUM_23154 is not set # CONFIG_CAVIUM_ERRATUM_27456 is not set +CONFIG_ARM64_16K_PAGES=y CONFIG_COMPAT=y CONFIG_ARMV8_DEPRECATED=y CONFIG_SWP_EMULATION=y @@ -65,6 +66,8 @@ CONFIG_VIRTUALIZATION=y CONFIG_KVM=y CONFIG_JUMP_LABEL=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr> --- board/raspberrypi/config_5.txt | 23 ++++++++++++++++++++ board/raspberrypi/readme.txt | 1 + board/raspberrypi5 | 1 + configs/raspberrypi5_defconfig | 38 ++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 board/raspberrypi/config_5.txt create mode 120000 board/raspberrypi5 create mode 100644 configs/raspberrypi5_defconfig