KIRSKSTONE: overwrite syntax
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
This commit is contained in:
1 parent
5e68bca87d
commit
483a6968fa
66 files changed
+551
-552
No files matched your search
@@ -243,8 +243,8 @@ python do_create_multiextlinux_config() {
|
||||
extra_extlinuxlabels = labels
|
||||
extra_cfile = os.path.join(d.getVar('B'), subdir , config + '_' + 'extlinux.conf')
|
||||
# Configure dynamically the default menu configuration if there is no specific one configured
|
||||
if d.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL_%s' % config):
|
||||
bb.note(">>> Specific configuration for UBOOT_EXTLINUX_DEFAULT_LABEL var detected for %s label: %s" % (config, d.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL_%s' % config)))
|
||||
if d.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL:%s' % config):
|
||||
bb.note(">>> Specific configuration for UBOOT_EXTLINUX_DEFAULT_LABEL var detected for %s label: %s" % (config, d.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL:%s' % config)))
|
||||
else:
|
||||
bb.note(">>> Set UBOOT_EXTLINUX_DEFAULT_LABEL to %s" % config)
|
||||
d.setVar('UBOOT_EXTLINUX_DEFAULT_LABEL', config)
|
||||
@@ -266,8 +266,8 @@ python do_create_multiextlinux_config() {
|
||||
if socname_list and len(socname_list.split()) > 0:
|
||||
for soc in socname_list.split():
|
||||
if config.find(soc) > -1:
|
||||
if d.getVar('UBOOT_EXTLINUX_SPLASH_%s' % soc):
|
||||
splash = d.getVar('UBOOT_EXTLINUX_SPLASH_%s' % soc)
|
||||
if d.getVar('UBOOT_EXTLINUX_SPLASH:%s' % soc):
|
||||
splash = d.getVar('UBOOT_EXTLINUX_SPLASH:%s' % soc)
|
||||
bb.note(">>> Specific configuration for SPLASH Screen detected with configuration: %s" % config)
|
||||
bb.note(">>> Set UBOOT_EXTLINUX_SPLASH to %s" % splash)
|
||||
d.setVar('UBOOT_EXTLINUX_SPLASH', splash)
|
||||
@@ -282,8 +282,8 @@ do_create_multiextlinux_config[cleandirs] += "${B}"
|
||||
# Because of local overrides within create_multiextlinux_config() function, we
|
||||
# need to make sure to add each variables to the vardeps list.
|
||||
UBOOT_EXTLINUX_TARGET_VARS = "FIT LABELS BOOTPREFIXES TIMEOUT DEFAULT_LABEL TARGETS_EXTRA_CONFIG"
|
||||
do_create_multiextlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_TARGET_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_TARGETS').split()])}"
|
||||
do_create_multiextlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX:%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_TARGET_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_TARGETS').split()])}"
|
||||
UBOOT_EXTLINUX_LABELS_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD FIT"
|
||||
UBOOT_EXTLINUX_LABELS_CONFIGURED = "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('UBOOT_EXTLINUX_LABELS_%s' % o) for o in d.getVar('UBOOT_EXTLINUX_TARGETS').split()).split()))}"
|
||||
UBOOT_EXTLINUX_LABELS_CONFIGURED += "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_%s' % o) for o in d.getVar('UBOOT_EXTLINUX_TARGETS').split()).split()))}"
|
||||
do_create_multiextlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_LABELS_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS_CONFIGURED').split()])}"
|
||||
UBOOT_EXTLINUX_LABELS_CONFIGURED = "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('UBOOT_EXTLINUX_LABELS:%s' % o) for o in d.getVar('UBOOT_EXTLINUX_TARGETS').split()).split()))}"
|
||||
UBOOT_EXTLINUX_LABELS_CONFIGURED += "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG:%s' % o) for o in d.getVar('UBOOT_EXTLINUX_TARGETS').split()).split()))}"
|
||||
do_create_multiextlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX:%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_LABELS_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS_CONFIGURED').split()])}"
|
||||
@@ -3,9 +3,9 @@ DEPENDS += "tf-a-tools-native"
|
||||
# Configure new package to provide fiptool wrapper for SDK usage
|
||||
PACKAGES =+ "${FIPTOOL_WRAPPER}"
|
||||
|
||||
BBCLASSEXTEND_append = " nativesdk"
|
||||
BBCLASSEXTEND:append = " nativesdk"
|
||||
|
||||
RRECOMMENDS_${FIPTOOL_WRAPPER}_append_class-nativesdk = " nativesdk-tf-a-tools"
|
||||
RRECOMMENDS:${FIPTOOL_WRAPPER}:append:class-nativesdk = " nativesdk-tf-a-tools"
|
||||
|
||||
# Define default TF-A FIP namings
|
||||
FIP_BASENAME ?= "fip"
|
||||
@@ -67,7 +67,7 @@ FIP_SIGN_SUFFIX ??= ''
|
||||
# Define FIP dependency build
|
||||
FIP_DEPENDS += "virtual/bootloader"
|
||||
FIP_DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'virtual/optee-os', '', d)}"
|
||||
FIP_DEPENDS_class-nativesdk = ""
|
||||
FIP_DEPENDS:class-nativesdk = ""
|
||||
|
||||
# -----------------------------------------------
|
||||
# Handle FIP config and set internal vars
|
||||
@@ -158,7 +158,7 @@ python () {
|
||||
}
|
||||
|
||||
# Deploy the fip binary for current target
|
||||
do_deploy_append_class-target() {
|
||||
do_deploy:append:class-target() {
|
||||
install -d ${DEPLOYDIR}
|
||||
install -d ${FIP_DEPLOYDIR_FIP}
|
||||
|
||||
@@ -281,11 +281,11 @@ do_deploy_append_class-target() {
|
||||
}
|
||||
|
||||
# Stub do_compile for nativesdk use case as we only expect to provide FIPTOOL_WRAPPER
|
||||
do_compile_class-nativesdk() {
|
||||
do_compile:class-nativesdk() {
|
||||
return
|
||||
}
|
||||
|
||||
do_install_class-nativesdk() {
|
||||
do_install:class-nativesdk() {
|
||||
# Create the FIPTOOL_WRAPPER script to use on sdk side
|
||||
cat << EOF > ${WORKDIR}/${FIPTOOL_WRAPPER}
|
||||
#!/bin/bash -
|
||||
@@ -388,4 +388,4 @@ EOF
|
||||
}
|
||||
|
||||
# Feed package for sdk with our fiptool wrapper
|
||||
FILES_${FIPTOOL_WRAPPER}_class-nativesdk = "${bindir}/${FIPTOOL_WRAPPER}"
|
||||
FILES:${FIPTOOL_WRAPPER}:class-nativesdk = "${bindir}/${FIPTOOL_WRAPPER}"
|
||||
@@ -66,9 +66,9 @@
|
||||
# - <config-label> from 'FLASHLAYOUT_CONFIG_LABELS' list
|
||||
# Priority assignment is:
|
||||
# It means the 'FLASHLAYOUT_PARTITION_LABELS' value can be overriden by setting:
|
||||
# FLASHLAYOUT_PARTITION_LABELS_<bootscheme-label>_<config-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS_<bootscheme-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS_<config-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS:<bootscheme-label>:<config-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS:<bootscheme-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS:<config-label>
|
||||
# FLASHLAYOUT_PARTITION_LABELS
|
||||
#
|
||||
# Another override mechanism is also implemented for all other partition variables:
|
||||
@@ -217,11 +217,11 @@ def expand_var(var, bootscheme, config, partition, d):
|
||||
bb.fatal('OVERRIDES not defined')
|
||||
localdata.setVar('OVERRIDES', partition + ':' + overrides)
|
||||
# Compute var according to priority assignment order defined above
|
||||
expanded_var = localdata.getVar('%s_%s_%s' % (var, bootscheme, config))
|
||||
expanded_var = localdata.getVar('%s:%s:%s' % (var, bootscheme, config))
|
||||
if not expanded_var:
|
||||
expanded_var = localdata.getVar('%s_%s' % (var, bootscheme))
|
||||
expanded_var = localdata.getVar('%s:%s' % (var, bootscheme))
|
||||
if not expanded_var:
|
||||
expanded_var = localdata.getVar('%s_%s' % (var, config))
|
||||
expanded_var = localdata.getVar('%s:%s' % (var, config))
|
||||
if not expanded_var:
|
||||
expanded_var = localdata.getVar(var)
|
||||
if not expanded_var:
|
||||
@@ -296,11 +296,11 @@ def align_size(d, device, size, copy=1):
|
||||
# Make sure to use device name and not device type
|
||||
device_types = (d.getVar('DEVICE_STORAGE_TYPES') or "").split()
|
||||
if device in device_types:
|
||||
device = d.getVar('DEVICE_%s' % device) or ""
|
||||
device = d.getVar('DEVICE:%s' % device) or ""
|
||||
# Get device alignment size
|
||||
alignment_size = d.getVar('DEVICE_ALIGNMENT_SIZE_%s' % device) or "none"
|
||||
alignment_size = d.getVar('DEVICE_ALIGNMENT_SIZE:%s' % device) or "none"
|
||||
if alignment_size == 'none':
|
||||
bb.fatal('Missing DEVICE_ALIGNMENT_SIZE_%s value' % device)
|
||||
bb.fatal('Missing DEVICE_ALIGNMENT_SIZE:%s value' % device)
|
||||
# Check for default size alignment on erase block
|
||||
if ( int(size) * 1024 ) % int(alignment_size, 16) == 0:
|
||||
bb.debug(1, '>>> The partition size properly follows %s erase size' % alignment_size)
|
||||
@@ -337,19 +337,19 @@ def get_offset(new_offset, copy, current_device, bootscheme, config, partition,
|
||||
"""
|
||||
import re
|
||||
# Get current_device alias
|
||||
device_alias = d.getVar('DEVICE_%s' % current_device) or ""
|
||||
device_alias = d.getVar('DEVICE:%s' % current_device) or ""
|
||||
# Set offset
|
||||
offset = expand_var('FLASHLAYOUT_PARTITION_OFFSET', bootscheme, config, partition, d)
|
||||
bb.debug(1, '>>> Selected FLASHLAYOUT_PARTITION_OFFSET: %s' % offset)
|
||||
# Set max offset
|
||||
max_offset = d.getVar('DEVICE_MAX_OFFSET_%s' % device_alias) or "none"
|
||||
max_offset = d.getVar('DEVICE_MAX_OFFSET:%s' % device_alias) or "none"
|
||||
bb.debug(1, '>>> Selected DEVICE_MAX_OFFSET: %s' % max_offset)
|
||||
if offset == 'none':
|
||||
if new_offset == 'none':
|
||||
bb.debug(1, '>>> No %s partition offset configured (%s device) for %s label for %s bootscheme, so default to default origin device one.' % (partition, current_device, config, bootscheme))
|
||||
start_offset = d.getVar('DEVICE_START_OFFSET_%s' % device_alias) or "none"
|
||||
start_offset = d.getVar('DEVICE_START_OFFSET:%s' % device_alias) or "none"
|
||||
if start_offset == 'none':
|
||||
bb.fatal('Missing DEVICE_START_OFFSET_%s value' % device_alias)
|
||||
bb.fatal('Missing DEVICE_START_OFFSET:%s value' % device_alias)
|
||||
offset = start_offset
|
||||
else:
|
||||
offset = new_offset
|
||||
@@ -394,7 +394,7 @@ def get_binaryname(labeltype, device, bootscheme, config, partition, d):
|
||||
bb.debug(1, '>>> Selected FLASHLAYOUT_PARTITION_BIN2LOAD: %s' % binary_name)
|
||||
# Set 'device' to alias name in lower case
|
||||
if device != 'none':
|
||||
device = d.getVar('DEVICE_%s' % device).lower()
|
||||
device = d.getVar('DEVICE:%s' % device).lower()
|
||||
# Init pattern to look for with current config value
|
||||
update_patterns = '<BOOTSCHEME>;' + bootscheme
|
||||
update_patterns += ' ' + '<CONFIG>;' + config.replace("-","_")
|
||||
@@ -506,14 +506,14 @@ python do_create_flashlayout_config() {
|
||||
current_label = labeltype
|
||||
# Init flashlayout file name
|
||||
if config == 'none':
|
||||
config_append = ''
|
||||
config_addons = ''
|
||||
else:
|
||||
config_append = '_' + config
|
||||
config_addons = '_' + config
|
||||
if len(labeltypes.split()) < 2 and len(bootschemes.split()) < 2:
|
||||
labeltype_append = ''
|
||||
labeltype_addons = ''
|
||||
else:
|
||||
labeltype_append = '_' + labeltype + '-' + bootscheme
|
||||
flashlayout_file = os.path.join(flashlayout_subfolder_path, d.expand("${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_append, labeltype_append)))
|
||||
labeltype_addons = '_' + labeltype + '-' + bootscheme
|
||||
flashlayout_file = os.path.join(flashlayout_subfolder_path, d.expand("${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_addons, labeltype_addons)))
|
||||
# Get the partition list to write in flashlayout file
|
||||
partitions = expand_var('FLASHLAYOUT_PARTITION_LABELS', bootscheme, config, '', d)
|
||||
bb.debug(1, 'FLASHLAYOUT_PARTITION_LABELS: %s' % partitions)
|
||||
@@ -614,12 +614,12 @@ python do_create_flashlayout_config() {
|
||||
os.remove(flashlayout_file)
|
||||
break
|
||||
# Get the supported labels for current storage device
|
||||
partition_device_alias = d.getVar('DEVICE_%s' % partition_device) or ""
|
||||
partition_type_supported_labels = d.getVar('DEVICE_BOARD_ENABLE_%s' % partition_device_alias) or "none"
|
||||
partition_device_alias = d.getVar('DEVICE:%s' % partition_device) or ""
|
||||
partition_type_supported_labels = d.getVar('DEVICE_BOARD_ENABLE:%s' % partition_device_alias) or "none"
|
||||
# Check if partition type is supported for the current label
|
||||
if partition_device != 'none' and current_label not in partition_type_supported_labels.split():
|
||||
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_DEVICE (%s, alias %s) is not supported for current label (%s): partition %s not appended in flashlayout file' % (partition_device, partition_device_alias, current_label, partition_name))
|
||||
bb.debug(1, '>>> DEVICE_BOARD_ENABLE_%s: %s' % (partition_device_alias, partition_type_supported_labels))
|
||||
bb.debug(1, '>>> DEVICE_BOARD_ENABLE:%s: %s' % (partition_device_alias, partition_type_supported_labels))
|
||||
continue
|
||||
# Write to flashlayout file the partition configuration
|
||||
fl_file.write('%s\t%s\t%s\t%s\t%s\t%s\t%s\n' %
|
||||
@@ -658,7 +658,7 @@ python do_create_flashlayout_config() {
|
||||
flashlayout_wrapper4dbg_subfolder_path = os.path.join(d.getVar('FLASHLAYOUT_DESTDIR'), bootscheme, "debug")
|
||||
bb.utils.mkdirhier(flashlayout_wrapper4dbg_subfolder_path)
|
||||
# Wrapper4dbg output filename
|
||||
debug_flashlayout_file = os.path.join(flashlayout_wrapper4dbg_subfolder_path,d.expand("debug-${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_append, labeltype_append)))
|
||||
debug_flashlayout_file = os.path.join(flashlayout_wrapper4dbg_subfolder_path,d.expand("debug-${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_addons, labeltype_addons)))
|
||||
bb.debug(1, ">>> Update tf-a in %s" % (debug_flashlayout_file))
|
||||
os.rename(tmp_flashlayout_file, debug_flashlayout_file)
|
||||
else:
|
||||
@@ -705,11 +705,11 @@ python flashlayout_partition_config() {
|
||||
images.
|
||||
Based on PARTITIONS_CONFIG, PARTITIONS_BOOTLOADER_CONFIG and PARTITIONS_OPTEE_CONFIG
|
||||
feed FLASHLAYOUT_PARTITION_ vars for each 'config' and 'label':
|
||||
FLASHLAYOUT_PARTITION_ENABLE_<config>_<label>
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_<config>_<label>
|
||||
FLASHLAYOUT_PARTITION_SIZE_<config>_<label>
|
||||
FLASHLAYOUT_PARTITION_TYPE_<config>_<label>
|
||||
FLASHLAYOUT_PARTITION_COPY_<config>_<label>
|
||||
FLASHLAYOUT_PARTITION_ENABLE:<config>:<label>
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD:<config>:<label>
|
||||
FLASHLAYOUT_PARTITION_SIZE:<config>:<label>
|
||||
FLASHLAYOUT_PARTITION_TYPE:<config>:<label>
|
||||
FLASHLAYOUT_PARTITION_COPY:<config>:<label>
|
||||
"""
|
||||
# Init partition and flashlayout configuration vars
|
||||
partitionconfig_list = 'PARTITIONS_CONFIG PARTITIONS_BOOTLOADER_CONFIG PARTITIONS_OPTEE_CONFIG'
|
||||
@@ -742,44 +742,44 @@ python flashlayout_partition_config() {
|
||||
else:
|
||||
bb.fatal('[%s] Missing partlabel setting' % partconfvar)
|
||||
|
||||
# Feed FLASHLAYOUT_PARTITION_* vars
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_ENABLE_%s_%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_ENABLE_%s_%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_ENABLE_%s_%s' % (config, fl_label))))
|
||||
# Feed FLASHLAYOUT_PARTITION:* vars
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_ENABLE:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label))))
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ENABLE_%s_%s to 'P'." % (config, fl_label))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_ENABLE_%s_%s' % (config, fl_label), 'P')
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ENABLE:%s:%s to 'P'." % (config, fl_label))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label), 'P')
|
||||
if items[0] != '':
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD_%s_%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_BIN2LOAD_%s_%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD_%s_%s' % (config, fl_label))))
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label))))
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD_%s_%s to %s." % (config, fl_label, items[0]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD_%s_%s' % (config, fl_label), items[0])
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s to %s." % (config, fl_label, items[0]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label), items[0])
|
||||
else:
|
||||
bb.debug(1, "No partdata setting for %s label : default setting would applied..." % fl_label)
|
||||
if items[2] != '':
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_SIZE_%s_%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_SIZE_%s_%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_SIZE_%s_%s' % (config, fl_label))))
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_SIZE:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label))))
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_SIZE_%s_%s to %s." % (config, fl_label, items[2]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_SIZE_%s_%s' % (config, fl_label), items[2])
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_SIZE:%s:%s to %s." % (config, fl_label, items[2]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label), items[2])
|
||||
else:
|
||||
bb.debug(1, "No size setting for %s label : default setting would applied..." % fl_label)
|
||||
if items[3] != '':
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_TYPE_%s_%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_TYPE_%s_%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_TYPE_%s_%s' % (config, fl_label))))
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_TYPE:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label))))
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_TYPE_%s_%s to %s." % (config, fl_label, items[3]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_TYPE_%s_%s' % (config, fl_label), items[3])
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_TYPE:%s:%s to %s." % (config, fl_label, items[3]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label), items[3])
|
||||
else:
|
||||
bb.debug(1, "No PARTITION_TYPE setting for %s label: default setting would applied..." % fl_label)
|
||||
if len(items) == 4:
|
||||
bb.debug(1, "No PARTITION_COPY setting for %s label : default setting would applied..." % fl_label)
|
||||
elif items[4] != '':
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_COPY_%s_%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_COPY_%s_%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_COPY_%s_%s' % (config, fl_label))))
|
||||
if d.getVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label)):
|
||||
bb.debug(1, "FLASHLAYOUT_PARTITION_COPY:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label))))
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_COPY_%s_%s to %s." % (config, fl_label, items[4]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_COPY_%s_%s' % (config, fl_label), items[4])
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_COPY:%s:%s to %s." % (config, fl_label, items[4]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label), items[4])
|
||||
else:
|
||||
bb.debug(1, "No PARTITION_COPY setting for %s label : default setting would applied..." % fl_label)
|
||||
break
|
||||
@@ -792,14 +792,14 @@ python flashlayout_partition_config() {
|
||||
|
||||
FLASHLAYOUT_LABELS_VARS = "CONFIG_LABELS PARTITION_LABELS TYPE_LABELS"
|
||||
FLASHLAYOUT_LABELS_OVERRIDES = "${FLASHLAYOUT_BOOTSCHEME_LABELS} ${FLASHLAYOUT_CONFIG_LABELS}"
|
||||
FLASHLAYOUT_LABELS_OVERRIDES += "${@' '.join('%s_%s' % (b, c) for b in d.getVar('FLASHLAYOUT_BOOTSCHEME_LABELS').split() for c in d.getVar('FLASHLAYOUT_CONFIG_LABELS').split())}"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['FLASHLAYOUT_%s_%s' % (v, o) for v in d.getVar('FLASHLAYOUT_LABELS_VARS').split() for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split()])}"
|
||||
FLASHLAYOUT_LABELS_OVERRIDES += "${@' '.join('%s:%s' % (b, c) for b in d.getVar('FLASHLAYOUT_BOOTSCHEME_LABELS').split() for c in d.getVar('FLASHLAYOUT_CONFIG_LABELS').split())}"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['FLASHLAYOUT:%s:%s' % (v, o) for v in d.getVar('FLASHLAYOUT_LABELS_VARS').split() for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split()])}"
|
||||
|
||||
FLASHLAYOUT_PARTITION_VARS = "ENABLE ID TYPE DEVICE OFFSET BIN2LOAD SIZE REPLACE_PATTERNS"
|
||||
FLASHLAYOUT_PARTITION_CONFIGURED = "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('FLASHLAYOUT_PARTITION_LABELS_%s' % o) for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split()).split()))}"
|
||||
FLASHLAYOUT_PARTITION_CONFIGURED = "${@' '.join(dict.fromkeys(' '.join('%s' % d.getVar('FLASHLAYOUT_PARTITION_LABELS:%s' % o) for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split()).split()))}"
|
||||
FLASHLAYOUT_PARTITION_OVERRIDES = "${FLASHLAYOUT_LABELS_OVERRIDES} ${FLASHLAYOUT_PARTITION_CONFIGURED}"
|
||||
FLASHLAYOUT_PARTITION_OVERRIDES += "${@' '.join('%s_%s' % (o, p) for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split() for p in d.getVar('FLASHLAYOUT_PARTITION_CONFIGURED').split())}"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['FLASHLAYOUT_PARTITION_%s_%s' % (v, o) for v in d.getVar('FLASHLAYOUT_PARTITION_VARS').split() for o in d.getVar('FLASHLAYOUT_PARTITION_OVERRIDES').split()])}"
|
||||
FLASHLAYOUT_PARTITION_OVERRIDES += "${@' '.join('%s:%s' % (o, p) for o in d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split() for p in d.getVar('FLASHLAYOUT_PARTITION_CONFIGURED').split())}"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['FLASHLAYOUT_PARTITION:%s:%s' % (v, o) for v in d.getVar('FLASHLAYOUT_PARTITION_VARS').split() for o in d.getVar('FLASHLAYOUT_PARTITION_OVERRIDES').split()])}"
|
||||
|
||||
FLASHLAYOUT_DEVICE_VARS = "ALIGNMENT_SIZE BOARD_ENABLE START_OFFSET MAX_OFFSET"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['DEVICE_%s_%s' % (v, o) for v in d.getVar('FLASHLAYOUT_DEVICE_VARS').split() for o in d.getVar('DEVICE_STORAGE_NAMES').split()])}"
|
||||
do_create_flashlayout_config[vardeps] += "${@' '.join(['DEVICE:%s:%s' % (v, o) for v in d.getVar('FLASHLAYOUT_DEVICE_VARS').split() for o in d.getVar('DEVICE_STORAGE_NAMES').split()])}"
|
||||
@@ -30,7 +30,7 @@ python stmultiub_environment () {
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND += "stmultiub_environment;"
|
||||
|
||||
IMAGE_CMD_stmultiubi () {
|
||||
IMAGE_CMD:stmultiubi () {
|
||||
. ${T}/stmultiubi_environment
|
||||
|
||||
# Split MKUBIFS_ARGS_<name> and UBINIZE_ARGS_<name>
|
||||
|
||||
@@ -46,25 +46,25 @@ python __anonymous () {
|
||||
# Update IMAGE vars for each partition image
|
||||
if items[1] != '':
|
||||
bb.debug(1, "Set UBI_VOLNAME to %s for %s partition image." % (items[1], items[0]))
|
||||
d.setVar('UBI_VOLNAME_pn-%s' % d.expand(items[0]), items[1])
|
||||
d.setVar('UBI_VOLNAME:pn-%s' % d.expand(items[0]), items[1])
|
||||
if d.expand(items[1])[-2:] != 'fs':
|
||||
bb.debug(1, "Set IMAGE_NAME_SUFFIX to '.%sfs' for %s partition image." % (items[1], items[0]))
|
||||
d.setVar('IMAGE_NAME_SUFFIX_pn-%s' % d.expand(items[0]), '.' + items[1] + 'fs')
|
||||
d.setVar('IMAGE_NAME_SUFFIX:pn-%s' % d.expand(items[0]), '.' + items[1] + 'fs')
|
||||
else:
|
||||
bb.debug(1, "Set IMAGE_NAME_SUFFIX to '.%s' for %s partition image." % (items[1], items[0]))
|
||||
d.setVar('IMAGE_NAME_SUFFIX_pn-%s' % d.expand(items[0]), '.' + items[1])
|
||||
d.setVar('IMAGE_NAME_SUFFIX:pn-%s' % d.expand(items[0]), '.' + items[1])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_IMAGES] Missing label setting for %s image' % items[0])
|
||||
# Make sure that we're dealing with partition image and not rootfs image
|
||||
if items[2] != '':
|
||||
# Mount point is available, so we're dealing with partition image
|
||||
bb.debug(1, "Set IMAGE_PARTITION_MOUNTPOINT to %s for %s partition image." % (items[2], items[0]))
|
||||
d.setVar('IMAGE_PARTITION_MOUNTPOINT_pn-%s' % d.expand(items[0]), items[2])
|
||||
d.setVar('IMAGE_PARTITION_MOUNTPOINT:pn-%s' % d.expand(items[0]), items[2])
|
||||
# Append image to image_partitions list
|
||||
image_partitions.append(d.expand(items[0]))
|
||||
if items[3] != '':
|
||||
bb.debug(1, "Set IMAGE_ROOTFS_SIZE to %s for %s partition image." % (items[3], items[0]))
|
||||
d.setVar('IMAGE_ROOTFS_SIZE_pn-%s' % d.expand(items[0]), items[3])
|
||||
d.setVar('IMAGE_ROOTFS_SIZE:pn-%s' % d.expand(items[0]), items[3])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_IMAGES] Missing size setting for %s image' % items[0])
|
||||
|
||||
@@ -83,7 +83,7 @@ python __anonymous () {
|
||||
if len(ubiconfigs) > 0:
|
||||
for ubi_config in ubiconfigs:
|
||||
bb.debug(1, "Appending '%s' image with %s size to STM32MP_UBI_VOLUME." % (items[0], items[3]))
|
||||
d.appendVar('STM32MP_UBI_VOLUME_%s' % ubi_config, ' ' + items[0] + ':' + items[3])
|
||||
d.appendVar('STM32MP_UBI_VOLUME:%s' % ubi_config, ' ' + items[0] + ':' + items[3])
|
||||
break
|
||||
|
||||
# Reset IMAGE_LIST_SUMMARY with computed partition configuration
|
||||
@@ -200,7 +200,7 @@ python image_rootfs_image_clean_task(){
|
||||
package = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8").rstrip('\n')
|
||||
package = re.sub(r":.*", "", package)
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.fatal("Cannot check package for file %s" % (os.path.join(root, f)))
|
||||
bb.note("Cannot check package for file %s" % (os.path.join(root, f)))
|
||||
|
||||
if package:
|
||||
# Use oe-pkgdata-util to list all files provided by a package
|
||||
@@ -239,7 +239,7 @@ python image_rootfs_image_clean_task(){
|
||||
# -----------------------------------------------------------------------------
|
||||
DEPLOY_BUILDINFO_FILE ??= "0"
|
||||
|
||||
buildinfo_append() {
|
||||
buildinfo:append() {
|
||||
if d.getVar('DEPLOY_BUILDINFO_FILE') != '1':
|
||||
return
|
||||
# Export build information to deploy dir
|
||||
|
||||
Reference in new issue
Block a user