diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh index 2796e19eb7..b479ec9e0b 100755 --- a/support/scripts/genimage.sh +++ b/support/scripts/genimage.sh @@ -46,3 +46,14 @@ genimage \ --inputpath "${BINARIES_DIR}" \ --outputpath "${BINARIES_DIR}" \ --config "${GENIMAGE_CFG}" + +if grep -Eq "^BR2_PACKAGE_HOST_BMAP_TOOLS=y$" "${BR2_CONFIG}"; then + while IFS= read -r image; do + image_path="${BINARIES_DIR}/${image}" + if ! test -f "${image_path}"; then + continue + fi + bmaptool create "${image_path}" -o "${image_path}.bmap" + gzip -c "${image_path}" > "${image_path}.gz" + done < <(grep '^image ' "${GENIMAGE_CFG}" | cut -d ' ' -f 2) +fi