mirror of
https://github.com/lingble/tegra-demo-distro.git
synced 2025-10-29 11:42:26 +00:00
Content imported from the old test distro, with the following modifications: * Removed most custom configuration files * All open-source layers fully included under layers/ * Secureboot support removed * Layout reworked to eliminate extra subdirectory for core layer * Added meta-tegra-support layer for holding common metadata for use by all distro layers * Reworked setup-env script to be usable for multiple distros sharing the repository * Added demo image recipes and packagegroups Signed-off-by: Matt Madison <matt@madison.systems>
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
TD_BBLAYERS_CONF_VERSION ??= "unset-0"
|
|
|
|
|
|
python tegra_distro_update_bblayersconf() {
|
|
current_version = d.getVar('TD_BBLAYERS_CONF_VERSION').split('-')
|
|
|
|
required_version = (d.getVar('REQUIRED_TD_BBLAYERS_CONF_VERSION') or 'UNKNOWN-0').split('-')
|
|
if required_version[0] == "UNKNOWN":
|
|
# malformed configuration
|
|
raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
|
|
|
|
if current_version[0] == required_version[0] and int(current_version[1]) == int(required_version[1]):
|
|
return
|
|
|
|
distro_layerdir = d.getVar('TD_DISTRO_LAYERDIR')
|
|
if not distro_layerdir:
|
|
raise NotImplementedError("TD_DISTRO_LAYERDIR must be set to locate the bblayers template config")
|
|
|
|
root = d.getVar("COREBASE")
|
|
|
|
# On any mismatch, just use the template
|
|
newconf = sanity_conf_read(os.path.join(distro_layerdir, 'conf',
|
|
'template-{}'.format(d.getVar('DISTRO')),
|
|
'bblayers.conf.sample'))
|
|
with open(bblayers_conf_file(d), "w") as f:
|
|
f.write(''.join([line.replace('##OEROOT##', root).replace('##COREBASE##', root) for line in newconf]))
|
|
bb.note("Your conf/bblayers.conf has been automatically updated.")
|
|
return
|
|
|
|
}
|
|
|
|
BBLAYERS_CONF_UPDATE_FUNCS += " \
|
|
conf/bblayers.conf:TD_BBLAYERS_CONF_VERSION:REQUIRED_TD_BBLAYERS_CONF_VERSION:tegra_distro_update_bblayersconf \
|
|
"
|