dey-image-installer: loop on new BOOTABLE_ARTIFACTS variable
The artifacts that must go inside the installer ZIP image are not anymore the ones in UBOOT_CONFIG. For CC8X, the artifacts are combinations of UBOOT_CONFIG and RAM_CONFIGS. This commit adds a function 'get_bootable_artifacts()' to boot-artifacts class to generate a new variable BOOTABLE_ARTIFACTS with the list of bootable artifacts DEY produces. The installer recipe can then simply iterate on that list, rather than needing to calculate it by itself. Signed-off-by: Hector Palacios <hector.palacios@digi.com> https://jira.digi.com/browse/DEL-6641
This commit is contained in:
parent
7d61198cc8
commit
65ec66b659
|
|
@ -24,3 +24,27 @@ def get_uboot_ram_combinations(d):
|
||||||
return " ".join(matches)
|
return " ".join(matches)
|
||||||
|
|
||||||
UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}"
|
UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}"
|
||||||
|
|
||||||
|
# This function returns a list with the bootable artifacts
|
||||||
|
def get_bootable_artifacts(d):
|
||||||
|
import re
|
||||||
|
|
||||||
|
types = d.getVar('UBOOT_CONFIG', True) or ""
|
||||||
|
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
|
||||||
|
uboot_prefix = d.getVar('UBOOT_PREFIX', True) or ""
|
||||||
|
uboot_suffix = d.getVar('UBOOT_SUFFIX', True) or ""
|
||||||
|
artifacts = []
|
||||||
|
|
||||||
|
# For platforms without RAM_CONFIGS, build the artifacts from UBOOT_CONFIG
|
||||||
|
if ram_configs == "":
|
||||||
|
for t in types.split(" "):
|
||||||
|
artifacts.append("%s-%s.%s" % (uboot_prefix, t, uboot_suffix))
|
||||||
|
return " ".join(artifacts)
|
||||||
|
else:
|
||||||
|
machine = d.getVar('MACHINE', True) or ""
|
||||||
|
ram_combinations = get_uboot_ram_combinations(d)
|
||||||
|
for ramc in ram_combinations.split(" "):
|
||||||
|
artifacts.append("%s-%s-%s.%s" % (uboot_prefix, machine, ramc, uboot_suffix))
|
||||||
|
return " ".join(artifacts)
|
||||||
|
|
||||||
|
BOOTABLE_ARTIFACTS = "${@get_bootable_artifacts(d)}"
|
||||||
|
|
|
||||||
|
|
@ -53,3 +53,4 @@ MACHINEOVERRIDES .= "${@['', ':${MACHINE_VARIANT}']['${MACHINE_VARIANT}' != '']}
|
||||||
|
|
||||||
# U-Boot symlink
|
# U-Boot symlink
|
||||||
UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"
|
UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"
|
||||||
|
BOOTABLE_ARTIFACTS ?= ""
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#
|
#
|
||||||
# Copyright 2017, Digi International Inc.
|
# Copyright 2017, Digi International Inc.
|
||||||
#
|
#
|
||||||
|
inherit boot-artifacts
|
||||||
|
|
||||||
DEPENDS += "zip-native"
|
DEPENDS += "zip-native"
|
||||||
|
|
||||||
|
|
@ -26,9 +27,9 @@ generate_installer_zip () {
|
||||||
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}"
|
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for ubconf in ${UBOOT_CONFIG}; do
|
for artifact in ${BOOTABLE_ARTIFACTS}; do
|
||||||
if readlink -e "${DEPLOY_DIR_IMAGE}/${UBOOT_PREFIX}-${ubconf}.${UBOOT_SUFFIX}" >/dev/null; then
|
if readlink -e "${DEPLOY_DIR_IMAGE}/${artifact}" >/dev/null; then
|
||||||
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${IMAGE_BOOTLOADER}-${ubconf}.${UBOOT_SUFFIX}"
|
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${artifact}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue