package/rpi-firmware: rework boot/config file handling
PATCH v5 1/6 package/rpi-firmware: rework boot/config file handling
Try to be less smart (focused on the one target/one use-case), instead reduce the rpi-firmware package to a selectable list of (verbatim) installed firmware files.
- change rpi-firmware config handling from rpi-variant/rpi-flavour choices to bootcode.bin, pi-default/-extended/-cut-down and pi4-/default/-extended/-cut-down selection
- add BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE option to select installable config.txt file
- remove config.txt modify code/handling from raspberry post-image.sh script
- add different customized config.txt files to the raspberry board section
- change dtoverlay krnbt from 'dtoverlay=miniuart-bt,krnbt=on' to extra line with explanation comment
- change raspberry defconfigs to select appropiate rpi-firmware and config.txt files
- change genimage-raspberrypi4.cfg/genimage-raspberrypi4-64.cfg to use start4.elf and fixup4.dat
- update board/raspberrypi/readme.txt (add optional files fixup4.dat, start4.elf and zImage)
With this changes a better support for custom use-cases should be possible, specially multi-target SD cards as suggested by Stefan Agner ([1]).
[1] http://lists.busybox.net/pipermail/buildroot/2021-February/303318.html
---
Changes v1 -> v2:
- update genimage-raspberrypi4.cfg/genimage-raspberrypi4-64.cfg to use start4.elf and fixup4.dat
Changes v2 -> v3:
- remove duplicated BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 from configs/raspberrypi4_64_defconfig
- fix BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE entry from configs/raspberrypi4_64_defconfig
- change firmware list to one-assignment style (suggested by Yann E. MORIN)
- change firmware install to make-level foreach loop (suggested by Yann E. MORIN)
Changes v3 -> v4:
- fix config.in typo (Patch vs. Path)
- fix 64bit config.txt files (kernel image name zImage vs. Image,
previously done by 'post-image.sh --aarch64')
Changes v4 -> v5:
- rebased
- incorporate krnbt option
- add rework boot/config file handling for cm4io and cm4io_64
- update board/raspberrypi/readme.txt
--- board/raspberrypi/config_0w.txt | 29 +++++++ board/raspberrypi/config_3.txt | 29 +++++++ board/raspberrypi/config_3_64bit.txt | 32 ++++++++ board/raspberrypi/config_3_qt5we.txt | 26 +++++++ board/raspberrypi/config_4.txt | 29 +++++++ board/raspberrypi/config_4_64bit.txt | 36 +++++++++ board/raspberrypi/config_cm4io.txt | 26 +++++++ board/raspberrypi/config_cm4io_64bit.txt | 30 +++++++ .../raspberrypi/config_default.txt | 4 +- .../raspberrypi/genimage-raspberrypi4-64.cfg | 4 +- board/raspberrypi/genimage-raspberrypi4.cfg | 4 +- .../genimage-raspberrypicm4io-64.cfg | 4 +- .../raspberrypi/genimage-raspberrypicm4io.cfg | 4 +- board/raspberrypi/post-image.sh | 33 -------- board/raspberrypi/readme.txt | 9 ++- configs/raspberrypi0_defconfig | 3 + configs/raspberrypi0w_defconfig | 4 +- configs/raspberrypi2_defconfig | 3 + configs/raspberrypi3_64_defconfig | 4 +- configs/raspberrypi3_defconfig | 4 +- configs/raspberrypi3_qt5we_defconfig | 4 +- configs/raspberrypi4_64_defconfig | 2 +- configs/raspberrypi4_defconfig | 2 +- configs/raspberrypi_defconfig | 3 + configs/raspberrypicm4io_64_defconfig | 2 +- configs/raspberrypicm4io_defconfig | 2 +- package/rpi-firmware/Config.in | 78 ++++++++----------- package/rpi-firmware/rpi-firmware.mk | 34 +++++--- 28 files changed, 334 insertions(+), 110 deletions(-) create mode 100644 board/raspberrypi/config_0w.txt create mode 100644 board/raspberrypi/config_3.txt create mode 100644 board/raspberrypi/config_3_64bit.txt create mode 100644 board/raspberrypi/config_3_qt5we.txt create mode 100644 board/raspberrypi/config_4.txt create mode 100644 board/raspberrypi/config_4_64bit.txt create mode 100644 board/raspberrypi/config_cm4io.txt create mode 100644 board/raspberrypi/config_cm4io_64bit.txt rename package/rpi-firmware/config.txt => board/raspberrypi/config_default.txt (79%)
board/raspberrypi/config_0w.txt new file +29 -0
@@ -0,0 +1,29 @@ +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable autoprobing of Bluetooth driver without need of hciattach/btattach +dtoverlay=krnbt=on
board/raspberrypi/config_3.txt new file +29 -0
@@ -0,0 +1,29 @@ +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable autoprobing of Bluetooth driver without need of hciattach/btattach +dtoverlay=krnbt=on
board/raspberrypi/config_3_64bit.txt new file +32 -0
@@ -0,0 +1,32 @@ +# 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=Image + +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable autoprobing of Bluetooth driver without need of hciattach/btattach +dtoverlay=krnbt=on + +# enable 64bits support +arm_64bit=1
board/raspberrypi/config_3_qt5we.txt new file +26 -0
@@ -0,0 +1,26 @@ +# 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=200 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt
board/raspberrypi/config_4.txt new file +29 -0
@@ -0,0 +1,29 @@ +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable autoprobing of Bluetooth driver without need of hciattach/btattach +dtoverlay=krnbt=on
board/raspberrypi/config_4_64bit.txt new file +36 -0
@@ -0,0 +1,36 @@ +# 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=Image + +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable autoprobing of Bluetooth driver without need of hciattach/btattach +dtoverlay=krnbt=on + +dtoverlay=vc4-kms-v3d-pi4 +dtoverlay=imx219 +#dtoverlay=ov5647 + +# enable 64bits support +arm_64bit=1
board/raspberrypi/config_cm4io.txt new file +26 -0
@@ -0,0 +1,26 @@ +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt
board/raspberrypi/config_cm4io_64bit.txt new file +30 -0
@@ -0,0 +1,30 @@ +# 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=Image + +# 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 + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt + +# enable 64bits support +arm_64bit=1 +
board/raspberrypi/config_default.txt renamed from package/rpi-firmware/config.txt +1 -3
@@ -1,11 +1,9 @@ # Please note that this is only a sample, we recommend you to change it to fit # your needs. -# You should override this file using a post-build script. +# 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 -# We always use the same names, the real used variant is selected by -# BR2_PACKAGE_RPI_FIRMWARE_{DEFAULT,X,CD} choice start_file=start.elf fixup_file=fixup.dat
board/raspberrypi/genimage-raspberrypi4-64.cfg +2 -2
@@ -4,8 +4,8 @@ image boot.vfat { "bcm2711-rpi-4-b.dtb", "rpi-firmware/cmdline.txt", "rpi-firmware/config.txt", - "rpi-firmware/fixup.dat", - "rpi-firmware/start.elf", + "rpi-firmware/fixup4.dat", + "rpi-firmware/start4.elf", "rpi-firmware/overlays", "Image" }
board/raspberrypi/genimage-raspberrypi4.cfg +2 -2
@@ -4,8 +4,8 @@ image boot.vfat { "bcm2711-rpi-4-b.dtb", "rpi-firmware/cmdline.txt", "rpi-firmware/config.txt", - "rpi-firmware/fixup.dat", - "rpi-firmware/start.elf", + "rpi-firmware/fixup4.dat", + "rpi-firmware/start4.elf", "rpi-firmware/overlays", "zImage" }
board/raspberrypi/genimage-raspberrypicm4io-64.cfg +2 -2
@@ -4,8 +4,8 @@ image boot.vfat { "bcm2711-rpi-cm4.dtb", "rpi-firmware/cmdline.txt", "rpi-firmware/config.txt", - "rpi-firmware/fixup.dat", - "rpi-firmware/start.elf", + "rpi-firmware/fixup4.dat", + "rpi-firmware/start4.elf", "rpi-firmware/overlays", "Image" }
board/raspberrypi/genimage-raspberrypicm4io.cfg +2 -2
@@ -4,8 +4,8 @@ image boot.vfat { "bcm2711-rpi-cm4.dtb", "rpi-firmware/cmdline.txt", "rpi-firmware/config.txt", - "rpi-firmware/fixup.dat", - "rpi-firmware/start.elf", + "rpi-firmware/fixup4.dat", + "rpi-firmware/start4.elf", "rpi-firmware/overlays", "zImage" }
board/raspberrypi/post-image.sh +0 -33
@@ -7,39 +7,6 @@ BOARD_NAME="$(basename ${BOARD_DIR})" GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" -for arg in "$@" -do - case "${arg}" in - --add-miniuart-bt-overlay) - if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then - echo "Adding 'dtoverlay=miniuart-bt' to config.txt (fixes ttyAMA0 serial console)." - cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" - -# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console -dtoverlay=miniuart-bt,krnbt=on -__EOF__ - fi - ;; - --aarch64) - # Run a 64bits kernel (armv8) - sed -e '/^kernel=/s,=.*,=Image,' -i "${BINARIES_DIR}/rpi-firmware/config.txt" - if ! grep -qE '^arm_64bit=1' "${BINARIES_DIR}/rpi-firmware/config.txt"; then - cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" - -# enable 64bits support -arm_64bit=1 -__EOF__ - fi - ;; - --gpu_mem_256=*|--gpu_mem_512=*|--gpu_mem_1024=*) - # Set GPU memory - gpu_mem="${arg:2}" - sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt" - ;; - esac - -done - # Pass an empty rootpath. genimage makes a full copy of the given rootpath to # ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk # space. We don't rely on genimage to build the rootfs image, just to insert a
board/raspberrypi/readme.txt +6 -3
@@ -87,11 +87,14 @@ After building, you should obtain this tree: | +-- bootcode.bin | +-- cmdline.txt | +-- config.txt - | +-- fixup.dat - | +-- start.elf + | +-- fixup.dat [1] + | +-- fixup4.dat [1] + | +-- start.elf [1] + | +-- start4.elf [1] | `-- overlays/ [2] +-- sdcard.img - `-- zImage + +-- Image [1] + `-- zImage [1] [1] Not all of them will be present, depending on the RaspberryPi model you are using.
configs/raspberrypi0_defconfig +3 -0
@@ -20,6 +20,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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/raspberrypi0/config_default.txt" # BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set # Required tools to create the SD image
configs/raspberrypi0w_defconfig +3 -1
@@ -16,6 +16,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero-w" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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/raspberrypi0w/config_0w.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -29,4 +32,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi0w/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi0w/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
configs/raspberrypi2_defconfig +3 -0
@@ -22,6 +22,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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_INSTALL_DTB_OVERLAYS is not set # Required tools to create the SD image
configs/raspberrypi3_64_defconfig +3 -1
@@ -21,6 +21,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi- BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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/raspberrypi3-64/config_3_64bit.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -34,4 +37,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay"
configs/raspberrypi3_defconfig +3 -1
@@ -21,6 +21,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-r BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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/raspberrypi3/config_3.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -34,4 +37,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
configs/raspberrypi3_qt5we_defconfig +3 -1
@@ -31,6 +31,9 @@ BR2_PACKAGE_QT5BASE_PNG=y BR2_PACKAGE_QT5WEBENGINE=y BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=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/raspberrypi3/config_3_qt5we.txt" BR2_PACKAGE_RPI_USERLAND=y BR2_PACKAGE_CA_CERTIFICATES=y BR2_PACKAGE_NTP=y
@@ -48,4 +51,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="400M" BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --gpu_mem_1024=200"
configs/raspberrypi4_64_defconfig +1 -1
@@ -22,6 +22,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi4-64/config_4_64bit.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -35,4 +36,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
configs/raspberrypi4_defconfig +1 -1
@@ -22,6 +22,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi4/config_4.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -35,4 +36,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
configs/raspberrypi_defconfig +3 -0
@@ -21,6 +21,9 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-c BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=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_INSTALL_DTB_OVERLAYS is not set # Required tools to create the SD image
configs/raspberrypicm4io_64_defconfig +1 -1
@@ -22,6 +22,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypicm4io-64/config_cm4io_64bit.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -38,4 +39,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypicm4io-64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypicm4io-64/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
configs/raspberrypicm4io_defconfig +1 -1
@@ -22,6 +22,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y +BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypicm4io-64/config_cm4io.txt" # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -38,4 +39,3 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypicm4io/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypicm4io/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
package/rpi-firmware/Config.in +34 -44
97 lines not on this page · raw message
package/rpi-firmware/rpi-firmware.mk +23 -11
@@ -10,6 +10,27 @@ RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom RPI_FIRMWARE_INSTALL_IMAGES = YES +RPI_FIRMWARE_FILES = \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN), bootcode.bin) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI), start.elf fixup.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X), startx.elf fixupx.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD), start_cd.elf fixup_cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4), start4.elf fixup4.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X), start4x.elf fixup4x.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) + +define RPI_FIRMWARE_INSTALL_BIN + $(foreach f,$(RPI_FIRMWARE_FILES), \ + $(INSTALL) -D -m 0644 $(@D)/boot/$(f) $(BINARIES_DIR)/rpi-firmware/$(f) + ) +endef + +ifneq ($(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE),) +define RPI_FIRMWARE_INSTALL_CONFIG + $(INSTALL) -D -m 0644 $(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE) $(BINARIES_DIR)/rpi-firmware/config.txt +endef +endif + ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y) define RPI_FIRMWARE_INSTALL_DTB $(foreach dtb,$(wildcard $(@D)/boot/*.dtb), \
@@ -41,19 +62,10 @@ define RPI_FIRMWARE_INSTALL_TARGET_CMDS endef endif # INSTALL_VCDBG -ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI),y) -# bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM -define RPI_FIRMWARE_INSTALL_BOOTCODE_BIN - $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin -endef -endif - define RPI_FIRMWARE_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt $(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt - $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf - $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat - $(RPI_FIRMWARE_INSTALL_BOOTCODE_BIN) + $(RPI_FIRMWARE_INSTALL_BIN) + $(RPI_FIRMWARE_INSTALL_CONFIG) $(RPI_FIRMWARE_INSTALL_DTB) $(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS) endef
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 2/6 board/raspberrypicm4io: enable RTC and USB overlays
- add RTC and USB dtoverlay entries to config_cm4io.txt
---
Changes v4 -> v5:
- new patch
--- board/raspberrypi/config_cm4io.txt | 7 +++++++ 1 file changed, 7 insertions(+)
board/raspberrypi/config_cm4io.txt +7 -0
@@ -24,3 +24,10 @@ gpu_mem_1024=100 # fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console dtoverlay=miniuart-bt + +# enable RTC +dtparam=i2c_vc=on +dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi + +# enable dwc2 USB controller (USB 2.0) +dtoverlay=dwc2,dr_mode=host
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/6] board/raspberrypicm4io: enable RTC and USB overlays
Peter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 1 line
- add RTC and USB dtoverlay entries to config_cm4io.txt
Why specifically the RTC and USB? And why only on the CM, and not the other boards?
IIRC, dwc2 is an OTG chip, too, and it is also wired on the rpi0. Well, by experience, I know that the rpi0 *can* do USB slave/OTG.
Regards,
Yann E. MORIN.
Quoted 30 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v4 -> v5:
- new patch--- board/raspberrypi/config_cm4io.txt | 7 +++++++ 1 file changed, 7 insertions(+)board/raspberrypi/config_cm4io.txt +7
-0@@ -24,3 +24,10 @@ gpu_mem_1024=100 # fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console dtoverlay=miniuart-bt + +# enable RTC +dtparam=i2c_vc=on +dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi + +# enable dwc2 USB controller (USB 2.0) +dtoverlay=dwc2,dr_mode=hostSignature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/6] board/raspberrypicm4io: enable RTC and USB overlays
Hello Yann,
Quoted 7 lines · Yann E. MORIN
Peter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 1 line
- add RTC and USB dtoverlay entries to config_cm4io.txt
Why specifically the RTC and USB? And why only on the CM, and not the other boards?
The config is not for the CM4 standalone, but specific to the CM4 IO Board, equipped (as the only RPi original one) with an RTC chip....
Quoted 3 lines
IIRC, dwc2 is an OTG chip, too, and it is also wired on the rpi0. Well, by experience, I know that the rpi0 *can* do USB slave/OTG.
And as far as I know the USB is enabled with all RPi's with exception of the CM4: 'The USB interface is disabled to save power by default on the CM4' (see [1] page 5)
According to [2]:
Name: dwc-otg
Info: Selects the dwc_otg USB controller driver which has fiq support. This
is the default on all except the Pi Zero which defaults to dwc2.
Load: dtoverlay=dwc-otg
Params: <None>
Name: dwc2
Info: Selects the dwc2 USB controller driver
Load: dtoverlay=dwc2,<param>=<val>
Params: dr_mode Dual role mode: "host", "peripheral" or "otg"
g-rx-fifo-size Size of rx fifo size in gadget mode
g-np-tx-fifo-size Size of non-periodic tx fifo size in gadget
mode
Would interpret 'defaults to dwc2' on Pi Zero as enabled by default...
Regards,
Peter
[1] https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
[2] https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README
Quoted 31 lines
Regards,
Yann E. MORIN.Quoted 26 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v4 -> v5:
- new patch--- board/raspberrypi/config_cm4io.txt | 7 +++++++ 1 file changed, 7 insertions(+)board/raspberrypi/config_cm4io.txt +7
-1@@ -24,3 +24,10 @@ gpu_mem_1024=100 # fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console dtoverlay=miniuart-bt + +# enable RTC +dtparam=i2c_vc=on +dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi + +# enable dwc2 USB controller (USB 2.0) +dtoverlay=dwc2,dr_mode=host --2.33.0
Quoted 5 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/6] board/raspberrypicm4io: enable RTC and USB overlays
On 2021-10-17 22:54 +0200, Peter Seiderer spake thusly:
Quoted 8 lines · Yann E. MORIN
Quoted 4 lines
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 1 line
- add RTC and USB dtoverlay entries to config_cm4io.txt
Why specifically the RTC and USB? And why only on the CM, and not the other boards?
The config is not for the CM4 standalone, but specific to the CM4 IO Board, equipped (as the only RPi original one) with an RTC chip....
Ah, OK, that makes sense, then.
Quoted 20 lines
Quoted 2 lines
IIRC, dwc2 is an OTG chip, too, and it is also wired on the rpi0. Well, by experience, I know that the rpi0 *can* do USB slave/OTG.
And as far as I know the USB is enabled with all RPi's with exception of the CM4: 'The USB interface is disabled to save power by default on the CM4' (see [1] page 5)
According to [2]:
Name: dwc-otg
Info: Selects thedwc_otgUSB controller driver which has fiq support. This
is the default on all except the Pi Zero which defaults to dwc2.
Load: dtoverlay=dwc-otg
Params: <None>Name: dwc2
Info: Selects the dwc2 USB controller driver
Load: dtoverlay=dwc2,<param>=<val>
Params:dr_modeDual role mode: "host", "peripheral" or "otg"
Quoted 7 lines
g-rx-fifo-size Size of rx fifo size in gadget mode
g-np-tx-fifo-size Size of non-periodic tx fifo size in gadget
modeWould interpret 'defaults to dwc2' on Pi Zero as enabled by default...
Yes, it is enabled by default, as a host-only controller, not OTG, which has to be explictly requested.
Regards,
Yann E. MORIN.
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/6] board/raspberrypicm4io: enable RTC and USB overlays
In reply to Peter SeidererQuoted 9 lines · On Tue, 21 Sep 2021 22:21:33 +0200 Peter Seiderer <[email protected]> wrote:
- add RTC and USB dtoverlay entries to config_cm4io.txt
Signed-off-by Peter Seiderer <[email protected]>---
Changes v4 -> v5:
- new patch--- board/raspberrypi/config_cm4io.txt | 7 +++++++ 1 file changed, 7 insertions(+)
I have applied to master, after extending the commit log with more details that explain the change. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 3/6 board/raspberrypicm4io-64: enable RTC and USB overlays
In reply to Peter Seiderer- add RTC and USB dtoverlay entries to config_cm4io_64bit.txt
---
Changes v4 -> v5:
- new patch
--- board/raspberrypi/config_cm4io_64bit.txt | 7 +++++++ 1 file changed, 7 insertions(+)
board/raspberrypi/config_cm4io_64bit.txt +7 -0
@@ -25,6 +25,13 @@ gpu_mem_1024=100 # fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console dtoverlay=miniuart-bt +# enable RTC +dtparam=i2c_vc=on +dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi + +# enable dwc2 USB controller (USB 2.0) +dtoverlay=dwc2,dr_mode=host + # enable 64bits support arm_64bit=1
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 3/6] board/raspberrypicm4io-64: enable RTC and USB overlays
Quoted 3 lines · On Tue, 21 Sep 2021 22:21:34 +0200 Peter Seiderer <[email protected]> wrote:
- add RTC and USB dtoverlay entries to config_cm4io_64bit.txt
Signed-off-by Peter Seiderer <[email protected]>
I have applied to master, after extending the commit log with more details that explain the change. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 4/6 package/rpi-firmware: add option for the debug set of start/fixup boot files
In reply to Peter SeidererAdd option for the debug set of start/fixup boot files.
---
Changes v1 -> v2:
- new patch
Changes v2 -> v3:
- adjust to one-assignment style
Changes v3 -> v4:
- no changes
Changes v4 -> v5:
- rebased
--- package/rpi-firmware/Config.in | 10 ++++++++++ package/rpi-firmware/rpi-firmware.mk | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)
package/rpi-firmware/Config.in +10 -0
@@ -35,6 +35,11 @@ config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD The cut-down set of files for versions Zero/1/2/3 (only features required to boot a Linux kernel). +config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_DB + bool "rpi 0/1/2/3 (debug)" + help + The debug set of files for versions Zero/1/2/3. + config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 bool "rpi 4 (default)" help
@@ -53,6 +58,11 @@ config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD The cut-down set of files for versions 4 (only features required to boot a Linux kernel). +config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_DB + bool "rpi 4 (debug)" + help + The debug set of files for versions 4. + config BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE string "Path to a file stored as boot/config.txt" help
package/rpi-firmware/rpi-firmware.mk +3 -1
@@ -15,9 +15,11 @@ RPI_FIRMWARE_FILES = \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI), start.elf fixup.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X), startx.elf fixupx.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD), start_cd.elf fixup_cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_DB), start_db.elf fixup_db.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4), start4.elf fixup4.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X), start4x.elf fixup4x.dat) \ - $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_DB), start4db.elf fixup4db.dat) define RPI_FIRMWARE_INSTALL_BIN $(foreach f,$(RPI_FIRMWARE_FILES), \
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH v5 4/6] package/rpi-firmware: add option for the debug set of start/fixup boot files
Peter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 3 lines
Add option for the debug set of start/fixup boot files.
Signed-off-by Peter Seiderer <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 69 lines
---
Changes v1 -> v2:
- new patchChanges v2 -> v3:
- adjust to one-assignment styleChanges v3 -> v4:
- no changesChanges v4 -> v5:
- rebased--- package/rpi-firmware/Config.in | 10 ++++++++++ package/rpi-firmware/rpi-firmware.mk | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)package/rpi-firmware/Config.in +10
-0@@ -35,6 +35,11 @@ config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD The cut-down set of files for versions Zero/1/2/3 (only features required to boot a Linux kernel). +config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_DB + bool "rpi 0/1/2/3 (debug)" + help + The debug set of files for versions Zero/1/2/3. + config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 bool "rpi 4 (default)" help@@ -53,6 +58,11 @@ config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD The cut-down set of files for versions 4 (only features required to boot a Linux kernel). +config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_DB + bool "rpi 4 (debug)" + help + The debug set of files for versions 4. + config BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE string "Path to a file stored as boot/config.txt" helppackage/rpi-firmware/rpi-firmware.mk +3
-1@@ -15,9 +15,11 @@ RPI_FIRMWARE_FILES = \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI), start.elf fixup.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X), startx.elf fixupx.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD), start_cd.elf fixup_cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_DB), start_db.elf fixup_db.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4), start4.elf fixup4.dat) \ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X), start4x.elf fixup4x.dat) \ - $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_DB), start4db.elf fixup4db.dat) define RPI_FIRMWARE_INSTALL_BIN $(foreach f,$(RPI_FIRMWARE_FILES), \Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 5/6 package/rpi-firmware: convert dtb overlay install loop to make-level foreach loop
In reply to Peter Seiderer---
Changes v2 -> v3:
- new patch
Changes v3 -> v4:
- no changes
Changes v4 -> v5:
- rebased
--- package/rpi-firmware/rpi-firmware.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
package/rpi-firmware/rpi-firmware.mk +3 -3
@@ -43,9 +43,9 @@ endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS),y) define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS - for ovldtb in $(@D)/boot/overlays/*.dtbo; do \ - $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ - done + $(foreach ovldtb,$(wildcard $(@D)/boot/overlays/*.dtbo), \ + $(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb)) + ) endef else # Still create the directory, so a genimage.cfg can include it independently of
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH v5 5/6] package/rpi-firmware: convert dtb overlay install loop to make-level foreach loop
Peter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 1 line
Signed-off-by Peter Seiderer <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 37 lines
---
Changes v2 -> v3:
- new patchChanges v3 -> v4:
- no changesChanges v4 -> v5:
- rebased--- package/rpi-firmware/rpi-firmware.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)package/rpi-firmware/rpi-firmware.mk +3
-3@@ -43,9 +43,9 @@ endif ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS),y) define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS - for ovldtb in $(@D)/boot/overlays/*.dtbo; do \ - $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ - done + $(foreach ovldtb,$(wildcard $(@D)/boot/overlays/*.dtbo), \ + $(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb)) + ) endef else # Still create the directory, so a genimage.cfg can include it independently ofSignature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 6/6 package/rpi-wifi-firmware: provide convenience links for RPi3A+, RPi3B+ and RPi4B firmware configuration files
In reply to Peter SeidererProvide convenience links for BCM43455/CYW43455 based RPi3A+, RPi3B+ and RPi4B WIFI firmware configuration files to avoid runtime firmware loading warning in the kernel logs, e.g. (RPi3B+):
brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt failed with error -2
or (RP4B
brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
---
Changes v4 -> v5:
- new patch
--- package/rpi-wifi-firmware/rpi-wifi-firmware.mk | 3 +++ 1 file changed, 3 insertions(+)
package/rpi-wifi-firmware/rpi-wifi-firmware.mk +3 -0
@@ -12,6 +12,9 @@ RPI_WIFI_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx define RPI_WIFI_FIRMWARE_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/lib/firmware/brcm $(INSTALL) -m 0644 $(@D)/firmware/brcm/brcmfmac* $(TARGET_DIR)/lib/firmware/brcm + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt endef $(eval $(generic-package))
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 6/6] package/rpi-wifi-firmware: provide convenience links for RPi3A+, RPi3B+ and RPi4B firmware configuration files
Peter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 11 lines
Provide convenience links for BCM43455/CYW43455 based RPi3A+, RPi3B+ and RPi4B WIFI firmware configuration files to avoid runtime firmware loading warning in the kernel logs, e.g. (RPi3B+):
brcmfmac mmc1:0001:1: Direct firmware load for
brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txtfailed with error -2or (RP4B
brcmfmac mmc1:0001:1: Direct firmware load for
brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txtfailed with error -2Signed-off-by Peter Seiderer <[email protected]>
I've slightly reworded and rewrapped the commit log, and applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 28 lines
---
Changes v4 -> v5:
- new patch--- package/rpi-wifi-firmware/rpi-wifi-firmware.mk | 3 +++ 1 file changed, 3 insertions(+)package/rpi-wifi-firmware/rpi-wifi-firmware.mk +3
-0@@ -12,6 +12,9 @@ RPI_WIFI_FIRMWARE_LICENSE_FILES = LICENCE.broadcom_bcm43xx define RPI_WIFI_FIRMWARE_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/lib/firmware/brcm $(INSTALL) -m 0644 $(@D)/firmware/brcm/brcmfmac* $(TARGET_DIR)/lib/firmware/brcm + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt + ln -sf brcmfmac43455-sdio.txt $(TARGET_DIR)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt endef $(eval $(generic-package))Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedPeter, All,
On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
Quoted 3 lines
Try to be less smart (focused on the one target/one use-case), instead reduce the rpi-firmware package to a selectable list of (verbatim) installed firmware files.
[--SNIP--]
Quoted 7 lines
With this changes a better support for custom use-cases should be possible, specially multi-target SD cards as suggested by Stefan Agner ([1]).
[1] http://lists.busybox.net/pipermail/buildroot/2021-February/303318.html
Signed-off-by Peter Seiderer <[email protected]>
Thanks for your persistence in working on this! :-)
[--SNIP--]
Quoted 14 lines
package/rpi-firmware/rpi-firmware.mk +6
-0@@ -10,6 +10,27 @@ RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom RPI_FIRMWARE_INSTALL_IMAGES = YES +RPI_FIRMWARE_FILES = \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN), bootcode.bin) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI), start.elf fixup.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X), startx.elf fixupx.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD), start_cd.elf fixup_cd.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4), start4.elf fixup4.dat) \
package/rpi-firmware/rpi-firmware.mk RPI_FIRMWARE_LICENSE = BSD-3-Clause · line 28
Quoted 10 lines
package/rpi-firmware/rpi-firmware.mk +10
-0+ $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X), start4x.elf fixup4x.dat) \ + $(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat) + +define RPI_FIRMWARE_INSTALL_BIN + $(foreach f,$(RPI_FIRMWARE_FILES), \ + $(INSTALL) -D -m 0644 $(@D)/boot/$(f) $(BINARIES_DIR)/rpi-firmware/$(f) + ) +endef + +ifneq ($(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE),)
BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE is a kconfig string, so if the string is empty, the variable will be "", i.e.e two double quotes, and this is not empty for make.
I've fixed that by defining the usual qstripped variable.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 37 lines
package/rpi-firmware/rpi-firmware.mk +7
-11+define RPI_FIRMWARE_INSTALL_CONFIG + $(INSTALL) -D -m 0644 $(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE) $(BINARIES_DIR)/rpi-firmware/config.txt +endef +endif + ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y) define RPI_FIRMWARE_INSTALL_DTB $(foreach dtb,$(wildcard $(@D)/boot/*.dtb), \@@ -41,19 +62,10 @@ define RPI_FIRMWARE_INSTALL_TARGET_CMDS endef endif # INSTALL_VCDBG -ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI),y) -# bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM -define RPI_FIRMWARE_INSTALL_BOOTCODE_BIN - $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin -endef -endif - define RPI_FIRMWARE_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt $(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt - $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf - $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat - $(RPI_FIRMWARE_INSTALL_BOOTCODE_BIN) + $(RPI_FIRMWARE_INSTALL_BIN) + $(RPI_FIRMWARE_INSTALL_CONFIG) $(RPI_FIRMWARE_INSTALL_DTB) $(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS) endefSignature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot