From aafe22d276afee93cb55d3d1510989156b44cb8c Mon Sep 17 00:00:00 2001 From: Gabriel Lima Date: Sat, 28 Mar 2026 15:20:18 -0300 Subject: [PATCH] Create custom cmdline and config on BR2_EXTERNAL --- board/raspberrypi/cmdline_common.txt | 1 + board/raspberrypi/config_common.txt | 23 +++++++++++++++++++++++ configs/raspberrypi_common_defconfig | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 board/raspberrypi/cmdline_common.txt create mode 100644 board/raspberrypi/config_common.txt diff --git a/board/raspberrypi/cmdline_common.txt b/board/raspberrypi/cmdline_common.txt new file mode 100644 index 0000000..155a546 --- /dev/null +++ b/board/raspberrypi/cmdline_common.txt @@ -0,0 +1 @@ +root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 diff --git a/board/raspberrypi/config_common.txt b/board/raspberrypi/config_common.txt new file mode 100644 index 0000000..c09ecca --- /dev/null +++ b/board/raspberrypi/config_common.txt @@ -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=start.elf +fixup_file=fixup.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 diff --git a/configs/raspberrypi_common_defconfig b/configs/raspberrypi_common_defconfig index fd85086..cc7f525 100644 --- a/configs/raspberrypi_common_defconfig +++ b/configs/raspberrypi_common_defconfig @@ -19,7 +19,8 @@ BR2_PACKAGE_XZ=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="board/raspberrypi/config_default.txt" +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="$(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/config_common.txt" +BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE="$(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/cmdline_common.txt" # BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set BR2_PACKAGE_KMOD=y BR2_PACKAGE_KMOD_TOOLS=y