CLASS: fix wrong var dependency

Signed-off-by: Priouzeau Christophe <christophe.priouzeau@st.com>
This commit is contained in:
Priouzeau Christophe committed 2020-02-03 14:53:38 +01:00
1 parent c9f76277cd
commit 3c67c03907
2 files changed
+15 -48

No files matched your search

+7 -2
View File
@@ -102,6 +102,7 @@ FLASHLAYOUT_BASENAME ??= "FlashLayout"
FLASHLAYOUT_SUFFIX ??= "tsv"
FLASHLAYOUT_BOOTSCHEME_LABELS ??= ""
FLASHLAYOUT_CONFIG_LABELS ??= ""
ENABLE_FLASHLAYOUT_DEFAULT ??= "0"
FLASHLAYOUT_DEFAULT_SRC ??= ""
@@ -246,8 +247,12 @@ def get_binaryname(labeltype, bootscheme, config, partition, d):
binary_name = expand_var('FLASHLAYOUT_PARTITION_BIN2LOAD', bootscheme, config, partition, d)
bb.note('>>> Selected FLASHLAYOUT_PARTITION_BIN2LOAD: %s' % binary_name)
# Get binary_name basename to then check for any rename case
binary_name_base = os.path.basename(binary_name)
bb.note('>>> Basename selected for %s: %s' % (binary_name, binary_name_base))
# Treat TF-A, TEE, U-BOOT and U-BOOT-SPL binary rename case
if re.match('^tf-a.*$', binary_name) or re.match('^u-boot.*$', binary_name) or re.match('^tee-.*$', binary_name):
if re.match('^tf-a.*$', binary_name_base) or re.match('^u-boot.*$', binary_name_base) or re.match('^tee-.*$', binary_name_base):
file_name, file_ext = os.path.splitext(binary_name)
# Init binary_type to use from labeltype
binary_type = labeltype + '-' + bootscheme
@@ -266,7 +271,7 @@ def get_binaryname(labeltype, bootscheme, config, partition, d):
binary_type = re.sub(r'-%s$' % pattern2replace, '-' + pattern2use, binary_type)
bb.note('>>> New "binary_type" to use for binary name": %s' % binary_type)
# Append binary_type to binary name
if re.match('^u-boot-spl.*$', binary_name):
if re.match('^u-boot-spl.*$', binary_name_base):
binary_name = file_name + file_ext + '-' + binary_type
else:
binary_name = file_name + '-' + binary_type + file_ext