diff --git a/br-external/Config.in b/br-external/Config.in index b637780..fdd59be 100644 --- a/br-external/Config.in +++ b/br-external/Config.in @@ -4,3 +4,5 @@ source "$BR2_EXTERNAL_BR2RAUC_PATH/package/librespot/Config.in" source "$BR2_EXTERNAL_BR2RAUC_PATH/package/pp3-api/Config.in" source "$BR2_EXTERNAL_BR2RAUC_PATH/package/pp3-core/Config.in" source "$BR2_EXTERNAL_BR2RAUC_PATH/package/pp3-web-ui/Config.in" +source "$BR2_EXTERNAL_BR2RAUC_PATH/package/rpi-eeprom/Config.in" +source "$BR2_EXTERNAL_BR2RAUC_PATH/package/rpi-utils/Config.in" diff --git a/br-external/package/rpi-eeprom/Config.in b/br-external/package/rpi-eeprom/Config.in new file mode 100644 index 0000000..a4f31c2 --- /dev/null +++ b/br-external/package/rpi-eeprom/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RPI_EEPROM + bool "rpi-eeprom" + help + Raspberry Pi bootloader tools. + + https://github.com/raspberrypi/rpi-eeprom diff --git a/br-external/package/rpi-eeprom/README.md b/br-external/package/rpi-eeprom/README.md new file mode 100644 index 0000000..f5a6c5a --- /dev/null +++ b/br-external/package/rpi-eeprom/README.md @@ -0,0 +1,16 @@ +from https://lore.kernel.org/buildroot/20241230000816.34cc40be@windsurf/T/#u +(should soon be part of buildroot release) + +sudo mount /dev/mmcblk0p1 /boot +sudo EDITOR=vi rpi-eeprom-config -e + +``` +[all] +BOOT_UART=0 +WAKE_ON_GPIO=1 +POWER_OFF_ON_HALT=0 +``` + +NOTE: POWER_OFF_ON_HALT=1 only makes sense if WAKE_ON_GPIO=0, c.f. https://www.raspberrypi.com/documentation/computers/raspberry-pi.html + +=> so for now we have no reason to change the firmware params (or the firmware itself for that matter) \ No newline at end of file diff --git a/br-external/package/rpi-eeprom/rpi-eeprom.mk b/br-external/package/rpi-eeprom/rpi-eeprom.mk new file mode 100644 index 0000000..49b4e5b --- /dev/null +++ b/br-external/package/rpi-eeprom/rpi-eeprom.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# rpi-eeprom +# +################################################################################ + +RPI_EEPROM_VERSION = v2025.01.22-2712 +RPI_EEPROM_SITE = $(call github,raspberrypi,rpi-eeprom,$(RPI_EEPROM_VERSION)) +RPI_EEPROM_LICENSE = BSD-3-Clause +RPI_EEPROM_LICENSE_FILES = LICENSE + +RPI_EEPROM_INSTALL = YES + +# TODO: use latest firmware from that commit (check changelog) +# NOTE: current on my Rpi is 2023/01/11 +# TODO: modify rpi-eeprom-update so that the correct boot partition is mounted (the one that is modified is the one that is loaded by uboot) +# (or simply move the resulting files from /boot to the correct /mnt) +# TODO: automate the update of the EEPROM config + + +define RPI_EEPROM_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/rpi-eeprom-config $(TARGET_DIR)/bin/rpi-eeprom-config + $(INSTALL) -D -m 0755 $(@D)/rpi-eeprom-digest $(TARGET_DIR)/bin/rpi-eeprom-digest + $(INSTALL) -D -m 0755 $(@D)/rpi-eeprom-update $(TARGET_DIR)/bin/rpi-eeprom-update + $(INSTALL) -D -m 0644 $(@D)/firmware-2711/default/pieeprom-2023-01-11.bin $(TARGET_DIR)/bin/firmware/default/pieeprom-2023-01-11.bin + $(INSTALL) -D -m 0644 $(@D)/firmware-2711/default/recovery.bin $(TARGET_DIR)/bin/firmware/default/recovery.bin +endef + +$(eval $(generic-package)) diff --git a/br-external/package/rpi-utils/Config.in b/br-external/package/rpi-utils/Config.in new file mode 100644 index 0000000..eb73e82 --- /dev/null +++ b/br-external/package/rpi-utils/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RPI_UTILS + bool "rpi-utils" + help + A collection of scripts and simple applications for Raspberry Pi. + + https://github.com/raspberrypi/utils diff --git a/br-external/package/rpi-utils/rpi-utils.mk b/br-external/package/rpi-utils/rpi-utils.mk new file mode 100644 index 0000000..8ad904e --- /dev/null +++ b/br-external/package/rpi-utils/rpi-utils.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# rpi-utils +# +################################################################################ + +RPI_UTILS_VERSION = 33aa4da93d8da90d5075e8cd48e72cc90048b9f3 +RPI_UTILS_SITE = $(call github,raspberrypi,utils,$(RPI_UTILS_VERSION)) +RPI_UTILS_LICENSE = BSD-3-Clause +RPI_UTILS_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/pieeprom-2024-12-07.bin b/pieeprom-2024-12-07.bin new file mode 100644 index 0000000..95466a9 Binary files /dev/null and b/pieeprom-2024-12-07.bin differ