dey-image-installer: remove boot-artifacts.bbclass
The class 'boot-artifacts.bbclass' was created to generate a list of the bootable artifacts that must be copied from the deploy dir to the installer ZIP file, so that the installer has all the possible bootloader files to update any variant of the hardware. The class was somewhat over-engineered to produce the list, specially for the cc8x, with the variants of SoC revision, RAM size and width. With the arrival of ST family, it got more complex, as the artifacts don't even come from U-Boot recipe. To remove complexity, this commit removes the bbclass and moves the list to the platform config file. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
parent
f50b9b7fc6
commit
b4c65056fa
|
|
@ -1,70 +0,0 @@
|
||||||
# Class for the generation of boot artifacts
|
|
||||||
|
|
||||||
# This function returns a list with the RAM_CONFIGS that match the RAM size
|
|
||||||
# in the list of UBOOT_CONFIG
|
|
||||||
def get_uboot_ram_combinations(d):
|
|
||||||
import re
|
|
||||||
|
|
||||||
types = d.getVar('UBOOT_CONFIG', True) or ""
|
|
||||||
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
|
|
||||||
|
|
||||||
# Convert to arrays
|
|
||||||
types = types.split(" ")
|
|
||||||
ram_configs = ram_configs.split(" ")
|
|
||||||
|
|
||||||
# Obtain the list of RAM_CONFIGS for whose RAM size there is a match
|
|
||||||
# in UBOOT_CONFIG
|
|
||||||
matches = []
|
|
||||||
for type in types:
|
|
||||||
ramsize = re.search("([0-9]*[G|M]B)", type).group(1)
|
|
||||||
for ramc in ram_configs:
|
|
||||||
if ramsize in ramc:
|
|
||||||
matches.append(ramc)
|
|
||||||
|
|
||||||
return " ".join(matches)
|
|
||||||
|
|
||||||
UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}"
|
|
||||||
|
|
||||||
# This function returns a list with the bootable artifacts
|
|
||||||
def get_bootable_artifacts(d):
|
|
||||||
import re
|
|
||||||
|
|
||||||
types = d.getVar('UBOOT_CONFIG', True) or ""
|
|
||||||
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
|
|
||||||
soc_revisions = d.getVar('SOC_REVISIONS', True) or ""
|
|
||||||
uboot_prefix = d.getVar('UBOOT_PREFIX', True) or ""
|
|
||||||
uboot_suffix = d.getVar('UBOOT_SUFFIX', True) or ""
|
|
||||||
atf_types = d.getVar('TF_A_CONFIG', True) or ""
|
|
||||||
atf_boot_modes = ['nand']
|
|
||||||
artifacts = []
|
|
||||||
|
|
||||||
# For platforms with a FIP artifact, ignore u-boot artifacts
|
|
||||||
if d.getVar('FIP_UBOOT_DTB'):
|
|
||||||
machine = d.getVar('MACHINE', True) or ""
|
|
||||||
# Add ATF artifacts
|
|
||||||
for t in atf_types.split(" "):
|
|
||||||
if t in atf_boot_modes:
|
|
||||||
artifacts.append("arm-trusted-firmware/tf-a-%s-%s.stm32" % (machine, t))
|
|
||||||
# Add FIP artifact
|
|
||||||
artifacts.append("fip/fip-%s.bin" % (machine))
|
|
||||||
return " ".join(artifacts)
|
|
||||||
|
|
||||||
# For platforms without RAM_CONFIGS, build the artifacts from UBOOT_CONFIG
|
|
||||||
if ram_configs == "":
|
|
||||||
for t in types.split(" "):
|
|
||||||
artifacts.append("%s-%s.%s" % (uboot_prefix, t.replace("_","-"), uboot_suffix))
|
|
||||||
return " ".join(artifacts)
|
|
||||||
else:
|
|
||||||
machine = d.getVar('MACHINE', True) or ""
|
|
||||||
ram_combinations = get_uboot_ram_combinations(d)
|
|
||||||
if soc_revisions == "":
|
|
||||||
for ramc in ram_combinations.split(" "):
|
|
||||||
artifacts.append("%s-%s-%s.%s" % (uboot_prefix, machine, ramc, uboot_suffix))
|
|
||||||
else:
|
|
||||||
for soc_rev in soc_revisions.split(" "):
|
|
||||||
for ramc in ram_combinations.split(" "):
|
|
||||||
artifacts.append("%s-%s-%s-%s.%s" % (uboot_prefix, machine, soc_rev, ramc, uboot_suffix))
|
|
||||||
|
|
||||||
return " ".join(artifacts)
|
|
||||||
|
|
||||||
BOOTABLE_ARTIFACTS = "${@get_bootable_artifacts(d)}"
|
|
||||||
|
|
@ -47,3 +47,9 @@ XBEE_TTY ?= "ttymxc4"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
u-boot-ccimx6qpsbc1GB.imx \
|
||||||
|
u-boot-ccimx6qpsbc2GB.imx \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -49,3 +49,12 @@ XBEE_TTY ?= "ttymxc4"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
u-boot-ccimx6dlsbc512MB.imx \
|
||||||
|
u-boot-ccimx6dlsbc.imx \
|
||||||
|
u-boot-ccimx6qsbc2GB.imx \
|
||||||
|
u-boot-ccimx6qsbc512MB.imx \
|
||||||
|
u-boot-ccimx6qsbc.imx \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -34,3 +34,10 @@ XBEE_TTY ?= "ttymxc1"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"tar.bz2 boot.ubifs recovery.ubifs squashfs", \
|
"tar.bz2 boot.ubifs recovery.ubifs squashfs", \
|
||||||
"tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}'
|
"tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
u-boot-ccimx6ulsbc1GB.imx \
|
||||||
|
u-boot-ccimx6ulsbc512MB.imx \
|
||||||
|
u-boot-ccimx6ulsbc.imx \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -33,3 +33,10 @@ IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
|
|
||||||
# Default image for install scripts
|
# Default image for install scripts
|
||||||
DEFAULT_IMAGE_NAME ?= "core-image-base"
|
DEFAULT_IMAGE_NAME ?= "core-image-base"
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
u-boot-ccimx6ulstarter1GB.imx \
|
||||||
|
u-boot-ccimx6ulstarter512MB.imx \
|
||||||
|
u-boot-ccimx6ulstarter.imx \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -50,3 +50,6 @@ XBEE_TTY ?= "ttymxc3"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mm-dvk.bin"
|
||||||
|
|
|
||||||
|
|
@ -52,3 +52,6 @@ XBEE_TTY ?= "ttymxc3"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mn-dvk.bin"
|
||||||
|
|
|
||||||
|
|
@ -33,3 +33,15 @@ XBEE_TTY ?= "ttyLP0"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
imx-boot-ccimx8x-sbc-express-B0-1GB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-B0-1GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-B0-2GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-B0-512MB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-C0-1GB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-C0-1GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-C0-2GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-express-C0-512MB_16bit.bin \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -46,3 +46,15 @@ XBEE_TTY ?= "ttyMCA0"
|
||||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||||
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
"boot.vfat tar.bz2 recovery.vfat squashfs", \
|
||||||
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-B0-1GB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-B0-1GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-B0-2GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-B0-512MB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-C0-1GB_16bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-C0-1GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-C0-2GB_32bit.bin \
|
||||||
|
imx-boot-ccimx8x-sbc-pro-C0-512MB_16bit.bin \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -173,3 +173,9 @@ VIRTUAL-RUNTIME_initscripts ?= "initscripts"
|
||||||
|
|
||||||
# Disable use of vendorfs partition
|
# Disable use of vendorfs partition
|
||||||
ST_VENDORFS = "0"
|
ST_VENDORFS = "0"
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
arm-trusted-firmware/tf-a-ccmp13-dvk-nand.stm32 \
|
||||||
|
fip/fip-ccmp13-dvk-optee.bin \
|
||||||
|
"
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,12 @@ VIRTUAL-RUNTIME_initscripts ?= "initscripts"
|
||||||
# Disable use of vendorfs partition
|
# Disable use of vendorfs partition
|
||||||
ST_VENDORFS = "0"
|
ST_VENDORFS = "0"
|
||||||
|
|
||||||
|
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||||
|
BOOTABLE_ARTIFACTS = " \
|
||||||
|
arm-trusted-firmware/tf-a-ccmp15-dvk-nand.stm32 \
|
||||||
|
fip/fip-ccmp15-dvk-optee.bin \
|
||||||
|
"
|
||||||
|
|
||||||
# SWUpdate sw-description configuration
|
# SWUpdate sw-description configuration
|
||||||
BOOTFS_EXT ?= ".boot.ubifs"
|
BOOTFS_EXT ?= ".boot.ubifs"
|
||||||
ROOTFS_EXT ?= ".ubifs"
|
ROOTFS_EXT ?= ".ubifs"
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
#
|
#
|
||||||
# Copyright 2017-2022, Digi International Inc.
|
# Copyright 2017-2022, Digi International Inc.
|
||||||
#
|
#
|
||||||
inherit boot-artifacts
|
|
||||||
|
|
||||||
DEPENDS += "zip-native"
|
DEPENDS += "zip-native"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue