CLASSES/MACHINES: update for v2.0.0
Several updates integrated: - removal of no more supported basic boot scheme - removal of no more supported boot device (nor-nand and nor-emmc) - rework of providers and machine features - introduction of new board versions (a, c, d, f) - update of extlinuxconf-stm32mp class to manage multiple board versions - configure 'extlinux.conf' file to manage PARTUUID to select rootfs partition - new partition images management (easy to add or remove partition through new PARTITIONS_CONFIG var - specific configuration on machine side for all storage device supported Change-Id: I7e4d3d16535a5654c7fd80f9b56296a61050def3
This commit is contained in:
parent
2fbe4ce39c
commit
af5ae28215
|
|
@ -17,6 +17,7 @@ python archiver_clean_tarball() {
|
|||
if os.path.exists(os.path.join(tmpdir,dirs_list[0],"git", ".git")):
|
||||
src_origin = os.path.join(tmpdir,dirs_list[0], '.')
|
||||
shutil.rmtree(os.path.join(tmpdir,dirs_list[0],"git", ".git"))
|
||||
shutil.move(os.path.join(tmpdir,dirs_list[0],"git"),os.path.join(tmpdir,dirs_list[0],d.getVar('BPN')+'-'+d.getVar('PV')))
|
||||
os.remove(os.path.join(ar_outdir,tarball_name[0]))
|
||||
subdirs_list = [f for f in listdir(os.path.join(tmpdir,dirs_list[0])) if os.path.isdir(os.path.join(tmpdir,dirs_list[0], f))]
|
||||
if len(subdirs_list) == 1:
|
||||
|
|
@ -34,7 +35,7 @@ archiver_git_uri() {
|
|||
BRANCH=master
|
||||
fi
|
||||
|
||||
sed -i -e "s|##GIT_BRANCH##|$BRANCH|g" -e "s|##GIT_SRCREV##|${SRCREV}|g" ${ARCHIVER_OUTDIR}/${ARCHIVER_README}
|
||||
sed -i -e "s|##GIT_BRANCH##|$BRANCH|g" -e "s|##GIT_SRCREV##|${SRCREV}|g" -e "s|##BP##|${BP}|g" -e "s|##PV##|${PV}|g" -e "s|##PR##|${PR}|g" ${ARCHIVER_OUTDIR}/${ARCHIVER_README}
|
||||
}
|
||||
do_ar_original[postfuncs] =+ "archiver_git_uri"
|
||||
|
||||
|
|
|
|||
|
|
@ -29,52 +29,44 @@
|
|||
# --------------------------------------------------------------------
|
||||
# STM32MP specific implementation
|
||||
# --------------------------------------------------------------------
|
||||
# Append new mechanism to allow multi 'extlinux.conf' file generation.
|
||||
# Append new mechanism to allow multiple config file generation.
|
||||
# - multiple targets case:
|
||||
# each 'extlinux.conf' file generated is created under specific path:
|
||||
# each config file generated is created under specific path:
|
||||
# '${B}/<UBOOT_EXTLINUX_BOOTPREFIXES>extlinux/extlinux.conf'
|
||||
# - simple target case:
|
||||
# the 'extlinux.conf' file generated is created under default path:
|
||||
# '${B}/extlinux/extlinux.conf'
|
||||
#
|
||||
# New external variables added:
|
||||
# UBOOT_EXTLINUX_TARGETS - A list of targets for multi config file
|
||||
# generation
|
||||
# UBOOT_EXTLINUX_BOOTPREFIXES - Bootprefix used in uboot script to select
|
||||
# extlinux.conf file to use
|
||||
# UBOOT_EXTLINUX_TARGETS - List of targets for multi config file creation
|
||||
# UBOOT_EXTLINUX_BOOTPREFIXES - Prefix used in uboot script to select config file
|
||||
#
|
||||
# Add an extra configuration to allow to duplicate current config file into a new
|
||||
# one by appending some new labels to the current ones.
|
||||
# This mechanism is enabled through UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG var.
|
||||
# The format to specify it is:
|
||||
# UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG ??= "foo"
|
||||
# UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[foo] = "label1 label2"
|
||||
# Along with current config file created 'extlinux.conf', a new config file is
|
||||
# created at same location with name 'foo_extlinux.conf'.
|
||||
# This config file contains the labels defined for current config file with also
|
||||
# the new configured lables (i.e. label1 and lable2).
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
# Output example:
|
||||
# Implementation:
|
||||
# --------------------------------------------------------------------
|
||||
# Following 'extlinux.conf' files are generated under ${UBOOT_EXTLINUX_INSTALL_DIR}:
|
||||
# ${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/extlinux.conf
|
||||
# ${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[1]}extlinux/extlinux.conf
|
||||
# We create all config file based on a loop for all targets set in
|
||||
# UBOOT_EXTLINUX_TARGETS var, then we use the mechanism defined in
|
||||
# 'uboot-extlinux-config.bbclass' class to generate the config file
|
||||
# Plus for each target we may use the UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG var
|
||||
# to create additional config file that will use the labels list from on going
|
||||
# target plus the labels defined for this extra target.
|
||||
#
|
||||
# File content (${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/exlinux.conf):
|
||||
# menu title Select the boot mode
|
||||
# TIMEOUT ${UBOOT_EXTLINUX_TIMEOUT}
|
||||
# DEFAULT ${UBOOT_EXTLINUX_DEFAULT_LABEL_${UBOOT_EXTLINUX_TARGETS}[0]}
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[0]}[0]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[0]}[1]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
#
|
||||
# File content (${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/exlinux.conf):
|
||||
# menu title Select the boot mode
|
||||
# TIMEOUT ${UBOOT_EXTLINUX_TIMEOUT}
|
||||
# DEFAULT ${UBOOT_EXTLINUX_DEFAULT_LABEL_${UBOOT_EXTLINUX_TARGETS}[1]}
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[1]}[0]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[1]}[1]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# We manage to allow var override using the current target defined from the
|
||||
# ongoing loop.
|
||||
# In the same way var averride is managed through the ongoing label loop while
|
||||
# writting the config file (refer to 'uboot-extlinux-config.bbclass' class for
|
||||
# details).
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
UBOOT_EXTLINUX_TARGETS ?= ""
|
||||
|
|
@ -87,6 +79,85 @@ UBOOT_EXTLINUX_KERNEL_IMAGE ?= "/${KERNEL_IMAGETYPE}"
|
|||
UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw"
|
||||
UBOOT_EXTLINUX_TIMEOUT ?= "20"
|
||||
|
||||
def create_extlinux_file(cfile, labels, data):
|
||||
"""
|
||||
Copy/Paste extract of 'do_create_extlinux_config()' function
|
||||
from openembedded-core 'uboot-extlinux-config.bbclass' class
|
||||
"""
|
||||
# Use copy of provided data environment to allow label override without side
|
||||
# effect when looping on 'create_extlinux_file' function.
|
||||
localdata = bb.data.createCopy(data)
|
||||
# Default function from OpenEmbedded class
|
||||
try:
|
||||
with open(cfile, 'w') as cfgfile:
|
||||
cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n')
|
||||
|
||||
if len(labels.split()) > 1:
|
||||
cfgfile.write('menu title Select the boot mode\n')
|
||||
|
||||
splashscreen_name = localdata.getVar('UBOOT_SPLASH_IMAGE')
|
||||
if not splashscreen_name:
|
||||
bb.warn('UBOOT_SPLASH_IMAGE not defined')
|
||||
else:
|
||||
cfgfile.write('MENU BACKGROUND /%s.bmp\n' % (splashscreen_name))
|
||||
|
||||
timeout = localdata.getVar('UBOOT_EXTLINUX_TIMEOUT')
|
||||
if timeout:
|
||||
cfgfile.write('TIMEOUT %s\n' % (timeout))
|
||||
|
||||
if len(labels.split()) > 1:
|
||||
default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
|
||||
if default:
|
||||
cfgfile.write('DEFAULT %s\n' % (default))
|
||||
|
||||
# Need to deconflict the labels with existing overrides
|
||||
label_overrides = labels.split()
|
||||
default_overrides = localdata.getVar('OVERRIDES').split(':')
|
||||
# We're keeping all the existing overrides that aren't used as a label
|
||||
# an override for that label will be added back in while we're processing that label
|
||||
keep_overrides = list(filter(lambda x: x not in label_overrides, default_overrides))
|
||||
|
||||
for label in labels.split():
|
||||
|
||||
localdata.setVar('OVERRIDES', ':'.join(keep_overrides + [label]))
|
||||
|
||||
extlinux_console = localdata.getVar('UBOOT_EXTLINUX_CONSOLE')
|
||||
|
||||
menu_description = localdata.getVar('UBOOT_EXTLINUX_MENU_DESCRIPTION')
|
||||
if not menu_description:
|
||||
menu_description = label
|
||||
|
||||
root = localdata.getVar('UBOOT_EXTLINUX_ROOT')
|
||||
if not root:
|
||||
bb.fatal('UBOOT_EXTLINUX_ROOT not defined')
|
||||
|
||||
kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE')
|
||||
fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR')
|
||||
|
||||
fdt = localdata.getVar('UBOOT_EXTLINUX_FDT')
|
||||
|
||||
if fdt:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' %
|
||||
(menu_description, kernel_image, fdt))
|
||||
elif fdtdir:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' %
|
||||
(menu_description, kernel_image, fdtdir))
|
||||
else:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image))
|
||||
|
||||
kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS')
|
||||
|
||||
initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD')
|
||||
if initrd:
|
||||
cfgfile.write('\tINITRD %s\n'% initrd)
|
||||
|
||||
kernel_args = root + " " + kernel_args
|
||||
cfgfile.write('\tAPPEND %s %s\n' % (kernel_args, extlinux_console))
|
||||
|
||||
except OSError:
|
||||
bb.fatal('Unable to open %s' % (cfile))
|
||||
|
||||
|
||||
python do_create_multiextlinux_config() {
|
||||
targets = d.getVar('UBOOT_EXTLINUX_TARGETS')
|
||||
if not targets:
|
||||
|
|
@ -94,24 +165,32 @@ python do_create_multiextlinux_config() {
|
|||
if not targets.strip():
|
||||
bb.fatal("No targets, nothing to do")
|
||||
|
||||
# Need to deconflict the targets with existing overrides
|
||||
target_overrides = targets.split()
|
||||
default_overrides = d.getVar('OVERRIDES').split(':')
|
||||
# We're keeping all the existing overrides that aren't used as a target
|
||||
# an override for that target will be added back in while we're processing that target
|
||||
keep_overrides = list(filter(lambda x: x not in target_overrides, default_overrides))
|
||||
|
||||
for target in targets.split():
|
||||
bb.note("Loop for '%s' target" % target)
|
||||
|
||||
localdata = bb.data.createCopy(d)
|
||||
overrides = localdata.getVar('OVERRIDES')
|
||||
if not overrides:
|
||||
bb.fatal('OVERRIDES not defined')
|
||||
localdata.setVar('OVERRIDES', target + ':' + overrides)
|
||||
# Append target as OVERRIDES
|
||||
d.setVar('OVERRIDES', ':'.join(keep_overrides + [target]))
|
||||
|
||||
# Initialize labels from localdata to allow target override
|
||||
labels = localdata.getVar('UBOOT_EXTLINUX_LABELS')
|
||||
# Initialize labels
|
||||
labels = d.getVar('UBOOT_EXTLINUX_LABELS')
|
||||
if not labels:
|
||||
bb.fatal("UBOOT_EXTLINUX_LABELS not defined, nothing to do")
|
||||
if not labels.strip():
|
||||
bb.fatal("No labels, nothing to do")
|
||||
|
||||
# Initialize subdir for extlinux.conf file location
|
||||
if len(targets.split()) > 1:
|
||||
bootprefix = localdata.getVar('UBOOT_EXTLINUX_BOOTPREFIXES') or ""
|
||||
# Initialize extra target configs
|
||||
extra_extlinuxtargetconfig = d.getVar('UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG') or ""
|
||||
|
||||
# Initialize subdir for config file location
|
||||
if len(targets.split()) > 1 or len(extra_extlinuxtargetconfig.split()) > 0:
|
||||
bootprefix = d.getVar('UBOOT_EXTLINUX_BOOTPREFIXES') or ""
|
||||
subdir = bootprefix + 'extlinux'
|
||||
else:
|
||||
subdir = 'extlinux'
|
||||
|
|
@ -122,79 +201,35 @@ python do_create_multiextlinux_config() {
|
|||
# Create extlinux folder
|
||||
bb.utils.mkdirhier(os.path.dirname(cfile))
|
||||
|
||||
# ************************************************************
|
||||
# Copy/Paste extract of 'do_create_extlinux_config()' function
|
||||
# from openembedded-core 'uboot-extlinux-config.bbclass' class
|
||||
# ************************************************************
|
||||
try:
|
||||
with open(cfile, 'w') as cfgfile:
|
||||
cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n')
|
||||
# Go for config file creation
|
||||
bb.note("Create %s/extlinux.conf file for %s labels" % (subdir, labels))
|
||||
create_extlinux_file(cfile, labels, d)
|
||||
|
||||
if len(labels.split()) > 1:
|
||||
cfgfile.write('menu title Select the boot mode\n')
|
||||
|
||||
splashscreen_name = localdata.getVar('UBOOT_SPLASH_IMAGE')
|
||||
if not splashscreen_name:
|
||||
bb.warn('UBOOT_SPLASH_IMAGE not defined')
|
||||
else:
|
||||
cfgfile.write('MENU BACKGROUND /%s.bmp\n' % (splashscreen_name))
|
||||
|
||||
timeout = localdata.getVar('UBOOT_EXTLINUX_TIMEOUT')
|
||||
if timeout:
|
||||
cfgfile.write('TIMEOUT %s\n' % (timeout))
|
||||
|
||||
if len(labels.split()) > 1:
|
||||
default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
|
||||
if default:
|
||||
cfgfile.write('DEFAULT %s\n' % (default))
|
||||
|
||||
for label in labels.split():
|
||||
# **********************************************
|
||||
# Add localdata reset to fix var expansion issue
|
||||
# **********************************************
|
||||
localdata = bb.data.createCopy(d)
|
||||
|
||||
overrides = localdata.getVar('OVERRIDES')
|
||||
if not overrides:
|
||||
bb.fatal('OVERRIDES not defined')
|
||||
|
||||
localdata.setVar('OVERRIDES', label + ':' + overrides)
|
||||
|
||||
extlinux_console = localdata.getVar('UBOOT_EXTLINUX_CONSOLE')
|
||||
|
||||
menu_description = localdata.getVar('UBOOT_EXTLINUX_MENU_DESCRIPTION')
|
||||
if not menu_description:
|
||||
menu_description = label
|
||||
|
||||
root = localdata.getVar('UBOOT_EXTLINUX_ROOT')
|
||||
if not root:
|
||||
bb.fatal('UBOOT_EXTLINUX_ROOT not defined')
|
||||
|
||||
kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE')
|
||||
fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR')
|
||||
|
||||
fdt = localdata.getVar('UBOOT_EXTLINUX_FDT')
|
||||
|
||||
if fdt:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' %
|
||||
(menu_description, kernel_image, fdt))
|
||||
elif fdtdir:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' %
|
||||
(menu_description, kernel_image, fdtdir))
|
||||
else:
|
||||
cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image))
|
||||
|
||||
kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS')
|
||||
|
||||
initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD')
|
||||
if initrd:
|
||||
cfgfile.write('\tINITRD %s\n'% initrd)
|
||||
|
||||
kernel_args = root + " " + kernel_args
|
||||
cfgfile.write('\tAPPEND %s %s\n' % (kernel_args, extlinux_console))
|
||||
|
||||
except OSError:
|
||||
bb.fatal('Unable to open %s' % (cfile))
|
||||
# Manage UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG
|
||||
extra_extlinuxtargetconfigflag = d.getVarFlags('UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
extra_extlinuxtargetconfigflag.pop('doc', None)
|
||||
# Handle new targets and labels append
|
||||
if len(extra_extlinuxtargetconfig.split()) > 0:
|
||||
bb.note("Manage EXTRA target configuration:")
|
||||
for config in extra_extlinuxtargetconfig.split():
|
||||
# Init extra config vars:
|
||||
extra_extlinuxlabels = ""
|
||||
extra_cfile = ""
|
||||
for f, v in extra_extlinuxtargetconfigflag.items():
|
||||
if config == f:
|
||||
bb.note(">>> Loop for '%s' extra target config." % config)
|
||||
if len(v.split()) > 0:
|
||||
bb.note(">>> Set '%s' to extra_extlinuxlabels." % v)
|
||||
extra_extlinuxlabels = labels + ' ' + v
|
||||
extra_cfile = os.path.join(d.getVar('B'), subdir , config + '_' + 'extlinux.conf')
|
||||
else:
|
||||
bb.note(">>> No extra labels defined, no new config file to create")
|
||||
break
|
||||
# Manage new config file creation
|
||||
if extra_extlinuxlabels != "":
|
||||
bb.note(">>> Create %s/%s_extlinux.conf file for %s labels" % (subdir, config, extra_extlinuxlabels))
|
||||
create_extlinux_file(extra_cfile, extra_extlinuxlabels, d)
|
||||
}
|
||||
addtask create_multiextlinux_config before do_compile
|
||||
|
||||
|
|
@ -203,7 +238,7 @@ do_create_multiextlinux_config[cleandirs] += "${B}"
|
|||
# Manage specific var dependency:
|
||||
# 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 = "LABELS BOOTPREFIXES TIMEOUT DEFAULT_LABEL"
|
||||
UBOOT_EXTLINUX_TARGET_VARS = "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()])}"
|
||||
UBOOT_EXTLINUX_LABELS_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD"
|
||||
UBOOT_EXTLINUX_LABELS_CONFIGURED = "${@" ".join(map(lambda t: "%s" % d.getVar("UBOOT_EXTLINUX_LABELS_%s" % t), d.getVar('UBOOT_EXTLINUX_TARGETS').split()))}"
|
||||
|
|
|
|||
|
|
@ -93,37 +93,52 @@
|
|||
# FLASHLAYOUT_PARTITION_xxx
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Configure flashlayout file generation
|
||||
ENABLE_FLASHLAYOUT_CONFIG ??= "1"
|
||||
|
||||
FLASHLAYOUT_SUBDIR = "flashlayout_${PN}"
|
||||
FLASHLAYOUT_DESTDIR = "${IMGDEPLOYDIR}/${FLASHLAYOUT_SUBDIR}"
|
||||
|
||||
# Configure direct use of flashlayout file without automatic file generation
|
||||
ENABLE_FLASHLAYOUT_DEFAULT ??= "0"
|
||||
# Configure path for provided flashlayout file
|
||||
FLASHLAYOUT_DEFAULT_SRC ??= ""
|
||||
# Configure flashlayout file name default format
|
||||
FLASHLAYOUT_BASENAME ??= "FlashLayout"
|
||||
FLASHLAYOUT_SUFFIX ??= "tsv"
|
||||
# Configure flashlayout file generation for stm32wrapper4dbg
|
||||
ENABLE_FLASHLAYOUT_CONFIG_WRAPPER4DBG ??= "0"
|
||||
|
||||
# Configure folders for flashlayout file generation
|
||||
FLASHLAYOUT_DEPLOYDIR ?= "${DEPLOY_DIR}/images/${MACHINE}"
|
||||
FLASHLAYOUT_TOPDIR ?= "${WORKDIR}/flashlayout-destdir/"
|
||||
FLASHLAYOUT_SUBDIR ?= "flashlayout_${PN}"
|
||||
FLASHLAYOUT_DESTDIR = "${FLASHLAYOUT_TOPDIR}/${FLASHLAYOUT_SUBDIR}"
|
||||
|
||||
# Init bootscheme and config labels
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS ??= ""
|
||||
FLASHLAYOUT_CONFIG_LABELS ??= ""
|
||||
# Init partition image list (used to configure partitions)
|
||||
FLASHLAYOUT_PARTITION_IMAGES ??= ""
|
||||
# Init partition and type labels
|
||||
# Note: possible override with bootscheme and/or config
|
||||
FLASHLAYOUT_PARTITION_LABELS ??= ""
|
||||
FLASHLAYOUT_TYPE_LABELS ??= ""
|
||||
# Init flashlayout partition vars
|
||||
# Note: possible override with bootscheme and/or config and/or partition
|
||||
FLASHLAYOUT_PARTITION_ENABLE ??= ""
|
||||
FLASHLAYOUT_PARTITION_ID ??= ""
|
||||
FLASHLAYOUT_PARTITION_TYPE ??= ""
|
||||
FLASHLAYOUT_PARTITION_DEVICE ??= ""
|
||||
FLASHLAYOUT_PARTITION_OFFSET ??= ""
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD ??= ""
|
||||
FLASHLAYOUT_PARTITION_SIZE ??= ""
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS ??= ""
|
||||
|
||||
ENABLE_FLASHLAYOUT_DEFAULT ??= "0"
|
||||
FLASHLAYOUT_DEFAULT_SRC ??= ""
|
||||
|
||||
# List all specific dependencies to image_complete task for successfull build
|
||||
FLASHLAYOUT_DEPEND_TASKS ??= ""
|
||||
|
||||
# List configuration files to monitor to trigger new flashlayout generation
|
||||
FLASHLAYOUT_CONFIGURE_FILES ??= ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Make sure to add the flashlayout file creation after ROOTFS build
|
||||
# So we should identify image ROOTFS build and only the ROOTFS (for now)
|
||||
# As we know that PARTITIONS may be built as part of ROOTFS build, let's
|
||||
# avoid amending the partition images
|
||||
# -----------------------------------------------------------------------------
|
||||
python __anonymous () {
|
||||
flashlayout_config = d.getVar('ENABLE_FLASHLAYOUT_CONFIG')
|
||||
if flashlayout_config == "1":
|
||||
# -----------------------------------------------------------------------------
|
||||
# Make sure to add the flashlayout file creation after ROOTFS build
|
||||
# So we should identify image ROOTFS build and only the ROOTFS (for now)
|
||||
# As we know that PARTITIONS may be built as part of ROOTFS build, let's
|
||||
# avoid amending the partition images
|
||||
# -----------------------------------------------------------------------------
|
||||
if d.getVar('ENABLE_FLASHLAYOUT_CONFIG') == "1":
|
||||
# Gather all current tasks
|
||||
tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
|
||||
for task in tasks:
|
||||
|
|
@ -135,18 +150,35 @@ python __anonymous () {
|
|||
initramfs = d.getVar('INITRAMFS_IMAGE') or ""
|
||||
# Init INITRD image if any
|
||||
initrd = d.getVar('INITRD_IMAGE') or ""
|
||||
# Init partition list from PARTITIONS_IMAGE
|
||||
image_partitions = (d.getVar('PARTITIONS_IMAGE') or "").split()
|
||||
# We need to clearly identify ROOTFS build, not InitRAMFS one (if any)
|
||||
# Init partition list from PARTITIONS_CONFIG
|
||||
image_partitions = []
|
||||
# Append image_partitions list with all configured partition images:
|
||||
|
||||
partitionsconfigflags = d.getVarFlags('PARTITIONS_CONFIG')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
partitionsconfigflags.pop('doc', None)
|
||||
partitionsconfig = (d.getVar('PARTITIONS_CONFIG') or "").split()
|
||||
if len(partitionsconfig) > 0:
|
||||
for config in partitionsconfig:
|
||||
for f, v in partitionsconfigflags.items():
|
||||
if config == f:
|
||||
items = v.split(',')
|
||||
# Make sure about PARTITIONS_CONFIG contents
|
||||
if items[0] and len(items) > 5:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Only image,label,mountpoint,size,type can be specified!')
|
||||
# Make sure that we're dealing with partition image and not rootfs image
|
||||
if len(items) > 2 and items[2]:
|
||||
# Mount point is available, so we're dealing with partition image
|
||||
# Append image to image_partitions list
|
||||
image_partitions.append(d.expand(items[0]))
|
||||
break
|
||||
|
||||
# We need to clearly identify ROOTFS build, not InitRAMFS/initRD one (if any), not partition one either
|
||||
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name != initrd:
|
||||
# We need to make sure to add all extra dependencies as 'depends'
|
||||
# for image_complete task
|
||||
if d.getVar('FLASHLAYOUT_DEPEND_TASKS'):
|
||||
d.appendVarFlag('do_image_complete', 'depends', ' %s' % (d.getVar('FLASHLAYOUT_DEPEND_TASKS',)))
|
||||
# We can append the flashlayout file creation task to this ROOTFS build
|
||||
d.appendVar('IMAGE_POSTPROCESS_COMMAND', 'do_create_flashlayout_config ; ')
|
||||
# Append also the configuration files to properly take into account any updates
|
||||
d.appendVarFlag('do_image_complete', 'file-checksums', ' ${FLASHLAYOUT_CONFIGURE_FILES} ')
|
||||
# We add the flashlayout file creation task just after the do_image_complete for ROOTFS build
|
||||
bb.build.addtask('do_create_flashlayout_config', 'do_build', 'do_image_complete', d)
|
||||
# We add also the function that feeds the FLASHLAYOUT_PARTITION_* vars from PARTITIONS_CONFIG
|
||||
d.appendVarFlag('do_create_flashlayout_config', 'prefuncs', ' flashlayout_partition_image_config')
|
||||
}
|
||||
|
||||
def expand_var(var, bootscheme, config, partition, d):
|
||||
|
|
@ -179,30 +211,98 @@ def expand_var(var, bootscheme, config, partition, d):
|
|||
# Return expanded and/or overriden var value
|
||||
return expanded_var
|
||||
|
||||
def get_offset(new_offset, bootscheme, config, partition, d):
|
||||
def get_device(bootscheme, config, partition, d):
|
||||
"""
|
||||
This function return a couple of strings: offset, next_offset
|
||||
This function returns the device configured from FLASHLAYOUT_PARTITION_DEVICE for
|
||||
the requested partition for label and bootscheme configured.
|
||||
The var FLASHLAYOUT_PARTITION_DEVICE can be configured through different scheme
|
||||
FLASHLAYOUT_PARTITION_DEVICE = '<device0>:<dev0part_0> <dev0part_1>,<device1>:<dev1part0>'
|
||||
FLASHLAYOUT_PARTITION_DEVICE = '<device0>:default,<device1>:<dev1part0> <dev1part1>,<device2>:<dev2part0>'
|
||||
FLASHLAYOUT_PARTITION_DEVICE = '<device0>'
|
||||
Then, to set the device for the current partition, the logic followed is:
|
||||
If the configuration provides a single device, then partition device is set
|
||||
to this value.
|
||||
Else,
|
||||
If the current partition is specified in any of the configured partition
|
||||
lists, the matching configured device is set as partition device.
|
||||
And if the current partition is not found, the default device configured
|
||||
is set as partition device.
|
||||
"""
|
||||
# Set device configuration
|
||||
device_configs = expand_var('FLASHLAYOUT_PARTITION_DEVICE', bootscheme, config, partition, d)
|
||||
bb.note('>>> Selected FLASHLAYOUT_PARTITION_DEVICE: %s' % device_configs)
|
||||
|
||||
if len(device_configs.split(',')) == 1:
|
||||
bb.note('>>> Only one device configuration set for %s partition for %s label for %s bootscheme' % (partition, config, bootscheme))
|
||||
device = device_configs.split(':')[0]
|
||||
else:
|
||||
bb.note('>>> Multiple device configurations set for %s partition for %s label for %s bootscheme' % (partition, config, bootscheme))
|
||||
# Init default_device and device to empty string
|
||||
default_device = ''
|
||||
device = ''
|
||||
for device_config in device_configs.split(','):
|
||||
cfg_devc = device_config.split(':')[0].strip()
|
||||
cfg_part = device_config.split(':')[1] or 'default'
|
||||
# Make sure configuration is correct
|
||||
if len(cfg_devc.split()) > 1:
|
||||
bb.fatal('Only one device configuration can be specified: found %s for %s partition for %s label for %s bootscheme' % (cfg_devc, partition, config, bootscheme))
|
||||
# Configure the default device configuration if any
|
||||
if cfg_part == 'default':
|
||||
if default_device != '':
|
||||
bb.fatal('Found two "default" device configuration for %s partition for %s label for %s bootscheme in FLASHLAYOUT_PARTITION_DEVICE var' % (partition, config, bootscheme))
|
||||
default_device = cfg_devc
|
||||
bb.note('>>> Set default device configuration to %s' % default_device)
|
||||
else:
|
||||
# Find out if any device is configured for current partition
|
||||
for p in cfg_part.split():
|
||||
if p == partition:
|
||||
device = cfg_devc
|
||||
break
|
||||
# If 'device' is still empty for current partition, check if we can apply default device configuration
|
||||
if device == '':
|
||||
if default_device == '':
|
||||
bb.fatal('Not able to get device configuration for %s partition for %s label for %s bootscheme' % (partition, config, bootscheme))
|
||||
else:
|
||||
bb.note('>>> Configure device to default device setting')
|
||||
device = default_device
|
||||
bb.note('>>> New device configured: %s' % device)
|
||||
# Return the value computed
|
||||
return device
|
||||
|
||||
def get_offset(new_offset, current_device, bootscheme, config, partition, d):
|
||||
"""
|
||||
This function returns a couple of strings: offset, next_offset
|
||||
The offset is the one to use in flashlayout file for the requested partition,
|
||||
and next_offset is the one to use in flashlayout for next partition (if any).
|
||||
|
||||
The offset can be directly configured for the current partition through the
|
||||
FLASHLAYOUT_PARTITION_OFFSET variable. If this one is set to 'none' for the
|
||||
current partition, then we use the one provided through 'new_offset'.
|
||||
current partition, then we use the one provided through 'new_offset' if set,
|
||||
else we default to DEVICE_START_OFFSET_<device> one where <device> is feed from
|
||||
'current_device' input.
|
||||
|
||||
The next_offset is computed by first getting the FLASHLAYOUT_PARTITION_SIZE for
|
||||
the current partition, and we make sure to align properly the next_offset
|
||||
according to the DEVICE_ALIGNMENT_SIZE_<device> where <device> is feed from
|
||||
FLASHLAYOUT_PARTITION_DEVICE.
|
||||
'current_device' input.
|
||||
"""
|
||||
import re
|
||||
|
||||
# Get current_device alias
|
||||
device_alias = d.getVar('DEVICE_%s' % current_device) or ""
|
||||
|
||||
# Set offset
|
||||
offset = expand_var('FLASHLAYOUT_PARTITION_OFFSET', bootscheme, config, partition, d)
|
||||
bb.note('>>> Selected FLASHLAYOUT_PARTITION_OFFSET: %s' % offset)
|
||||
if offset == 'none':
|
||||
if new_offset == 'none':
|
||||
bb.fatal('Missing %s partition offset configuration for %s label for %s bootscheme!' % (partition, config, bootscheme))
|
||||
offset = new_offset
|
||||
bb.note('>>> 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"
|
||||
if start_offset == 'none':
|
||||
bb.fatal('Missing DEVICE_START_OFFSET_%s value' % device_alias)
|
||||
offset = start_offset
|
||||
else:
|
||||
offset = new_offset
|
||||
bb.note('>>> New offset configured: %s' % offset)
|
||||
|
||||
# Set next offset
|
||||
|
|
@ -213,11 +313,10 @@ def get_offset(new_offset, bootscheme, config, partition, d):
|
|||
next_offset = "none"
|
||||
else:
|
||||
if re.match('^0x.*$', offset):
|
||||
current_device = expand_var('FLASHLAYOUT_PARTITION_DEVICE', bootscheme, config, partition, d)
|
||||
bb.note('>>> Current device is %s' % current_device)
|
||||
alignment_size = d.getVar('DEVICE_ALIGNMENT_SIZE_%s' % current_device) or "none"
|
||||
bb.note('>>> Current device is %s (%s alias)' % (current_device, device_alias))
|
||||
alignment_size = d.getVar('DEVICE_ALIGNMENT_SIZE_%s' % device_alias) or "none"
|
||||
if alignment_size == 'none':
|
||||
bb.fatal('Missing DEVICE_ALIGNMENT_SIZE_%s value' % current_device)
|
||||
bb.fatal('Missing DEVICE_ALIGNMENT_SIZE_%s value' % device_alias)
|
||||
if ( int(partition_size) * 1024 ) % int(alignment_size, 16) == 0:
|
||||
bb.note('>>> The partition size properly follows %s erase size' % alignment_size)
|
||||
else:
|
||||
|
|
@ -236,7 +335,6 @@ def get_offset(new_offset, bootscheme, config, partition, d):
|
|||
# Return both offset and next offset
|
||||
return str(offset), str(next_offset)
|
||||
|
||||
|
||||
def get_binaryname(labeltype, bootscheme, config, partition, d):
|
||||
"""
|
||||
Return proper binary name to use in flashlayout file by applying any specific
|
||||
|
|
@ -260,7 +358,7 @@ def get_binaryname(labeltype, bootscheme, config, partition, d):
|
|||
binary_type = labeltype + '-' + bootscheme
|
||||
bb.note('>>> Binary type used: %s' % binary_type)
|
||||
# Check for any replace pattern
|
||||
replace_patterns = expand_var('BIN2BOOT_REPLACE_PATTERNS', bootscheme, config, partition, d)
|
||||
replace_patterns = expand_var('FLASHLAYOUT_PARTITION_REPLACE_PATTERNS', bootscheme, config, partition, d)
|
||||
bb.note('>>> Substitution patterns: %s' % replace_patterns)
|
||||
# Apply replacement patterns on binary_type
|
||||
if replace_patterns != 'none':
|
||||
|
|
@ -291,7 +389,7 @@ def flashlayout_search(d, files):
|
|||
search_path = d.getVar("BBPATH").split(":")
|
||||
for file in files.split():
|
||||
for p in search_path:
|
||||
file_path = p + "/" + file
|
||||
file_path = os.path.join(p, file)
|
||||
if os.path.isfile(file_path):
|
||||
return (True, file_path)
|
||||
return (False, "")
|
||||
|
|
@ -317,15 +415,16 @@ python do_create_flashlayout_config() {
|
|||
bb.fatal("FLASHLAYOUT_DEFAULT_SRC not defined, please set a proper value")
|
||||
if not flashlayout_src.strip():
|
||||
bb.fatal("No static flashlayout file configured, nothing to do")
|
||||
found, f = flashlayout_search(d, flashlayout_src)
|
||||
if found:
|
||||
flashlayout_staticname=os.path.basename(f)
|
||||
flashlayout_file = d.expand("${FLASHLAYOUT_DESTDIR}/%s" % flashlayout_staticname)
|
||||
shutil.copy2(f, flashlayout_file)
|
||||
bb.note('Copy %s to output file %s' % (f, flashlayout_file))
|
||||
return
|
||||
else:
|
||||
bb.fatal("Configure static file: %s not found" % flashlayout_src)
|
||||
for fl_src in flashlayout_src.split():
|
||||
found, f = flashlayout_search(d, fl_src)
|
||||
if found:
|
||||
flashlayout_staticname=os.path.basename(f)
|
||||
flashlayout_file = os.path.join(d.getVar('FLASHLAYOUT_DESTDIR'), flashlayout_staticname)
|
||||
shutil.copy2(f, flashlayout_file)
|
||||
bb.note('Copy %s to output file %s' % (f, flashlayout_file))
|
||||
else:
|
||||
bb.fatal("Configure static file: %s not found" % fl_src)
|
||||
return
|
||||
|
||||
# Set bootschemes for partition var override configuration
|
||||
bootschemes = d.getVar('FLASHLAYOUT_BOOTSCHEME_LABELS')
|
||||
|
|
@ -341,7 +440,6 @@ python do_create_flashlayout_config() {
|
|||
|
||||
for bootscheme in bootschemes.split():
|
||||
bb.note('*** Loop for bootscheme label: %s' % bootscheme)
|
||||
|
||||
# Get the different flashlayout config label
|
||||
configs = expand_var('FLASHLAYOUT_CONFIG_LABELS', bootscheme, '', '', d)
|
||||
# Make sure there is no '_' in FLASHLAYOUT_CONFIG_LABELS
|
||||
|
|
@ -350,16 +448,25 @@ python do_create_flashlayout_config() {
|
|||
bb.fatal("Please remove all '_' for configs defined in FLASHLAYOUT_CONFIG_LABELS")
|
||||
bb.note('FLASHLAYOUT_CONFIG_LABELS: %s' % configs)
|
||||
|
||||
if configs.strip() == 'none':
|
||||
bb.note("FLASHLAYOUT_CONFIG_LABELS is none, so no flashlayout file to generate.")
|
||||
continue
|
||||
# Create bootscheme subfolder for flashlayout files
|
||||
flashlayout_subfolder_path = os.path.join(d.getVar('FLASHLAYOUT_DESTDIR'), bootscheme)
|
||||
bb.utils.mkdirhier(flashlayout_subfolder_path)
|
||||
|
||||
for config in configs.split():
|
||||
bb.note('*** Loop for config label: %s' % config)
|
||||
# Set labeltypes list
|
||||
labeltypes = expand_var('FLASHLAYOUT_TYPE_LABELS', bootscheme, config, '', d)
|
||||
bb.note('FLASHLAYOUT_TYPE_LABELS: %s' % labeltypes)
|
||||
if labeltypes == 'none':
|
||||
if labeltypes.strip() == 'none':
|
||||
bb.note("FLASHLAYOUT_TYPE_LABELS is none, so no flashlayout file to generate.")
|
||||
continue
|
||||
for labeltype in labeltypes.split():
|
||||
bb.note('*** Loop for label type: %s' % labeltype)
|
||||
# Init current label
|
||||
current_label = labeltype
|
||||
# Init flashlayout file name
|
||||
if config == 'none':
|
||||
config_append = ''
|
||||
|
|
@ -369,7 +476,7 @@ python do_create_flashlayout_config() {
|
|||
labeltype_append = ''
|
||||
else:
|
||||
labeltype_append = '_' + labeltype + '-' + bootscheme
|
||||
flashlayout_file = d.expand("${FLASHLAYOUT_DESTDIR}/${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_append, labeltype_append))
|
||||
flashlayout_file = os.path.join(flashlayout_subfolder_path, d.expand("${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_append, labeltype_append)))
|
||||
# Get the partition list to write in flashlayout file
|
||||
partitions = expand_var('FLASHLAYOUT_PARTITION_LABELS', bootscheme, config, '', d)
|
||||
bb.note('FLASHLAYOUT_PARTITION_LABELS: %s' % partitions)
|
||||
|
|
@ -383,6 +490,8 @@ python do_create_flashlayout_config() {
|
|||
fl_file.write('#Opt\tId\tName\tType\tIP\tOffset\tBinary\n')
|
||||
# Init partition next offset to 'none'
|
||||
partition_nextoffset = "none"
|
||||
# Init partition previous device to 'none'
|
||||
partition_prevdevice = "none"
|
||||
for partition in partitions.split():
|
||||
bb.note('*** Loop for partition: %s' % partition)
|
||||
# Init partition settings
|
||||
|
|
@ -390,9 +499,14 @@ python do_create_flashlayout_config() {
|
|||
partition_id = expand_var('FLASHLAYOUT_PARTITION_ID', bootscheme, config, partition, d)
|
||||
partition_name = partition
|
||||
partition_type = expand_var('FLASHLAYOUT_PARTITION_TYPE', bootscheme, config, partition, d)
|
||||
partition_device = expand_var('FLASHLAYOUT_PARTITION_DEVICE', bootscheme, config, partition, d)
|
||||
partition_device = get_device(bootscheme, config, partition, d)
|
||||
# Reset partition_nextoffset to 'none' in case partition device has changed
|
||||
if partition_device != partition_prevdevice:
|
||||
partition_nextoffset = "none"
|
||||
# Save partition current device to previous one for next loop
|
||||
partition_prevdevice = partition_device
|
||||
# Get partition offset
|
||||
partition_offset, partition_nextoffset = get_offset(partition_nextoffset, bootscheme, config, partition, d)
|
||||
partition_offset, partition_nextoffset = get_offset(partition_nextoffset, partition_device, bootscheme, config, partition, d)
|
||||
# Get binary name
|
||||
partition_bin2load = get_binaryname(labeltype, bootscheme, config, partition, d)
|
||||
# Be verbose in log file
|
||||
|
|
@ -405,6 +519,14 @@ python do_create_flashlayout_config() {
|
|||
bb.note('>>> FLASHLAYOUT_PARTITION_OFFSET: %s' % partition_offset)
|
||||
bb.note('>>> FLASHLAYOUT_PARTITION_BIN2LOAD: %s' % partition_bin2load)
|
||||
bb.note('>>> done')
|
||||
# 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.note('>>> 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.note('>>> 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))
|
||||
|
|
@ -444,3 +566,99 @@ python do_create_flashlayout_config() {
|
|||
else:
|
||||
os.remove(tmp_flashlayout_file)
|
||||
}
|
||||
do_create_flashlayout_config[dirs] = "${FLASHLAYOUT_DESTDIR}"
|
||||
|
||||
FLASHLAYOUT_DEPEND_TASKS ?= ""
|
||||
do_create_flashlayout_config[depends] += "${FLASHLAYOUT_DEPEND_TASKS}"
|
||||
|
||||
SSTATETASKS += "do_create_flashlayout_config"
|
||||
do_create_flashlayout_config[cleandirs] = "${FLASHLAYOUT_TOPDIR}"
|
||||
do_create_flashlayout_config[sstate-inputdirs] = "${FLASHLAYOUT_TOPDIR}"
|
||||
do_create_flashlayout_config[sstate-outputdirs] = "${FLASHLAYOUT_DEPLOYDIR}/"
|
||||
|
||||
python do_create_flashlayout_config_setscene () {
|
||||
sstate_setscene(d)
|
||||
}
|
||||
addtask do_create_flashlayout_config_setscene
|
||||
|
||||
python flashlayout_partition_image_config() {
|
||||
"""
|
||||
Set the different flashlayout partition vars for the configure partition
|
||||
images.
|
||||
Based on PARTITIONS_CONFIG, feed:
|
||||
FLASHLAYOUT_PARTITION_IMAGES
|
||||
FLASHLAYOUT_PARTITION_ID_
|
||||
FLASHLAYOUT_PARTITION_TYPE_
|
||||
FLASHLAYOUT_PARTITION_SIZE_
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_
|
||||
"""
|
||||
|
||||
partitionsconfigflags = d.getVarFlags('PARTITIONS_CONFIG')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
partitionsconfigflags.pop('doc', None)
|
||||
partitionsconfig = (d.getVar('PARTITIONS_CONFIG') or "").split()
|
||||
|
||||
if len(partitionsconfig) > 0:
|
||||
# Init default partition id for binary type and other
|
||||
id_bin = 4
|
||||
id_oth = 33
|
||||
for config in partitionsconfig:
|
||||
for f, v in partitionsconfigflags.items():
|
||||
if config == f:
|
||||
items = v.split(',')
|
||||
# Make sure about PARTITIONS_CONFIG contents
|
||||
if items[0] and len(items) > 5:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Only image,label,mountpoint,size,type can be specified!')
|
||||
if items[1]:
|
||||
bb.debug(1, "Appending %s to FLASHLAYOUT_PARTITION_IMAGES." % items[1])
|
||||
d.appendVar('FLASHLAYOUT_PARTITION_IMAGES', ' ' + items[1])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing image label setting')
|
||||
# Init flashlayout label
|
||||
fl_label = d.expand(items[1])
|
||||
if items[2] == '':
|
||||
# There is no mountpoint specified, so we apply rootfs image format
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD_%s to %s." % (fl_label, items[0] + "-${MACHINE}.ext4"))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD_%s' % fl_label, items[0] + "-${MACHINE}.ext4")
|
||||
else:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_BIN2LOAD_%s to %s." % (fl_label, items[0] + "-${DISTRO}-${MACHINE}.ext4"))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_BIN2LOAD_%s' % fl_label, items[0] + "-${DISTRO}-${MACHINE}.ext4")
|
||||
if items[3]:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_SIZE_%s to %s." % (fl_label, items[3]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_SIZE_%s' % fl_label, items[3])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing PARTITION_SIZE setting for % label' % fl_label)
|
||||
if items[4]:
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_TYPE_%s to %s." % (fl_label, items[4]))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_TYPE_%s' % fl_label, items[4])
|
||||
# Compute partition id according to type set
|
||||
if items[4] == 'Binary':
|
||||
part_id = '0x{0:0{1}X}'.format(id_bin, 2)
|
||||
id_bin = id_bin + 1
|
||||
else:
|
||||
part_id = '0x{0:0{1}X}'.format(id_oth, 2)
|
||||
id_oth = id_oth + 1
|
||||
bb.debug(1, "Set FLASHLAYOUT_PARTITION_ID_%s to %s." % (fl_label, part_id))
|
||||
d.setVar('FLASHLAYOUT_PARTITION_ID_%s' % fl_label, "%s" % part_id)
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing PARTITION_TYPE setting for % label' % fl_label)
|
||||
break
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Manage specific var dependency:
|
||||
# Because of local overrides within create_flashlayout_config() function, we
|
||||
# need to make sure to add each variables to the vardeps list.
|
||||
|
||||
FLASHLAYOUT_LABELS_VARS = "CONFIG_LABELS PARTITION_LABELS TYPE_LABELS"
|
||||
FLASHLAYOUT_LABELS_OVERRIDES = "${@' '.join('%s %s %s_%s' % (b, c, 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(map(lambda o: "%s" % d.getVar("FLASHLAYOUT_PARTITION_LABELS_%s" % o), d.getVar('FLASHLAYOUT_LABELS_OVERRIDES').split()))}"
|
||||
FLASHLAYOUT_PARTITION_OVERRIDES = "${@' '.join('%s %s %s_%s' % (o, p, 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"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_CONFIGURED = "${@" ".join(map(lambda p: "%s" % d.getVar("DEVICE_%s" % p), 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('FLASHLAYOUT_PARTITION_DEVICE_CONFIGURED').split()])}"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
inherit image_types
|
||||
|
||||
do_image_stmultiubi[depends] += "mtd-utils-native:do_populate_sysroot"
|
||||
do_image_stmultiubi[depends] += " \
|
||||
mtd-utils-native:do_populate_sysroot \
|
||||
bc-native:do_populate_sysroot \
|
||||
"
|
||||
|
||||
python stmultiub_environment () {
|
||||
if d.getVar('MULTIUBI_BUILD'):
|
||||
|
|
@ -39,36 +42,23 @@ IMAGE_CMD_stmultiubi () {
|
|||
|
||||
ENABLE_MULTIVOLUME_UBI ?= "1"
|
||||
|
||||
st_multivolume_ubifs() {
|
||||
# This function depends on IMAGE_FSTYPES 'stmultiubi'
|
||||
if [ "${@bb.utils.contains('IMAGE_FSTYPES', 'stmultiubi', '1', '0', d)}" != "1" ]; then
|
||||
return
|
||||
fi
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define the list of volumes for the multi UBIFS with 'STM32MP_UBI_VOLUME' var.
|
||||
# The format to follow is:
|
||||
# STM32MP_UBI_VOLUME = "<VOL_NAME_1>:<VOL_SIZE_1>:<VOL_TYPE_1> <VOL_NAME_2>:<VOL_SIZE_2>"
|
||||
# Note that:
|
||||
# - 'VOL_NAME' is the image volume name
|
||||
# - 'VOL_SIZE' is set in KiB
|
||||
# - 'VOL_TYPE' is optional part and could be 'empty' to add empty UBI with
|
||||
# volume name set to 'VOL_NAME'
|
||||
# -----------------------------------------------------------------------------
|
||||
STM32MP_UBI_VOLUME ?= ""
|
||||
|
||||
st_multivolume_ubifs() {
|
||||
if [ "${ENABLE_MULTIVOLUME_UBI}" != "1" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define the list of volumes for the multi UBIFS with 'STM32MP_UBI_VOLUME' var.
|
||||
# The format to follow is:
|
||||
# STM32MP_UBI_VOLUME = "<VOL_NAME_1>:<VOL_SIZE_1>:<VOL_TYPE_1> <VOL_NAME_2>:<VOL_SIZE_2>"
|
||||
# Note that:
|
||||
# - 'VOL_NAME' should follow 'IMAGE_LINK_NAME' format
|
||||
# - 'VOL_SIZE' is set in KiB
|
||||
# - 'VOL_TYPE' is optional part and could be 'empty' to add empty UBI with name 'VOL_NAME'
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# We check that user as explicitly provided multi volume UBIFS var
|
||||
# and that partition images are also provided
|
||||
if [ -n "${STM32MP_UBI_VOLUME}" ] && [ -n "${PARTITIONS_IMAGE}" ]; then
|
||||
|
||||
# We should only generate multi volume UBIFS for rootfs image and not
|
||||
# any of the partition image one
|
||||
for partition in ${PARTITIONS_IMAGE}; do
|
||||
[ "${partition}-${DISTRO}-${MACHINE}" = "${IMAGE_LINK_NAME}" ] && return
|
||||
done
|
||||
|
||||
if [ -n "${STM32MP_UBI_VOLUME}" ]; then
|
||||
. ${T}/stmultiubi_environment
|
||||
|
||||
# Get total volume number to handle
|
||||
|
|
@ -99,6 +89,13 @@ st_multivolume_ubifs() {
|
|||
echo vol_name=${volume_name} >> ${cfg_filename}
|
||||
echo vol_flags=autoresize >> ${cfg_filename}
|
||||
else
|
||||
# Update volume_name to fit image link name scheme
|
||||
if [ "${volume_name}" = "${IMAGE_BASENAME}" ]; then
|
||||
volume_name=${IMAGE_LINK_NAME}
|
||||
else
|
||||
# Partiton images use case, so make sure to append DISTRO and MACHINE
|
||||
volume_name=${volume_name}-${DISTRO}-${MACHINE}
|
||||
fi
|
||||
if [ -z "${volume_type}" ]; then
|
||||
bbnote "The UBI volume type is not set. Use default configuration for ${volume_name}"
|
||||
bbnote "Append ${extra_size}KiB extra space to UBIFS volume size"
|
||||
|
|
@ -114,7 +111,7 @@ st_multivolume_ubifs() {
|
|||
elif [ -e ${DEPLOY_DIR_IMAGE}/${volume_name}_${name}.ubinize.cfg.ubi ]; then
|
||||
ubinize_cfg=${DEPLOY_DIR_IMAGE}/${volume_name}_${name}.ubinize.cfg.ubi
|
||||
else
|
||||
bbfatal "Can't find any '${name}' ubinize config file for ${volume_name} in ${IMGDEPLOYDIR} or ${DEPLOY_DIR_IMAGE} folders"
|
||||
bbfatal "Can't find any '${volume_name}_${name}.ubinize.cfg.ubi' config file from ${IMGDEPLOYDIR} or ${DEPLOY_DIR_IMAGE} folders"
|
||||
fi
|
||||
# Create temporary copy of ubinize config file for update
|
||||
cp ${ubinize_cfg} ${WORKDIR}/
|
||||
|
|
@ -159,5 +156,3 @@ st_multivolume_ubifs() {
|
|||
done
|
||||
fi
|
||||
}
|
||||
|
||||
IMAGE_POSTPROCESS_COMMAND += " st_multivolume_ubifs ;"
|
||||
|
|
|
|||
|
|
@ -9,15 +9,92 @@
|
|||
#
|
||||
|
||||
ENABLE_PARTITIONS_IMAGE ?= "1"
|
||||
PARTITIONS_IMAGE ?= ""
|
||||
|
||||
PARTITIONS_CONFIG ??= ""
|
||||
PARTITIONS_IMAGE ??= ""
|
||||
PARTITIONS_MOUNTPOINT ??= ""
|
||||
|
||||
python __anonymous () {
|
||||
# We check first if it is requested to generate any partition images
|
||||
if d.getVar('ENABLE_PARTITIONS_IMAGE') != "1":
|
||||
bb.note('ENABLE_PARTITIONS_IMAGE not enabled')
|
||||
return
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Update the partition configuration set by user
|
||||
# -----------------------------------------------------------------------------
|
||||
partitionsconfigflags = d.getVarFlags('PARTITIONS_CONFIG')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
partitionsconfigflags.pop('doc', None)
|
||||
partitionsconfig = (d.getVar('PARTITIONS_CONFIG') or "").split()
|
||||
# Init image_summary_list
|
||||
image_summary_list = ''
|
||||
if len(partitionsconfig) > 0:
|
||||
for config in partitionsconfig:
|
||||
for f, v in partitionsconfigflags.items():
|
||||
if config == f:
|
||||
items = v.split(',')
|
||||
if items[0]:
|
||||
if len(items) > 5:
|
||||
raise bb.parse.SkipRecipe('Only image,label,mountpoint,size,type can be specified!')
|
||||
# Make sure that we're dealing with partition image and not rootfs image
|
||||
if len(items) > 2 and items[2]:
|
||||
# Mount point available, so we're dealing with partition image
|
||||
# PARTITIONS_IMAGE appending
|
||||
bb.debug(1, "Appending '%s' to PARTITIONS_IMAGE." % items[0])
|
||||
d.appendVar('PARTITIONS_IMAGE', ' ' + items[0])
|
||||
# PARTITIONS_MOUNTPOINT appending
|
||||
bb.debug(1, "Appending '%s' to PARTITIONS_MOUNTPOINT." % items[2])
|
||||
d.appendVar('PARTITIONS_MOUNTPOINT', ' ' + items[2])
|
||||
|
||||
# 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])
|
||||
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')
|
||||
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])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing label setting for %s image' % items[0])
|
||||
if items[2]:
|
||||
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])
|
||||
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])
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing size setting for %s image' % items[0])
|
||||
|
||||
# Manage IMAGE_SUMMARY_LIST configuration according to PARTITION_CONFIG set
|
||||
if d.getVar('ENABLE_IMAGE_LICENSE_SUMMARY') == "1":
|
||||
if not items[2]:
|
||||
# Set '/' as default mountpoint for rootfs in IMAGE_SUMMARY_LIST
|
||||
items[2] = '/'
|
||||
image_summary_list += items[0] + ':' + items[2] + ';'
|
||||
|
||||
# Manage multiubi volume list STM32MP_UBI_VOLUME
|
||||
if bb.utils.contains('IMAGE_FSTYPES', 'stmultiubi', True, False, d) and d.getVar('ENABLE_MULTIVOLUME_UBI') == "1":
|
||||
bb.debug(1, "Appending '%s' image with %s size to STM32MP_UBI_VOLUME." % (items[0], items[3]))
|
||||
d.appendVar('STM32MP_UBI_VOLUME', ' ' + items[0] + ':' + items[3])
|
||||
|
||||
else:
|
||||
bb.fatal('[PARTITIONS_CONFIG] Missing image setting')
|
||||
|
||||
break
|
||||
|
||||
# Reset IMAGE_LIST_SUMMARY with computed partition configuration
|
||||
if d.getVar('ENABLE_IMAGE_LICENSE_SUMMARY') == "1":
|
||||
bb.debug(1, "Set IMAGE_SUMMARY_LIST with configuration: %s." % image_summary_list)
|
||||
d.setVar('IMAGE_SUMMARY_LIST', image_summary_list)
|
||||
|
||||
# Init partition list from PARTITIONS_IMAGE
|
||||
image_partitions = (d.getVar('PARTITIONS_IMAGE') or "").split()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Make sure to append the partition build to current image target
|
||||
# -----------------------------------------------------------------------------
|
||||
if len(image_partitions) > 0:
|
||||
# Gather all current tasks
|
||||
tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
|
||||
|
|
@ -28,33 +105,45 @@ python __anonymous () {
|
|||
current_image_name = d.getVar('PN') or ""
|
||||
# Init RAMFS image if any
|
||||
initramfs = d.getVar('INITRAMFS_IMAGE') or ""
|
||||
|
||||
# Init INITRD image if any
|
||||
initrd = d.getVar('INITRD_IMAGE') or ""
|
||||
# We need to append partition images generation only to image
|
||||
# that are not one of the defined partitions and not the InitRAMFS image.
|
||||
# Without this check we would create circular dependency
|
||||
if current_image_name not in image_partitions and current_image_name != initramfs:
|
||||
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name != initrd:
|
||||
for partition in image_partitions:
|
||||
bb.debug(1, "Appending %s image build to 'do_image_complete' depends tasks." % partition)
|
||||
d.appendVarFlag('do_image_complete', 'depends', ' %s:do_image_complete' % partition)
|
||||
bb.debug(1, "Appending 'image_rootfs_image_clean_task' to IMAGE_PREPROCESS_COMMAND.")
|
||||
d.appendVar('IMAGE_PREPROCESS_COMMAND', 'image_rootfs_image_clean_task;')
|
||||
# Manage multiubi volume build enable for current image
|
||||
if bb.utils.contains('IMAGE_FSTYPES', 'stmultiubi', True, False, d) and d.getVar('ENABLE_MULTIVOLUME_UBI') == "1":
|
||||
bb.debug(1, "Appending 'st_multivolume_ubifs' to IMAGE_POSTPROCESS_COMMAND.")
|
||||
d.appendVar('IMAGE_POSTPROCESS_COMMAND', 'st_multivolume_ubifs;')
|
||||
}
|
||||
|
||||
image_rootfs_image_clean_task () {
|
||||
if [ ${ENABLE_PARTITIONS_IMAGE} -ne "1" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
for name in ${PARTITIONS_IMAGE};
|
||||
do
|
||||
if `echo ${IMAGE_NAME} | grep -q $name` ;
|
||||
then
|
||||
return;
|
||||
fi
|
||||
done
|
||||
bbnote "Clean mount point on ${IMAGE_NAME}:"
|
||||
LIST=`ls -l ${IMAGE_ROOTFS}`
|
||||
for dir in ${PARTITIONS_MOUNTPOINT_IMAGE};
|
||||
do
|
||||
bbnote "$dir on ${IMAGE_NAME} are cleanned because it's a mount point."
|
||||
rm -rf ${IMAGE_ROOTFS}/$dir/*
|
||||
image_rootfs_image_clean_task() {
|
||||
bbnote "PARTITIONS_IMAGE"
|
||||
bbnote ">>> ${PARTITIONS_IMAGE}"
|
||||
bbnote "PARTITIONS_MOUNTPOINT"
|
||||
bbnote ">>> ${PARTITIONS_MOUNTPOINT}"
|
||||
unset i j
|
||||
for img in ${PARTITIONS_IMAGE}; do
|
||||
i=$(expr $i + 1);
|
||||
for part in ${PARTITIONS_MOUNTPOINT}; do
|
||||
j=$(expr $j + 1);
|
||||
if [ $j -eq $i ]; then
|
||||
bbnote "Expecting to clean folder:"
|
||||
bbnote ">>> ${IMAGE_ROOTFS}/$part"
|
||||
if [ -d ${IMAGE_ROOTFS}/$part ]; then
|
||||
rm -rf ${IMAGE_ROOTFS}/$part/*
|
||||
bbnote ">>> DONE"
|
||||
else
|
||||
bbnote ">>> NOT DONE : $part folder doesn't exist in image rootfs"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
unset i
|
||||
}
|
||||
IMAGE_PREPROCESS_COMMAND_append = " image_rootfs_image_clean_task; "
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ require conf/machine/include/st-machine-features-stm32mp.inc
|
|||
require conf/machine/include/st-machine-flashlayout-stm32mp.inc
|
||||
require conf/machine/include/st-machine-flashlayout-deleteall-stm32mp.inc
|
||||
require conf/machine/include/st-machine-flashlayout-extensible-stm32mp.inc
|
||||
require conf/machine/include/st-machine-storage-device-stm32mp.inc
|
||||
|
||||
# Define specific common machine name
|
||||
MACHINEOVERRIDES .= ":stcommon"
|
||||
|
|
@ -16,13 +17,13 @@ MACHINEOVERRIDES .= ":stm32mpcommon"
|
|||
# boot scheme
|
||||
# =========================================================================
|
||||
# List of supported boot schemes
|
||||
BOOTSCHEME_LABELS ??= "basic trusted optee"
|
||||
BOOTSCHEME_LABELS ??= "trusted optee"
|
||||
|
||||
# =========================================================================
|
||||
# boot device
|
||||
# =========================================================================
|
||||
# List of supported boot devices
|
||||
BOOTDEVICE_LABELS ??= "emmc nand-4-256 nor-emmc nor-nand-4-256 nor-sdcard sdcard"
|
||||
BOOTDEVICE_LABELS ??= "emmc nand-4-256 nor-sdcard sdcard"
|
||||
|
||||
# =========================================================================
|
||||
# Machine settings
|
||||
|
|
@ -30,9 +31,13 @@ BOOTDEVICE_LABELS ??= "emmc nand-4-256 nor-emmc nor-nand-4-256 nor-sdcard sdcard
|
|||
# Default machine feature
|
||||
MACHINE_FEATURES = "usbhost usbgadget alsa screen ext2"
|
||||
MACHINE_FEATURES_append = " ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)} "
|
||||
MACHINE_FEATURES_append = " watchdog "
|
||||
MACHINE_FEATURES_append = " tpm2 "
|
||||
|
||||
MACHINE_FEATURES_append = " autoresize "
|
||||
# Remove autoresize package from DISTRO_EXTRA_RRECOMMENDS to add it explicitly
|
||||
# in our bootfs image instead of rootfs
|
||||
DISTRO_EXTRA_RRECOMMENDS_remove = "${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '${AUTORESIZE}', '', d)}"
|
||||
|
||||
# Default serial consoles (TTYs) to enable using getty
|
||||
# Before kernel 4.18, serial console are ttyS3 but after is ttySTM0
|
||||
SERIAL_CONSOLES = "115200;ttySTM0"
|
||||
|
|
@ -56,51 +61,35 @@ STM32MP_DEVICETREE_append = " ${STM32MP_DT_FILES_EV} "
|
|||
# =========================================================================
|
||||
# Machine specific packages
|
||||
# =========================================================================
|
||||
WIFI_SUSPEND = "${@bb.utils.contains('DISTRO_FEATURES','systemd',' wifi-suspend ','',d)}"
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'linux-firmware-bcm43430', '', d)} "
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', '${WIFI_SUSPEND}', '', d)} "
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " m4projects-stm32mp1 "
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " linux-examples-stm32mp1 "
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " m4fwcoredump "
|
||||
# Enable Software watchdog when sysvinit
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','sysvinit',' watchdog ','',d)} "
|
||||
|
||||
# =========================================================================
|
||||
# Image
|
||||
# =========================================================================
|
||||
# For sparse, align on 4096b
|
||||
IMAGE_ROOTFS_ALIGNMENT ?= "4"
|
||||
|
||||
# Enable licence summary and configure License content generation
|
||||
ENABLE_IMAGE_LICENSE_SUMMARY ?= "1"
|
||||
|
||||
# Partitions configuration
|
||||
IMAGE_CLASSES += "st-partitions-image"
|
||||
|
||||
# Define image to use for extra partitions
|
||||
STM32MP_BOOTFS_IMAGE = "st-image-bootfs"
|
||||
STM32MP_BOOTFS_LABEL = "boot"
|
||||
STM32MP_BOOTFS_MOUNTPOINT_IMAGE = "/boot"
|
||||
STM32MP_USERFS_IMAGE = "st-image-userfs"
|
||||
STM32MP_USERFS_LABEL = "userfs"
|
||||
STM32MP_USERFS_MOUNTPOINT_IMAGE = "/usr/local"
|
||||
STM32MP_VENDORFS_IMAGE = "st-image-vendorfs"
|
||||
STM32MP_VENDORFS_LABEL = "vendorfs"
|
||||
STM32MP_VENDORFS_MOUNTPOINT_IMAGE = "/vendor"
|
||||
|
||||
# Configure use of VENDORFS partition
|
||||
ST_VENDORFS ?= "1"
|
||||
|
||||
# Define extra partition to build
|
||||
PARTITIONS_IMAGE = "${STM32MP_BOOTFS_IMAGE}"
|
||||
PARTITIONS_IMAGE += "${STM32MP_USERFS_IMAGE}"
|
||||
PARTITIONS_IMAGE += "${@bb.utils.contains('ST_VENDORFS','1','${STM32MP_VENDORFS_IMAGE}','',d)}"
|
||||
PARTITIONS_MOUNTPOINT_IMAGE = "${STM32MP_BOOTFS_MOUNTPOINT_IMAGE}"
|
||||
PARTITIONS_MOUNTPOINT_IMAGE += "${STM32MP_USERFS_MOUNTPOINT_IMAGE}"
|
||||
PARTITIONS_MOUNTPOINT_IMAGE += "${@bb.utils.contains('ST_VENDORFS','1','${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}','',d)}"
|
||||
|
||||
# Provide list of partition to mount
|
||||
MOUNT_PARTITIONS_LIST = "${STM32MP_BOOTFS_LABEL},${STM32MP_BOOTFS_MOUNTPOINT_IMAGE}"
|
||||
MOUNT_PARTITIONS_LIST += "${STM32MP_USERFS_LABEL},${STM32MP_USERFS_MOUNTPOINT_IMAGE}"
|
||||
MOUNT_PARTITIONS_LIST += "${@bb.utils.contains('ST_VENDORFS','1','${STM32MP_VENDORFS_LABEL},${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}','',d)}"
|
||||
STM32MP_BOOTFS_IMAGE ?= "st-image-bootfs"
|
||||
STM32MP_BOOTFS_LABEL ?= "boot"
|
||||
STM32MP_BOOTFS_MOUNTPOINT ?= "/boot"
|
||||
STM32MP_USERFS_IMAGE ?= "st-image-userfs"
|
||||
STM32MP_USERFS_LABEL ?= "userfs"
|
||||
STM32MP_USERFS_MOUNTPOINT ?= "/usr/local"
|
||||
STM32MP_VENDORFS_IMAGE ?= "st-image-vendorfs"
|
||||
STM32MP_VENDORFS_LABEL ?= "vendorfs"
|
||||
STM32MP_VENDORFS_MOUNTPOINT ?= "/vendor"
|
||||
|
||||
# Define image partition size (supposed to be set as max size in image recipe)
|
||||
# Proposed value for bootfs is 64MB
|
||||
BOOTFS_PARTITION_SIZE = "65536"
|
||||
BOOTFS_PARTITION_SIZE ?= "65536"
|
||||
# Proposed value for rootfs should fit our highest constraint: NAND size (1GiB)
|
||||
# For optee bootscheme we have the maximum partitions:
|
||||
# FSBL1 + SSBL + SSBL2 + TEEH + TEED + TEEX + Multivolume UBI = NAND size
|
||||
|
|
@ -116,35 +105,38 @@ BOOTFS_PARTITION_SIZE = "65536"
|
|||
# rootfs < 1016.5MiB - (256KiB + 256KiB + 64MiB + 16MiB + 128MiB + 53360KiB + 4 * 9 * 256KiB)
|
||||
# rootfs < 746.8MiB
|
||||
# Proposed value for rootfs is 746MiB
|
||||
ROOTFS_PARTITION_SIZE = "763904"
|
||||
# Define max size for ROOTFS image being built to this value
|
||||
IMAGE_ROOTFS_MAXSIZE ?= "763904"
|
||||
# And configure the ROOTFS_PARTITION_SIZE variable accordingly
|
||||
ROOTFS_PARTITION_SIZE ?= "${IMAGE_ROOTFS_MAXSIZE}"
|
||||
# Proposed value for userfs is 128MB (4*32MB)
|
||||
USERFS_PARTITION_SIZE = "131072"
|
||||
USERFS_PARTITION_SIZE ?= "131072"
|
||||
# Proposed value for vendorfs is 16MB
|
||||
VENDORFS_PARTITION_SIZE = "16384"
|
||||
VENDORFS_PARTITION_SIZE ?= "16384"
|
||||
|
||||
# Define the max size for ROOTFS image being built
|
||||
# On other image partition such settings is directly done in image recipe
|
||||
IMAGE_ROOTFS_MAXSIZE ?= "${ROOTFS_PARTITION_SIZE}"
|
||||
# Enable use of extra partition(s)
|
||||
ST_BOOTFS ?= "1"
|
||||
ST_VENDORFS ?= "1"
|
||||
ST_USERFS ?= "1"
|
||||
|
||||
# Partitions configuration
|
||||
PARTITIONS_CONFIG += "${@bb.utils.contains('ST_BOOTFS', '1', 'bootfs', '', d)}"
|
||||
PARTITIONS_CONFIG += "${@bb.utils.contains('ST_VENDORFS', '1', 'vendorfs', '', d)}"
|
||||
PARTITIONS_CONFIG += "rootfs"
|
||||
PARTITIONS_CONFIG += "${@bb.utils.contains('ST_USERFS', '1', 'userfs', '', d)}"
|
||||
|
||||
PARTITIONS_CONFIG[bootfs] ?= "${STM32MP_BOOTFS_IMAGE},${STM32MP_BOOTFS_LABEL},${STM32MP_BOOTFS_MOUNTPOINT},${BOOTFS_PARTITION_SIZE},System"
|
||||
PARTITIONS_CONFIG[vendorfs] ?= "${STM32MP_VENDORFS_IMAGE},${STM32MP_VENDORFS_LABEL},${STM32MP_VENDORFS_MOUNTPOINT},${VENDORFS_PARTITION_SIZE},FileSystem"
|
||||
PARTITIONS_CONFIG[rootfs] ?= "${IMAGE_BASENAME},rootfs,,${ROOTFS_PARTITION_SIZE},FileSystem"
|
||||
PARTITIONS_CONFIG[userfs] ?= "${STM32MP_USERFS_IMAGE},${STM32MP_USERFS_LABEL},${STM32MP_USERFS_MOUNTPOINT},${USERFS_PARTITION_SIZE},FileSystem"
|
||||
|
||||
# UBI Configuration
|
||||
IMAGE_CLASSES += "image_types-stubi"
|
||||
|
||||
# Define specific U-Boot config partition settings
|
||||
STM32MP_UBOOTCONFIG_NAME = "uboot_config"
|
||||
UBOOTCONFIG_PARTITION_SIZE = "256"
|
||||
# Define two empty volumes to manage U-Boot config beginning of multivolume UBIFS
|
||||
STM32MP_UBI_VOLUME_prepend = "uboot_config:256:empty uboot_config_r:256:empty "
|
||||
|
||||
# Define volume list for multivolume UBIFS
|
||||
# We need to have two empty UBI volumes to manage U-Boot config in our multivolume UBI
|
||||
STM32MP_UBI_VOLUME += "${STM32MP_UBOOTCONFIG_NAME}:${UBOOTCONFIG_PARTITION_SIZE}:empty"
|
||||
STM32MP_UBI_VOLUME += "${STM32MP_UBOOTCONFIG_NAME}_r:${UBOOTCONFIG_PARTITION_SIZE}:empty"
|
||||
# Add default partition volumes
|
||||
STM32MP_UBI_VOLUME += "${STM32MP_BOOTFS_IMAGE}-${DISTRO}-${MACHINE}:${BOOTFS_PARTITION_SIZE}"
|
||||
STM32MP_UBI_VOLUME += "${IMAGE_LINK_NAME}:${ROOTFS_PARTITION_SIZE}"
|
||||
STM32MP_UBI_VOLUME += "${@bb.utils.contains('ST_VENDORFS','1','${STM32MP_VENDORFS_IMAGE}-${DISTRO}-${MACHINE}:${VENDORFS_PARTITION_SIZE}','',d)}"
|
||||
STM32MP_UBI_VOLUME += "${STM32MP_USERFS_IMAGE}-${DISTRO}-${MACHINE}:${USERFS_PARTITION_SIZE}"
|
||||
|
||||
# Define UBI volume label for ROOTFS image being built
|
||||
# This is needed to have "generic" kernel command line to mount UBI file system
|
||||
# Define UBI volume label to use in kernel command line to mount UBI file system
|
||||
UBI_VOLNAME ?= "rootfs"
|
||||
|
||||
# Define UBI labels to build
|
||||
|
|
@ -152,7 +144,7 @@ UBI_VOLNAME ?= "rootfs"
|
|||
# nand_<PageSize>_<BlockSize>
|
||||
# nor_<BlockSize>
|
||||
# Like that a same UBI partition can be used for severals NAND/NOR providers
|
||||
MULTIUBI_BUILD_append = " nand_4_256 "
|
||||
MULTIUBI_BUILD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', 'nand_4_256', '', d)}"
|
||||
|
||||
# UBI Args for NAND by default on MB1262 (Micron MT29F8G16ABACAH4)
|
||||
# LEB = BLOCK_SIZE - (2 * page size): 256*1024 - (2*4096)
|
||||
|
|
@ -164,6 +156,8 @@ EXTRA_UBIFS_SIZE_nand_4_256 = "2304"
|
|||
# Default FSTYPES requested
|
||||
WKS_IMAGE_FSTYPES ?= ""
|
||||
IMAGE_FSTYPES ?= "${WKS_IMAGE_FSTYPES} tar.xz ext4"
|
||||
# Append ubi FSTYPES to default ones for nand volumes
|
||||
IMAGE_FSTYPES += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', 'stmultiubi', '', d)}"
|
||||
|
||||
# Define specific EXT4 command line:
|
||||
# - Create minimal inode number (as it is done by default in image_types.bbclass)
|
||||
|
|
@ -173,13 +167,6 @@ IMAGE_FSTYPES ?= "${WKS_IMAGE_FSTYPES} tar.xz ext4"
|
|||
# by U-Boot
|
||||
EXTRA_IMAGECMD_ext4 = "-i 4096 -L ${@d.getVar('IMAGE_NAME_SUFFIX').replace('.', '', 1)[:16]} -O ^metadata_csum,^dir_index"
|
||||
|
||||
# Enable licence summary and configure License content generation
|
||||
ENABLE_IMAGE_LICENSE_SUMMARY = "1"
|
||||
IMAGE_SUMMARY_LIST = "${STM32MP_BOOTFS_IMAGE}"
|
||||
IMAGE_SUMMARY_LIST_append = "${@bb.utils.contains('ST_VENDORFS','1',':${STM32MP_VENDORFS_IMAGE}','',d)}"
|
||||
IMAGE_SUMMARY_LIST_append = ":#IMAGE#"
|
||||
IMAGE_SUMMARY_LIST_append = ":${STM32MP_USERFS_IMAGE}"
|
||||
|
||||
# Allow debug on the platform with gdb and openocd tools
|
||||
EXTRA_IMAGEDEPENDS_append = " \
|
||||
gdb-cross-arm \
|
||||
|
|
@ -204,8 +191,16 @@ ST_TOOLS_FOR_SDK_PERL = " \
|
|||
nativesdk-perl-module-encode \
|
||||
nativesdk-perl-module-encode-mime-header \
|
||||
"
|
||||
|
||||
ST_TOOLS_FOR_SDK_append = " ${ST_TOOLS_FOR_SDK_PERL} "
|
||||
|
||||
# For support of python module for optee-os
|
||||
ST_TOOLS_FOR_SDK_append = " \
|
||||
nativesdk-python3-pyelftools \
|
||||
nativesdk-python3-pycryptodomex \
|
||||
nativesdk-python3-pycrypto \
|
||||
"
|
||||
|
||||
# For support of string convertion (iconv) in SDK
|
||||
ST_TOOLS_FOR_SDK_append = " \
|
||||
nativesdk-glibc-gconv-utf-16 \
|
||||
|
|
@ -216,6 +211,12 @@ ST_TOOLS_FOR_SDK_append = " \
|
|||
nativesdk-wayland \
|
||||
"
|
||||
|
||||
# For Kernel yaml dependency
|
||||
ST_TOOLS_FOR_SDK_remove = " \
|
||||
nativesdk-libyaml \
|
||||
nativesdk-libyaml-dev \
|
||||
"
|
||||
|
||||
# For CMSIS-SVD file parser with GDB
|
||||
ST_TOOLS_FOR_SDK_append = " \
|
||||
nativesdk-svd-tools \
|
||||
|
|
@ -284,21 +285,18 @@ LINUX_A7_EXAMPLES_DT ?= ""
|
|||
# =========================================================================
|
||||
# u-boot
|
||||
# =========================================================================
|
||||
EXTRA_IMAGEDEPENDS += "u-boot-stm32mp"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-stm32mp"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-stm32mp"
|
||||
EXTRA_IMAGEDEPENDS += "virtual/bootloader"
|
||||
|
||||
# Define default U-Boot config
|
||||
UBOOT_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'basic', 'basic', '', d)}"
|
||||
UBOOT_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', 'trusted', '', d)}"
|
||||
UBOOT_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)}"
|
||||
#Add this config until u-boot is able to flash with basic binary
|
||||
UBOOT_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'basic', 'trusted', '', d)}"
|
||||
# The 'basic' config is only available for stm32mp1 machines
|
||||
UBOOT_CONFIG_append_stm32mp1common = " basic "
|
||||
|
||||
# Define u-boot defconfig and binary to use for each UBOOT_CONFIG
|
||||
UBOOT_CONFIG[basic] = "stm32mp15_basic_defconfig,,u-boot.img"
|
||||
UBOOT_CONFIG[trusted] = "stm32mp15_trusted_defconfig,,u-boot.stm32"
|
||||
UBOOT_CONFIG[optee] = "stm32mp15_optee_defconfig,,u-boot.stm32"
|
||||
UBOOT_CONFIG[optee] = "stm32mp15_trusted_defconfig,,u-boot.stm32"
|
||||
|
||||
# List of U-Boot device tree to use
|
||||
UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}"
|
||||
|
|
@ -306,27 +304,27 @@ UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}"
|
|||
# Define u-boot splashscreen file naming
|
||||
UBOOT_SPLASH_IMAGE = "splash"
|
||||
|
||||
# =========================================================================
|
||||
# tf-a
|
||||
# =========================================================================
|
||||
# Finally we must compile tf-a in all cases as we need trusted binary to boot
|
||||
#EXTRA_IMAGEDEPENDS += "${@bb.utils.contains_any('BOOTSCHEME_LABELS', 'optee trusted', 'tf-a-stm32mp', '', d)}"
|
||||
EXTRA_IMAGEDEPENDS += "tf-a-stm32mp"
|
||||
PREFERRED_PROVIDER_u-boot-fw-utils_stm32mp1common = "libubootenv"
|
||||
|
||||
# Define default TF-A config
|
||||
TF_A_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', 'trusted', '', d)}"
|
||||
TF_A_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)}"
|
||||
MACHINE_EXTRA_RRECOMMENDS_append_stm32mp1common = " \
|
||||
u-boot-fw-config-stm32mp \
|
||||
"
|
||||
|
||||
#Add this config until tf-a is able to flash with basic binary
|
||||
TF_A_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'basic', 'trusted', '', d)}"
|
||||
#Add this config until optee is able to flash
|
||||
TF_A_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'trusted', '', d)}"
|
||||
# =========================================================================
|
||||
# trusted-firmware-a
|
||||
# =========================================================================
|
||||
# Add trusted-firmware-a serialboot to allow images programming
|
||||
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a-serialboot"
|
||||
# Add optionnaly trusted-firmware-a
|
||||
EXTRA_IMAGEDEPENDS += "${@bb.utils.contains_any('BOOTSCHEME_LABELS', 'optee trusted', 'virtual/trusted-firmware-a', '', d)}"
|
||||
|
||||
# Define SECURE_PAYLOAD config to set for each TF_A_CONFIG
|
||||
TF_A_CONFIG_optee = "AARCH32_SP=optee STM32MP_BOOT_ONLY=1"
|
||||
TF_A_CONFIG_trusted = "AARCH32_SP=sp_min"
|
||||
TF_A_CONFIG_serialboot = "AARCH32_SP=sp_min"
|
||||
TF_A_CONFIG_optee = "AARCH32_SP=optee"
|
||||
TF_A_CONFIG_trusted = "AARCH32_SP=sp_min"
|
||||
|
||||
# Manage proper dependency
|
||||
# Manage proper update for TF_A_CONFIG_* var
|
||||
tfaconfig_env[vardeps] += "${@bb.utils.contains('TF_A_CONFIG', 'serialboot', 'TF_A_CONFIG_serialboot', '', d)}"
|
||||
tfaconfig_env[vardeps] += "${@bb.utils.contains('TF_A_CONFIG', 'optee', 'TF_A_CONFIG_optee', '', d)}"
|
||||
tfaconfig_env[vardeps] += "${@bb.utils.contains('TF_A_CONFIG', 'trusted', 'TF_A_CONFIG_trusted', '', d)}"
|
||||
|
||||
|
|
@ -339,16 +337,6 @@ TF_A_DEVICETREE = "${STM32MP_DEVICETREE}"
|
|||
# Map OPTEE configuration to device tree list
|
||||
OPTEE_CONF = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# flashlayout
|
||||
# =========================================================================
|
||||
# Add specific scheme to provide flashlayout that will erase all storage devices
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS += "deleteall"
|
||||
# Add specific scheme to provide flashlayout that will make rootfs extensible to
|
||||
# remaining device free space
|
||||
# NOTE: this scheme is ONLY compatible with disco board and trusted bootscheme
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', 'extensible', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# Xserver
|
||||
# =========================================================================
|
||||
|
|
@ -369,7 +357,6 @@ ELF_DEBUG_ENABLE = "1"
|
|||
# =========================================================================
|
||||
PREFERRED_PROVIDER_sysdig = "sysdig-stm32mp"
|
||||
|
||||
|
||||
# =========================================================================
|
||||
# M4 copro
|
||||
# =========================================================================
|
||||
|
|
@ -389,4 +376,4 @@ M4_PACKAGE_4USERFS = "${@bb.utils.contains('ST_USERFS','1','1','0',d)}"
|
|||
# =========================================================================
|
||||
# Variable for using vendor directory instead of usr
|
||||
GCNANO_USERLAND_USE_VENDOR_DIR = "${@bb.utils.contains('ST_VENDORFS','1','1','0',d)}"
|
||||
GCNANO_USERLAND_VENDOR_DIR = "${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}"
|
||||
GCNANO_USERLAND_VENDOR_DIR = "${STM32MP_VENDORFS_MOUNTPOINT}"
|
||||
|
|
|
|||
|
|
@ -1,275 +1,94 @@
|
|||
#@DESCRIPTION: STM32MP machine extlinux file configuration
|
||||
|
||||
# Set generic extlinux bootdevice variable to ease definition
|
||||
EXTLINUX_BOOTDEVICE_EMMC = "mmc1"
|
||||
EXTLINUX_BOOTDEVICE_SDCARD = "mmc0"
|
||||
EXTLINUX_BOOTDEVICE_NORSDCARD = "nor0"
|
||||
EXTLINUX_BOOTDEVICE_NOREMMC = "nor0-mmc1"
|
||||
EXTLINUX_BOOTDEVICE_NAND = "nand0"
|
||||
|
||||
# Set generic extlinux root variable to ease definition
|
||||
EXTLINUX_ROOT_EMMC = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk1p4','root=/dev/mmcblk1p3',d)}"
|
||||
EXTLINUX_ROOT_EMMC_OPTEE = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk1p7','root=/dev/mmcblk1p6',d)}"
|
||||
EXTLINUX_ROOT_NAND = "ubi.mtd=UBI rootfstype=ubifs root=ubi0:rootfs"
|
||||
EXTLINUX_ROOT_NOREMMC = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk1p3','root=/dev/mmcblk1p2',d)}"
|
||||
EXTLINUX_ROOT_NORSDCARD = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk0p3','root=/dev/mmcblk0p2',d)}"
|
||||
EXTLINUX_ROOT_SDCARD = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk0p6','root=/dev/mmcblk0p5',d)}"
|
||||
EXTLINUX_ROOT_SDCARD_OPTEE = "${@bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk0p9','root=/dev/mmcblk0p8',d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# REMINDER: how 'exlinux.conf' files are built
|
||||
#
|
||||
# The 'extlinux.conf' files are generated under ${UBOOT_EXTLINUX_INSTALL_DIR}:
|
||||
# ${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/extlinux.conf
|
||||
# ${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[1]}extlinux/extlinux.conf
|
||||
# ...
|
||||
#
|
||||
# File content (${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/exlinux.conf):
|
||||
# menu title Select the boot mode
|
||||
# TIMEOUT ${UBOOT_EXTLINUX_TIMEOUT}
|
||||
# DEFAULT ${UBOOT_EXTLINUX_DEFAULT_LABEL_${UBOOT_EXTLINUX_TARGETS}[0]}
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[0]}[0]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[0]}[1]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
#
|
||||
# File content (${UBOOT_EXTLINUX_BOOTPREFIXES_${UBOOT_EXTLINUX_TARGETS}[0]}extlinux/exlinux.conf):
|
||||
# menu title Select the boot mode
|
||||
# TIMEOUT ${UBOOT_EXTLINUX_TIMEOUT}
|
||||
# DEFAULT ${UBOOT_EXTLINUX_DEFAULT_LABEL_${UBOOT_EXTLINUX_TARGETS}[1]}
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[1]}[0]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[0]} >
|
||||
# LABEL ${UBOOT_EXTLINUX_LABELS_${UBOOT_EXTLINUX_TARGETS}[1]}[1]
|
||||
# KERNEL ${UBOOT_EXTLINUX_KERNEL} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_KERNEL_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# FDT ${UBOOT_EXTLINUX_FDT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_FDT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# APPEND ${UBOOT_EXTLINUX_ROOT} < OR OVERRIDE WITH : ${UBOOT_EXTLINUX_ROOT_${IMAGE_UBOOT_EXTLINUX_LABELS}[1]} >
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Init the list of targets per device config
|
||||
UBOOT_EXTLINUX_TARGETS_emmc ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_emmc-optee ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_nand ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_nor-emmc ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_nor-sdcard ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard ?= ""
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard-optee ?= ""
|
||||
# Configure bootscheme diversity for emmc and sdcard
|
||||
EXTLINUX_TARGETS_EMMC += "${@bb.utils.contains_any('BOOTSCHEME_LABELS', [ 'basic', 'trusted' ], '${UBOOT_EXTLINUX_TARGETS_emmc}', '', d)}"
|
||||
EXTLINUX_TARGETS_EMMC += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', '${UBOOT_EXTLINUX_TARGETS_emmc-optee}', '', d)}"
|
||||
EXTLINUX_TARGETS_SDCARD += "${@bb.utils.contains_any('BOOTSCHEME_LABELS', [ 'basic', 'trusted' ], '${UBOOT_EXTLINUX_TARGETS_sdcard}', '', d)}"
|
||||
EXTLINUX_TARGETS_SDCARD += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', '${UBOOT_EXTLINUX_TARGETS_sdcard-optee}', '', d)}"
|
||||
# Define the extlinux targets to use
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', '${EXTLINUX_TARGETS_EMMC}', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'nand-4-256', 'nor-nand-4-256' ], '${UBOOT_EXTLINUX_TARGETS_nand}', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-emmc', '${UBOOT_EXTLINUX_TARGETS_nor-emmc}', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard', '${UBOOT_EXTLINUX_TARGETS_nor-sdcard}', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${EXTLINUX_TARGETS_SDCARD}', '', d)}"
|
||||
|
||||
# Set extlinux console for stm32mp machine
|
||||
# Define extlinux console for stm32mp machine
|
||||
UBOOT_EXTLINUX_CONSOLE = "console=${@d.getVar('SERIAL_CONSOLE').split()[1]},${@d.getVar('SERIAL_CONSOLE').split()[0]}"
|
||||
# Define default FDTDIR for all configs
|
||||
UBOOT_EXTLINUX_FDTDIR = "/"
|
||||
# Define default MENU DESCRIPTION for all configs
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION = "OpenSTLinux"
|
||||
# Define default boot config for all config
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL ?= "OpenSTLinux"
|
||||
# Define default INITRD for all configs
|
||||
INITRD_SHORTNAME ??= ""
|
||||
UBOOT_EXTLINUX_INITRD ?= "${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '/${INITRD_SHORTNAME}', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# DK1 configuration
|
||||
# Configurations
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define additional targets to use
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157a-dk1', 'mp157a-dk1_sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157a-dk1', 'mp157a-dk1_sdcard-optee', '', d)}"
|
||||
# Define bootprefix for each target
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157a-dk1_sdcard = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157a-dk1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157a-dk1_sdcard-optee = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157a-dk1-optee_"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'sdcard', 'nor-sdcard' ], 'target-sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', 'target-emmc', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'nand-4-256', 'nor-nand-4-256' ], 'target-nand', '', d)}"
|
||||
# Define labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157a-dk1_sdcard = "stm32mp157a-dk1-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157a-dk1_sdcard-optee = "stm32mp157a-dk1-sdcard-optee"
|
||||
# Define default boot config for each target
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157a-dk1_sdcard ?= "stm32mp157a-dk1-sdcard"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157a-dk1_sdcard-optee ?= "stm32mp157a-dk1-sdcard-optee"
|
||||
# Define FDT overrides for all labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157a-dk1-sdcard = "/stm32mp157a-dk1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157a-dk1-sdcard-optee = "/stm32mp157a-dk1.dtb"
|
||||
# Define ROOT overrides for all labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157a-dk1-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157a-dk1-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# (mandatory to allow specific var override if needed)
|
||||
UBOOT_EXTLINUX_LABELS_target-sdcard += "rootfs"
|
||||
UBOOT_EXTLINUX_LABELS_target-emmc += "rootfs"
|
||||
UBOOT_EXTLINUX_LABELS_target-nand += "rootfs"
|
||||
# Define specific bootprefix for each target
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_target-sdcard = "${DEVICE_SDCARD}_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_target-emmc = "${DEVICE_EMMC}_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_target-nand = "${DEVICE_NAND}_"
|
||||
# Define ROOT overrides for each target
|
||||
UBOOT_EXTLINUX_ROOT_target-nand = "ubi.mtd=UBI rootfstype=ubifs root=ubi0:rootfs"
|
||||
UBOOT_EXTLINUX_ROOT_target-sdcard = "root=PARTUUID=${DEVICE_PARTUUID_ROOTFS_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_target-emmc = "root=PARTUUID=${DEVICE_PARTUUID_ROOTFS_EMMC}"
|
||||
# Define INITRD overrides for nand target
|
||||
UBOOT_EXTLINUX_INITRD_target-nand = ""
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append specific examples configs
|
||||
# -----------------------------------------------------------------------------
|
||||
# Enable UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG var that allows to configure
|
||||
# additional target:
|
||||
# UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG = "extra-target"
|
||||
# Then define new label(s) to append to the label list from current target
|
||||
# UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[extra-target] = "newlabel1 newlabel2"
|
||||
# This will create new 'extlinux.conf' file with name 'extra-target_extlinux.conf'
|
||||
# that will use UBOOT_EXTLINUX_LABELS label list defined for current target plus
|
||||
# the 'newlabel1' and 'newlabel2' labels.
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define additional extra targets to consider
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-sdcard += "${STM32MP_DT_FILES_DK}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-sdcard += "${STM32MP_DT_FILES_ED}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-sdcard += "${STM32MP_DT_FILES_EV}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-emmc += "${STM32MP_DT_FILES_ED}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-emmc += "${STM32MP_DT_FILES_EV}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-nand += "${STM32MP_DT_FILES_ED}"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG_target-nand += "${STM32MP_DT_FILES_EV}"
|
||||
# Define extra label configuration
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157c-dk2] += "stm32mp157c-dk2-a7"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157c-dk2] += "stm32mp157c-dk2-m4"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157c-ev1] += "stm32mp157c-ev1-a7"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157c-ev1] += "stm32mp157c-ev1-m4"
|
||||
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157f-dk2] += "stm32mp157f-dk2-a7"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157f-dk2] += "stm32mp157f-dk2-m4"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157f-ev1] += "stm32mp157f-ev1-a7"
|
||||
UBOOT_EXTLINUX_TARGETS_EXTRA_CONFIG[stm32mp157f-ev1] += "stm32mp157f-ev1-m4"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# DK2 configuration
|
||||
# Configure A7 examples labels
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define additional targets to use
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-dk2', 'mp157c-dk2_sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-dk2', 'mp157c-dk2_sdcard-optee', '', d)}"
|
||||
# Define bootprefix for each target
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-dk2_sdcard = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-dk2_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-dk2_sdcard-optee = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-dk2-optee_"
|
||||
# Define labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard = "stm32mp157c-dk2-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard-optee = "stm32mp157c-dk2-sdcard-optee"
|
||||
# Define default boot config for each target
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-dk2_sdcard ?= "stm32mp157c-dk2-sdcard"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-dk2_sdcard-optee ?= "stm32mp157c-dk2-sdcard-optee"
|
||||
# Define FDT overrides for all labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-sdcard = "/stm32mp157c-dk2.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-sdcard-optee = "/stm32mp157c-dk2.dtb"
|
||||
# Define ROOT overrides for all labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append A7 examples labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard += "stm32mp157c-dk2-a7-examples-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard-optee += "stm32mp157c-dk2-a7-examples-sdcard-optee"
|
||||
# Define FDT overrides for A7 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-a7-examples-sdcard = "/stm32mp157c-dk2-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-a7-examples-sdcard-optee = "/stm32mp157c-dk2-a7-examples.dtb"
|
||||
# Define ROOT overrides for A7 labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-a7-examples-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-a7-examples-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append M4 examples labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard += "stm32mp157c-dk2-m4-examples-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-dk2_sdcard-optee += "stm32mp157c-dk2-m4-examples-sdcard-optee"
|
||||
# Define FDT overrides for M4 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-m4-examples-sdcard = "/stm32mp157c-dk2-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-m4-examples-sdcard-optee = "/stm32mp157c-dk2-m4-examples.dtb"
|
||||
# Define ROOT overrides for M4 labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-m4-examples-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-dk2-m4-examples-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# Define MENU DESCRIPTION overrides for new A7 labels
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157c-dk2-a7 = "stm32mp157c-dk2-a7-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157c-ev1-a7 = "stm32mp157c-ev1-a7-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157f-dk2-a7 = "stm32mp157f-dk2-a7-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157f-ev1-a7 = "stm32mp157f-ev1-a7-examples"
|
||||
# Define FDT overrides for new A7 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-a7 = "/stm32mp157c-dk2-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7 = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157f-dk2-a7 = "/stm32mp157f-dk2-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157f-ev1-a7 = "/stm32mp157f-ev1-a7-examples.dtb"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ED1 configuration
|
||||
# Configure M4 examples labels
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define additional targets to use
|
||||
UBOOT_EXTLINUX_TARGETS_emmc += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ed1', 'mp157c-ed1_emmc', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_emmc-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ed1', 'mp157c-ed1_emmc-optee', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ed1', 'mp157c-ed1_sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ed1', 'mp157c-ed1_sdcard-optee', '', d)}"
|
||||
# Define bootprefix for each target
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ed1_emmc = "${EXTLINUX_BOOTDEVICE_EMMC}_stm32mp157c-ed1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ed1_emmc-optee = "${EXTLINUX_BOOTDEVICE_EMMC}_stm32mp157c-ed1-optee_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ed1_sdcard = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-ed1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ed1_sdcard-optee = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-ed1-optee_"
|
||||
# Define labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ed1_emmc = "stm32mp157c-ed1-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ed1_emmc-optee = "stm32mp157c-ed1-emmc-optee"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ed1_sdcard = "stm32mp157c-ed1-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ed1_sdcard-optee = "stm32mp157c-ed1-sdcard-optee"
|
||||
# Define default boot config for each target
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ed1_emmc ?= "stm32mp157c-ed1-emmc"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ed1_emmc-optee ?= "stm32mp157c-ed1-emmc-optee"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ed1_sdcard ?= "stm32mp157c-ed1-sdcard"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ed1_sdcard-optee ?= "stm32mp157c-ed1-sdcard-optee"
|
||||
# Define FDT overrides for all labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ed1-emmc = "/stm32mp157c-ed1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ed1-emmc-optee = "/stm32mp157c-ed1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ed1-sdcard = "/stm32mp157c-ed1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ed1-sdcard-optee = "/stm32mp157c-ed1.dtb"
|
||||
# Define ROOT overrides for all labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ed1-emmc = "${EXTLINUX_ROOT_EMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ed1-emmc-optee = "${EXTLINUX_ROOT_EMMC_OPTEE}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ed1-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ed1-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# EV1 configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define additional targets to use
|
||||
UBOOT_EXTLINUX_TARGETS_emmc += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_emmc', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_emmc-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_emmc-optee', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_nand += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_nand', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_nor-sdcard += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_nor-sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_nor-emmc += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_nor-emmc', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_sdcard', '', d)}"
|
||||
UBOOT_EXTLINUX_TARGETS_sdcard-optee += "${@bb.utils.contains('STM32MP_DEVICETREE', 'stm32mp157c-ev1', 'mp157c-ev1_sdcard-optee', '', d)}"
|
||||
# Define bootprefix for each target
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_emmc = "${EXTLINUX_BOOTDEVICE_EMMC}_stm32mp157c-ev1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_emmc-optee = "${EXTLINUX_BOOTDEVICE_EMMC}_stm32mp157c-ev1-optee_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_nand = "${EXTLINUX_BOOTDEVICE_NAND}_stm32mp157c-ev1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_nor-sdcard = "${EXTLINUX_BOOTDEVICE_NORSDCARD}_stm32mp157c-ev1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_nor-emmc = "${EXTLINUX_BOOTDEVICE_NOREMMC}_stm32mp157c-ev1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_sdcard = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-ev1_"
|
||||
UBOOT_EXTLINUX_BOOTPREFIXES_mp157c-ev1_sdcard-optee = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp157c-ev1-optee_"
|
||||
# Define labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc = "stm32mp157c-ev1-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc-optee = "stm32mp157c-ev1-emmc-optee"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nand = "stm32mp157c-ev1-nand"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-sdcard = "stm32mp157c-ev1-nor-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-emmc = "stm32mp157c-ev1-nor-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard = "stm32mp157c-ev1-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard-optee = "stm32mp157c-ev1-sdcard-optee"
|
||||
# Define default boot config for each target
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_emmc ?= "stm32mp157c-ev1-emmc"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_emmc-optee ?= "stm32mp157c-ev1-emmc-optee"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_nand ?= "stm32mp157c-ev1-nand"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_nor-sdcard ?= "stm32mp157c-ev1-nor-sdcard"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_nor-emmc ?= "stm32mp157c-ev1-nor-emmc"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_sdcard ?= "stm32mp157c-ev1-sdcard"
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_sdcard-optee ?= "stm32mp157c-ev1-sdcard-optee"
|
||||
# Define FDT overrides for all labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-emmc = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-emmc-optee = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-nand = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-nor-sdcard = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-nor-emmc = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-sdcard = "/stm32mp157c-ev1.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-sdcard-optee = "/stm32mp157c-ev1.dtb"
|
||||
# Define ROOT overrides for all labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-emmc = "${EXTLINUX_ROOT_EMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-emmc-optee = "${EXTLINUX_ROOT_EMMC_OPTEE}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-nand = "${EXTLINUX_ROOT_NAND}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-nor-sdcard = "${EXTLINUX_ROOT_NORSDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-nor-emmc = "${EXTLINUX_ROOT_NOREMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append A7 examples labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc += "stm32mp157c-ev1-a7-examples-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc-optee += "stm32mp157c-ev1-a7-examples-emmc-optee"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nand += "stm32mp157c-ev1-a7-examples-nand"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-sdcard += "stm32mp157c-ev1-a7-examples-nor-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-emmc += "stm32mp157c-ev1-a7-examples-nor-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard += "stm32mp157c-ev1-a7-examples-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard-optee += "stm32mp157c-ev1-a7-examples-sdcard-optee"
|
||||
# Define FDT overrides for A7 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-emmc = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-emmc-optee = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-nand = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-nor-sdcard = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-nor-emmc = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-sdcard = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-a7-examples-sdcard-optee = "/stm32mp157c-ev1-a7-examples.dtb"
|
||||
# Define ROOT overrides for A7 labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-emmc = "${EXTLINUX_ROOT_EMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-emmc-optee = "${EXTLINUX_ROOT_EMMC_OPTEE}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-nand = "${EXTLINUX_ROOT_NAND}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-nor-sdcard = "${EXTLINUX_ROOT_NORSDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-nor-emmc = "${EXTLINUX_ROOT_NOREMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-a7-examples-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append M4 examples labels for each target
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc += "stm32mp157c-ev1-m4-examples-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_emmc-optee += "stm32mp157c-ev1-m4-examples-emmc-optee"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nand += "stm32mp157c-ev1-m4-examples-nand"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-sdcard += "stm32mp157c-ev1-m4-examples-nor-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_nor-emmc += "stm32mp157c-ev1-m4-examples-nor-emmc"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard += "stm32mp157c-ev1-m4-examples-sdcard"
|
||||
UBOOT_EXTLINUX_LABELS_mp157c-ev1_sdcard-optee += "stm32mp157c-ev1-m4-examples-sdcard-optee"
|
||||
# Define FDT overrides for M4 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-emmc = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-emmc-optee = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-nand = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-nor-sdcard = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-nor-emmc = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-sdcard = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4-examples-sdcard-optee = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
# Define ROOT overrides for M4 labels
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-emmc = "${EXTLINUX_ROOT_EMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-emmc-optee = "${EXTLINUX_ROOT_EMMC_OPTEE}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-nand = "${EXTLINUX_ROOT_NAND}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-nor-sdcard = "${EXTLINUX_ROOT_NORSDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-nor-emmc = "${EXTLINUX_ROOT_NOREMMC}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-sdcard = "${EXTLINUX_ROOT_SDCARD}"
|
||||
UBOOT_EXTLINUX_ROOT_stm32mp157c-ev1-m4-examples-sdcard-optee = "${EXTLINUX_ROOT_SDCARD_OPTEE}"
|
||||
# Define MENU DESCRIPTION overrides for new A7 labels
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157c-dk2-m4 = "stm32mp157c-dk2-m4-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157c-ev1-m4 = "stm32mp157c-ev1-m4-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157f-dk2-m4 = "stm32mp157f-dk2-m4-examples"
|
||||
UBOOT_EXTLINUX_MENU_DESCRIPTION_stm32mp157f-ev1-m4 = "stm32mp157f-ev1-m4-examples"
|
||||
# Define FDT overrides for new M4 labels
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-dk2-m4 = "/stm32mp157c-dk2-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157c-ev1-m4 = "/stm32mp157c-ev1-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157f-dk2-m4 = "/stm32mp157f-dk2-m4-examples.dtb"
|
||||
UBOOT_EXTLINUX_FDT_stm32mp157f-ev1-m4 = "/stm32mp157f-ev1-m4-examples.dtb"
|
||||
|
|
|
|||
|
|
@ -2,53 +2,70 @@
|
|||
|
||||
include conf/machine/include/gpu_vivante.inc
|
||||
|
||||
#------------------
|
||||
#
|
||||
# GPU
|
||||
#
|
||||
# =========================================================================
|
||||
# gpu
|
||||
# =========================================================================
|
||||
# To support gpu on a machine,
|
||||
# please add "gpu" to MACHINE_FEATURES in machine conf file
|
||||
|
||||
GPU_LIST = "gcnano-driver-stm32mp"
|
||||
GPU_LIST ?= "\
|
||||
gcnano-driver-stm32mp \
|
||||
"
|
||||
GPU_IMAGE_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'gpu', '${GPU_LIST}', '', d)} "
|
||||
|
||||
#------------------
|
||||
#
|
||||
# =========================================================================
|
||||
# alsa
|
||||
# =========================================================================
|
||||
ALSA_LIST ?= "\
|
||||
alsa-state-stm32mp1 \
|
||||
"
|
||||
ALSA_IMAGE_INSTALL = "${@bb.utils.contains('COMBINED_FEATURES', 'alsa', '${ALSA_LIST}', '', d)} "
|
||||
|
||||
# =========================================================================
|
||||
# bluetooth
|
||||
# =========================================================================
|
||||
BLUETOOTH_LIST ?= ""
|
||||
BLUETOOTH_IMAGE_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', '${BLUETOOTH_LIST}', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# m4copro
|
||||
# =========================================================================
|
||||
M4COPRO_LIST ?= "\
|
||||
m4fwcoredump \
|
||||
m4projects-stm32mp1 \
|
||||
"
|
||||
M4COPRO_IMAGE_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'm4copro', '${M4COPRO_LIST}', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# optee
|
||||
#
|
||||
|
||||
OPTEE_LIST = "optee-os-stm32mp"
|
||||
# =========================================================================
|
||||
OPTEE_LIST ?= "\
|
||||
virtual/optee-os \
|
||||
"
|
||||
OPTEE_IMAGE_INSTALL = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', '${OPTEE_LIST}', '', d)} "
|
||||
PREFERRED_PROVIDER_optee-os = "optee-os-stm32mp"
|
||||
|
||||
OPTEE_BINARY = "optee-os-stm32mp"
|
||||
OPTEE_BINARY ?= "\
|
||||
virtual/optee-os \
|
||||
"
|
||||
OPTEE_BINARY_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '${OPTEE_BINARY}', '', d)} "
|
||||
|
||||
#------------------
|
||||
#
|
||||
# Alsa
|
||||
#
|
||||
ALSA_ADDONS = "alsa-state-stm32mp1"
|
||||
ALSA_ADDONS_INSTALL = "${@bb.utils.contains('COMBINED_FEATURES', 'alsa', '${ALSA_ADDONS}', '', d)} "
|
||||
# =========================================================================
|
||||
# wifi
|
||||
# =========================================================================
|
||||
WIFI_LIST ?= ""
|
||||
WIFI_IMAGE_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'wifi', '${WIFI_LIST}', '', d)} "
|
||||
|
||||
#------------------
|
||||
#
|
||||
# bluetooth
|
||||
#
|
||||
BLUETOOTH_LIST = " linux-firmware-bluetooth-bcm4343 "
|
||||
BLUETOOTH_IMAGE_INSTALL = "${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', '${BLUETOOTH_LIST}', '', d)} "
|
||||
|
||||
#------------------
|
||||
#
|
||||
# =========================================================================
|
||||
# Image appends
|
||||
#
|
||||
# =========================================================================
|
||||
EXTRA_IMAGEDEPENDS_append = " \
|
||||
${OPTEE_BINARY_INSTALL} \
|
||||
"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS_append = " \
|
||||
${GPU_IMAGE_INSTALL} \
|
||||
${OPTEE_IMAGE_INSTALL} \
|
||||
${ALSA_ADDONS_INSTALL} \
|
||||
${BLUETOOTH_IMAGE_INSTALL}\
|
||||
${GPU_IMAGE_INSTALL} \
|
||||
${ALSA_IMAGE_INSTALL} \
|
||||
${BLUETOOTH_IMAGE_INSTALL} \
|
||||
${M4COPRO_IMAGE_INSTALL} \
|
||||
${OPTEE_IMAGE_INSTALL} \
|
||||
${WIFI_IMAGE_INSTALL} \
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#@DESCRIPTION: STM32MP machine flashlayout deleteall configuration
|
||||
|
||||
# Set configuration file to monitor
|
||||
FLASHLAYOUT_CONFIGURE_FILES_append = " ${STM32MP_BASE}/conf/machine/include/st-machine-flashlayout-deleteall-stm32mp.inc:True "
|
||||
# Add specific scheme to provide flashlayout that will erase all storage devices
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS += "deleteall"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define config labels
|
||||
|
|
@ -9,40 +9,47 @@ FLASHLAYOUT_CONFIGURE_FILES_append = " ${STM32MP_BASE}/conf/machine/include/st-m
|
|||
FLASHLAYOUT_CONFIG_LABELS_deleteall = "disco eval"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define label types
|
||||
# Define label types for each config
|
||||
# -----------------------------------------------------------------------------
|
||||
FLASHLAYOUT_TYPE_LABELS_deleteall_disco = "${STM32MP_DT_FILES_DK}"
|
||||
FLASHLAYOUT_TYPE_LABELS_deleteall_eval = "${STM32MP_DT_FILES_ED} ${STM32MP_DT_FILES_EV}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define partitions to use
|
||||
# Define partitions to consider for flashlayout file generation
|
||||
#
|
||||
# NB: To manage bootloader partitions, simplification is done by directly
|
||||
# re-using 'fsbl1-boot' and 'ssbl-boot' partitions already defined in file
|
||||
# NB: We re-use as much as possible partitions already defined in file
|
||||
# 'st-machine-flashlayout-stm32mp.inc'
|
||||
# -----------------------------------------------------------------------------
|
||||
FLASHLAYOUT_PARTITION_LABELS_deleteall_disco = "fsbl1-boot ssbl-boot sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_deleteall_eval = "fsbl1-boot ssbl-boot emmcfsbl1 emmcfsbl2 emmcall nandall norall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_deleteall = "fsbl1-boot ssbl-boot fsbl1 fsbl2 emmcall nandall norall sdcardall"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Partition configuration for each partition label
|
||||
FLASHLAYOUT_PARTITION_DEVICE_emmcfsbl1 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_emmcfsbl2 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_emmcall = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nandall = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_norall = "${DEVICE_NOR}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_sdcardall = "${DEVICE_SDCARD}"
|
||||
# Specific for fsbl1-boot ssbl-boot partitions
|
||||
FLASHLAYOUT_PARTITION_DEVICE_deleteall_fsbl1-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_deleteall_ssbl-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_deleteall = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_deleteall_fsbl1-boot = "-"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_deleteall_ssbl-boot = "-"
|
||||
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall_emmcfsbl1 = "${FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl1}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall_emmcfsbl2 = "${FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl2}"
|
||||
FLASHLAYOUT_PARTITION_ID_emmcall = "0x30"
|
||||
FLASHLAYOUT_PARTITION_ID_nandall = "0x40"
|
||||
FLASHLAYOUT_PARTITION_ID_norall = "0x50"
|
||||
FLASHLAYOUT_PARTITION_ID_sdcardall = "0x60"
|
||||
|
||||
FLASHLAYOUT_PARTITION_TYPE_emmcall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_nandall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_norall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_sdcardall = "RawImage"
|
||||
|
||||
FLASHLAYOUT_PARTITION_DEVICE_deleteall = "none:fsbl1-boot ssbl-boot,${DEVICE_EMMC}:fsbl1 fsbl2 emmcall,${DEVICE_NAND}:nandall,${DEVICE_NOR}:norall,${DEVICE_SDCARD}:sdcardall"
|
||||
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall_fsbl1 = "${DEVICE_START_OFFSET_BOOT0_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_deleteall_fsbl2 = "${DEVICE_START_OFFSET_BOOT1_EMMC}"
|
||||
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_deleteall_fsbl1 = "none"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_deleteall_fsbl2 = "none"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# The 'deleteall' bootscheme is a trick to generate flashlayout files to clean
|
||||
# all memory devices on board. There are no specific 'deleteall' bootloader
|
||||
# binaries so use the 'trusted' or 'optee' one.
|
||||
BIN2BOOT_REPLACE_PATTERNS_fsbl1-boot_append = " deleteall;trusted"
|
||||
BIN2BOOT_REPLACE_PATTERNS_ssbl-boot_append = " ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'deleteall;optee', 'deleteall;trusted', d)}"
|
||||
# binaries so use the proper one ('serialboot', 'optee' or 'trusted').
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_fsbl1-boot_append = " deleteall;serialboot"
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_ssbl-boot_append = " deleteall;trusted"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
#@DESCRIPTION: STM32MP machine flashlayout extensible configuration
|
||||
|
||||
# Set configuration file to monitor
|
||||
FLASHLAYOUT_CONFIGURE_FILES_append = " ${STM32MP_BASE}/conf/machine/include/st-machine-flashlayout-extensible-stm32mp.inc:True "
|
||||
# Add specific scheme to provide flashlayout that will make rootfs extensible to
|
||||
# remaining device free space
|
||||
# NOTE: this scheme is ONLY compatible with disco board and trusted bootscheme
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'trusted', 'extensible', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define config labels
|
||||
# -----------------------------------------------------------------------------
|
||||
FLASHLAYOUT_CONFIG_LABELS_extensible = "sdcard"
|
||||
FLASHLAYOUT_CONFIG_LABELS_extensible = "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'sdcard', 'none', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define label types
|
||||
|
|
@ -20,17 +22,17 @@ FLASHLAYOUT_TYPE_LABELS_extensible = "${STM32MP_DT_FILES_DK}"
|
|||
# re-using 'fsbl1-boot' and 'ssbl-boot' partitions already defined in file
|
||||
# 'st-machine-flashlayout-stm32mp.inc'
|
||||
# -----------------------------------------------------------------------------
|
||||
FLASHLAYOUT_PARTITION_LABELS_extensible = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl bootfs ${VENDORFS_PART} rootfs"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Partition configuration for each partition label
|
||||
# Specific for fsbl1-boot ssbl-boot partitions
|
||||
FLASHLAYOUT_PARTITION_DEVICE_extensible_fsbl1-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_extensible_ssbl-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_LABELS_extensible = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_LABELS_extensible_remove = "userfs"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# The 'extensible' bootscheme is a trick to generate flashlayout files without
|
||||
# userfs partition for trusted bootscheme ONLY. So rootfs partition will be
|
||||
# extended up to the end of memory device, leaving plenty of space for user to
|
||||
# install more applications via 'apt-get'
|
||||
BIN2BOOT_REPLACE_PATTERNS_extensible_append = " extensible;trusted"
|
||||
# Make sure to use 'trusted' bootscheme for binary naming instead of 'extensible'
|
||||
# each time it is required
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_extensible_prepend = "extensible;trusted "
|
||||
# Additionnal replacement is expected for specific fsbl1 bootloader binary, as
|
||||
# we should use the 'serialboot' one instead of the 'trusted' one
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_extensible_fsbl1-boot_append = " trusted;serialboot"
|
||||
|
|
|
|||
|
|
@ -1,87 +1,102 @@
|
|||
#@DESCRIPTION: STM32MP machine flashlayout configuration
|
||||
|
||||
INHERIT += "flashlayout-stm32mp"
|
||||
|
||||
# Set configuration file to monitor
|
||||
FLASHLAYOUT_CONFIGURE_FILES_append = " ${STM32MP_BASE}/conf/machine/include/st-machine-flashlayout-stm32mp.inc:True "
|
||||
inherit flashlayout-stm32mp
|
||||
|
||||
# Add specific dependencies to get all binaries generated before flashlayout files
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'tf-a-stm32mp', 'tf-a-stm32mp:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'u-boot-stm32mp', 'u-boot-stm32mp:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'optee-os-stm32mp', 'optee-os-stm32mp:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'virtual/trusted-firmware-a', 'virtual/trusted-firmware-a:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'virtual/trusted-firmware-a-serialboot', 'virtual/trusted-firmware-a-serialboot:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'virtual/bootloader', 'virtual/bootloader:do_deploy', '', d)}"
|
||||
FLASHLAYOUT_DEPEND_TASKS += "${@bb.utils.contains('EXTRA_IMAGEDEPENDS', 'virtual/optee-os', 'virtual/optee-os:do_deploy', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define flashlayout devices
|
||||
# For the stm32mp flashlayout files, configuration is done to get output file
|
||||
# with following name scheme:
|
||||
# FlashLayout_<CONFIG_LABEL>[_<TYPE_LABEL>-<BOOTSCHEME_LABEL>].tsv
|
||||
#
|
||||
# The different labels are stored as list in different vars:
|
||||
# - <BOOTSCHEME_LABEL> FLASHLAYOUT_BOOTSCHEME_LABELS
|
||||
# - <CONFIG_LABEL> FLASHLAYOUT_CONFIG_LABELS
|
||||
# - <TYPE_LABEL> FLASHLAYOUT_TYPE_LABELS
|
||||
#
|
||||
# The flashlayout file name is generated with following loop logic:
|
||||
# for bootscheme in FLASHLAYOUT_BOOTSCHEME_LABELS (expanded according to ongoing OVERRIDES)
|
||||
# for config in FLASHLAYOUT_CONFIG_LABELS (expanded according to ongoing $bootscheme and OVERRIDES)
|
||||
# for typelabel in FLASHLAYOUT_TYPE_LABELS (expanded according to ongoing $bootscheme, $config and OVERRIDES)
|
||||
# if FLASHLAYOUT_BOOTSCHEME_LABELS items > 1 && FLASHLAYOUT_TYPE_LABELS items > 1
|
||||
# flashlayout_name = FlashLayout_$config_$typelabel-$bootscheme.tsv
|
||||
# else
|
||||
# flashlayout_name = FlashLayout_$config.tsv
|
||||
#
|
||||
# Each flashlayout file should contain lines that set the partition properties:
|
||||
# <Opt> <Id> <Name> <Type> <IP> <Offset> <Binary>
|
||||
#
|
||||
# The partition properties are set with 'FLASHLAYOUT_PARTITION_xxx' vars:
|
||||
# - <Opt> FLASHLAYOUT_PARTITION_ENABLE
|
||||
# - <Id> FLASHLAYOUT_PARTITION_ID
|
||||
# - <Name> Item from FLASHLAYOUT_PARTITION_LABELS list
|
||||
# - <Type> FLASHLAYOUT_PARTITION_TYPE
|
||||
# - <IP> FLASHLAYOUT_PARTITION_DEVICE
|
||||
# - <Offset> FLASHLAYOUT_PARTITION_OFFSET
|
||||
# - <Binary> FLASHLAYOUT_PARTITION_BIN2LOAD
|
||||
#
|
||||
# For the '$flashlayout_name' flashlayout file, the partition lines are generated
|
||||
# with following loop logic:
|
||||
# for partition in FLASHLAYOUT_PARTITION_LABELS (expanded according to ongoing $bootscheme, $config and OVERRIDES)
|
||||
# OVERRIDES_PREV = OVERRIDES
|
||||
# OVERRIDES = $partition:OVERRIDES
|
||||
# Compute partition properties for $partiton (expanded according to ongoing $bootscheme, $config and OVERRIDES)
|
||||
# Write new partition line to $flashlayout_name
|
||||
# OVERRIDES = OVERRIDES_PREV
|
||||
#
|
||||
# Modifying the OVERRIDES inside the loop allows dynamic configuration for each
|
||||
# partition property. This leaves plenty of possibility and guarantee specific
|
||||
# '$partition' override.
|
||||
# -----------------------------------------------------------------------------
|
||||
DEVICE_EMMC = "mmc1"
|
||||
DEVICE_NAND = "nand0"
|
||||
DEVICE_NOR = "nor0"
|
||||
DEVICE_SDCARD = "mmc0"
|
||||
# -----------------------------------------------------------------------------
|
||||
# EMMC
|
||||
# Extra space is required to store 'Protective MBR' and 'Primary GPT Header'
|
||||
# Currently the required size is 17kBytes (i.e. 0x4400)
|
||||
# We need to align this size to get the first offset to use
|
||||
DEVICE_START_OFFSET_mmc1 = "0x00080000"
|
||||
DEVICE_ALIGNMENT_SIZE_mmc1 = "0x00080000"
|
||||
# -----------------------------------------------------------------------------
|
||||
# NAND
|
||||
DEVICE_START_OFFSET_nand0 = "0x00000000"
|
||||
DEVICE_ALIGNMENT_SIZE_nand0 = "0x00040000"
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOR
|
||||
DEVICE_START_OFFSET_nor0 = "0x00000000"
|
||||
DEVICE_ALIGNMENT_SIZE_nor0 = "0x00010000"
|
||||
# -----------------------------------------------------------------------------
|
||||
# SDCARD
|
||||
# Extra space is required to store 'Protective MBR' and 'Primary GPT Header'
|
||||
# Currently the required size is 17kBytes (i.e. 0x4400)
|
||||
# We need to align this size to get the first offset to use
|
||||
DEVICE_START_OFFSET_mmc0 = "0x00004400"
|
||||
DEVICE_ALIGNMENT_SIZE_mmc0 = "0x00000200"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define bootscheme labels
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define bootscheme label to allow specific expansion for partition vars
|
||||
FLASHLAYOUT_BOOTSCHEME_LABELS += "${BOOTSCHEME_LABELS}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define config labels
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOTE: define can be done with following priority assignment:
|
||||
# 1) list_<BOOTSCHEME>
|
||||
# 2) list
|
||||
# 3) Default 'list' to 'none' when not defined
|
||||
# Priority var assignment (where <OVERRIDES> are the usual override mechanism):
|
||||
# 1) FLASHLAYOUT_CONFIG_LABELS_<BOOTSCHEME>_<OVERRIDES>
|
||||
# 2) FLASHLAYOUT_CONFIG_LABELS_<BOOTSCHEME>
|
||||
# 3) FLASHLAYOUT_CONFIG_LABELS_<OVERRIDES>
|
||||
# 4) FLASHLAYOUT_CONFIG_LABELS
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define supported config labels
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', 'emmc', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nand-4-256', 'nand-4-256', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-emmc', 'nor-emmc', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-nand-4-256', 'nor-nand-4-256', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard', 'nor-sdcard', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'sdcard', '', d)}"
|
||||
|
||||
# Set by default this variable to 0, and set to 1 only when we are using st-example-image-*
|
||||
ST_EXAMPLE_IMAGE ??= "0"
|
||||
|
||||
#FIXME need to manage overall device size to abort flashlayout creation in case of oversizing the storage devices
|
||||
|
||||
# Remove NAND flashlayout when we are using st-example-image-* as rootfs too big for a NAND device size of 1 GBytes
|
||||
#FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'emmc', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'nand-4-256', '', d)}"
|
||||
#FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'nor-sdcard', '', d)}"
|
||||
#FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'nor-emmc', '', d)}"
|
||||
FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'nor-nand-4-256', '', d)}"
|
||||
#FLASHLAYOUT_CONFIG_LABELS_remove = "${@bb.utils.contains('ST_EXAMPLE_IMAGE', '1', 'sdcard', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define label types
|
||||
# Define label types for each config
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOTE: define can be done with following priority assignment:
|
||||
# 1) list_<BOOTSCHEME>_<CONFIG>
|
||||
# 2) list_<BOOTSCHEME>
|
||||
# 3) list_<CONFIG>
|
||||
# 4) list
|
||||
# 5) Default 'list' to 'none' when not defined
|
||||
# NOTE: We use devicetree to allow proper filtering on supported storage device
|
||||
# -----------------------------------------------------------------------------
|
||||
# Priority var assignment (where <OVERRIDES> are the usual override mechanism):
|
||||
# 1) FLASHLAYOUT_TYPE_LABELS_<BOOTSCHEME>_<CONFIG>_<OVERRIDES>
|
||||
# 2) FLASHLAYOUT_TYPE_LABELS_<BOOTSCHEME>_<CONFIG>
|
||||
# 3) FLASHLAYOUT_TYPE_LABELS_<BOOTSCHEME>_<OVERRIDES>
|
||||
# 4) FLASHLAYOUT_TYPE_LABELS_<BOOTSCHEME>
|
||||
# 5) FLASHLAYOUT_TYPE_LABELS_<CONFIG>_<OVERRIDES>
|
||||
# 6) FLASHLAYOUT_TYPE_LABELS_<CONFIG>
|
||||
# 7) FLASHLAYOUT_TYPE_LABELS_<OVERRIDES>
|
||||
# 8) FLASHLAYOUT_TYPE_LABELS
|
||||
# -----------------------------------------------------------------------------
|
||||
# EMMC
|
||||
# Set flashlayout file generation to eval board (mother and daughter) only
|
||||
|
|
@ -91,98 +106,67 @@ FLASHLAYOUT_TYPE_LABELS_emmc = "${STM32MP_DT_FILES_ED} ${STM32MP_DT_FILES_EV}"
|
|||
FLASHLAYOUT_TYPE_LABELS_nand-4-256 = "${STM32MP_DT_FILES_EV}"
|
||||
# NOR
|
||||
# Set flashlayout file generation to eval board only
|
||||
FLASHLAYOUT_TYPE_LABELS_nor-emmc = "${STM32MP_DT_FILES_EV}"
|
||||
FLASHLAYOUT_TYPE_LABELS_nor-nand-4-256 = "${STM32MP_DT_FILES_EV}"
|
||||
FLASHLAYOUT_TYPE_LABELS_nor-sdcard = "${STM32MP_DT_FILES_EV}"
|
||||
FLASHLAYOUT_TYPE_LABELS_nor-sdcard = "${STM32MP_DT_FILES_EV}"
|
||||
# SDCARD
|
||||
# Set flashlayout file generation for all boards
|
||||
FLASHLAYOUT_TYPE_LABELS_sdcard = "${STM32MP_DT_FILES_DK} ${STM32MP_DT_FILES_ED} ${STM32MP_DT_FILES_EV}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define partitions to use
|
||||
# Define partitions to consider for flashlayout file generation
|
||||
# -----------------------------------------------------------------------------
|
||||
# There are few restrictions to follow:
|
||||
# - The partition for the first boot loader should follow the naming rule:
|
||||
# fsbl*
|
||||
# - The partition for the secondary boot loader should follow the naming rule:
|
||||
# ssbl
|
||||
# NOTE: There are few restrictions to follow:
|
||||
# - The partition for the first boot loader should follow the naming
|
||||
# rule: fsbl*
|
||||
# - The partition for the secondary boot loader should follow the naming
|
||||
# rule: ssbl
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOTE: define can be done with following priority assignment:
|
||||
# 1) list_<BOOTSCHEME>_<CONFIG>
|
||||
# 2) list_<BOOTSCHEME>
|
||||
# 3) list_<CONFIG>
|
||||
# 4) list
|
||||
# 5) Default 'list' to 'none' when not defined
|
||||
# Priority var assignment (where <OVERRIDES> are the usual override mechanism):
|
||||
# 1) FLASHLAYOUT_PARTITION_LABELS_<BOOTSCHEME>_<CONFIG>_<OVERRIDES>
|
||||
# 2) FLASHLAYOUT_PARTITION_LABELS_<BOOTSCHEME>_<CONFIG>
|
||||
# 3) FLASHLAYOUT_PARTITION_LABELS_<BOOTSCHEME>_<OVERRIDES>
|
||||
# 4) FLASHLAYOUT_PARTITION_LABELS_<BOOTSCHEME>
|
||||
# 5) FLASHLAYOUT_PARTITION_LABELS_<CONFIG>_<OVERRIDES>
|
||||
# 6) FLASHLAYOUT_PARTITION_LABELS_<CONFIG>
|
||||
# 7) FLASHLAYOUT_PARTITION_LABELS_<OVERRIDES>
|
||||
# 8) FLASHLAYOUT_PARTITION_LABELS
|
||||
# -----------------------------------------------------------------------------
|
||||
VENDORFS_PART = "${@bb.utils.contains('ST_VENDORFS','1','vendorfs','',d)}"
|
||||
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nand-4-256 = "none"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nor-nand-4-256 = "none"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nor-emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nor-sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
# FLASHLAYOUT_PARTITION_IMAGES is initalized through PARTITIONS_CONFIG within 'flashlayout-stm32mp' class
|
||||
FLASHLAYOUT_PARTITION_IMAGES ?= ""
|
||||
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl teeh teed teex bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 ssbl ssbl2 teeh teed teex ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env teeh teed teex empty emptyfsbl1 emptyssbl emptyssbl2 emptyteeh emptyteed emptyteex ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env teeh teed teex empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env teeh teed teex empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl teeh teed teex bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl teeh teed teex ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 ssbl ssbl2 teeh teed teex ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env teeh teed teex empty ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl teeh teed teex ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 ssbl ssbl2 ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty emptyfsbl1 emptyssbl emptyssbl2 ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl bootfs ${VENDORFS_PART} rootfs userfs"
|
||||
|
||||
# To manage properly dynamic boot for NOR use case, our 'boot.src' script scans
|
||||
# one after one the devices to find out expected binaries from bootfs partition.
|
||||
# So we make sure to erase all devices we do not want to use to boot
|
||||
# for our NOR-* boot configurations
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nor-emmc += "nandall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_basic_nor-sdcard += "emmcfsbl1 emmcfsbl2 emmcall nandall"
|
||||
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-nand-4-256 += "emmcfsbl1 emmcfsbl2 emmcall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-emmc += "nandall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_optee_nor-sdcard += "emmcfsbl1 emmcfsbl2 emmcall nandall"
|
||||
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-nand-4-256 += "emmcfsbl1 emmcfsbl2 emmcall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-emmc += "nandall sdcardall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-sdcard += "emmcfsbl1 emmcfsbl2 emmcall nandall"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_emmc = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nand-4-256 = "fsbl1-boot ssbl-boot fsbl1 ssbl ssbl2 ubifs"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_nor-sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl env empty ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_LABELS_trusted_sdcard = "fsbl1-boot ssbl-boot fsbl1 fsbl2 ssbl ${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Partition configuration for each partition label
|
||||
# NOTE: each item can be defined with following priority assignment:
|
||||
# 1) item_<BOOTSCHEME>_<CONFIG>_<PARTITION>
|
||||
# 2) item_<BOOTSCHEME>_<CONFIG>
|
||||
# 3) item_<BOOTSCHEME>_<PARTITION>
|
||||
# 4) item_<BOOTSCHEME>
|
||||
# 5) item_<CONFIG>_<PARTITION>
|
||||
# 6) item_<CONFIG>
|
||||
# 7) item_<PARTITION>
|
||||
# 8) item
|
||||
# 9) Default 'item' to 'none' when not defined
|
||||
# Partition properties configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
# Priority var assignment (where <OVERRIDES> are the usual override mechanism
|
||||
# with dynamic append of ongoing 'partition name' item):
|
||||
# 1) FLASHLAYOUT_PARTITION_xxx_<BOOTSCHEME>_<CONFIG>_<OVERRIDES>
|
||||
# 2) FLASHLAYOUT_PARTITION_xxx_<BOOTSCHEME>_<CONFIG>
|
||||
# 3) FLASHLAYOUT_PARTITION_xxx_<BOOTSCHEME>_<OVERRIDES>
|
||||
# 4) FLASHLAYOUT_PARTITION_xxx_<BOOTSCHEME>
|
||||
# 5) FLASHLAYOUT_PARTITION_xxx_<CONFIG>_<OVERRIDES>
|
||||
# 6) FLASHLAYOUT_PARTITION_xxx_<CONFIG>
|
||||
# 7) FLASHLAYOUT_PARTITION_xxx_<OVERRIDES>
|
||||
# 8) FLASHLAYOUT_PARTITION_xxx
|
||||
# 9) Default 'FLASHLAYOUT_PARTITION_xxx' to 'none' when not defined
|
||||
# -----------------------------------------------------------------------------
|
||||
FLASHLAYOUT_PARTITION_ENABLE = "P"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_fsbl1-boot = "-"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_ssbl-boot = "-"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_empty = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyfsbl1 = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyssbl = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyssbl2 = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyteeh = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyteed = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emptyteex = "PE"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_env = "PED"
|
||||
# Specific to manage partition erase
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emmcall = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emmcfsbl1 = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emmcfsbl2 = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_nandall = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_norall = "PED"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_sdcardall = "PED"
|
||||
# Due to association of u-boot and env, the ssbl partition need to be deleted
|
||||
FLASHLAYOUT_PARTITION_ENABLE_sdcard_ssbl = "PD"
|
||||
FLASHLAYOUT_PARTITION_ENABLE_emmc_ssbl = "PD"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Partition ID
|
||||
|
|
@ -198,162 +182,75 @@ FLASHLAYOUT_PARTITION_ENABLE_sdcardall = "PED"
|
|||
# there are two reserved IDs
|
||||
# 0x01 for FSBL
|
||||
# 0x03 for SSBL
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl1-boot = "0x01"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl-boot = "0x03"
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl1 = "0x04"
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl2 = "0x05"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl = "0x06"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl2 = "0x07"
|
||||
FLASHLAYOUT_PARTITION_ID_teeh = "0x0A"
|
||||
FLASHLAYOUT_PARTITION_ID_teed = "0x0B"
|
||||
FLASHLAYOUT_PARTITION_ID_teex = "0x0C"
|
||||
FLASHLAYOUT_PARTITION_ID_empty = "0x10"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyfsbl1 = "0x11"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyssbl = "0x12"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyssbl2 = "0x13"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyteeh = "0x14"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyteed = "0x15"
|
||||
FLASHLAYOUT_PARTITION_ID_emptyteex = "0x16"
|
||||
FLASHLAYOUT_PARTITION_ID_env = "0x20"
|
||||
FLASHLAYOUT_PARTITION_ID_ubifs = "0x21"
|
||||
FLASHLAYOUT_PARTITION_ID_bootfs = "0x21"
|
||||
FLASHLAYOUT_PARTITION_ID_vendorfs = "0x22"
|
||||
FLASHLAYOUT_PARTITION_ID_rootfs = "0x23"
|
||||
FLASHLAYOUT_PARTITION_ID_userfs = "0x24"
|
||||
# Specific to manage partition erase
|
||||
FLASHLAYOUT_PARTITION_ID_emmcfsbl1 = "0x08"
|
||||
FLASHLAYOUT_PARTITION_ID_emmcfsbl2 = "0x09"
|
||||
FLASHLAYOUT_PARTITION_ID_emmcall = "0x30"
|
||||
FLASHLAYOUT_PARTITION_ID_nandall = "0x40"
|
||||
FLASHLAYOUT_PARTITION_ID_norall = "0x50"
|
||||
FLASHLAYOUT_PARTITION_ID_sdcardall = "0x60"
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl1-boot = "0x01"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl-boot = "0x03"
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl1 = "0x04"
|
||||
FLASHLAYOUT_PARTITION_ID_fsbl2 = "0x05"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl = "0x06"
|
||||
FLASHLAYOUT_PARTITION_ID_ssbl2 = "0x07"
|
||||
FLASHLAYOUT_PARTITION_ID_teeh = "0x0A"
|
||||
FLASHLAYOUT_PARTITION_ID_teed = "0x0B"
|
||||
FLASHLAYOUT_PARTITION_ID_teex = "0x0C"
|
||||
FLASHLAYOUT_PARTITION_ID_empty = "0x10"
|
||||
FLASHLAYOUT_PARTITION_ID_env = "0x20"
|
||||
FLASHLAYOUT_PARTITION_ID_ubifs = "0x21"
|
||||
|
||||
FLASHLAYOUT_PARTITION_TYPE = "Binary"
|
||||
FLASHLAYOUT_PARTITION_TYPE_nand-4-256_fsbl1 = "Binary(2)"
|
||||
FLASHLAYOUT_PARTITION_TYPE_ubifs = "System"
|
||||
FLASHLAYOUT_PARTITION_TYPE_bootfs = "System"
|
||||
FLASHLAYOUT_PARTITION_TYPE_vendorfs = "FileSystem"
|
||||
FLASHLAYOUT_PARTITION_TYPE_rootfs = "FileSystem"
|
||||
FLASHLAYOUT_PARTITION_TYPE_userfs = "FileSystem"
|
||||
# Specific to manage partition erase
|
||||
FLASHLAYOUT_PARTITION_TYPE_emmcall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_nandall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_norall = "RawImage"
|
||||
FLASHLAYOUT_PARTITION_TYPE_sdcardall = "RawImage"
|
||||
|
||||
FLASHLAYOUT_PARTITION_DEVICE_emmc = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nand-4-256 = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor = "${DEVICE_NOR}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc = "${DEVICE_NOR}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_bootfs = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_vendorfs = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_rootfs = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_userfs = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256 = "${DEVICE_NOR}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyfsbl1 = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyssbl = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyssbl2 = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyteeh = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyteed = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emptyteex = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_ubifs = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard = "${DEVICE_NOR}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_bootfs = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_vendorfs = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_rootfs = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_userfs = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_sdcard = "${DEVICE_SDCARD}"
|
||||
# Specific for fsbl1-boot ssbl-boot partitions
|
||||
FLASHLAYOUT_PARTITION_DEVICE_basic_fsbl1-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_basic_ssbl-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_optee_fsbl1-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_optee_ssbl-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_trusted_fsbl1-boot = "none"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_trusted_ssbl-boot = "none"
|
||||
# Specific to manage partition erase for NOR-* boot
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_nandall = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-emmc_sdcardall = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emmcall = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emmcfsbl1 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_emmcfsbl2 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-nand-4-256_sdcardall = "${DEVICE_SDCARD}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_emmcall = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_emmcfsbl1 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_emmcfsbl2 = "${DEVICE_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard_nandall = "${DEVICE_NAND}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_emmc = "none:fsbl1-boot ssbl-boot,${DEVICE_EMMC}:default"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nand-4-256 = "none:fsbl1-boot ssbl-boot,${DEVICE_NAND}:default"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_nor-sdcard = "none:fsbl1-boot ssbl-boot,${DEVICE_NOR}:default,${DEVICE_SDCARD}:${FLASHLAYOUT_PARTITION_IMAGES}"
|
||||
FLASHLAYOUT_PARTITION_DEVICE_sdcard = "none:fsbl1-boot ssbl-boot,${DEVICE_SDCARD}:default"
|
||||
|
||||
FLASHLAYOUT_PARTITION_OFFSET_fsbl1-boot = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_ssbl-boot = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl1 = "boot1"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl2 = "boot2"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_ssbl = "${DEVICE_START_OFFSET_mmc1}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nand-4-256_fsbl1 = "${DEVICE_START_OFFSET_nand0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-sdcard_fsbl1 = "${DEVICE_START_OFFSET_nor0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-sdcard_bootfs = "${DEVICE_START_OFFSET_mmc0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-emmc_fsbl1 = "${DEVICE_START_OFFSET_nor0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-emmc_bootfs = "${DEVICE_START_OFFSET_mmc1}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-nand-4-256_fsbl1 = "${DEVICE_START_OFFSET_nor0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nor-nand-4-256_emptyfsbl1 = "${DEVICE_START_OFFSET_nand0}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_sdcard_fsbl1 = "${DEVICE_START_OFFSET_mmc0}"
|
||||
# Specific to manage partition erase
|
||||
FLASHLAYOUT_PARTITION_OFFSET_nandall = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_sdcardall = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmcall = "0x0"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmcfsbl1 = "${FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl1}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmcfsbl2 = "${FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl2}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl1 = "${DEVICE_START_OFFSET_BOOT0_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_fsbl2 = "${DEVICE_START_OFFSET_BOOT1_EMMC}"
|
||||
FLASHLAYOUT_PARTITION_OFFSET_emmc_ssbl = "${DEVICE_START_OFFSET_EMMC}"
|
||||
|
||||
# Size defined in Kbytes
|
||||
FLASHLAYOUT_PARTITION_SIZE_fsbl1 = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_fsbl1 = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_fsbl2 = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_ssbl = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_ssbl2 = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_env = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_env = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_teeh = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_teed = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_teed = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_teex = "256"
|
||||
# Specific override for partition size as the configuration should follow
|
||||
# the U-Boot source code where these partition sizes are hard coded
|
||||
FLASHLAYOUT_PARTITION_SIZE_empty = "0"
|
||||
# Specific override for MTD partitions hard coded on U-Boot side
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_fsbl1 = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_ssbl = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_ssbl2 = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teeh = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teed = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teex = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_empty = "0"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyfsbl1 = "${FLASHLAYOUT_PARTITION_SIZE_nand-4-256_fsbl1}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyssbl = "${FLASHLAYOUT_PARTITION_SIZE_ssbl}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyssbl2 = "${FLASHLAYOUT_PARTITION_SIZE_ssbl2}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyteeh = "${FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teeh}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyteed = "${FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teed}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_emptyteex = "${FLASHLAYOUT_PARTITION_SIZE_nand-4-256_teex}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_bootfs = "${BOOTFS_PARTITION_SIZE}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_vendorfs = "${VENDORFS_PARTITION_SIZE}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_rootfs = "${IMAGE_ROOTFS_MAXSIZE}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_ubifs = "none"
|
||||
FLASHLAYOUT_PARTITION_SIZE_userfs = "${USERFS_PARTITION_SIZE}"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_fsbl1 = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_fsbl2 = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_ssbl = "2048"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_env = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_teeh = "256"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_teed = "512"
|
||||
FLASHLAYOUT_PARTITION_SIZE_nor-sdcard_teex = "256"
|
||||
|
||||
# Set binaries to use for each partition
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl1-boot = "tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl-boot = "u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl1 = "tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_basic_fsbl1 = "u-boot-spl.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl2 = "tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_basic_fsbl2 = "u-boot-spl.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl = "u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_basic_ssbl = "u-boot.img"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl2 = "u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teeh = "tee-header_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teed = "tee-pageable_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teex = "tee-pager_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_env = "none"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl1-boot = "arm-trusted-firmware/tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl-boot = "bootloader/u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl1 = "arm-trusted-firmware/tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_fsbl2 = "arm-trusted-firmware/tf-a.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl = "bootloader/u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ssbl2 = "bootloader/u-boot.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teeh = "optee/tee-header_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teed = "optee/tee-pageable_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_teex = "optee/tee-pager_v2.stm32"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_ubifs = "${IMAGE_LINK_NAME}_nand_4_256_multivolume.ubi"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_bootfs = "${STM32MP_BOOTFS_IMAGE}-${DISTRO}-${MACHINE}.ext4"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_vendorfs = "${STM32MP_VENDORFS_IMAGE}-${DISTRO}-${MACHINE}.ext4"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_rootfs = "${IMAGE_LINK_NAME}.ext4"
|
||||
FLASHLAYOUT_PARTITION_BIN2LOAD_userfs = "${STM32MP_USERFS_IMAGE}-${DISTRO}-${MACHINE}.ext4"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Use the 'BIN2BOOT_REPLACE_PATTERNS' var to allow dynamic binary renaming for
|
||||
# the bootloader binaries. This is only required for fsbl1-boot and ssbl-boot
|
||||
# partitions that provides the binary to flash the device.
|
||||
# Use the 'FLASHLAYOUT_PARTITION_REPLACE_PATTERNS' var to allow dynamic binary
|
||||
# renaming for the bootloader binaries. This is only required for fsbl1-boot and
|
||||
# ssbl-boot partitions that provides the binary to flash the device.
|
||||
# The format to follow is:
|
||||
# '<PATTERN2REPLACE_1>;<PATTERN2SET_1> <PATTERN2REPLACE_2>;<PATTERN2SET_2>'
|
||||
# And the pattern to replace in binary name is only searched as:
|
||||
|
|
@ -361,17 +258,14 @@ FLASHLAYOUT_PARTITION_BIN2LOAD_userfs = "${STM32MP_USERFS_IMAGE}-${DISTRO}
|
|||
# or
|
||||
# '-<PATTERN>-'
|
||||
# -----------------------------------------------------------------------------
|
||||
# The 'basic' bootscheme does not support Programmer mode, so use 'trusted' one
|
||||
# (valid for both fsbl1-boot and ssbl-boot)
|
||||
BIN2BOOT_REPLACE_PATTERNS_DEFAULT = "basic;trusted"
|
||||
# We use specific tf-a serialboot mode for any bootscheme for fsbl1-boot
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_fsbl1-boot_append = " optee;serialboot trusted;serialboot"
|
||||
# For u-boot the 'optee' bootscheme is the same than trusted so use 'trusted'
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_ssbl-boot_append = " optee;trusted"
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_ssbl_append = " optee;trusted"
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_ssbl2_append = " optee;trusted"
|
||||
|
||||
# The daughter board does not support Programmer mode, so use eval one
|
||||
# (valid for both fsbl1-boot and ssbl-boot)
|
||||
BIN2BOOT_REPLACE_PATTERNS_DEFAULT_append = " ed1;ev1"
|
||||
|
||||
# Apply for fsbl1-boot and ssbl-boot
|
||||
BIN2BOOT_REPLACE_PATTERNS_fsbl1-boot = "${BIN2BOOT_REPLACE_PATTERNS_DEFAULT}"
|
||||
BIN2BOOT_REPLACE_PATTERNS_ssbl-boot = "${BIN2BOOT_REPLACE_PATTERNS_DEFAULT}"
|
||||
|
||||
# For fsbl1-boot, the 'optee' bootscheme does not support Programmer mode, so
|
||||
# prefer the 'trusted' one.
|
||||
BIN2BOOT_REPLACE_PATTERNS_fsbl1-boot_append = " optee;trusted"
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_fsbl1-boot_append = " ed1;ev1"
|
||||
FLASHLAYOUT_PARTITION_REPLACE_PATTERNS_ssbl-boot_append = " ed1;ev1"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
|
|||
# u-boot
|
||||
# =========================================================================
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-stm32mp"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-stm32mp"
|
||||
|
||||
# =========================================================================
|
||||
# trusted-firmware-a
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
#@DESCRIPTION: STM32MP machine storage device configuration
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define device storage name and type mapping
|
||||
# -----------------------------------------------------------------------------
|
||||
DEVICE_STORAGE ?= "EMMC:mmc1, NAND:nand0, NOR:nor0, SDCARD:mmc0"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define device storage name alias
|
||||
# -----------------------------------------------------------------------------
|
||||
DEVICE_STORAGE_NAMES += "EMMC"
|
||||
DEVICE_STORAGE_NAMES += "NAND"
|
||||
DEVICE_STORAGE_NAMES += "NOR"
|
||||
DEVICE_STORAGE_NAMES += "SDCARD"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Define device storage type
|
||||
# -----------------------------------------------------------------------------
|
||||
DEVICE_STORAGE_TYPES += "mmc0"
|
||||
DEVICE_STORAGE_TYPES += "mmc1"
|
||||
DEVICE_STORAGE_TYPES += "mmc2"
|
||||
DEVICE_STORAGE_TYPES += "nand0"
|
||||
DEVICE_STORAGE_TYPES += "nor0"
|
||||
|
||||
python () {
|
||||
"""
|
||||
This function configure dynamically the needed alias between generic storage
|
||||
device name and device type.
|
||||
Output for this function is the initialization of:
|
||||
DEVICE_<device_name> = '<device_type>'
|
||||
DEVICE_<device_type> = '<device_name>'
|
||||
"""
|
||||
device_storage_config = d.getVar('DEVICE_STORAGE') or ''
|
||||
if not device_storage_config:
|
||||
return
|
||||
if not device_storage_config.strip():
|
||||
return
|
||||
if len(device_storage_config.split(',')) > 0:
|
||||
# Init supported device storage configuration
|
||||
supported_device_names = (d.getVar('DEVICE_STORAGE_NAMES') or '').split()
|
||||
supported_device_types = (d.getVar('DEVICE_STORAGE_TYPES') or '').split()
|
||||
# Loop for all storage device configurations
|
||||
for device_storage in device_storage_config.split(','):
|
||||
device_name = device_storage.split(':')[0].strip()
|
||||
device_type = device_storage.split(':')[1].strip()
|
||||
# Check for configuration consistency
|
||||
if device_name and device_type:
|
||||
# Make sure configuration is correctly done
|
||||
if device_name not in supported_device_names:
|
||||
bb.fatal('Wrong DEVICE_STORAGE configuration: "%s" is not part of supported device name (%s)' % (device_name, supported_device_names))
|
||||
if device_type not in supported_device_types:
|
||||
bb.fatal('Wrong DEVICE_STORAGE configuration: "%s" is not part of supported device type (%s)' % (device_type, supported_device_types))
|
||||
# Configure alias
|
||||
d.setVar('DEVICE_%s' % device_name, device_type)
|
||||
d.setVar('DEVICE_%s' % device_type, device_name)
|
||||
else:
|
||||
bb.fatal('Wrong DEVICE_STORAGE configuration: expecting DEVICE_STORAGE = "<device_name1>:<devie_type1>,<device_name2>:<device_type2>"')
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# EMMC
|
||||
# Extra space is required to store 'Protective MBR' and 'Primary GPT Header'
|
||||
# Currently the required size is 17kBytes (i.e. 0x4400)
|
||||
# We need to align this size to get the first offset to use
|
||||
DEVICE_START_OFFSET_EMMC ?= "0x00080000"
|
||||
DEVICE_ALIGNMENT_SIZE_EMMC ?= "0x00080000"
|
||||
|
||||
# Specific to EMMC, there are two boot partitions using specific offset to access
|
||||
DEVICE_START_OFFSET_BOOT0_EMMC ?= "boot1"
|
||||
DEVICE_START_OFFSET_BOOT1_EMMC ?= "boot2"
|
||||
|
||||
# Configure the rootfs partition uid used in gpt partition table for EMMC
|
||||
DEVICE_PARTUUID_ROOTFS_EMMC ?= "${@d.getVar(d.expand('DEVICE_PARTUUID_ROOTFS_${DEVICE_EMMC}')) or ''}"
|
||||
|
||||
# Configure the list of boards that enable EMMC
|
||||
DEVICE_BOARD_ENABLE_EMMC += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', '${STM32MP_DT_FILES_ED}', '', d)}"
|
||||
DEVICE_BOARD_ENABLE_EMMC += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'emmc', '${STM32MP_DT_FILES_EV}', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# NAND
|
||||
DEVICE_START_OFFSET_NAND ?= "0x00000000"
|
||||
DEVICE_ALIGNMENT_SIZE_NAND ?= "0x00040000"
|
||||
|
||||
# Configure the list of boards that enable EMMC
|
||||
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)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOR
|
||||
DEVICE_START_OFFSET_NOR ?= "0x00000000"
|
||||
DEVICE_ALIGNMENT_SIZE_NOR ?= "0x00010000"
|
||||
|
||||
# Configure the list of boards that enable EMMC
|
||||
DEVICE_BOARD_ENABLE_NOR += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'nor-sdcard' , '${STM32MP_DT_FILES_EV}', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# SDCARD
|
||||
# Extra space is required to store 'Protective MBR' and 'Primary GPT Header'
|
||||
# Currently the required size is 17kBytes (i.e. 0x4400)
|
||||
# We need to align this size to get the first offset to use
|
||||
DEVICE_START_OFFSET_SDCARD ?= "0x00004400"
|
||||
DEVICE_ALIGNMENT_SIZE_SDCARD ?= "0x00000200"
|
||||
|
||||
# Configure the rootfs partition uid used in gpt partition table for SDCARD
|
||||
DEVICE_PARTUUID_ROOTFS_SDCARD ?= "${@d.getVar(d.expand('DEVICE_PARTUUID_ROOTFS_${DEVICE_SDCARD}')) or ''}"
|
||||
|
||||
# Configure the list of boards that enable SDCARD
|
||||
DEVICE_BOARD_ENABLE_SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${STM32MP_DT_FILES_DK}', '', d)}"
|
||||
DEVICE_BOARD_ENABLE_SDCARD += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'sdcard', 'nor-sdcard' ], '${STM32MP_DT_FILES_ED}', '', d)}"
|
||||
DEVICE_BOARD_ENABLE_SDCARD += "${@bb.utils.contains_any('BOOTDEVICE_LABELS', [ 'sdcard', 'nor-sdcard' ], '${STM32MP_DT_FILES_EV}', '', d)}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fixed configuration from U-Boot source code
|
||||
# -----------------------------------------------------------------------------
|
||||
DEVICE_PARTUUID_ROOTFS_mmc0 ?= "e91c4e10-16e6-4c0e-bd0e-77becf4a3582"
|
||||
DEVICE_PARTUUID_ROOTFS_mmc1 ?= "491f6117-415d-4f53-88c9-6e0de54deac6"
|
||||
DEVICE_PARTUUID_ROOTFS_mmc2 ?= "fd58f1c7-be0d-4338-8ee9-ad8f050aeb18"
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: stm32mp1-disco
|
||||
#@DESCRIPTION: Configuration for STM32MP157C-DK2 board (Trusted boot and SDcard only)
|
||||
#@DESCRIPTION: [EXAMPLE] STM32MP157C-DK2 board ONLY with Trusted boot and SDcard support
|
||||
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python
|
||||
|
||||
include conf/machine/include/st-machine-common-stm32mp.inc
|
||||
include conf/machine/include/st-machine-providers-stm32mp.inc
|
||||
|
||||
# Define specific familly common machine name
|
||||
MACHINEOVERRIDES .= ":stm32mp1common"
|
||||
|
||||
# =========================================================================
|
||||
# Chip architecture
|
||||
|
|
@ -14,7 +18,6 @@ include conf/machine/include/tune-cortexa7.inc
|
|||
# =========================================================================
|
||||
# boot scheme
|
||||
# =========================================================================
|
||||
#BOOTSCHEME_LABELS += "basic"
|
||||
BOOTSCHEME_LABELS += "trusted"
|
||||
#BOOTSCHEME_LABELS += "optee"
|
||||
|
||||
|
|
@ -24,8 +27,6 @@ BOOTSCHEME_LABELS += "trusted"
|
|||
# Define the boot device supported
|
||||
#BOOTDEVICE_LABELS += "emmc"
|
||||
#BOOTDEVICE_LABELS += "nand-4-256"
|
||||
#BOOTDEVICE_LABELS += "nor-emmc"
|
||||
#BOOTDEVICE_LABELS += "nor-nand-4-256"
|
||||
#BOOTDEVICE_LABELS += "nor-sdcard"
|
||||
BOOTDEVICE_LABELS += "sdcard"
|
||||
|
||||
|
|
@ -33,25 +34,26 @@ BOOTDEVICE_LABELS += "sdcard"
|
|||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per board
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157a-dk1"
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157a-dk1 stm32mp157d-dk1"
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157c-dk2 stm32mp157f-dk2"
|
||||
STM32MP_DT_FILES_DK += "stm32mp157c-dk2"
|
||||
#STM32MP_DT_FILES_ED += "stm32mp157c-ed1"
|
||||
#STM32MP_DT_FILES_EV += "stm32mp157c-ev1"
|
||||
#STM32MP_DT_FILES_ED += "stm32mp157c-ed1 stm32mp157f-ed1"
|
||||
#STM32MP_DT_FILES_EV += "stm32mp157a-ev1 stm32mp157c-ev1 stm32mp157d-ev1 stm32mp157f-ev1"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
# =========================================================================
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "watchdog"
|
||||
MACHINE_FEATURES += "bluetooth"
|
||||
MACHINE_FEATURES += "wifi"
|
||||
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
|
||||
# Splashscreen enabled
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "m4copro"
|
||||
|
||||
# =========================================================================
|
||||
# Image
|
||||
# =========================================================================
|
||||
# Add ubi FSTYPES to default ones for nand volumes
|
||||
#IMAGE_FSTYPES += "stmultiubi"
|
||||
# Bluetooth
|
||||
BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
|
||||
# Wifi
|
||||
WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
|
|
@ -62,6 +64,8 @@ MACHINE_FEATURES += "splashscreen"
|
|||
# Define the devicetree for Linux A7 examples
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157c-dk2-a7-examples"
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157c-ev1-a7-examples"
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157f-dk2-a7-examples"
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157f-ev1-a7-examples"
|
||||
|
||||
# =========================================================================
|
||||
# M4 copro
|
||||
|
|
@ -69,6 +73,8 @@ LINUX_A7_EXAMPLES_DT += "stm32mp157c-dk2-a7-examples"
|
|||
# Define the devicetree for M4 example
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157c-dk2-m4-examples"
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157c-ev1-m4-examples"
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157f-dk2-m4-examples"
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157f-ev1-m4-examples"
|
||||
|
||||
# Define specific board reference to use
|
||||
M4_BOARDS = "STM32MP157C-DK2"
|
||||
|
|
@ -76,20 +82,20 @@ M4_BOARDS = "STM32MP157C-DK2"
|
|||
# =========================================================================
|
||||
# extlinux configuration
|
||||
# =========================================================================
|
||||
# As example, modify the default boot config for each target to M4 config
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-dk2_sdcard = "stm32mp157c-dk2-m4-examples-sdcard"
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-dk2_sdcard-optee = "stm32mp157c-dk2-m4-examples-sdcard-optee"
|
||||
# As example, modify the default boot config to M4 config
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_stm32mp157c-dk2 = "stm32mp157c-dk2-m4-examples"
|
||||
|
||||
# =========================================================================
|
||||
# WIC for sdcard raw image
|
||||
# =========================================================================
|
||||
WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
|
||||
WKS_FILE_DEPENDS ?= " \
|
||||
u-boot-stm32mp \
|
||||
tf-a-stm32mp \
|
||||
${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee-os-stm32mp', '', d)} \
|
||||
virtual/bootloader \
|
||||
virtual/trusted-firmware-a \
|
||||
virtual/trusted-firmware-a-serialboot \
|
||||
${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'virtual/optee-os', '', d)} \
|
||||
st-image-bootfs \
|
||||
st-image-vendorfs \
|
||||
${@bb.utils.contains('ST_VENDORFS','1','st-image-vendorfs', '', d)} \
|
||||
st-image-userfs \
|
||||
"
|
||||
TRUSTED_WIC_FILE = "${@bb.utils.contains('ST_VENDORFS','1','sdcard-stm32mp157c-dk2-trusted-vendorfs-1GB.wks.in','sdcard-stm32mp157c-dk2-trusted-1GB.wks.in',d)}"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: stm32mp1-eval
|
||||
#@DESCRIPTION: Configuration for STM32MP157C-EV1 board (Trusted boot and SDcard only)
|
||||
#@DESCRIPTION: [EXAMPLE] STM32MP157C-EV1 board ONLY with Trusted boot and SDcard support
|
||||
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python
|
||||
|
||||
include conf/machine/include/st-machine-common-stm32mp.inc
|
||||
include conf/machine/include/st-machine-providers-stm32mp.inc
|
||||
|
||||
# Define specific familly common machine name
|
||||
MACHINEOVERRIDES .= ":stm32mp1common"
|
||||
|
||||
# =========================================================================
|
||||
# Chip architecture
|
||||
|
|
@ -14,7 +18,6 @@ include conf/machine/include/tune-cortexa7.inc
|
|||
# =========================================================================
|
||||
# boot scheme
|
||||
# =========================================================================
|
||||
#BOOTSCHEME_LABELS += "basic"
|
||||
BOOTSCHEME_LABELS += "trusted"
|
||||
#BOOTSCHEME_LABELS += "optee"
|
||||
|
||||
|
|
@ -24,8 +27,6 @@ BOOTSCHEME_LABELS += "trusted"
|
|||
# Define the boot device supported
|
||||
#BOOTDEVICE_LABELS += "emmc"
|
||||
#BOOTDEVICE_LABELS += "nand-4-256"
|
||||
#BOOTDEVICE_LABELS += "nor-emmc"
|
||||
#BOOTDEVICE_LABELS += "nor-nand-4-256"
|
||||
#BOOTDEVICE_LABELS += "nor-sdcard"
|
||||
BOOTDEVICE_LABELS += "sdcard"
|
||||
|
||||
|
|
@ -33,25 +34,26 @@ BOOTDEVICE_LABELS += "sdcard"
|
|||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per board
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157a-dk1"
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157c-dk2"
|
||||
#STM32MP_DT_FILES_ED += "stm32mp157c-ed1"
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157a-dk1 stm32mp157d-dk1"
|
||||
#STM32MP_DT_FILES_DK += "stm32mp157c-dk2 stm32mp157f-dk2"
|
||||
#STM32MP_DT_FILES_ED += "stm32mp157c-ed1 stm32mp157f-ed1"
|
||||
#STM32MP_DT_FILES_EV += "stm32mp157a-ev1 stm32mp157c-ev1 stm32mp157d-ev1 stm32mp157f-ev1"
|
||||
STM32MP_DT_FILES_EV += "stm32mp157c-ev1"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
# =========================================================================
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "watchdog"
|
||||
#MACHINE_FEATURES += "bluetooth"
|
||||
#MACHINE_FEATURES += "wifi"
|
||||
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
|
||||
# Splashscreen enabled
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "m4copro"
|
||||
|
||||
# =========================================================================
|
||||
# Image
|
||||
# =========================================================================
|
||||
# Add ubi FSTYPES to default ones for nand volumes
|
||||
#IMAGE_FSTYPES += "stmultiubi"
|
||||
# Bluetooth
|
||||
#BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
|
||||
# Wifi
|
||||
#WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
|
|
@ -62,6 +64,8 @@ KERNEL_MODULE_AUTOLOAD = "goodix"
|
|||
# Define the devicetree for Linux A7 examples
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157c-dk2-a7-examples"
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157c-ev1-a7-examples"
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157f-dk2-a7-examples"
|
||||
#LINUX_A7_EXAMPLES_DT += "stm32mp157f-ev1-a7-examples"
|
||||
|
||||
# =========================================================================
|
||||
# M4 copro
|
||||
|
|
@ -69,6 +73,8 @@ LINUX_A7_EXAMPLES_DT += "stm32mp157c-ev1-a7-examples"
|
|||
# Define the devicetree for M4 example
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157c-dk2-m4-examples"
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157c-ev1-m4-examples"
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157f-dk2-m4-examples"
|
||||
#CUBE_M4_EXAMPLES_DT += "stm32mp157f-ev1-m4-examples"
|
||||
|
||||
# Define specific board reference to use
|
||||
M4_BOARDS = "STM32MP157C-EV1"
|
||||
|
|
@ -77,6 +83,5 @@ M4_BOARDS = "STM32MP157C-EV1"
|
|||
# extlinux configuration
|
||||
# =========================================================================
|
||||
# As example, modify the default boot config for each target to M4 config
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_sdcard = "stm32mp157c-ev1-m4-examples-sdcard"
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_mp157c-ev1_sdcard-optee = "stm32mp157c-ev1-m4-examples-sdcard-optee"
|
||||
#UBOOT_EXTLINUX_DEFAULT_LABEL_stm32mp157c-ev1 = "stm32mp157c-ev1-m4-examples"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
#@NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python
|
||||
|
||||
include conf/machine/include/st-machine-common-stm32mp.inc
|
||||
include conf/machine/include/st-machine-providers-stm32mp.inc
|
||||
|
||||
# Define specific familly common machine name
|
||||
MACHINEOVERRIDES .= ":stm32mp1common"
|
||||
|
||||
# =========================================================================
|
||||
# Chip architecture
|
||||
|
|
@ -14,7 +18,6 @@ include conf/machine/include/tune-cortexa7.inc
|
|||
# =========================================================================
|
||||
# boot scheme
|
||||
# =========================================================================
|
||||
BOOTSCHEME_LABELS += "basic"
|
||||
BOOTSCHEME_LABELS += "trusted"
|
||||
BOOTSCHEME_LABELS += "optee"
|
||||
|
||||
|
|
@ -24,8 +27,6 @@ BOOTSCHEME_LABELS += "optee"
|
|||
# Define the boot device supported
|
||||
BOOTDEVICE_LABELS += "emmc"
|
||||
BOOTDEVICE_LABELS += "nand-4-256"
|
||||
BOOTDEVICE_LABELS += "nor-emmc"
|
||||
BOOTDEVICE_LABELS += "nor-nand-4-256"
|
||||
BOOTDEVICE_LABELS += "nor-sdcard"
|
||||
BOOTDEVICE_LABELS += "sdcard"
|
||||
|
||||
|
|
@ -33,25 +34,25 @@ BOOTDEVICE_LABELS += "sdcard"
|
|||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per board
|
||||
STM32MP_DT_FILES_DK += "stm32mp157a-dk1"
|
||||
STM32MP_DT_FILES_DK += "stm32mp157c-dk2"
|
||||
STM32MP_DT_FILES_ED += "stm32mp157c-ed1"
|
||||
STM32MP_DT_FILES_EV += "stm32mp157c-ev1"
|
||||
STM32MP_DT_FILES_DK += "stm32mp157a-dk1 stm32mp157d-dk1"
|
||||
STM32MP_DT_FILES_DK += "stm32mp157c-dk2 stm32mp157f-dk2"
|
||||
STM32MP_DT_FILES_ED += "stm32mp157c-ed1 stm32mp157f-ed1"
|
||||
STM32MP_DT_FILES_EV += "stm32mp157a-ev1 stm32mp157c-ev1 stm32mp157d-ev1 stm32mp157f-ev1"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
# =========================================================================
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "watchdog"
|
||||
MACHINE_FEATURES += "bluetooth"
|
||||
MACHINE_FEATURES += "wifi"
|
||||
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
|
||||
# Splashscreen enabled
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "m4copro"
|
||||
|
||||
# =========================================================================
|
||||
# Image
|
||||
# =========================================================================
|
||||
# Add ubi FSTYPES to default ones for nand volumes
|
||||
IMAGE_FSTYPES += "stmultiubi"
|
||||
# Bluetooth
|
||||
BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
|
||||
# Wifi
|
||||
WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
|
|
@ -62,6 +63,8 @@ KERNEL_MODULE_AUTOLOAD = "goodix"
|
|||
# Define the devicetree for Linux A7 examples
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157c-dk2-a7-examples"
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157c-ev1-a7-examples"
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157f-dk2-a7-examples"
|
||||
LINUX_A7_EXAMPLES_DT += "stm32mp157f-ev1-a7-examples"
|
||||
|
||||
# =========================================================================
|
||||
# M4 copro
|
||||
|
|
@ -69,3 +72,5 @@ LINUX_A7_EXAMPLES_DT += "stm32mp157c-ev1-a7-examples"
|
|||
# Define the devicetree for M4 example
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157c-dk2-m4-examples"
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157c-ev1-m4-examples"
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157f-dk2-m4-examples"
|
||||
CUBE_M4_EXAMPLES_DT += "stm32mp157f-ev1-m4-examples"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-optee.stm32
|
||||
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-serialboot.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
PED 0x08 emmcfsbl1 Binary mmc1 boot1 none
|
||||
PED 0x09 emmcfsbl2 Binary mmc1 boot2 none
|
||||
PED 0x30 emmcall RawImage mmc1 0x0 none
|
||||
|
|
|
|||
|
|
|
@ -1,10 +1,10 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary mmc1 boot1 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary mmc1 boot2 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary mmc1 0x00080000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-serialboot.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary mmc1 boot1 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary mmc1 boot2 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
PD 0x06 ssbl Binary mmc1 0x00080000 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x21 bootfs System mmc1 0x00280000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x22 vendorfs FileSystem mmc1 0x04280000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x23 rootfs FileSystem mmc1 0x05280000 st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc1 0x33C80000 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc1 0x34100000 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
|
|
|
|||
|
|
|
@ -1,7 +1,7 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary(2) nand0 0x00000000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nand0 0x00200000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x07 ssbl2 Binary nand0 0x00400000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-serialboot.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary(2) nand0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nand0 0x00200000 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x07 ssbl2 Binary nand0 0x00400000 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x21 ubifs System nand0 0x00600000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
|
||||
|
|
|
|||
|
|
|
@ -1,14 +0,0 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary nor0 0x00000000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary nor0 0x00040000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nor0 0x00080000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
PED 0x20 env Binary nor0 0x00280000 none
|
||||
PE 0x10 empty Binary nor0 0x002C0000 none
|
||||
P 0x21 bootfs System mmc1 0x00080000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x22 vendorfs FileSystem mmc1 0x04080000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x23 rootfs FileSystem mmc1 0x05080000 st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc1 0x33A80000 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
PED 0x40 nandall RawImage nand0 0x0 none
|
||||
PED 0x60 sdcardall RawImage mmc0 0x0 none
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary nor0 0x00000000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary nor0 0x00040000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nor0 0x00080000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
PED 0x20 env Binary nor0 0x00280000 none
|
||||
PE 0x10 empty Binary nor0 0x002C0000 none
|
||||
PE 0x11 emptyfsbl1 Binary nand0 0x00000000 none
|
||||
PE 0x12 emptyssbl Binary nand0 0x00200000 none
|
||||
PE 0x13 emptyssbl2 Binary nand0 0x00400000 none
|
||||
P 0x21 ubifs System nand0 0x00600000 st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
|
||||
PED 0x08 emmcfsbl1 Binary mmc1 boot1 none
|
||||
PED 0x09 emmcfsbl2 Binary mmc1 boot2 none
|
||||
PED 0x30 emmcall RawImage mmc1 0x0 none
|
||||
PED 0x60 sdcardall RawImage mmc0 0x0 none
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary nor0 0x00000000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary nor0 0x00040000 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nor0 0x00080000 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-serialboot.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary nor0 0x00000000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary nor0 0x00040000 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary nor0 0x00080000 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
PED 0x20 env Binary nor0 0x00280000 none
|
||||
PE 0x10 empty Binary nor0 0x002C0000 none
|
||||
P 0x21 bootfs System mmc0 0x00004400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x22 vendorfs FileSystem mmc0 0x04004400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x23 rootfs FileSystem mmc0 0x05004400 st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc0 0x33A04400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
PED 0x08 emmcfsbl1 Binary mmc1 boot1 none
|
||||
PED 0x09 emmcfsbl2 Binary mmc1 boot2 none
|
||||
PED 0x30 emmcall RawImage mmc1 0x0 none
|
||||
PED 0x40 nandall RawImage nand0 0x0 none
|
||||
P 0x24 userfs FileSystem mmc0 0x33E70400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
|
|
|
|||
|
|
|
@ -1,10 +1,10 @@
|
|||
#Opt Id Name Type IP Offset Binary
|
||||
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary mmc0 0x00004400 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x06 ssbl Binary mmc0 0x00084400 u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-ev1-serialboot.stm32
|
||||
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32
|
||||
PD 0x06 ssbl Binary mmc0 0x00084400 bootloader/u-boot-stm32mp157c-ev1-trusted.stm32
|
||||
P 0x21 bootfs System mmc0 0x00284400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x22 vendorfs FileSystem mmc0 0x04284400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x23 rootfs FileSystem mmc0 0x05284400 st-image-weston-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc0 0x33C84400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
P 0x24 userfs FileSystem mmc0 0x340F0400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
|
||||
|
|
|
|||
|
|
|
@ -1,4 +1 @@
|
|||
FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:"
|
||||
|
||||
dirs755_append_stm32mpcommon = " ${STM32MP_USERFS_MOUNTPOINT_IMAGE}"
|
||||
dirs755_append_stm32mpcommon = " ${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
DUMMYPROVIDES_remove = "busybox-dev perl-dev"
|
||||
DUMMYPROVIDES_remove_stm32mpcommon = "busybox-dev perl-dev"
|
||||
|
|
|
|||
|
|
@ -1,38 +1,13 @@
|
|||
SUMMARY = "STM32MP bootfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_BOOTFS_LABEL}fs"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_BOOTFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_BOOTFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Set ROOTFS_MAXSIZE to expected ROOTFS_SIZE to use the whole disk partition and leave extra space to user
|
||||
IMAGE_ROOTFS_SIZE = "${BOOTFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${BOOTFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${IMAGE_ROOTFS_SIZE}"
|
||||
IMAGE_OVERHEAD_FACTOR = "1"
|
||||
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
kernel-imagebootfs \
|
||||
|
|
@ -40,38 +15,8 @@ PACKAGE_INSTALL += " \
|
|||
${@bb.utils.contains('MACHINE_FEATURES', 'splashscreen', 'u-boot-stm32mp-splash', '', d)} \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# remove specific systemd task
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd-systemctl-native;"
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd_preset_all;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -d ${IMAGE_ROOTFS}/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
# Add specific autoresize package to bootfs
|
||||
AUTORESIZE ?= ""
|
||||
PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '${AUTORESIZE}', '', d)} \
|
||||
"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
inherit core-image
|
||||
|
||||
# Disable flashlayout generation for the partition image as this is supposed
|
||||
# to be done only for complete image
|
||||
ENABLE_FLASHLAYOUT_CONFIG = "0"
|
||||
|
||||
# Disable image license summary generation for the partition image as this is
|
||||
# supposed to be done only for complete image
|
||||
ENABLE_IMAGE_LICENSE_SUMMARY = "0"
|
||||
|
||||
# Remove WIC image generation for the partition image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
# Append DISTRO to image name even if we're not using ST distro setting
|
||||
# Mandatory to ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
bbnote "Mountpoint ${IMAGE_PARTITION_MOUNTPOINT} found in ${IMAGE_ROOTFS}"
|
||||
bbnote ">>> Remove all files and folder except ${IMAGE_PARTITION_MOUNTPOINT}"
|
||||
TARGETROOTFS=${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}
|
||||
while [ "${TARGETROOTFS}" != "${IMAGE_ROOTFS}" ]
|
||||
do
|
||||
find $(dirname ${TARGETROOTFS})/ -mindepth 1 ! -regex "^${TARGETROOTFS}\(/.*\)?" -delete
|
||||
TARGETROOTFS=$(dirname ${TARGETROOTFS})
|
||||
done
|
||||
bbnote ">>> Move ${IMAGE_PARTITION_MOUNTPOINT} contents to ${IMAGE_ROOTFS}"
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
bbnote ">>> Remove remaining ${IMAGE_PARTITION_MOUNTPOINT} folder"
|
||||
# Remove empty boot folder
|
||||
TARGETROOTFS=${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}
|
||||
while [ "${TARGETROOTFS}" != "${IMAGE_ROOTFS}" ]
|
||||
do
|
||||
bbnote ">>> Delete ${TARGETROOTFS}"
|
||||
rm -rf ${TARGETROOTFS}/
|
||||
TARGETROOTFS=$(dirname ${TARGETROOTFS})
|
||||
done
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
|
|
@ -1,35 +1,11 @@
|
|||
SUMMARY = "STM32MP userfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_USERFS_LABEL}"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_USERFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_USERFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Define to null ROOTFS_MAXSIZE
|
||||
IMAGE_ROOTFS_MAXSIZE = ""
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
m4projects-stm32mp1-userfs \
|
||||
|
|
@ -40,40 +16,3 @@ PACKAGE_INSTALL += " \
|
|||
PACKAGE_INSTALL += " \
|
||||
packagegroup-st-demo \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/ | grep -v $(dirname ${IMAGE_PARTITION_MOUNTPOINT}/))
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/ ${IMAGE_ROOTFS}$(dirname ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,77 +1,18 @@
|
|||
SUMMARY = "STM32MP vendorfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_VENDORFS_LABEL}"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_VENDORFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Set ROOTFS_MAXSIZE to expected ROOTFS_SIZE to use the whole disk partition and leave extra space to user
|
||||
IMAGE_ROOTFS_SIZE = "${VENDORFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${VENDORFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${IMAGE_ROOTFS_SIZE}"
|
||||
IMAGE_OVERHEAD_FACTOR = "1"
|
||||
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('MACHINE_FEATURES', 'gpu', d.getVar('GPU_USERLAND_LIBRARIES_INSTALL') or '', '', d)} \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# remove specific systemd task
|
||||
# Remove specific systemd task
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd-systemctl-native;"
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd_preset_all;"
|
||||
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
# Warning: the first stage of boot (here fsbl1, fsbl2, ssbl) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
part fsbl1 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl1 --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl2 --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source gptcopy --sourceparams="file=u-boot-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 2048K
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/bootloader/u-boot-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
|
||||
|
||||
part teeh --source gptcopy --sourceparams="file=tee-header_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teed --source gptcopy --sourceparams="file=tee-pageable_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teex --source gptcopy --sourceparams="file=tee-pager_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teeh --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teeh --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-header_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part teed --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teed --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pageable_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
|
||||
part teex --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teex --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pager_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 768M
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
# Warning: the first stage of boot (here fsbl1, fsbl2, ssbl) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
part fsbl1 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl1 --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl2 --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source gptcopy --sourceparams="file=u-boot-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 2048K
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/bootloader/u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
|
||||
|
||||
part teeh --source gptcopy --sourceparams="file=tee-header_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teed --source gptcopy --sourceparams="file=tee-pageable_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teex --source gptcopy --sourceparams="file=tee-pager_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 256K
|
||||
part teeh --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teeh --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-header_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part teed --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teed --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pageable_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
|
||||
part teex --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teex --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pager_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
|
||||
part vendorfs --source rawcopy --sourceparams="file=st-image-vendorfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label vendorfs --active --fixed-size 16M
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
# Warning: the first stage of boot (here fsbl1, fsbl2, ssbl) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
part fsbl1 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label fsbl1 --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label fsbl2 --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source gptcopy --sourceparams="file=u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 2048K
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/bootloader/u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
|
||||
|
||||
part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 768M
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
# Warning: the first stage of boot (here fsbl1, fsbl2, ssbl) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
part fsbl1 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label fsbl1 --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label fsbl2 --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source gptcopy --sourceparams="file=u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 2048K
|
||||
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/bootloader/u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
|
||||
part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
|
||||
part vendorfs --source rawcopy --sourceparams="file=st-image-vendorfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label vendorfs --active --fixed-size 16M
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 768M
|
||||
|
|
|
|||
Loading…
Reference in New Issue