From 8d69f395c24b6dd2ee85093764fc01eb98bafd3b Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 4 Oct 2021 11:51:31 +0200 Subject: [PATCH] Support board specific RPi firmware configuration (#1567) Support optional board specific default RPi firmware configuration file (config.txt). Also rename from boot-env.txt to config.txt since this file is not read by the U-Boot boot loader but the Raspberry Pi specific boot firmware. --- .../board/raspberrypi/{boot-env.txt => config.txt} | 0 buildroot-external/board/raspberrypi/hassos-hook.sh | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename buildroot-external/board/raspberrypi/{boot-env.txt => config.txt} (100%) diff --git a/buildroot-external/board/raspberrypi/boot-env.txt b/buildroot-external/board/raspberrypi/config.txt similarity index 100% rename from buildroot-external/board/raspberrypi/boot-env.txt rename to buildroot-external/board/raspberrypi/config.txt diff --git a/buildroot-external/board/raspberrypi/hassos-hook.sh b/buildroot-external/board/raspberrypi/hassos-hook.sh index dda9d21d0..3cd37630e 100755 --- a/buildroot-external/board/raspberrypi/hassos-hook.sh +++ b/buildroot-external/board/raspberrypi/hassos-hook.sh @@ -9,7 +9,12 @@ function hassos_pre_image() { "${BINARIES_DIR}/boot.scr" cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" cp -r "${BINARIES_DIR}/rpi-firmware/"* "${BOOT_DATA}/" - cp "${BOARD_DIR}/../boot-env.txt" "${BOOT_DATA}/config.txt" + if [ -f "${BOARD_DIR}/config.txt" ]; then + cp "${BOARD_DIR}/config.txt" "${BOOT_DATA}/config.txt" + else + cp "${BOARD_DIR}/../config.txt" "${BOOT_DATA}/config.txt" + fi + cp "${BOARD_DIR}/../config.txt" "${BOOT_DATA}/config.txt" cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" # EEPROM update for Raspberry Pi 4/Compute Module 4