Copy the Raspberry Pi 4 EEPROM only if we deploy the package (#1104)

Fix build by only copy the EEPROM update to the boot partition if we
actually enable the EEPROM package.
This commit is contained in:
Stefan Agner 2020-12-18 19:29:46 +01:00 committed by GitHub
parent dadc82ae37
commit 22aede0278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,9 +14,7 @@ function hassos_pre_image() {
# Firmware
if [[ "${BOARD_ID}" =~ "rpi4" ]]; then
cp "${BINARIES_DIR}/rpi-firmware/fixup.dat" "${BOOT_DATA}/fixup4.dat"
cp "${BINARIES_DIR}/rpi-firmware/start.elf" "${BOOT_DATA}/start4.elf"
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.sig" "${BOOT_DATA}/pieeprom.sig"
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.upd" "${BOOT_DATA}/pieeprom.upd"
cp "${BINARIES_DIR}/rpi-firmware/start.elf" "${BOOT_DATA}/start4.elf"
else
cp -t "${BOOT_DATA}" \
"${BINARIES_DIR}/rpi-firmware/fixup.dat" \
@ -24,6 +22,12 @@ function hassos_pre_image() {
"${BINARIES_DIR}/rpi-firmware/bootcode.bin"
fi
# EEPROM update for Raspberry Pi 4/Compute Module 4
if grep -Eq "^BR2_PACKAGE_RPI_EEPROM=y$" "${BR2_CONFIG}"; then
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.sig" "${BOOT_DATA}/pieeprom.sig"
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.upd" "${BOOT_DATA}/pieeprom.upd"
fi
# Set cmd options
echo "dwc_otg.lpm_enable=0 console=tty1" > "${BOOT_DATA}/cmdline.txt"