Skip to content
Snippets Groups Projects
Commit 74643665 authored by Jonas Höppner's avatar Jonas Höppner
Browse files

alphaplan_fwr: Create u-boot package from imx-boot.tar.gz if found

The main install file for u-boot changed to imx-boot.tar.gz, so this
should be added to alphaplan. Leaving the imx-boot implementation
as fallback.

BCS 746-000600
parent 3514dffb
No related branches found
No related tags found
1 merge request!84alphaplan_fwr: Create u-boot package from imx-boot.tar.gz if found
Pipeline #8742 passed with stages
in 26 seconds
......@@ -85,6 +85,7 @@ def generate_ap_subarticle(
ap_dict = get_ap_dict(machine, machine_ap, release_name_ap)
# Match artifacts and get path and md5sum
for artifact in artifacts:
# Compare the artifact with the match from ap_key
if artifact.casefold().endswith(ap_dict[ap_key][ApSubKeys.MATCH].casefold()):
path = os.path.join(output_dir, machine, artifact)
path = os.path.join(*(path.split(os.path.sep)[2:]))
......@@ -161,13 +162,21 @@ def generate_fwr_articles(
attribute,
stueckliste=stueckliste,
)
# If imx-boot is in artifacts_all (TANARO), add an uboot FWR package
if "imx-boot" in artifacts_all:
subarticles_uboot = [
ApKeys.FNGSYS_UBOOT_UPDATE,
ApKeys.FNGSYS_UBOOT_IMAGE,
ApKeys.FNGSYS_UBOOT_CHECKSUM,
]
# If imx-boot.tar.gz or deprecated imx-boot is in artifacts_all (imx8mX)i
# add an uboot FWR package
if "imx-boot.tar.gz" in artifacts_all or "imx-boot" in artifacts_all:
if "imx-boot.tar.gz" in artifacts_all:
subarticles_uboot = [
ApKeys.FNGSYS_UBOOT_UPDATE,
ApKeys.FNGSYS_UBOOT_IMAGETAR,
]
# this is not needed if the above tar.gz is used.
elif "imx-boot" in artifacts_all:
subarticles_uboot = [
ApKeys.FNGSYS_UBOOT_UPDATE,
ApKeys.FNGSYS_UBOOT_IMAGE,
ApKeys.FNGSYS_UBOOT_CHECKSUM,
]
stueckliste_uboot = []
for key in subarticles_uboot:
stueckliste_uboot.append(
......
......@@ -16,6 +16,7 @@ class ApKeys(Flag):
FNGSYS_UBOOT_UPDATE = auto()
FNGSYS_UBOOT_IMAGE = auto()
FNGSYS_UBOOT_CHECKSUM = auto()
FNGSYS_UBOOT_IMAGETAR = auto()
class ApSubKeys(Flag):
......@@ -133,6 +134,17 @@ def get_ap_dict(machine, machine_ap, release_name_local):
ApSubKeys.ATTRIBUTESET: "Firmware, Bestandteil eines SW-Paketes",
}
ap_dict[ApKeys.FNGSYS_UBOOT_IMAGETAR] = {
ApSubKeys.MATCH: "imx-boot.tar.gz",
ApSubKeys.MATCHCODE: "FS",
ApSubKeys.BEZEICHNUNG: "{} U-Boot {} Bootloader Image".format(
machine_ap, release_name_local
),
ApSubKeys.LANGTEXT: "",
ApSubKeys.TYP: "FS",
ApSubKeys.ATTRIBUTESET: "Firmware, Bestandteil eines SW-Paketes",
}
ap_dict[ApKeys.FNGSYS_UBOOT_CHECKSUM] = {
ApSubKeys.MATCH: "imx-boot.md5",
ApSubKeys.MATCHCODE: "TFTP",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment