add fwupdate support

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Change-Id: I0d5a476d43c3ba3007b1bd01339496657afc5f2f
This commit is contained in:
Christophe Priouzeau 2022-06-06 15:22:42 +02:00 committed by bernard PUEL
parent 9825958fd6
commit 71ade1be2a
10 changed files with 383 additions and 265 deletions

View File

@ -104,6 +104,8 @@ FLASHLAYOUT_BASENAME ??= "FlashLayout"
FLASHLAYOUT_SUFFIX ??= "tsv" FLASHLAYOUT_SUFFIX ??= "tsv"
# Configure flashlayout file generation for stm32wrapper4dbg # Configure flashlayout file generation for stm32wrapper4dbg
ENABLE_FLASHLAYOUT_CONFIG_WRAPPER4DBG ??= "0" ENABLE_FLASHLAYOUT_CONFIG_WRAPPER4DBG ??= "0"
# Configure flashlayout file generation with multiple binary copy within partition
ENABLE_FLASHLAYOUT_PARTITION_BINCOPY ??= "0"
# Configure partition file extension # Configure partition file extension
PARTITION_SUFFIX ??= ".ext4" PARTITION_SUFFIX ??= ".ext4"
@ -133,6 +135,8 @@ FLASHLAYOUT_PARTITION_OFFSET ??= ""
FLASHLAYOUT_PARTITION_BIN2LOAD ??= "" FLASHLAYOUT_PARTITION_BIN2LOAD ??= ""
FLASHLAYOUT_PARTITION_SIZE ??= "" FLASHLAYOUT_PARTITION_SIZE ??= ""
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS ??= "" FLASHLAYOUT_PARTITION_REPLACE_PATTERNS ??= ""
# Init single partition creation
FLASHLAYOUT_PARTITION_DUPLICATION ??= "1"
# The STM32CubeProgrammer supported ID range is: # The STM32CubeProgrammer supported ID range is:
# 0x00 to 0xFF # 0x00 to 0xFF
@ -150,6 +154,9 @@ FLASHLAYOUT_PARTITION_ID_LIMIT_BINARY ??= "0x0F"
FLASHLAYOUT_PARTITION_ID_START_OTHERS ??= "0x10" FLASHLAYOUT_PARTITION_ID_START_OTHERS ??= "0x10"
FLASHLAYOUT_PARTITION_ID_LIMIT_OTHERS ??= "0xF0" FLASHLAYOUT_PARTITION_ID_LIMIT_OTHERS ??= "0xF0"
# Init default config for empty or used partition for STM32CubeProgrammer
FLASHLAYOUT_PARTITION_ENABLE_PROGRAMM_EMPTY ??= "PED"
python __anonymous () { python __anonymous () {
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Make sure to add the flashlayout file creation after ROOTFS build # Make sure to add the flashlayout file creation after ROOTFS build
@ -229,6 +236,20 @@ def expand_var(var, bootscheme, config, partition, d):
# Return expanded and/or overriden var value # Return expanded and/or overriden var value
return expanded_var return expanded_var
def get_label_list(d, label, duplicate='1'):
"""
Configure the label name list according to the proposed duplicate value
"""
list = []
if int(duplicate) > 1:
for i in range(1, int(duplicate) + 1):
list.append(label + str(i))
bb.debug(1,">>> Partition duplication configure for %s with new sub-list: %s" % (label, list))
else:
list.append(label)
# Return the label list
return list
def get_device(bootscheme, config, partition, d): def get_device(bootscheme, config, partition, d):
""" """
This function returns the device configured from FLASHLAYOUT_PARTITION_DEVICE for This function returns the device configured from FLASHLAYOUT_PARTITION_DEVICE for
@ -534,96 +555,107 @@ python do_create_flashlayout_config() {
partition_nextoffset = "none" partition_nextoffset = "none"
# Init partition previous device to 'none' # Init partition previous device to 'none'
partition_prevdevice = "none" partition_prevdevice = "none"
for partition in partitions.split(): for part in partitions.split():
bb.debug(1, '*** Loop for partition: %s' % partition) bb.debug(1, '*** Loop for partition: %s' % part)
# Init partition settings # Init break and clean file switch
partition_enable = expand_var('FLASHLAYOUT_PARTITION_ENABLE', bootscheme, config, partition, d) break_and_clean_file = '0'
partition_name = partition # Init partition duplication count
partition_type = expand_var('FLASHLAYOUT_PARTITION_TYPE', bootscheme, config, partition, d) partition_duplication = expand_var('FLASHLAYOUT_PARTITION_DUPLICATION', bootscheme, config, part, d)
partition_id = expand_var('FLASHLAYOUT_PARTITION_ID', bootscheme, config, partition, d) if not partition_duplication.isdigit():
if partition_id == "none": bb.fatal('Wrong configuration for FLASHLAYOUT_PARTITION_DUPLICATION: %s (bootscheme: %s, config: %s, partition: %s)' % (partition_duplication, bootscheme, config, part))
# Compute partition_id
if partition_type == 'Binary': for partition in get_label_list(d, part, partition_duplication):
# Make sure we're not getting wrong partition_id bb.debug(1, '>>> Set partition label name to : %s' % partition)
if partition_id_bin > partition_id_binmax: # Init partition settings
bb.fatal('Partition ID exceed %s limit for %s type: FLASHLAYOUT_PARTITION_ID = %s (bootscheme: %s, config: %s, partition: %s)' % (d.getVar("FLASHLAYOUT_PARTITION_ID_LIMIT_BINARY"), partition_type, partition_id, bootscheme, config, partition)) partition_enable = expand_var('FLASHLAYOUT_PARTITION_ENABLE', bootscheme, config, partition, d)
partition_id = '0x{0:0{1}X}'.format(partition_id_bin, 2) partition_name = partition
partition_id_bin = partition_id_bin + 1 partition_type = expand_var('FLASHLAYOUT_PARTITION_TYPE', bootscheme, config, partition, d)
else: partition_id = expand_var('FLASHLAYOUT_PARTITION_ID', bootscheme, config, partition, d)
# Make sure we're not getting wrong partition_id if partition_id == "none":
if partition_id_oth > partition_id_othmax: # Compute partition_id
bb.fatal('Partition ID exceed %s limit for %s type: FLASHLAYOUT_PARTITION_ID = %s (bootscheme: %s, config: %s, partition: %s)' % (d.getVar("FLASHLAYOUT_PARTITION_ID_LIMIT_OTHERS"), partition_type, partition_id, bootscheme, config, partition)) if partition_type == 'Binary' or partition_type == 'FIP':
partition_id = '0x{0:0{1}X}'.format(partition_id_oth, 2) # Make sure we're not getting wrong partition_id
partition_id_oth = partition_id_oth + 1 if partition_id_bin > partition_id_binmax:
partition_copy = expand_var('FLASHLAYOUT_PARTITION_COPY', bootscheme, config, partition, d) bb.fatal('Partition ID exceed %s limit for %s type: FLASHLAYOUT_PARTITION_ID = %s (bootscheme: %s, config: %s, partition: %s)' % (d.getVar("FLASHLAYOUT_PARTITION_ID_LIMIT_BINARY"), partition_type, partition_id, bootscheme, config, partition))
if not partition_copy.isdigit(): partition_id = '0x{0:0{1}X}'.format(partition_id_bin, 2)
bb.fatal('Wrong configuration for FLASHLAYOUT_PARTITION_COPY: %s (bootscheme: %s, config: %s, partition: %s)' % (partition_copy, bootscheme, config, partition)) partition_id_bin = partition_id_bin + 1
# Update partition type if needed else:
if partition_copy != "1": # Make sure we're not getting wrong partition_id
partition_type += '(' + partition_copy + ')' if partition_id_oth > partition_id_othmax:
partition_device = get_device(bootscheme, config, partition, d) bb.fatal('Partition ID exceed %s limit for %s type: FLASHLAYOUT_PARTITION_ID = %s (bootscheme: %s, config: %s, partition: %s)' % (d.getVar("FLASHLAYOUT_PARTITION_ID_LIMIT_OTHERS"), partition_type, partition_id, bootscheme, config, partition))
# Reset partition_nextoffset to 'none' in case partition device has changed partition_id = '0x{0:0{1}X}'.format(partition_id_oth, 2)
if partition_device != partition_prevdevice: partition_id_oth = partition_id_oth + 1
partition_nextoffset = "none" partition_copy = expand_var('FLASHLAYOUT_PARTITION_COPY', bootscheme, config, partition, d)
# Save partition current device to previous one for next loop if not partition_copy.isdigit():
partition_prevdevice = partition_device bb.fatal('Wrong configuration for FLASHLAYOUT_PARTITION_COPY: %s (bootscheme: %s, config: %s, partition: %s)' % (partition_copy, bootscheme, config, partition))
# Get partition offset # Update partition type if needed
partition_offset, partition_nextoffset, partition_maxoffset = get_offset(partition_nextoffset, partition_copy, partition_device, bootscheme, config, partition, d) if int(partition_copy) > 1:
# Get binary name partition_type += '(' + partition_copy + ')'
partition_bin2load = get_binaryname(labeltype, partition_device, bootscheme, config, partition, d) partition_device = get_device(bootscheme, config, partition, d)
# Be verbose in log file # Reset partition_nextoffset to 'none' in case partition device has changed
bb.debug(1, '>>> Layout inputs: %s' % fl_file.name) if partition_device != partition_prevdevice:
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_ENABLE: %s' % partition_enable) partition_nextoffset = "none"
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_ID: %s' % partition_id) # Save partition current device to previous one for next loop
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_LABEL: %s' % partition_name) partition_prevdevice = partition_device
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_TYPE: %s' % partition_type) # Get partition offset
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_DEVICE: %s' % partition_device) partition_offset, partition_nextoffset, partition_maxoffset = get_offset(partition_nextoffset, partition_copy, partition_device, bootscheme, config, partition, d)
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_OFFSET: %s' % partition_offset) # Get binary name
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_BIN2LOAD: %s' % partition_bin2load) partition_bin2load = get_binaryname(labeltype, partition_device, bootscheme, config, partition, d)
bb.debug(1, '>>> done') # Be verbose in log file
# Check if the size will exceed the mass storage bb.debug(1, '>>> Layout inputs: %s' % fl_file.name)
if partition_maxoffset != "none" : bb.debug(1, '>>> FLASHLAYOUT_PARTITION_ENABLE: %s' % partition_enable)
bb.warn('>>> Cannot generate %s file: the end offset (%s) for %s partition exceeds the max offset (%s) for %s device.' % (os.path.basename(flashlayout_file), partition_nextoffset, partition, partition_maxoffset, partition_device)) bb.debug(1, '>>> FLASHLAYOUT_PARTITION_ID: %s' % partition_id)
# Cleanup on-going tsv file bb.debug(1, '>>> FLASHLAYOUT_PARTITION_LABEL: %s' % partition_name)
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_TYPE: %s' % partition_type)
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_DEVICE: %s' % partition_device)
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_OFFSET: %s' % partition_offset)
bb.debug(1, '>>> FLASHLAYOUT_PARTITION_BIN2LOAD: %s' % partition_bin2load)
bb.debug(1, '>>> done')
# Check if the size will exceed the mass storage
if partition_maxoffset != "none" :
bb.warn('>>> Cannot generate %s file: the end offset (%s) for %s partition exceeds the max offset (%s) for %s device.' % (os.path.basename(flashlayout_file), partition_nextoffset, partition, partition_maxoffset, partition_device))
# Cleanup on-going tsv file
break_and_clean_file = '1'
break
# Check if binary is available in deploy folder
if partition_bin2load != 'none':
bin2load_fullpath = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), partition_bin2load)
if not os.path.isfile(bin2load_fullpath):
# Specific case for rootfs binary (not yet deployed)
bin2load_fullpath = os.path.join(d.getVar('IMGDEPLOYDIR'), partition_bin2load)
if not os.path.isfile(bin2load_fullpath):
bb.warn('>>> Cannot generate %s file: the %s binary for %s partition is missing in deploy folder' % (os.path.basename(flashlayout_file), partition_bin2load, partition))
# Cleanup on-going tsv file
break_and_clean_file = '1'
break
# Check if the bin2load size will exceed the partition size
if partition_nextoffset != 'none':
bin2load_size = os.path.getsize(bin2load_fullpath)
partition_size = int(partition_nextoffset, 16) - int(partition_offset, 16)
if bin2load_size > partition_size:
bb.warn('>>> Cannot generate %s file: the %s binary size (%s) for %s partition exceeds the partition size (%s).' % (os.path.basename(flashlayout_file), partition_bin2load, bin2load_size, partition, partition_size))
# Cleanup on-going tsv file
break_and_clean_file = '1'
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"
# 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))
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' %
(partition_enable, partition_id, partition_name, partition_type, partition_device, partition_offset, partition_bin2load))
# Abort on-going flashlayout file
if break_and_clean_file == "1":
break_and_clean_file = '0'
fl_file.close() fl_file.close()
if os.path.exists(flashlayout_file): if os.path.exists(flashlayout_file):
os.remove(flashlayout_file) os.remove(flashlayout_file)
break break
# Check if binary is available in deploy folder
if partition_bin2load != 'none':
bin2load_fullpath = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), partition_bin2load)
if not os.path.isfile(bin2load_fullpath):
# Specific case for rootfs binary (not yet deployed)
bin2load_fullpath = os.path.join(d.getVar('IMGDEPLOYDIR'), partition_bin2load)
if not os.path.isfile(bin2load_fullpath):
bb.warn('>>> Cannot generate %s file: the %s binary for %s partition is missing in deploy folder' % (os.path.basename(flashlayout_file), partition_bin2load, partition))
# Cleanup on-going tsv file
fl_file.close()
if os.path.exists(flashlayout_file):
os.remove(flashlayout_file)
break
# Check if the bin2load size will exceed the partition size
if partition_nextoffset != 'none':
bin2load_size = os.path.getsize(bin2load_fullpath)
partition_size = int(partition_nextoffset, 16) - int(partition_offset, 16)
if bin2load_size > partition_size:
bb.warn('>>> Cannot generate %s file: the %s binary size (%s) for %s partition exceeds the partition size (%s).' % (os.path.basename(flashlayout_file), partition_bin2load, bin2load_size, partition, partition_size))
# Cleanup on-going tsv file
fl_file.close()
if os.path.exists(flashlayout_file):
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"
# 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))
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' %
(partition_enable, partition_id, partition_name, partition_type, partition_device, partition_offset, partition_bin2load))
except OSError: except OSError:
bb.fatal('Unable to open %s' % (fl_file)) bb.fatal('Unable to open %s' % (fl_file))
@ -703,16 +735,17 @@ python flashlayout_partition_config() {
""" """
Set the different flashlayout partition vars for the configure partition Set the different flashlayout partition vars for the configure partition
images. images.
Based on PARTITIONS_CONFIG, PARTITIONS_BOOTLOADER_CONFIG and PARTITIONS_OPTEE_CONFIG Based on PARTITIONS_CONFIG and PARTITIONS_BOOTLOADER_CONFIG
feed FLASHLAYOUT_PARTITION_ vars for each 'config' and 'label': feed FLASHLAYOUT_PARTITION_ vars for each 'config' and 'label':
FLASHLAYOUT_PARTITION_ENABLE:<config>:<label> FLASHLAYOUT_PARTITION_ENABLE:<config>:<label>
FLASHLAYOUT_PARTITION_BIN2LOAD:<config>:<label> FLASHLAYOUT_PARTITION_BIN2LOAD:<config>:<label>
FLASHLAYOUT_PARTITION_SIZE:<config>:<label> FLASHLAYOUT_PARTITION_SIZE:<config>:<label>
FLASHLAYOUT_PARTITION_TYPE:<config>:<label> FLASHLAYOUT_PARTITION_TYPE:<config>:<label>
FLASHLAYOUT_PARTITION_COPY:<config>:<label> FLASHLAYOUT_PARTITION_COPY:<config>:<label>
FLASHLAYOUT_PARTITION_OFFSET:<config>:<label>
""" """
# Init partition and flashlayout configuration vars # Init partition and flashlayout configuration vars
partitionconfig_list = 'PARTITIONS_CONFIG PARTITIONS_BOOTLOADER_CONFIG PARTITIONS_OPTEE_CONFIG' partitionconfig_list = 'PARTITIONS_CONFIG PARTITIONS_BOOTLOADER_CONFIG'
for partconfvar in partitionconfig_list.split(): for partconfvar in partitionconfig_list.split():
partitionsconfigflags = d.getVarFlags(partconfvar) partitionsconfigflags = d.getVarFlags(partconfvar)
@ -742,46 +775,103 @@ python flashlayout_partition_config() {
else: else:
bb.fatal('[%s] Missing partlabel setting' % partconfvar) bb.fatal('[%s] Missing partlabel setting' % partconfvar)
# Feed FLASHLAYOUT_PARTITION:* vars # Init default partition_enable
if d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label)): partition_enable = d.getVar('FLASHLAYOUT_PARTITION_ENABLE')
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: # Init for partition duplication
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ENABLE:%s:%s to 'P'." % (config, fl_label)) if d.getVar('ENABLE_FLASHLAYOUT_PARTITION_BINCOPY') == '0':
d.setVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label), 'P') if len(items) == 5 and items[4] != '':
if items[0] != '': if d.getVar('FLASHLAYOUT_PARTITION_DUPLICATION:%s:%s' % (config, fl_label)):
if d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label)): bb.debug(1,"FLASHLAYOUT_PARTITION_DUPLICATION:%s:%s is already set to: %s" % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_DUPLICATION:%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_DUPLICATION:%s:%s to %s" % (config, fl_label, items[4]))
d.setVar('FLASHLAYOUT_PARTITION_DUPLICATION:%s:%s' % (config, fl_label), items[4])
else: else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s to %s." % (config, fl_label, items[0])) bb.debug(1, "No partition duplication setting for %s label : default setting would applied..." % fl_label)
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label), items[0]) duplicate_max = d.getVar('FLASHLAYOUT_PARTITION_DUPLICATION')
else: else:
bb.debug(1, "No partdata setting for %s label : default setting would applied..." % fl_label) bb.debug(1,"Set FLASHLAYOUT_PARTITION_DUPLICATION to 1")
if items[2] != '': d.setVar('FLASHLAYOUT_PARTITION_DUPLICATION', '1')
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)))) duplicate_max = expand_var('FLASHLAYOUT_PARTITION_DUPLICATION', '', config, fl_label, d)
if not duplicate_max.isdigit():
bb.fatal('[%s] Wrong configuration for FLASHLAYOUT_PARTITION_DUPLICATION: %s (config: %s, partition: %s)' % (partconfvar, duplicate_max, config, fl_label))
# Init label list and original label
fl_label_ori = fl_label
fl_label_list = get_label_list(d, fl_label, duplicate_max)
for fl_label in fl_label_list:
bb.debug(1,"Feed FLASHLAYOUT_PARTITION_* vars for label: %s" % fl_label)
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))))
elif d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label_ori)):
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s:to %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label_ori))))
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label), d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label_ori)))
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])
if d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s' % (config, fl_label)) == "":
bb.debug(1, "FLASHLAYOUT_PARTITION_BIN2LOAD:%s:%s is empty: use '%s' as programm setting." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_ENABLE_PROGRAMM_EMPTY')))
partition_enable = d.getVar('FLASHLAYOUT_PARTITION_ENABLE_PROGRAMM_EMPTY')
else: else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_SIZE:%s:%s to %s." % (config, fl_label, items[2])) bb.debug(1, "No partdata setting for %s label : default setting would applied..." % fl_label)
d.setVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label), items[2]) # Update partition enable to empty in case nothing to load
else: if d.getVar('FLASHLAYOUT_PARTITION_BIN2LOAD') == "":
bb.debug(1, "No size setting for %s label : default setting would applied..." % fl_label) bb.debug(1, "FLASHLAYOUT_PARTITION_BIN2LOAD is empty: use '%s' as programm setting." % d.getVar('FLASHLAYOUT_PARTITION_ENABLE_PROGRAMM_EMPTY'))
if items[3] != '': partition_enable = d.getVar('FLASHLAYOUT_PARTITION_ENABLE_PROGRAMM_EMPTY')
if d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label)): if items[2] != '':
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_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))))
elif d.getVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label_ori)):
bb.debug(1, "Set FLASHLAYOUT_PARTITION_SIZE:%s:%s to %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label_ori))))
d.setVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label), d.getVar('FLASHLAYOUT_PARTITION_SIZE:%s:%s' % (config, fl_label_ori)))
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])
else: else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_TYPE:%s:%s to %s." % (config, fl_label, items[3])) bb.debug(1, "No size setting for %s label : default setting would applied..." % fl_label)
d.setVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label), items[3]) if items[3] != '':
else: if d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label)):
bb.debug(1, "No PARTITION_TYPE setting for %s label: default setting would applied..." % 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 len(items) == 4: elif d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label_ori)):
bb.debug(1, "No PARTITION_COPY setting for %s label : default setting would applied..." % fl_label) bb.debug(1, "Set FLASHLAYOUT_PARTITION_TYPE:%s:%s to %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label_ori))))
elif items[4] != '': d.setVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label), d.getVar('FLASHLAYOUT_PARTITION_TYPE:%s:%s' % (config, fl_label_ori)))
if d.getVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label)): else:
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)))) 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: else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_COPY:%s:%s to %s." % (config, fl_label, items[4])) bb.debug(1, "No PARTITION_TYPE setting for %s label: default setting would applied..." % fl_label)
d.setVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label), items[4]) if len(items) == 4:
else: bb.debug(1, "No PARTITION_COPY setting for %s label : default setting would applied..." % fl_label)
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))))
else:
if d.getVar('ENABLE_FLASHLAYOUT_PARTITION_BINCOPY') == '0':
bb.debug(1, "Set FLASHLAYOUT_PARTITION_COPY:%s:%s to %s." % (config, fl_label, '1'))
d.setVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label), '1')
else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_COPY:%s:%s to %s." % (config, fl_label_ori, items[4]))
d.setVar('FLASHLAYOUT_PARTITION_COPY:%s:%s' % (config, fl_label_ori), items[4])
else:
bb.debug(1, "No PARTITION_COPY setting for %s label : default setting would applied..." % fl_label)
if d.getVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label)):
bb.debug(1, "FLASHLAYOUT_PARTITION_OFFSET:%s:%s is already set to: %s." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label))))
elif d.getVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label_ori)):
bb.debug(1, "Set FLASHLAYOUT_PARTITION_OFFSET:%s:%s to '%s'." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label_ori))))
d.setVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label), d.getVar('FLASHLAYOUT_PARTITION_OFFSET:%s:%s' % (config, fl_label_ori)))
else:
bb.debug(1, "No specific override defined for FLASHLAYOUT_PARTITION_OFFSET on %s label : default setting would applied..." % fl_label)
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))))
elif d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label_ori)):
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ENABLE:%s:%s to '%s'." % (config, fl_label, d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label_ori))))
d.setVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label), d.getVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label_ori)))
else:
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ENABLE:%s:%s to '%s'." % (config, fl_label, partition_enable))
d.setVar('FLASHLAYOUT_PARTITION_ENABLE:%s:%s' % (config, fl_label), partition_enable)
break break
} }
@ -789,6 +879,21 @@ python flashlayout_partition_config() {
# Manage specific var dependency: # Manage specific var dependency:
# Because of local overrides within create_flashlayout_config() function, we # Because of local overrides within create_flashlayout_config() function, we
# need to make sure to add each variables to the vardeps list. # need to make sure to add each variables to the vardeps list.
def get_duplicate_labels(d, part_config):
"""
Return the list of new labels created to duplicate requested partition
configuration according to the available FLASHLAYOUT_CONFIG_LABELS.
"""
l = []
for o in d.getVar('FLASHLAYOUT_CONFIG_LABELS').split():
for conf in part_config.split():
for subconfigs in d.getVarFlag(conf, o).split():
items = subconfigs.split(',')
if len(items) > 4:
if items[4] != '1':
for duplabel in get_label_list(d, items[1], items[4]):
l.append(duplabel)
return ' '.join(dict.fromkeys(l))
FLASHLAYOUT_LABELS_VARS = "CONFIG_LABELS PARTITION_LABELS TYPE_LABELS" FLASHLAYOUT_LABELS_VARS = "CONFIG_LABELS PARTITION_LABELS TYPE_LABELS"
FLASHLAYOUT_LABELS_OVERRIDES = "${FLASHLAYOUT_BOOTSCHEME_LABELS} ${FLASHLAYOUT_CONFIG_LABELS}" FLASHLAYOUT_LABELS_OVERRIDES = "${FLASHLAYOUT_BOOTSCHEME_LABELS} ${FLASHLAYOUT_CONFIG_LABELS}"
@ -797,6 +902,7 @@ do_create_flashlayout_config[vardeps] += "${@' '.join(['FLASHLAYOUT:%s:%s' % (v,
FLASHLAYOUT_PARTITION_VARS = "ENABLE ID TYPE DEVICE OFFSET BIN2LOAD SIZE REPLACE_PATTERNS" 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_CONFIGURED += "${@' '.join('%s' % l for l in get_duplicate_labels(d, 'PARTITIONS_BOOTLOADER_CONFIG PARTITIONS_CONFIG').split())}"
FLASHLAYOUT_PARTITION_OVERRIDES = "${FLASHLAYOUT_LABELS_OVERRIDES} ${FLASHLAYOUT_PARTITION_CONFIGURED}" 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())}" 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()])}" 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()])}"

View File

@ -55,6 +55,9 @@ MACHINE_FEATURES:append = " ${@bb.utils.contains_any('BOOTDEVICE_LABELS', ['emm
# Use FIP image for boot loaders # Use FIP image for boot loaders
MACHINE_FEATURES:append = " fip" MACHINE_FEATURES:append = " fip"
# Enable firmware secure update feature
MACHINE_FEATURES:append = " fw-update"
# Default serial consoles (TTYs) to enable using getty # Default serial consoles (TTYs) to enable using getty
# Before kernel 4.18, serial console are ttyS3 but after is ttySTM0 # Before kernel 4.18, serial console are ttyS3 but after is ttySTM0
SERIAL_CONSOLES = "115200;ttySTM0" SERIAL_CONSOLES = "115200;ttySTM0"
@ -89,38 +92,38 @@ MACHINE_EXTRA_RRECOMMENDS:append = " ${@bb.utils.contains('DISTRO_FEATURES','sys
# - The partition for the first boot loader should follow the naming # - The partition for the first boot loader should follow the naming
# rule: fsbl* # rule: fsbl*
# - The partition for the secondary boot loader should follow the naming # - The partition for the secondary boot loader should follow the naming
# rule: ssbl or fip # rule: fip
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
STM32MP_FSBL1_DATA ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fip', 'arm-trusted-firmware/tf-a-<TYPE>-<DEVICE>.stm32', 'arm-trusted-firmware/tf-a-<TYPE>-<BOOTSCHEME>.stm32', d)}" ENABLE_FLASHLAYOUT_CONFIG_FWUP ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', '1', '0', d)}"
STM32MP_FSBL1_NAME ?= "fsbl1" # Keep the binary copy configuration for legacy flashlayout file style
ENABLE_FLASHLAYOUT_PARTITION_BINCOPY = "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '0', '1', d)}"
STM32MP_FSBL_PROGAMMER_NAME ?= "fsbl-boot"
STM32MP_SSBL_PROGAMMER_NAME ?= "fip-boot"
STM32MP_FSBL1_DATA ?= "arm-trusted-firmware/tf-a-<TYPE>-<DEVICE>.stm32"
STM32MP_FSBL1_NAME ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', 'fsbl', 'fsbl1', d)}"
STM32MP_FSBL1_SIZE ?= "256" STM32MP_FSBL1_SIZE ?= "256"
STM32MP_FSBL2_DATA ?= "${STM32MP_FSBL1_DATA}" STM32MP_FSBL2_DATA ?= "${STM32MP_FSBL1_DATA}"
STM32MP_FSBL2_NAME ?= "fsbl2" STM32MP_FSBL2_NAME ?= "fsbl2"
STM32MP_FSBL2_SIZE ?= "${STM32MP_FSBL1_SIZE}" STM32MP_FSBL2_SIZE ?= "${STM32MP_FSBL1_SIZE}"
STM32MP_SSBL1_DATA ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fip', 'fip/fip-<TYPE>-<BOOTSCHEME>${FIP_SIGN_SUFFIX}.bin', 'u-boot/u-boot-<TYPE>-trusted.stm32', d)}" STM32MP_SSBL1_DATA ?= "fip/fip-<TYPE>-<BOOTSCHEME>${FIP_SIGN_SUFFIX}.bin"
STM32MP_SSBL1_NAME ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fip', 'fip', 'ssbl', d)}" STM32MP_SSBL1_NAME ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', 'fip-a', 'fip', d)}"
STM32MP_SSBL1_SIZE ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fip', '4096', '2048', d)}" STM32MP_SSBL1_SIZE ?= "4096"
STM32MP_SSBL2_DATA ?= "${STM32MP_SSBL1_DATA}" STM32MP_SSBL2_DATA ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '', '${STM32MP_SSBL1_DATA}', d)}"
STM32MP_SSBL2_NAME ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fip', 'fip2', 'ssbl2', d)}" STM32MP_SSBL2_NAME ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', 'fip-b', 'fip2', d)}"
STM32MP_SSBL2_SIZE ?= "${STM32MP_SSBL1_SIZE}" STM32MP_SSBL2_SIZE ?= "${STM32MP_SSBL1_SIZE}"
STM32MP_UENV_DATA ?= "" STM32MP_UENV_DATA ?= ""
STM32MP_UENV_NAME ?= "env" STM32MP_UENV_NAME ?= "u-boot-env"
STM32MP_UENV_SIZE ?= "512" STM32MP_UENV_SIZE ?= "512"
STM32MP_TEEH_DATA ?= "optee/tee-header_v2-<TYPE>.stm32" STM32MP_METADATA_DATA ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'arm-trusted-firmware/${TF_A_METADATA_BINARY}', '', d)}"
STM32MP_TEEH_NAME ?= "teeh" STM32MP_METADATA_NAME ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', 'metadata', '', d)}"
STM32MP_TEEH_SIZE ?= "256" STM32MP_METADATA_SIZE ?= "256"
STM32MP_TEED_DATA ?= "optee/tee-pageable_v2-<TYPE>.stm32"
STM32MP_TEED_NAME ?= "teed"
STM32MP_TEED_SIZE ?= "512"
STM32MP_TEEX_DATA ?= "optee/tee-pager_v2-<TYPE>.stm32"
STM32MP_TEEX_NAME ?= "teex"
STM32MP_TEEX_SIZE ?= "256"
# Specific override for NAND device type regarding partition sizes to follow # Specific override for NAND device type regarding partition sizes to follow
# the hard coded configuration on U-Boot source code # the hard coded configuration on U-Boot source code
STM32MP_FSBL1_SIZE_UBOOT ?= "1024" STM32MP_FSBL1_SIZE_UBOOT ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '512', '1024', d)}"
STM32MP_TEEH_SIZE_UBOOT ?= "512" STM32MP_METADATA_SIZE_UBOOT ?= "512"
STM32MP_TEEX_SIZE_UBOOT ?= "512"
# Bootloader Partitions configuration # Bootloader Partitions configuration
PARTITIONS_BOOTLOADER_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', 'emmc', '', d)}" PARTITIONS_BOOTLOADER_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', 'emmc', '', d)}"
@ -132,76 +135,48 @@ PARTITIONS_BOOTLOADER_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'spin
# <binary_name>,<partlabel>,<size>,<type>,<copy> # <binary_name>,<partlabel>,<size>,<type>,<copy>
PARTITIONS_BOOTLOADER_CONFIG[emmc] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[emmc] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,1' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' else ''} \ ${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', False, True, d) else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,1' if '${STM32MP_SSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},FIP,1' if '${STM32MP_SSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', True, False, d) else ''} \
${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \
" "
PARTITIONS_BOOTLOADER_CONFIG[nand-4-256] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[nand-4-256] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE_UBOOT},Binary,2' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE_UBOOT},Binary,2' if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE_UBOOT},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},Binary,1' if '${STM32MP_SSBL2_NAME}' else ''} \ ${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_SSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL1_SIZE},FIP,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_SSBL2_NAME}' else ''} \
" "
PARTITIONS_BOOTLOADER_CONFIG[nor] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[nor] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,1' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' else ''} \ ${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', False, True, d) else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,1' if '${STM32MP_SSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},FIP,1' if '${STM32MP_SSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', True, False, d) else ''} \
${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \ ${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \
" "
PARTITIONS_BOOTLOADER_CONFIG[nor-sdcard] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[nor-sdcard] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,1' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' else ''} \ ${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', False, True, d) else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,1' if '${STM32MP_SSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},FIP,1' if '${STM32MP_SSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', True, False, d) else ''} \
${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \ ${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \
" "
PARTITIONS_BOOTLOADER_CONFIG[sdcard] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[sdcard] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,1' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE},Binary,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' else ''} \ ${@ '${STM32MP_FSBL2_DATA},${STM32MP_FSBL2_NAME},${STM32MP_FSBL2_SIZE},Binary,1' if '${STM32MP_FSBL2_NAME}' and bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', False, True, d) else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,1' if '${STM32MP_SSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},FIP,1' if '${STM32MP_SSBL2_NAME}' else ''} \
${@ '${STM32MP_UENV_DATA},${STM32MP_UENV_NAME},${STM32MP_UENV_SIZE},Binary,1' if '${STM32MP_UENV_NAME}' else ''} \
" "
PARTITIONS_BOOTLOADER_CONFIG[spinand-2-128] ?= "\ PARTITIONS_BOOTLOADER_CONFIG[spinand-2-128] ?= "\
${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE_UBOOT},Binary,2' if '${STM32MP_FSBL1_NAME}' else ''} \ ${@ '${STM32MP_FSBL1_DATA},${STM32MP_FSBL1_NAME},${STM32MP_FSBL1_SIZE_UBOOT},Binary,2' if '${STM32MP_FSBL1_NAME}' else ''} \
${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},Binary,1' if '${STM32MP_SSBL1_NAME}' else ''} \ ${@ '${STM32MP_METADATA_DATA},${STM32MP_METADATA_NAME},${STM32MP_METADATA_SIZE_UBOOT},Binary,2' if '${STM32MP_METADATA_NAME}' else ''} \
${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL2_SIZE},Binary,1' if '${STM32MP_SSBL2_NAME}' else ''} \ ${@ '${STM32MP_SSBL1_DATA},${STM32MP_SSBL1_NAME},${STM32MP_SSBL1_SIZE},FIP,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_SSBL1_NAME}' else ''} \
" ${@ '${STM32MP_SSBL2_DATA},${STM32MP_SSBL2_NAME},${STM32MP_SSBL1_SIZE},FIP,' + bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '2', '1', d) if '${STM32MP_SSBL2_NAME}' else ''} \
# Optee Partitions configuration
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', 'emmc', '', d)}"
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', 'nand-4-256', '', d)}"
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard', 'nor-sdcard', '', d)}"
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor', 'nor', '', d)}"
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'sdcard', '', d)}"
PARTITIONS_OPTEE_CONFIG += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'spinand-2-128', 'spinand-2-128', '', d)}"
# <binary_name>,<partlabel>,<size>,<type>,<copy>
PARTITIONS_OPTEE_CONFIG[emmc] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
"
PARTITIONS_OPTEE_CONFIG[nand-4-256] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE_UBOOT},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE_UBOOT},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
"
PARTITIONS_OPTEE_CONFIG[nor] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
"
PARTITIONS_OPTEE_CONFIG[nor-sdcard] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
"
PARTITIONS_OPTEE_CONFIG[sdcard] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
"
PARTITIONS_OPTEE_CONFIG[spinand-2-128] ?= "\
${@ '${STM32MP_TEEH_DATA},${STM32MP_TEEH_NAME},${STM32MP_TEEH_SIZE_UBOOT},Binary,1' if '${STM32MP_TEEH_NAME}' else ''} \
${@ '${STM32MP_TEED_DATA},${STM32MP_TEED_NAME},${STM32MP_TEED_SIZE},Binary,1' if '${STM32MP_TEED_NAME}' else ''} \
${@ '${STM32MP_TEEX_DATA},${STM32MP_TEEX_NAME},${STM32MP_TEEX_SIZE_UBOOT},Binary,1' if '${STM32MP_TEEX_NAME}' else ''} \
" "
# ========================================================================= # =========================================================================
@ -216,24 +191,34 @@ ENABLE_IMAGE_LICENSE_SUMMARY ?= "1"
# Define image partition size (supposed to be set as max size in image recipe) # Define image partition size (supposed to be set as max size in image recipe)
# Proposed value for rootfs should fit our highest constraint: NAND size (1GiB) # Proposed value for rootfs should fit our highest constraint: NAND size (1GiB)
# With FIP with have the maximum partitions: # With fw-update we have the following partitions:
# FSBL1 + FIP + FIP2 + Multivolume UBI = NAND size # FSBL1 + FSBL2 + METADATA1+ METADATA2 + FIP-A1 + FIP-A2 + FIP-B1 + FIP-B2 + Multivolume UBI = NAND size
# Multivolume UBI = 1GiB - (2MiB + 4MiB + 4MiB) = 1014MiB # Multivolume UBI = 1GiB - (512KiB + 512KiB + 512KiB + 512KiB + 4MiB + 4MiB + 4MiB + 4MiB) = 1006MiB
# With FIP with have the maximum partitions: # Without fw-update we have following partitions
# FSBL1 + FIP + FIP + Multivolume UBI = SPI NAND size # FSBL1 + FIP + FIP2 + Multivolume UBI = NAND size
# Multivolume UBI = 1GiB - (2MiB + 4MiB + 4MiB) = 1014MiB # Multivolume UBI = 1GiB - (2MiB + 4MiB + 4MiB) = 1014MiB
# With multivolume UBI split: # With multivolume UBI split:
# Multivolume UBI > uboot_config + uboot_config_r + bootfs + vendorfs + rootfs + userfs + UBI Overhead # Multivolume UBI > uboot_config + uboot_config_r + bootfs + vendorfs + rootfs + userfs + UBI Overhead
# From http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead, we compute # From http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead, we compute
# the UBI overhead for our NAND: # the UBI overhead for our NAND:
# (20*4096/1024 + 4) * 256KiB + (256KiB - 248KiB) * (1014MiB/256KiB - 20*4096/1024 - 4) = 53280KiB # With fw-update:
# (20*4096/1024 + 4) * 256KiB + (256KiB - 248KiB) * (1006MiB/256KiB - 20*4096/1024 - 4) = 53024KiB
# Without fw-update:
# (20*4096/1024 + 4) * 256KiB + (256KiB - 248KiB) * (1014MiB/256KiB - 20*4096/1024 - 4) = 53280KiB
# In addition, for each UBIFS, our NAND consummed 9 extra eraseblocks # In addition, for each UBIFS, our NAND consummed 9 extra eraseblocks
# So: # So:
# rootfs < Multivolume UBI - (uboot_config + uboot_config_r + bootfs + vendorfs + userfs + UBI Overhead + 4 * 9*eraseblocks) # rootfs < Multivolume UBI - (uboot_config + uboot_config_r + bootfs + vendorfs + userfs + UBI Overhead + 4 * 9*eraseblocks)
# rootfs < 1014MiB - (256KiB + 256KiB + 64MiB + 16MiB + 128MiB + 53280KiB + 4 * 9 * 256KiB) # With fw-update:
# rootfs < 744.5MiB # rootfs < 1006MiB - (256KiB + 256KiB + 64MiB + 16MiB + 128MiB + 53024KiB + 4 * 9 * 256KiB)
# Proposed value for rootfs is 744MiB # rootfs < 736.7MiB
STM32MP_ROOTFS_MAXSIZE_NAND ?= "762336" # Without fw-update:
# rootfs < 1014MiB - (256KiB + 256KiB + 64MiB + 16MiB + 128MiB + 53280KiB + 4 * 9 * 256KiB)
# rootfs < 744.5MiB
# Proposed value for rootfs is:
# With fw-update : 736MiB
# Without fw-update: 744MiB
STM32MP_ROOTFS_MAXSIZE_NAND ?= "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '753664', '762336', d)}"
# Default ROOTFS max size for image being built to this value # Default ROOTFS max size for image being built to this value
IMAGE_ROOTFS_MAXSIZE ?= "${STM32MP_ROOTFS_MAXSIZE_NAND}" IMAGE_ROOTFS_MAXSIZE ?= "${STM32MP_ROOTFS_MAXSIZE_NAND}"
@ -589,9 +574,13 @@ TF_A_CONFIG += "${@bb.utils.contains('TF_A_SSP_ENABLE', '1', 'uart-ssp usb-ssp',
# Default configuration for signing trusted-firmware-a binary # Default configuration for signing trusted-firmware-a binary
TF_A_SIGN_ENABLE ?= "0" TF_A_SIGN_ENABLE ?= "0"
# Configure TF-A to build the metadata binary
TF_A_ENABLE_METADATA ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', '1', '0', d)}"
TF_A_METADATA_BINARY ?= "metadata.bin"
# Configure the default MTD_START_OFFSET # Configure the default MTD_START_OFFSET
TF_A_MTD_START_OFFSET_NAND ?= "0x00200000" TF_A_MTD_START_OFFSET_NAND ?= "0x00200000"
TF_A_MTD_START_OFFSET_NOR ?= "0x00080000" TF_A_MTD_START_OFFSET_NOR ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', '0x00080000', '0x00100000', d)}"
TF_A_MTD_START_OFFSET_SPINAND ?= "0x00200000" TF_A_MTD_START_OFFSET_SPINAND ?= "0x00200000"
ST_TF_A_DEBUG_TRACE ?= "${@bb.utils.contains('ST_DEBUG_TRACE', '1', '1', '0', d)}" ST_TF_A_DEBUG_TRACE ?= "${@bb.utils.contains('ST_DEBUG_TRACE', '1', '1', '0', d)}"

View File

@ -25,8 +25,8 @@ FLASHLAYOUT_PARTITION_LABELS:deleteall = "${FLASHLAYOUT_PROGRAMMER_SECTIONS} emm
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Partition configuration for each partition label # Partition configuration for each partition label
FLASHLAYOUT_PARTITION_ENABLE:deleteall = "PED" FLASHLAYOUT_PARTITION_ENABLE:deleteall = "PED"
FLASHLAYOUT_PARTITION_ENABLE:deleteall:${STM32MP_FSBL1_NAME}-boot = "-" FLASHLAYOUT_PARTITION_ENABLE:deleteall:${STM32MP_FSBL_PROGAMMER_NAME} = "-"
FLASHLAYOUT_PARTITION_ENABLE:deleteall:${STM32MP_SSBL1_NAME}-boot = "-" FLASHLAYOUT_PARTITION_ENABLE:deleteall:${STM32MP_SSBL_PROGAMMER_NAME} = "-"
FLASHLAYOUT_PARTITION_TYPE:emmcall = "RawImage" FLASHLAYOUT_PARTITION_TYPE:emmcall = "RawImage"
FLASHLAYOUT_PARTITION_TYPE:nandall = "RawImage" FLASHLAYOUT_PARTITION_TYPE:nandall = "RawImage"
@ -44,5 +44,5 @@ FLASHLAYOUT_PARTITION_OFFSET:deleteall:emmcboot1 = "${DEVICE_START_OFFSET_BOOT1:
# The 'deleteall' bootscheme is a trick to generate flashlayout files to clean # The 'deleteall' bootscheme is a trick to generate flashlayout files to clean
# all memory devices on board. There are no specific 'deleteall' bootloaders # all memory devices on board. There are no specific 'deleteall' bootloaders
# so we need to manage specific override for FLASHLAYOUT_PROGRAMMER_SECTIONS binaries # so we need to manage specific override for FLASHLAYOUT_PROGRAMMER_SECTIONS binaries
BOOTSCHEME_REPLACE = "${@'optee' if bb.utils.contains('BOOTSCHEME_LABELS', 'optee', True, False, d) and not bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', True, False, d) else 'trusted'}" BOOTSCHEME_REPLACE = "${@'trusted' if bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', True, False, d) and not bb.utils.contains('BOOTSCHEME_LABELS', 'optee', True, False, d) else 'optee'}"
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_SSBL1_NAME}-boot:append = " deleteall;${BOOTSCHEME_REPLACE}" FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_SSBL_PROGAMMER_NAME}:append = " deleteall;${BOOTSCHEME_REPLACE}"

View File

@ -131,7 +131,7 @@ FLASHLAYOUT_TYPE_LABELS:trusted:spinand-2-128 = "${@' '.join(d for d in '${DEVIC
# 7) FLASHLAYOUT_PARTITION_LABELS:<OVERRIDES> # 7) FLASHLAYOUT_PARTITION_LABELS:<OVERRIDES>
# 8) FLASHLAYOUT_PARTITION_LABELS # 8) FLASHLAYOUT_PARTITION_LABELS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
FLASHLAYOUT_PROGRAMMER_SECTIONS ?= "${STM32MP_FSBL1_NAME}-boot ${STM32MP_SSBL1_NAME}-boot" FLASHLAYOUT_PROGRAMMER_SECTIONS ?= "${STM32MP_FSBL_PROGAMMER_NAME} ${STM32MP_SSBL_PROGAMMER_NAME}"
# FLASHLAYOUT_PARTITION_IMAGES is initalized through PARTITIONS_CONFIG within 'flashlayout-stm32mp' class # FLASHLAYOUT_PARTITION_IMAGES is initalized through PARTITIONS_CONFIG within 'flashlayout-stm32mp' class
FLASHLAYOUT_PARTITION_IMAGES ?= "" FLASHLAYOUT_PARTITION_IMAGES ?= ""
@ -216,14 +216,13 @@ FLASHLAYOUT_PARTITION_LABELS:trusted:spinand-2-128 = "\
# 9) Default 'FLASHLAYOUT_PARTITION_xxx' to 'none' when not defined # 9) Default 'FLASHLAYOUT_PARTITION_xxx' to 'none' when not defined
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
FLASHLAYOUT_PARTITION_ENABLE = "P" FLASHLAYOUT_PARTITION_ENABLE = "P"
FLASHLAYOUT_PARTITION_ENABLE:${STM32MP_FSBL1_NAME}-boot = "-" FLASHLAYOUT_PARTITION_ENABLE:${STM32MP_FSBL_PROGAMMER_NAME} = "-"
FLASHLAYOUT_PARTITION_ENABLE:${STM32MP_SSBL1_NAME}-boot = "-" FLASHLAYOUT_PARTITION_ENABLE:${STM32MP_SSBL_PROGAMMER_NAME} = "-"
FLASHLAYOUT_PARTITION_ENABLE:empty = "PE" FLASHLAYOUT_PARTITION_ENABLE:empty = "PE"
FLASHLAYOUT_PARTITION_ENABLE:nor:${STM32MP_UENV_NAME} = "PDE"
FLASHLAYOUT_PARTITION_ENABLE:nor-sdcard:${STM32MP_UENV_NAME} = "PDE"
# Need to make sure to delete partition that contains U-Boot env before update (gpt partitions only) # Need to make sure to delete partition that contains U-Boot env before update (gpt partitions only)
FLASHLAYOUT_PARTITION_ENABLE:sdcard:${STM32MP_SSBL1_NAME} = "PD" FLASHLAYOUT_PARTITION_ENABLE:sdcard:${STM32MP_SSBL1_NAME} = "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '', 'PD', d)}"
FLASHLAYOUT_PARTITION_ENABLE:emmc:${STM32MP_SSBL1_NAME} = "PD" FLASHLAYOUT_PARTITION_ENABLE:emmc:${STM32MP_SSBL1_NAME} = "${@bb.utils.contains('ENABLE_FLASHLAYOUT_CONFIG_FWUP', '1', '', 'PD', d)}"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Partition ID # Partition ID
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -231,10 +230,11 @@ FLASHLAYOUT_PARTITION_ENABLE:emmc:${STM32MP_SSBL1_NAME} = "PD"
# reserved IDs on STM32CubeProgrammer side: # reserved IDs on STM32CubeProgrammer side:
# 0x01 for FSBL # 0x01 for FSBL
# 0x03 for SSBL # 0x03 for SSBL
FLASHLAYOUT_PARTITION_ID:${STM32MP_FSBL1_NAME}-boot = "0x01" FLASHLAYOUT_PARTITION_ID:${STM32MP_FSBL_PROGAMMER_NAME} = "0x01"
FLASHLAYOUT_PARTITION_ID:${STM32MP_SSBL1_NAME}-boot = "0x03" FLASHLAYOUT_PARTITION_ID:${STM32MP_SSBL_PROGAMMER_NAME} = "0x03"
FLASHLAYOUT_PARTITION_TYPE = "Binary" FLASHLAYOUT_PARTITION_TYPE = "Binary"
FLASHLAYOUT_PARTITION_TYPE:${STM32MP_SSBL_PROGAMMER_NAME} = "FIP"
FLASHLAYOUT_PARTITION_TYPE:ubifs = "System" FLASHLAYOUT_PARTITION_TYPE:ubifs = "System"
FLASHLAYOUT_PARTITION_COPY = "1" FLASHLAYOUT_PARTITION_COPY = "1"
@ -246,14 +246,19 @@ FLASHLAYOUT_PARTITION_DEVICE:nor-sdcard = "none:${FLASHLAYOUT_PROGRAMMER_SEC
FLASHLAYOUT_PARTITION_DEVICE:sdcard = "none:${FLASHLAYOUT_PROGRAMMER_SECTIONS},${DEVICE:SDCARD}:default" FLASHLAYOUT_PARTITION_DEVICE:sdcard = "none:${FLASHLAYOUT_PROGRAMMER_SECTIONS},${DEVICE:SDCARD}:default"
FLASHLAYOUT_PARTITION_DEVICE:spinand-2-128 = "none:${FLASHLAYOUT_PROGRAMMER_SECTIONS},${DEVICE:SPINAND}:default" FLASHLAYOUT_PARTITION_DEVICE:spinand-2-128 = "none:${FLASHLAYOUT_PROGRAMMER_SECTIONS},${DEVICE:SPINAND}:default"
FLASHLAYOUT_PARTITION_OFFSET:${STM32MP_FSBL1_NAME}-boot = "0x0" FLASHLAYOUT_PARTITION_OFFSET:${STM32MP_FSBL_PROGAMMER_NAME} = "0x0"
FLASHLAYOUT_PARTITION_OFFSET:${STM32MP_SSBL1_NAME}-boot = "0x0" FLASHLAYOUT_PARTITION_OFFSET:${STM32MP_SSBL_PROGAMMER_NAME} = "0x0"
FLASHLAYOUT_PARTITION_OFFSET:emmc:${STM32MP_FSBL1_NAME} = "${DEVICE_START_OFFSET_BOOT0:EMMC}" FLASHLAYOUT_PARTITION_OFFSET:emmc:${STM32MP_FSBL1_NAME} = "${DEVICE_START_OFFSET_BOOT0:EMMC}"
FLASHLAYOUT_PARTITION_OFFSET:emmc:${STM32MP_FSBL2_NAME} = "${DEVICE_START_OFFSET_BOOT1:EMMC}" FLASHLAYOUT_PARTITION_OFFSET:emmc:${STM32MP_FSBL2_NAME} = "${DEVICE_START_OFFSET_BOOT1:EMMC}"
FLASHLAYOUT_PARTITION_OFFSET:emmc:${STM32MP_SSBL1_NAME} = "${DEVICE_START_OFFSET_EMMC}"
# Size defined in Kbytes # Size defined in Kbytes
FLASHLAYOUT_PARTITION_SIZE:empty = "0" FLASHLAYOUT_PARTITION_SIZE:empty = "0"
# Override default partition size for rootfs to increase available free space
# 3GiB for emmc
#FLASHLAYOUT_PARTITION_SIZE:emmc:${STM32MP_ROOTFS_LABEL} = "3145728"
# 4GiB for sdcard
#FLASHLAYOUT_PARTITION_SIZE:nor-sdcard:${STM32MP_ROOTFS_LABEL} = "4194304"
#FLASHLAYOUT_PARTITION_SIZE:sdcard:${STM32MP_ROOTFS_LABEL} = "4194304"
# Set binaries to use for each partition # Set binaries to use for each partition
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -264,8 +269,8 @@ FLASHLAYOUT_PARTITION_SIZE:empty = "0"
# '<TYPE>' (to insert label from FLASHLAYOUT_TYPE_LABELS) # '<TYPE>' (to insert label from FLASHLAYOUT_TYPE_LABELS)
# These patterns are processed to expand binary name for each config. # These patterns are processed to expand binary name for each config.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
FLASHLAYOUT_PARTITION_BIN2LOAD:${STM32MP_FSBL1_NAME}-boot = "${@bb.utils.contains('MACHINE_FEATURES', 'fip', 'arm-trusted-firmware/tf-a-<TYPE>-usb.stm32', 'arm-trusted-firmware/tf-a-<TYPE>-serialboot.stm32', d)}" FLASHLAYOUT_PARTITION_BIN2LOAD:${STM32MP_FSBL_PROGAMMER_NAME} = "arm-trusted-firmware/tf-a-<TYPE>-usb.stm32"
FLASHLAYOUT_PARTITION_BIN2LOAD:${STM32MP_SSBL1_NAME}-boot = "${STM32MP_SSBL1_DATA}" FLASHLAYOUT_PARTITION_BIN2LOAD:${STM32MP_SSBL_PROGAMMER_NAME} = "${STM32MP_SSBL1_DATA}"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Use the 'FLASHLAYOUT_PARTITION_REPLACE_PATTERNS' var to allow dynamic binary # Use the 'FLASHLAYOUT_PARTITION_REPLACE_PATTERNS' var to allow dynamic binary
@ -278,5 +283,5 @@ FLASHLAYOUT_PARTITION_BIN2LOAD:${STM32MP_SSBL1_NAME}-boot = "${STM32MP_SSBL1_DAT
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# The daughter board does not support Programmer mode, so use eval one # The daughter board does not support Programmer mode, so use eval one
# (valid for FLASHLAYOUT_PROGRAMMER_SECTIONS partitions) # (valid for FLASHLAYOUT_PROGRAMMER_SECTIONS partitions)
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_FSBL1_NAME}-boot:append = " ed1;ev1" FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_FSBL_PROGAMMER_NAME}:append = " ed1;ev1"
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_SSBL1_NAME}-boot:append = " ed1;ev1" FLASHLAYOUT_PARTITION_REPLACE_PATTERNS:${STM32MP_SSBL_PROGAMMER_NAME}:append = " ed1;ev1"

View File

@ -88,7 +88,6 @@ DEVICE_MAX_OFFSET:NAND ?= "0x40000000"
DEVICE_ALIGNMENT_SIZE:NAND ?= "0x00040000" DEVICE_ALIGNMENT_SIZE:NAND ?= "0x00040000"
# Configure the list of boards that enable NAND # Configure the list of boards that enable NAND
DEVICE_BOARD_ENABLE:NAND += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', '${STM32MP_DT_FILES_ED}', '', d)}"
DEVICE_BOARD_ENABLE:NAND += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', '${STM32MP_DT_FILES_EV}', '', d)}" DEVICE_BOARD_ENABLE:NAND += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', '${STM32MP_DT_FILES_EV}', '', d)}"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -102,8 +101,7 @@ DEVICE_ALIGNMENT_SIZE:NOR ?= "0x00010000"
DEVICE_PARTUUID_ROOTFS:NOR ?= "${@d.getVar(d.expand('DEVICE_PARTUUID_ROOTFS:${DEVICE_NOR}')) or ''}" DEVICE_PARTUUID_ROOTFS:NOR ?= "${@d.getVar(d.expand('DEVICE_PARTUUID_ROOTFS:${DEVICE_NOR}')) or ''}"
# Configure the list of boards that enable NOR # Configure the list of boards that enable NOR
DEVICE_BOARD_ENABLE:NOR += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard' , '${STM32MP_DT_FILES_EV}', '', d)}" DEVICE_BOARD_ENABLE:NOR += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'nor', 'nor-sdcard' ], '${STM32MP_DT_FILES_EV}', '', d)}"
DEVICE_BOARD_ENABLE:NOR += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor' , '${STM32MP_DT_FILES_EV}', '', d)}"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# SDCARD # SDCARD
@ -140,3 +138,7 @@ DEVICE_PARTUUID_ROOTFS:mmc0 ?= "e91c4e10-16e6-4c0e-bd0e-77becf4a3582"
DEVICE_PARTUUID_ROOTFS:mmc1 ?= "491f6117-415d-4f53-88c9-6e0de54deac6" DEVICE_PARTUUID_ROOTFS:mmc1 ?= "491f6117-415d-4f53-88c9-6e0de54deac6"
DEVICE_PARTUUID_ROOTFS:mmc2 ?= "fd58f1c7-be0d-4338-8ee9-ad8f050aeb18" DEVICE_PARTUUID_ROOTFS:mmc2 ?= "fd58f1c7-be0d-4338-8ee9-ad8f050aeb18"
DEVICE_PARTUUID_ROOTFS:nor0 ?= "" DEVICE_PARTUUID_ROOTFS:nor0 ?= ""
DEVICE_TYPEUUID_FIP = "19d5df83-11b0-457b-be2c-7559c13142a5"
DEVICE_PARTUUID_FIP_A = "4fd84c93-54ef-463f-a7ef-ae25ff887087"
DEVICE_PARTUUID_FIP_B = "09c54952-d5bf-45af-acee-335303766fb3"

View File

@ -1,6 +1,6 @@
#Opt Id Name Type IP Offset Binary #Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32 - 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
- 0x03 fip-boot Binary none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin - 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157c-ev1-optee.bin
PED 0x04 emmcboot0 Binary mmc1 boot1 none PED 0x04 emmcboot0 Binary mmc1 boot1 none
PED 0x05 emmcboot1 Binary mmc1 boot2 none PED 0x05 emmcboot1 Binary mmc1 boot2 none
PED 0x10 emmcall RawImage mmc1 0x0 none PED 0x10 emmcall RawImage mmc1 0x0 none

1 #Opt Id Name Type IP Offset Binary
2 - 0x01 fsbl1-boot fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
3 - 0x03 fip-boot Binary FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin fip/fip-stm32mp157c-ev1-optee.bin
4 PED 0x04 emmcboot0 Binary mmc1 boot1 none
5 PED 0x05 emmcboot1 Binary mmc1 boot2 none
6 PED 0x10 emmcall RawImage mmc1 0x0 none

View File

@ -1,10 +1,14 @@
#Opt Id Name Type IP Offset Binary #Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32 - 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
- 0x03 fip-boot Binary none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin - 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x04 fsbl1 Binary mmc1 boot1 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32 P 0x04 fsbl1 Binary mmc1 boot1 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32
P 0x05 fsbl2 Binary mmc1 boot2 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32 P 0x05 fsbl2 Binary mmc1 boot2 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32
PD 0x06 fip Binary mmc1 0x00080000 fip/fip-stm32mp157c-ev1-trusted.bin P 0x06 metadata1 Binary mmc1 0x00080000 arm-trusted-firmware/metadata.bin
P 0x10 boot System mmc1 0x00480000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 P 0x07 metadata2 Binary mmc1 0x00100000 arm-trusted-firmware/metadata.bin
P 0x11 vendorfs FileSystem mmc1 0x04480000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 P 0x08 fip-a FIP mmc1 0x00180000 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x12 rootfs FileSystem mmc1 0x05480000 st-image-weston-openstlinux-weston-stm32mp1.ext4 PED 0x09 fip-b FIP mmc1 0x00580000 none
P 0x13 userfs FileSystem mmc1 0x33E80000 st-image-userfs-openstlinux-weston-stm32mp1.ext4 PED 0x0A u-boot-env Binary mmc1 0x00980000 none
P 0x10 bootfs System mmc1 0x00A00000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc1 0x04A00000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc1 0x05A00000 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc1 0x33A00000 st-image-userfs-openstlinux-weston-stm32mp1.ext4

1 #Opt Id Name Type IP Offset Binary
2 - 0x01 fsbl1-boot fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
3 - 0x03 fip-boot Binary FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
4 P 0x04 fsbl1 Binary mmc1 boot1 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32
5 P 0x05 fsbl2 Binary mmc1 boot2 arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32
6 PD P 0x06 fip metadata1 Binary mmc1 0x00080000 fip/fip-stm32mp157c-ev1-trusted.bin arm-trusted-firmware/metadata.bin
7 P 0x10 0x07 boot metadata2 System Binary mmc1 0x00480000 0x00100000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 arm-trusted-firmware/metadata.bin
8 P 0x11 0x08 vendorfs fip-a FileSystem FIP mmc1 0x04480000 0x00180000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 fip/fip-stm32mp157c-ev1-trusted.bin
9 P PED 0x12 0x09 rootfs fip-b FileSystem FIP mmc1 0x05480000 0x00580000 st-image-weston-openstlinux-weston-stm32mp1.ext4 none
10 P PED 0x13 0x0A userfs u-boot-env FileSystem Binary mmc1 0x33E80000 0x00980000 st-image-userfs-openstlinux-weston-stm32mp1.ext4 none
11 P 0x10 bootfs System mmc1 0x00A00000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
12 P 0x11 vendorfs FileSystem mmc1 0x04A00000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
13 P 0x12 rootfs FileSystem mmc1 0x05A00000 st-image-weston-openstlinux-weston-stm32mp1.ext4
14 P 0x13 userfs FileSystem mmc1 0x33A00000 st-image-userfs-openstlinux-weston-stm32mp1.ext4

View File

@ -1,7 +1,12 @@
#Opt Id Name Type IP Offset Binary #Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32 - 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
- 0x03 fip-boot Binary none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin - 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x04 fsbl1 Binary(2) nand0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nand.stm32 P 0x04 fsbl1 Binary nand0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nand.stm32
P 0x05 fip Binary nand0 0x00200000 fip/fip-stm32mp157c-ev1-trusted.bin P 0x05 fsbl2 Binary nand0 0x00080000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nand.stm32
P 0x06 fip2 Binary nand0 0x00600000 fip/fip-stm32mp157c-ev1-trusted.bin P 0x06 metadata1 Binary nand0 0x00100000 arm-trusted-firmware/metadata.bin
P 0x10 ubifs System nand0 0x00A00000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi P 0x07 metadata2 Binary nand0 0x00180000 arm-trusted-firmware/metadata.bin
P 0x08 fip-a1 FIP nand0 0x00200000 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x09 fip-a2 FIP nand0 0x00600000 fip/fip-stm32mp157c-ev1-trusted.bin
PED 0x0A fip-b1 FIP nand0 0x00A00000 none
PED 0x0B fip-b2 FIP nand0 0x00E00000 none
P 0x10 ubifs System nand0 0x01200000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi

1 #Opt Id Name Type IP Offset Binary
2 - 0x01 fsbl1-boot fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
3 - 0x03 fip-boot Binary FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
4 P 0x04 fsbl1 Binary(2) Binary nand0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nand.stm32
5 P 0x05 fip fsbl2 Binary nand0 0x00200000 0x00080000 fip/fip-stm32mp157c-ev1-trusted.bin arm-trusted-firmware/tf-a-stm32mp157c-ev1-nand.stm32
6 P 0x06 fip2 metadata1 Binary nand0 0x00600000 0x00100000 fip/fip-stm32mp157c-ev1-trusted.bin arm-trusted-firmware/metadata.bin
7 P 0x10 0x07 ubifs metadata2 System Binary nand0 0x00A00000 0x00180000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi arm-trusted-firmware/metadata.bin
8 P 0x08 fip-a1 FIP nand0 0x00200000 fip/fip-stm32mp157c-ev1-trusted.bin
9 P 0x09 fip-a2 FIP nand0 0x00600000 fip/fip-stm32mp157c-ev1-trusted.bin
10 PED 0x0A fip-b1 FIP nand0 0x00A00000 none
11 PED 0x0B fip-b2 FIP nand0 0x00E00000 none
12 P 0x10 ubifs System nand0 0x01200000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi

View File

@ -1,12 +1,15 @@
#Opt Id Name Type IP Offset Binary #Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32 - 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
- 0x03 fip-boot Binary none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin - 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x04 fsbl1 Binary nor0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32 P 0x04 fsbl1 Binary nor0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32
P 0x05 fsbl2 Binary nor0 0x00040000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32 P 0x05 fsbl2 Binary nor0 0x00040000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32
P 0x06 fip Binary nor0 0x00080000 fip/fip-stm32mp157c-ev1-trusted.bin P 0x06 metadata1 Binary nor0 0x00080000 arm-trusted-firmware/metadata.bin
PDE 0x07 env Binary nor0 0x00480000 none P 0x07 metadata2 Binary nor0 0x000C0000 arm-trusted-firmware/metadata.bin
PE 0x08 empty Binary nor0 0x00500000 none P 0x08 fip-a FIP nor0 0x00100000 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x10 boot System mmc0 0x00004400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 PED 0x09 fip-b FIP nor0 0x00500000 none
PED 0x0A u-boot-env Binary nor0 0x00900000 none
PE 0x0B empty Binary nor0 0x00980000 none
P 0x10 bootfs System mmc0 0x00004400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc0 0x04004400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 P 0x11 vendorfs FileSystem mmc0 0x04004400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc0 0x05004400 st-image-weston-openstlinux-weston-stm32mp1.ext4 P 0x12 rootfs FileSystem mmc0 0x05004400 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc0 0x33A04400 st-image-userfs-openstlinux-weston-stm32mp1.ext4 P 0x13 userfs FileSystem mmc0 0x33004400 st-image-userfs-openstlinux-weston-stm32mp1.ext4

1 #Opt Id Name Type IP Offset Binary
2 - 0x01 fsbl1-boot fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
3 - 0x03 fip-boot Binary FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
4 P 0x04 fsbl1 Binary nor0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32
5 P 0x05 fsbl2 Binary nor0 0x00040000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-nor.stm32
6 P 0x06 fip metadata1 Binary nor0 0x00080000 fip/fip-stm32mp157c-ev1-trusted.bin arm-trusted-firmware/metadata.bin
7 PDE P 0x07 env metadata2 Binary nor0 0x00480000 0x000C0000 none arm-trusted-firmware/metadata.bin
8 PE P 0x08 empty fip-a Binary FIP nor0 0x00500000 0x00100000 none fip/fip-stm32mp157c-ev1-trusted.bin
9 P PED 0x10 0x09 boot fip-b System FIP mmc0 nor0 0x00004400 0x00500000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 none
10 PED 0x0A u-boot-env Binary nor0 0x00900000 none
11 PE 0x0B empty Binary nor0 0x00980000 none
12 P 0x10 bootfs System mmc0 0x00004400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
13 P 0x11 vendorfs FileSystem mmc0 0x04004400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
14 P 0x12 rootfs FileSystem mmc0 0x05004400 st-image-weston-openstlinux-weston-stm32mp1.ext4
15 P 0x13 userfs FileSystem mmc0 0x33A04400 0x33004400 st-image-userfs-openstlinux-weston-stm32mp1.ext4

View File

@ -1,10 +1,14 @@
#Opt Id Name Type IP Offset Binary #Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32 - 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
- 0x03 fip-boot Binary none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin - 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32 P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32 P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32
PD 0x06 fip Binary mmc0 0x00084400 fip/fip-stm32mp157c-ev1-trusted.bin P 0x06 metadata1 Binary mmc0 0x00084400 arm-trusted-firmware/metadata.bin
P 0x10 boot System mmc0 0x00484400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 P 0x07 metadata2 Binary mmc0 0x000C4400 arm-trusted-firmware/metadata.bin
P 0x11 vendorfs FileSystem mmc0 0x04484400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 P 0x08 fip-a FIP mmc0 0x00104400 fip/fip-stm32mp157c-ev1-trusted.bin
P 0x12 rootfs FileSystem mmc0 0x05484400 st-image-weston-openstlinux-weston-stm32mp1.ext4 PED 0x09 fip-b FIP mmc0 0x00504400 none
P 0x13 userfs FileSystem mmc0 0x33E84400 st-image-userfs-openstlinux-weston-stm32mp1.ext4 PED 0x0A u-boot-env Binary mmc0 0x00904400 none
P 0x10 bootfs System mmc0 0x00984400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc0 0x04984400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc0 0x05984400 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc0 0x33984400 st-image-userfs-openstlinux-weston-stm32mp1.ext4

1 #Opt Id Name Type IP Offset Binary
2 - 0x01 fsbl1-boot fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-usb.stm32
3 - 0x03 fip-boot Binary FIP none 0x0 fip/fip-stm32mp157c-ev1-trusted.bin
4 P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32
5 P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-sdcard.stm32
6 PD P 0x06 fip metadata1 Binary mmc0 0x00084400 fip/fip-stm32mp157c-ev1-trusted.bin arm-trusted-firmware/metadata.bin
7 P 0x10 0x07 boot metadata2 System Binary mmc0 0x00484400 0x000C4400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 arm-trusted-firmware/metadata.bin
8 P 0x11 0x08 vendorfs fip-a FileSystem FIP mmc0 0x04484400 0x00104400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 fip/fip-stm32mp157c-ev1-trusted.bin
9 P PED 0x12 0x09 rootfs fip-b FileSystem FIP mmc0 0x05484400 0x00504400 st-image-weston-openstlinux-weston-stm32mp1.ext4 none
10 P PED 0x13 0x0A userfs u-boot-env FileSystem Binary mmc0 0x33E84400 0x00904400 st-image-userfs-openstlinux-weston-stm32mp1.ext4 none
11 P 0x10 bootfs System mmc0 0x00984400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
12 P 0x11 vendorfs FileSystem mmc0 0x04984400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
13 P 0x12 rootfs FileSystem mmc0 0x05984400 st-image-weston-openstlinux-weston-stm32mp1.ext4
14 P 0x13 userfs FileSystem mmc0 0x33984400 st-image-userfs-openstlinux-weston-stm32mp1.ext4