genio: export (from the image) bins needed for flashing

- so regular armbian/build users can get them in `output/images`
This commit is contained in:
Ricardo Pardini 2026-01-03 15:15:03 +01:00 committed by Igor
parent 8c727d0f3a
commit 91b2454496

View File

@ -258,6 +258,21 @@ function post_config_uboot_target__downgrade_gcc_errors_to_warnings() {
return 0
}
# This exports fip.img and lk.bin _from the image_ to DESTIMG, for easier flashing by users.
# Those will end up being compressed (.xz/etc) by the compression code.
# Note: this is exported _from the image_, not from the u-boot build output; image builds might use
# a cached u-boot artifacts, so might not run the u-boot build at all; while we want to export those
# files together with the image.
function pre_umount_final_image__700_genio_export_flash_bins() {
: "${version:?"ERROR: version variable not defined"}"
run_host_command_logged ls -la "${MOUNT}"/usr/lib/linux-u-boot-*-"${BOARD}"/fip.img
run_host_command_logged ls -la "${MOUNT}"/usr/lib/linux-u-boot-*-"${BOARD}"/lk.bin
run_host_command_logged cp -v "${MOUNT}"/usr/lib/linux-u-boot-*-"${BOARD}"/fip.img "${DESTIMG}/${version}.fip.img"
run_host_command_logged cp -v "${MOUNT}"/usr/lib/linux-u-boot-*-"${BOARD}"/lk.bin "${DESTIMG}/${version}.lk.bin"
# shellcheck disable=SC2034 # used by the mtkflash extension
declare -g MEDIATEK_GENIO_EXPORTED_FIP_IMG="${version}.fip.img" MEDIATEK_GENIO_EXPORTED_LK_BIN="${version}.lk.bin"
}
function add_host_dependencies__genio_python3_deps_for_optee_build() {
display_alert "Preparing Genio OPTEE host-side dependencies" "for ATF/OPTEE build" "info"
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-cryptography python3-pyelftools"