diff --git a/classes/image-sign-rpi.bbclass b/classes/image-sign-rpi.bbclass index a2f88f3..92b323b 100644 --- a/classes/image-sign-rpi.bbclass +++ b/classes/image-sign-rpi.bbclass @@ -55,12 +55,6 @@ do_balena_signed_bootgen_and_deploy() { bbnote "Skipping ${f}" continue fi - # keep a copy of the firmware in boot.img for EEPROM self-update - if echo "${fname}" | grep -q -E "pieeprom.*\.bin$"; then - cp -vf "${f}" "${dname}/pieeprom.upd" - elif echo "${fname}" | grep -q -E "pieeprom.*\.sig$"; then - cp -vf "${f}" "${dname}/pieeprom.sig" - fi cp -rvf "${f}" "${tmpdir}/" rm -rf "${f:?}" # remove directory only once it is empty diff --git a/recipes-bsp/rpi-eeprom/rpi-eeprom_git.bbappend b/recipes-bsp/rpi-eeprom/rpi-eeprom_git.bbappend index 0d7e896..f4a6b54 100644 --- a/recipes-bsp/rpi-eeprom/rpi-eeprom_git.bbappend +++ b/recipes-bsp/rpi-eeprom/rpi-eeprom_git.bbappend @@ -29,10 +29,10 @@ do_compile:append() { # Merge the configuration file into the firmware ${PYTHON} "${WORKDIR}/rpi-eeprom-config" --config "${boot_conf}" --digest "${boot_conf}.sig" \ - --out "${WORKDIR}/${tgt_eeprom_bin}" --pubkey "${DEPLOY_DIR_IMAGE}/balena-keys/rsa.pem" "${WORKDIR}/${src_eeprom_bin}" + --out "${WORKDIR}/${TGT_EEPROM_BIN}" --pubkey "${DEPLOY_DIR_IMAGE}/balena-keys/rsa.pem" "${WORKDIR}/${src_eeprom_bin}" # Sign the firmware - do_sign_rsa "${WORKDIR}/${tgt_eeprom_bin}" "${WORKDIR}/${tgt_eeprom_bin%.bin}.sig" + do_sign_rsa "${WORKDIR}/${TGT_EEPROM_BIN}" "${WORKDIR}/${TGT_EEPROM_SIG}" fi } @@ -56,7 +56,7 @@ do_deploy:append() { echo "program_pubkey=1" >> ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/config.txt echo "revoke_devkey=1" >> ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/config.txt echo "program_jtag_lock=1" >> ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/config.txt - cp -av ${WORKDIR}/pieeprom-latest-stable*bin ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/pieeprom.bin - cp -av ${WORKDIR}/pieeprom-latest-stable*sig ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/pieeprom.sig + cp -av ${WORKDIR}/${TGT_EEPROM_BIN} ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/pieeprom.bin + cp -av ${WORKDIR}/${TGT_EEPROM_SIG} ${DEPLOY_DIR_IMAGE}/rpi-eeprom/secure-boot-lock/pieeprom.sig fi } diff --git a/recipes-core/images/balena-image-sb.inc b/recipes-core/images/balena-image-sb.inc index 3798a14..d5e7d72 100644 --- a/recipes-core/images/balena-image-sb.inc +++ b/recipes-core/images/balena-image-sb.inc @@ -25,8 +25,6 @@ BALENA_BOOT_PARTITION_FILES:append = " \ balena-bootloader/bootenv:/bootenv \ " -BALENA_BOOT_PARTITION_FILES:append = "${@oe.utils.conditional('SIGN_API','','',' rpi-eeprom/pieeprom-latest-stable.sig:/pieeprom-latest-stable.sig',d)}" - IMAGE_INSTALL:remove = " u-boot" IMAGE_INSTALL:append = " grub-editenv"