From 91b24544966b4b5e376e2713fe4a0a987b39d47b Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 3 Jan 2026 15:15:03 +0100 Subject: [PATCH] genio: export (from the image) bins needed for flashing - so regular armbian/build users can get them in `output/images` --- config/sources/families/genio.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/sources/families/genio.conf b/config/sources/families/genio.conf index 42e6514f35..33e652c166 100644 --- a/config/sources/families/genio.conf +++ b/config/sources/families/genio.conf @@ -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"