From 3fd0336cb9276d4373d5f161c9e45c47a4093fd1 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 23 Sep 2024 19:32:48 +0100 Subject: [PATCH 01/48] bsp: linux-lmp-ti-staging: bump 6.1.83 Signed-off-by: Jose Quaresma --- .../recipes-kernel/linux/linux-lmp-ti-staging_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb index e9798f5a0..d5c7926a4 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb @@ -6,8 +6,8 @@ KERNEL_REPO ?= "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" KERNEL_REPO_PROTOCOL ?= "https" KERNEL_BRANCH ?= "ti-linux-6.1.y" -LINUX_VERSION ?= "6.1.69" -SRCREV_machine ?= "2233af66faf7b81b6c286285e50cda5595dc410d" +LINUX_VERSION ?= "6.1.83" +SRCREV_machine ?= "c1c2f1971fbf6ddad93a8c94314fe8221e7aa6be" SRCREV_meta ?= "${KERNEL_META_COMMIT}" # Beagleplay (has its own repo) From 3925b22315f2eb87bc3101e54ddcdcfd5ab5e59d Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 23 Sep 2024 19:33:09 +0100 Subject: [PATCH 02/48] bsp: linux-lmp-ti-staging: drop beagleplay repo The beagleplay is now available in the default tree. Signed-off-by: Jose Quaresma --- .../recipes-kernel/linux/linux-lmp-ti-staging_git.bb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb index d5c7926a4..de604da6b 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb @@ -10,12 +10,6 @@ LINUX_VERSION ?= "6.1.83" SRCREV_machine ?= "c1c2f1971fbf6ddad93a8c94314fe8221e7aa6be" SRCREV_meta ?= "${KERNEL_META_COMMIT}" -# Beagleplay (has its own repo) -KERNEL_REPO:beagleplay ?= "git://github.com/beagleboard/linux.git" -KERNEL_BRANCH:beagleplay ?= "v6.1.46-ti-arm64-r13" -LINUX_VERSION:beagleplay ?= "6.1.46" -SRCREV_machine:beagleplay ?= "f47f74d11b19d8ae2f146de92c258f40e0930d86" - LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_REPO_PROTOCOL};branch=${KERNEL_BRANCH};name=machine; \ From a312516c4cb730e9f217791620a64bd8dd57184a Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 25 Sep 2024 09:05:53 +0100 Subject: [PATCH 03/48] bsp: imx-boot: Drop un-necessary variable BOOT_NAME Following https://github.com/Freescale/meta-freescale/pull/1945 Signed-off-by: Jose Quaresma --- .../recipes-bsp/imx-mkimage/imx-boot_%.bbappend | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meta-lmp-bsp/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_%.bbappend b/meta-lmp-bsp/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_%.bbappend index 702b44b0a..988367ad3 100644 --- a/meta-lmp-bsp/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_%.bbappend +++ b/meta-lmp-bsp/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_%.bbappend @@ -61,7 +61,7 @@ do_compile:prepend:mx93-nxp-bsp() { do_compile:append() { for type in ${UBOOT_CONFIG}; do UBOOT_CONFIG_EXTRA="$type" - BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + BOOT_CONFIG_MACHINE_EXTRA="imx-boot-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" for target in ${IMXBOOT_TARGETS}; do if [ -e "${BOOT_STAGING}/flash.bin-nohdmi" ]; then cp ${BOOT_STAGING}/flash.bin-nohdmi ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}-nohdmi @@ -73,7 +73,7 @@ do_compile:append() { do_install:append() { for type in ${UBOOT_CONFIG}; do UBOOT_CONFIG_EXTRA="$type" - BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + BOOT_CONFIG_MACHINE_EXTRA="imx-boot-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" for target in ${IMXBOOT_TARGETS}; do if [ -e "${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}-nohdmi" ]; then install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}-nohdmi ${D}/boot/ @@ -85,20 +85,20 @@ do_install:append() { do_deploy:append() { for type in ${UBOOT_CONFIG}; do UBOOT_CONFIG_EXTRA="$type" - BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + BOOT_CONFIG_MACHINE_EXTRA="imx-boot-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" for target in ${IMXBOOT_TARGETS}; do if [ -e "${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}-nohdmi" ]; then install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}-nohdmi ${DEPLOYDIR} - if [ ! -e "${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}-nohdmi" ]; then - ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET}-nohdmi ${DEPLOYDIR}/${BOOT_NAME}-nohdmi - ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET}-nohdmi ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}-nohdmi + if [ ! -e "${DEPLOYDIR}/imx-boot-${MACHINE}-nohdmi" ]; then + ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET}-nohdmi ${DEPLOYDIR}/imx-boot-nohdmi + ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET}-nohdmi ${DEPLOYDIR}/imx-boot-${MACHINE}-nohdmi fi fi done # Also create imx-boot link with the machine name (with the default IMXBOOT_TARGET) - if [ ! -e "${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}" ]; then - ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE} + if [ ! -e "${DEPLOYDIR}/imx-boot-${MACHINE}" ]; then + ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/imx-boot-${MACHINE} fi done } From eda3dadd2364c8243ba7de6ebb7b9eb08260730b Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 25 Sep 2024 09:46:17 +0100 Subject: [PATCH 04/48] Revert "bsp: lmp-machine-custom: UBOOT_PROVIDES_BOOT_CONTAINER is now chosed dynamic" This reverts commit f19349c943328b6323c26b4ec089815350159bcb. Required by https://github.com/Freescale/meta-freescale/pull/1945 Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index c0bb74a3f..f0841de37 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -800,6 +800,8 @@ PREFERRED_VERSION_optee-examples:mx8-nxp-bsp = "3.21.0" PREFERRED_VERSION_optee-examples:mx9-nxp-bsp = "3.21.0" PREFERRED_VERSION_optee-test:mx8-nxp-bsp = "3.21.0" PREFERRED_VERSION_optee-test:mx9-nxp-bsp = "3.21.0" +## We don't use imx-boot-container just yet +UBOOT_PROVIDES_BOOT_CONTAINER:mx8m-generic-bsp = "0" ## No need to install u-boot, already a WKS dependency MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove:imx-generic-bsp = "u-boot-fslc" ## OP-TEE is a dependency of u-boot (fit), no need for WKS_FILE_DEPENDS From ffa68f1e608fef1ec0cd0750f78a49429cdad248 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Wed, 11 Sep 2024 19:51:48 +0200 Subject: [PATCH 05/48] base: ostree: add support systemd-boot automatic boot assesment Add support for Automatic Boot Assessment [1]. Boot entries are now created with an additional suffix, which represents the amount of maximum tries for boot counting. [1] https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ Signed-off-by: Igor Opaniuk --- ...ystemd-boot-automatic-boot-assesment.patch | 148 ++++++++++++++++++ .../recipes-extended/ostree/ostree_%.bbappend | 1 + 2 files changed, 149 insertions(+) create mode 100644 meta-lmp-base/recipes-extended/ostree/ostree/0006-Add-support-systemd-boot-automatic-boot-assesment.patch diff --git a/meta-lmp-base/recipes-extended/ostree/ostree/0006-Add-support-systemd-boot-automatic-boot-assesment.patch b/meta-lmp-base/recipes-extended/ostree/ostree/0006-Add-support-systemd-boot-automatic-boot-assesment.patch new file mode 100644 index 000000000..331f0327e --- /dev/null +++ b/meta-lmp-base/recipes-extended/ostree/ostree/0006-Add-support-systemd-boot-automatic-boot-assesment.patch @@ -0,0 +1,148 @@ +From a9e35b76fd5e47b9bc29a7113d97a4d98a973e75 Mon Sep 17 00:00:00 2001 +From: Igor Opaniuk +Date: Wed, 11 Sep 2024 18:03:10 +0200 +Subject: [PATCH] Add support systemd-boot automatic boot assesment + +Add support for Automatic Boot Assessment [1]. +Boot entries are now created with an additional suffix, which +represents the amount of maximum tries for boot counting. + +[1] https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ +Upstream-Status: Inappropriate [lmp specific] +Signed-off-by: Igor Opaniuk +--- + src/libostree/ostree-sysroot-deploy.c | 66 +++++++++++++++++++++++---- + 1 file changed, 58 insertions(+), 8 deletions(-) + +diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c +index 99c894a..f9c496d 100644 +--- a/src/libostree/ostree-sysroot-deploy.c ++++ b/src/libostree/ostree-sysroot-deploy.c +@@ -62,6 +62,8 @@ + SD_ID128_MAKE (e8, 64, 6c, d6, 3d, ff, 46, 25, b7, 79, 09, a8, e7, a4, 09, 94) + #endif + ++#define SYSTEMD_BOOT_MAX_RETRIES 3 ++ + /* How much additional space we require available on top of what we accounted + * during the early prune fallocate space check. This accounts for anything not + * captured directly by `get_kernel_layout_size()` like writing new BLS entries. +@@ -1907,12 +1909,12 @@ parse_os_release (const char *contents, const char *split) + return ret; + } + +-/* Generate the filename we will use in /boot/loader/entries for this deployment. ++/* Generate the entry name we will use in /boot/loader/entries for this deployment. + * The provided n_deployments should be the total number of target deployments (which + * might be different from the cached value in the sysroot). + */ + static char * +-bootloader_entry_filename (OstreeSysroot *sysroot, guint n_deployments, ++bootloader_entry_name (OstreeSysroot *sysroot, guint n_deployments, + OstreeDeployment *deployment) + { + guint index = n_deployments - ostree_deployment_get_index (deployment); +@@ -1923,14 +1925,52 @@ bootloader_entry_filename (OstreeSysroot *sysroot, guint n_deployments, + if (use_old_naming) + { + const char *stateroot = ostree_deployment_get_osname (deployment); +- return g_strdup_printf ("ostree-%d-%s.conf", index, stateroot); ++ return g_strdup_printf ("ostree-%d-%s", index, stateroot); + } + else + { +- return g_strdup_printf ("ostree-%d.conf", index); ++ return g_strdup_printf ("ostree-%d", index); + } + } + ++/* Drop all temporary entries in /boot/loader/entries for this deployment, ++ * which were created during automatic boot assesment ++ * https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ ++ */ ++static gboolean ++bootloader_remove_tmp_entries (int dfd, const char *entry_name, GCancellable *cancellable, ++ GError **error) ++{ ++ g_auto(GLnxDirFdIterator) dfd_iter = { 0, }; ++ g_autofree char *entry_name_init = g_strdup_printf ("%s+%d", entry_name, SYSTEMD_BOOT_MAX_RETRIES); ++ ++ if (!glnx_dirfd_iterator_init_at (dfd, ".", FALSE, &dfd_iter, error)) ++ return FALSE; ++ ++ while (TRUE) ++ { ++ struct dirent *dent = NULL; ++ ++ if (!glnx_dirfd_iterator_next_dent_ensure_dtype (&dfd_iter, &dent, cancellable, error)) ++ return FALSE; ++ if (dent == NULL) ++ break; ++ ++ /* Don't remove default boot entry (with +3 suffix) */ ++ if (g_str_has_prefix (dent->d_name, entry_name_init)) ++ continue; ++ ++ if (g_str_has_prefix (dent->d_name, entry_name)) ++ { ++ if (!glnx_shutil_rm_rf_at (dfd_iter.fd, dent->d_name, cancellable, error)) ++ return FALSE; ++ } ++ ++ } ++ ++ return TRUE; ++} ++ + /* Given @deployment, prepare it to be booted; basically copying its + * kernel/initramfs into /boot/ostree (if needed) and writing out an entry in + * /boot/loader/entries. +@@ -1966,7 +2006,7 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, + const char *bootcsum = ostree_deployment_get_bootcsum (deployment); + g_autofree char *bootcsumdir = g_strdup_printf ("ostree/%s-%s", osname, bootcsum); + g_autofree char *bootconfdir = g_strdup_printf ("loader.%d/entries", new_bootversion); +- g_autofree char *bootconf_name = bootloader_entry_filename (sysroot, n_deployments, deployment); ++ g_autofree char *bootconf_name = bootloader_entry_name (sysroot, n_deployments, deployment); + + if (!glnx_shutil_mkdir_p_at (sysroot->boot_fd, bootcsumdir, 0775, cancellable, error)) + return FALSE; +@@ -2348,8 +2388,13 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, + if (!glnx_opendirat (sysroot->boot_fd, bootconfdir, TRUE, &bootconf_dfd, error)) + return FALSE; + ++ g_autofree char *bootconf_filename = g_strdup_printf ("%s+%d.conf", bootconf_name, SYSTEMD_BOOT_MAX_RETRIES); ++ ++ if (!bootloader_remove_tmp_entries(bootconf_dfd, bootconf_name, cancellable, error)) ++ return FALSE; ++ + if (!ostree_bootconfig_parser_write_at (ostree_deployment_get_bootconfig (deployment), +- bootconf_dfd, bootconf_name, cancellable, error)) ++ bootconf_dfd, bootconf_filename, cancellable, error)) + return FALSE; + + return TRUE; +@@ -4464,14 +4509,19 @@ ostree_sysroot_deployment_set_kargs_in_place (OstreeSysroot *self, OstreeDeploym + ostree_bootconfig_parser_set (new_bootconfig, "options", kargs_str); + + g_autofree char *bootconf_name +- = bootloader_entry_filename (self, self->deployments->len, deployment); ++ = bootloader_entry_name (self, self->deployments->len, deployment); + + g_autofree char *bootconfdir = g_strdup_printf ("loader.%d/entries", self->bootversion); + glnx_autofd int bootconf_dfd = -1; + if (!glnx_opendirat (self->boot_fd, bootconfdir, TRUE, &bootconf_dfd, error)) + return FALSE; + +- if (!ostree_bootconfig_parser_write_at (new_bootconfig, bootconf_dfd, bootconf_name, ++ g_autofree char *bootconf_filename = g_strdup_printf ("%s+%d.conf", bootconf_name, SYSTEMD_BOOT_MAX_RETRIES); ++ ++ if (!bootloader_remove_tmp_entries(bootconf_dfd, bootconf_name, cancellable, error)) ++ return FALSE; ++ ++ if (!ostree_bootconfig_parser_write_at (new_bootconfig, bootconf_dfd, bootconf_filename, + cancellable, error)) + return FALSE; + } +-- +2.34.1 + diff --git a/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend b/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend index 0ec5e6cea..cd6f9a1b0 100644 --- a/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend +++ b/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend @@ -10,6 +10,7 @@ SRC_URI:append = " \ file://0003-Add-support-for-directories-instead-of-symbolic-link.patch \ file://0004-Add-support-for-systemd-boot-bootloader.patch \ file://0005-ostree-decrease-default-grub.cfg-timeout-and-set-def.patch \ + file://0006-Add-support-systemd-boot-automatic-boot-assesment.patch \ " PACKAGECONFIG:remove = "static" From fa2446406dc57151d6b619031c70a670c7f0b48a Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 25 Sep 2024 17:51:32 +0100 Subject: [PATCH 06/48] base: kernel-lmp-fitimage: replace with oe-core 74054f3 copy Replace with a copy of oe-core kernel-fitimage.bbclass from scarthgap branch rev 74054f3 Signed-off-by: Jose Quaresma --- .../classes/kernel-lmp-fitimage.bbclass | 772 +++++++++++------- 1 file changed, 499 insertions(+), 273 deletions(-) diff --git a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass index b97434fe9..18ab17bd2 100644 --- a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass +++ b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass @@ -1,18 +1,157 @@ -# Linux microPlatform extensions to the upstream OE-core kernel-fitimage class +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +inherit kernel-uboot kernel-artifact-names uboot-config + +def get_fit_replacement_type(d): + kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" + replacementtype = "" + if 'fitImage' in kerneltypes.split(): + uarch = d.getVar("UBOOT_ARCH") + if uarch == "arm64": + replacementtype = "Image" + elif uarch == "riscv": + replacementtype = "Image" + elif uarch == "mips": + replacementtype = "vmlinuz.bin" + elif uarch == "x86": + replacementtype = "bzImage" + elif uarch == "microblaze": + replacementtype = "linux.bin" + else: + replacementtype = "zImage" + return replacementtype + +KERNEL_IMAGETYPE_REPLACEMENT ?= "${@get_fit_replacement_type(d)}" +DEPENDS:append = " ${@'u-boot-tools-native dtc-native' if 'fitImage' in (d.getVar('KERNEL_IMAGETYPES') or '').split() else ''}" + +python __anonymous () { + # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal + # to kernel.bbclass . We have to override it, since we pack zImage + # (at least for now) into the fitImage . + typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" + if 'fitImage' in typeformake.split(): + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', d.getVar('KERNEL_IMAGETYPE_REPLACEMENT'))) + + image = d.getVar('INITRAMFS_IMAGE') + if image: + d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') + + ubootenv = d.getVar('UBOOT_ENV') + if ubootenv: + d.appendVarFlag('do_assemble_fitimage', 'depends', ' virtual/bootloader:do_populate_sysroot') + + #check if there are any dtb providers + providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb") + if providerdtb: + d.appendVarFlag('do_assemble_fitimage', 'depends', ' virtual/dtb:do_populate_sysroot') + d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' virtual/dtb:do_populate_sysroot') + d.setVar('EXTERNAL_KERNEL_DEVICETREE', "${RECIPE_SYSROOT}/boot/devicetree") +} -inherit kernel-fitimage -# Default value for deployment filenames -FIT_LOADABLES ?= "" +# Description string +FIT_DESC ?= "Kernel fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" -# Recovery -INITRAMFS_RECOVERY_IMAGE ?= "" -INITRAMFS_RECOVERY_IMAGE_NAME ?= "${@['${INITRAMFS_RECOVERY_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_RECOVERY_IMAGE') == '']}" +# Kernel fitImage Hash Algo +FIT_HASH_ALG ?= "sha256" -python __anonymous () { - recovery = d.getVar('INITRAMFS_RECOVERY_IMAGE') - if recovery: - d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_RECOVERY_IMAGE}:do_image_complete') +# Kernel fitImage Signature Algo +FIT_SIGN_ALG ?= "rsa2048" + +# Kernel / U-Boot fitImage Padding Algo +FIT_PAD_ALG ?= "pkcs-1.5" + +# Generate keys for signing Kernel fitImage +FIT_GENERATE_KEYS ?= "0" + +# Size of private keys in number of bits +FIT_SIGN_NUMBITS ?= "2048" + +# args to openssl genrsa (Default is just the public exponent) +FIT_KEY_GENRSA_ARGS ?= "-F4" + +# args to openssl req (Default is -batch for non interactive mode and +# -new for new certificate) +FIT_KEY_REQ_ARGS ?= "-batch -new" + +# Standard format for public key certificate +FIT_KEY_SIGN_PKCS ?= "-x509" + +# Sign individual images as well +FIT_SIGN_INDIVIDUAL ?= "0" + +FIT_CONF_PREFIX ?= "conf-" +FIT_CONF_PREFIX[doc] = "Prefix to use for FIT configuration node name" + +FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio" + +# Allow user to select the default DTB for FIT image when multiple dtb's exists. +FIT_CONF_DEFAULT_DTB ?= "" + +# length of address in number of cells +# ex: 1 32bits address, 2 64bits address +FIT_ADDRESS_CELLS ?= "1" + +# Keys used to sign individually image nodes. +# The keys to sign image nodes must be different from those used to sign +# configuration nodes, otherwise the "required" property, from +# UBOOT_DTB_BINARY, will be set to "conf", because "conf" prevails on "image". +# Then the images signature checking will not be mandatory and no error will be +# raised in case of failure. +# UBOOT_SIGN_IMG_KEYNAME = "dev2" # keys name in keydir (eg. "dev2.crt", "dev2.key") + +# +# Emit the fitImage ITS header +# +# $1 ... .its filename +fitimage_emit_fit_header() { + cat << EOF >> $1 +/dts-v1/; + +/ { + description = "${FIT_DESC}"; + #address-cells = <${FIT_ADDRESS_CELLS}>; +EOF +} + +# +# Emit the fitImage section bits +# +# $1 ... .its filename +# $2 ... Section bit type: imagestart - image section start +# confstart - configuration section start +# sectend - section end +# fitend - fitimage end +# +fitimage_emit_section_maint() { + case $2 in + imagestart) + cat << EOF >> $1 + + images { +EOF + ;; + confstart) + cat << EOF >> $1 + + configurations { +EOF + ;; + sectend) + cat << EOF >> $1 + }; +EOF + ;; + fitend) + cat << EOF >> $1 +}; +EOF + ;; + esac } # @@ -34,28 +173,28 @@ fitimage_emit_section_kernel() { awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'` fi - cat << EOF >> ${1} - kernel-${2} { + cat << EOF >> $1 + kernel-$2 { description = "Linux kernel"; - data = /incbin/("${3}"); - type = "kernel"; + data = /incbin/("$3"); + type = "${UBOOT_MKIMAGE_KERNEL_TYPE}"; arch = "${UBOOT_ARCH}"; os = "linux"; - compression = "${4}"; + compression = "$4"; load = <${UBOOT_LOADADDRESS}>; - entry = <${ENTRYPOINT}>; + entry = <$ENTRYPOINT>; hash-1 { - algo = "${kernel_csum}"; + algo = "$kernel_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${kernel_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$kernel_sign_keyname" ] ; then + sed -i '$ d' $1 + cat << EOF >> $1 signature-1 { - algo = "${kernel_csum},${kernel_sign_algo}"; - key-name-hint = "${kernel_sign_keyname}"; + algo = "$kernel_csum,$kernel_sign_algo"; + key-name-hint = "$kernel_sign_keyname"; }; }; EOF @@ -83,32 +222,33 @@ fitimage_emit_section_dtb() { elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;" fi - cat << EOF >> ${1} - fdt-${2} { + cat << EOF >> $1 + fdt-$2 { description = "Flattened Device Tree blob"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "flat_dt"; arch = "${UBOOT_ARCH}"; compression = "none"; - ${dtb_loadline} + $dtb_loadline hash-1 { - algo = "${dtb_csum}"; + algo = "$dtb_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${dtb_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$dtb_sign_keyname" ] ; then + sed -i '$ d' $1 + cat << EOF >> $1 signature-1 { - algo = "${dtb_csum},${dtb_sign_algo}"; - key-name-hint = "${dtb_sign_keyname}"; + algo = "$dtb_csum,$dtb_sign_algo"; + key-name-hint = "$dtb_sign_keyname"; }; }; EOF fi } +# # Emit the fitImage ITS u-boot script section # # $1 ... .its filename @@ -120,25 +260,25 @@ fitimage_emit_section_boot_script() { bootscr_sign_algo="${FIT_SIGN_ALG}" bootscr_sign_keyname="${UBOOT_SIGN_IMG_KEYNAME}" - cat << EOF >> ${1} - bootscr-${2} { + cat << EOF >> $1 + bootscr-$2 { description = "U-boot script"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "script"; arch = "${UBOOT_ARCH}"; compression = "none"; hash-1 { - algo = "${bootscr_csum}"; + algo = "$bootscr_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${bootscr_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$bootscr_sign_keyname" ] ; then + sed -i '$ d' $1 + cat << EOF >> $1 signature-1 { - algo = "${bootscr_csum},${bootscr_sign_algo}"; - key-name-hint = "${bootscr_sign_keyname}"; + algo = "$bootscr_csum,$bootscr_sign_algo"; + key-name-hint = "$bootscr_sign_keyname"; }; }; EOF @@ -155,10 +295,10 @@ fitimage_emit_section_setup() { setup_csum="${FIT_HASH_ALG}" - cat << EOF >> ${1} - setup-${2} { + cat << EOF >> $1 + setup-$2 { description = "Linux setup.bin"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "x86_setup"; arch = "${UBOOT_ARCH}"; os = "linux"; @@ -166,7 +306,7 @@ fitimage_emit_section_setup() { load = <0x00090000>; entry = <0x00090000>; hash-1 { - algo = "${setup_csum}"; + algo = "$setup_csum"; }; }; EOF @@ -177,8 +317,7 @@ EOF # # $1 ... .its filename # $2 ... Image counter -# $3 ... Ramdisk image name -# $4 ... Path to ramdisk image +# $3 ... Path to ramdisk image fitimage_emit_section_ramdisk() { ramdisk_csum="${FIT_HASH_ALG}" @@ -194,34 +333,55 @@ fitimage_emit_section_ramdisk() { ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" fi - cat << EOF >> ${1} - ramdisk-${2} { - description = "${3}"; - data = /incbin/("${4}"); + cat << EOF >> $1 + ramdisk-$2 { + description = "${INITRAMFS_IMAGE}"; + data = /incbin/("$3"); type = "ramdisk"; arch = "${UBOOT_ARCH}"; os = "linux"; compression = "none"; - ${ramdisk_loadline} - ${ramdisk_entryline} + $ramdisk_loadline + $ramdisk_entryline hash-1 { - algo = "${ramdisk_csum}"; + algo = "$ramdisk_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${ramdisk_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$ramdisk_sign_keyname" ] ; then + sed -i '$ d' $1 + cat << EOF >> $1 signature-1 { - algo = "${ramdisk_csum},${ramdisk_sign_algo}"; - key-name-hint = "${ramdisk_sign_keyname}"; + algo = "$ramdisk_csum,$ramdisk_sign_algo"; + key-name-hint = "$ramdisk_sign_keyname"; }; }; EOF fi } +# +# echoes symlink destination if it points below directory +# +# $1 ... file that's a potential symlink +# $2 ... expected parent directory +symlink_points_below() { + file="$2/$1" + dir=$2 + + if ! [ -L "$file" ]; then + return + fi + + realpath="$(realpath --relative-to=$dir $file)" + if [ -z "${realpath%%../*}" ]; then + return + fi + + echo "$realpath" +} + # # Emit the fitImage ITS configuration section # @@ -231,186 +391,164 @@ EOF # $4 ... ramdisk ID # $5 ... u-boot script ID # $6 ... config ID -# $7 ... loadable ID (LmP specific) -# $8 ... default flag +# $7 ... default flag +# $8 ... default DTB image name fitimage_emit_section_config() { conf_csum="${FIT_HASH_ALG}" conf_sign_algo="${FIT_SIGN_ALG}" + conf_padding_algo="${FIT_PAD_ALG}" if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" fi - its_file="${1}" - kernel_id="${2}" - dtb_image="${3}" - ramdisk_id="${4}" - bootscr_id="${5}" - config_id="${6}" - loadable_id="${7}" - default_flag="${8}" + its_file="$1" + kernel_id="$2" + dtb_image="$3" + ramdisk_id="$4" + bootscr_id="$5" + config_id="$6" + default_flag="$7" + default_dtb_image="$8" # Test if we have any DTBs at all sep="" conf_desc="" - conf_node="conf-" + conf_node="${FIT_CONF_PREFIX}" kernel_line="" fdt_line="" ramdisk_line="" bootscr_line="" setup_line="" - loadable_line="" default_line="" + compatible_line="" + + dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") + if [ -z "$dtb_image_sect" ]; then + dtb_image_sect=$dtb_image + fi + + dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}" + if [ -f "$dtb_path" ] || [ -L "$dtb_path" ]; then + compat=$(fdtget -t s "$dtb_path" / compatible | sed 's/ /", "/g') + if [ -n "$compat" ]; then + compatible_line="compatible = \"$compat\";" + fi + fi + + dtb_image=$(echo $dtb_image | tr '/' '_') + dtb_image_sect=$(echo "${dtb_image_sect}" | tr '/' '_') # conf node name is selected based on dtb ID if it is present, - # otherwise no index is used (differs from kernel-fitimage, which - # uses kernel ID, but then breaks current qemu boot.cmds) - if [ -n "${dtb_image}" ]; then - conf_node=$conf_node${dtb_image} + # otherwise its selected based on kernel ID + if [ -n "$dtb_image" ]; then + conf_node=$conf_node$dtb_image + else + conf_node=$conf_node$kernel_id fi - if [ -n "${kernel_id}" ]; then + if [ -n "$kernel_id" ]; then conf_desc="Linux kernel" sep=", " - kernel_line="kernel = \"kernel-${kernel_id}\";" + kernel_line="kernel = \"kernel-$kernel_id\";" fi - if [ -n "${dtb_image}" ]; then - conf_desc="${conf_desc}${sep}FDT blob" + if [ -n "$dtb_image" ]; then + conf_desc="$conf_desc${sep}FDT blob" sep=", " - fdt_line="fdt = \"fdt-${dtb_image}\";" + fdt_line="fdt = \"fdt-$dtb_image_sect\";" fi - if [ -n "${ramdisk_id}" ]; then - conf_desc="${conf_desc}${sep}ramdisk" + if [ -n "$ramdisk_id" ]; then + conf_desc="$conf_desc${sep}ramdisk" sep=", " - ramdisk_line="ramdisk = \"ramdisk-${ramdisk_id}\";" + ramdisk_line="ramdisk = \"ramdisk-$ramdisk_id\";" fi - if [ -n "${bootscr_id}" ]; then - conf_desc="${conf_desc}${sep}u-boot script" + if [ -n "$bootscr_id" ]; then + conf_desc="$conf_desc${sep}u-boot script" sep=", " - bootscr_line="bootscr = \"bootscr-${bootscr_id}\";" + bootscr_line="bootscr = \"bootscr-$bootscr_id\";" fi - if [ -n "${config_id}" ]; then - conf_desc="${conf_desc}${sep}setup" - sep=", " - setup_line="setup = \"setup-${config_id}\";" + if [ -n "$config_id" ]; then + conf_desc="$conf_desc${sep}setup" + setup_line="setup = \"setup-$config_id\";" fi - if [ -n "${loadable_id}" ]; then - loadable_counter=0 - for LOADABLE in ${loadable_id}; do - if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then - loadable_counter=`expr ${loadable_counter} + 1` - if [ -z "${loadable_line}" ]; then - conf_desc="${conf_desc}${sep}loadables" - fi - loadable_line="${loadable_line}loadable_${loadable_counter} = \"loadable-${LOADABLE}\"; " + if [ "$default_flag" = "1" ]; then + # default node is selected based on dtb ID if it is present, + # otherwise its selected based on kernel ID + if [ -n "$dtb_image" ]; then + # Select default node as user specified dtb when + # multiple dtb exists. + if [ -n "$default_dtb_image" ]; then + default_line="default = \"${FIT_CONF_PREFIX}$default_dtb_image\";" + else + default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";" fi - done - fi - - if [ "${default_flag}" = "1" ]; then - # default node is selected based on dtb ID if it is present - if [ -n "${dtb_image}" ]; then - default_line="default = \"conf-${dtb_image}\";" else - default_line="default = \"conf-\";" + default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";" fi fi - cat << EOF >> ${its_file} - ${default_line} + cat << EOF >> $its_file + $default_line $conf_node { - description = "${default_flag} ${conf_desc}"; - ${kernel_line} - ${fdt_line} - ${ramdisk_line} - ${bootscr_line} - ${setup_line} - ${loadable_line} + description = "$default_flag $conf_desc"; + $compatible_line + $kernel_line + $fdt_line + $ramdisk_line + $bootscr_line + $setup_line hash-1 { - algo = "${conf_csum}"; + algo = "$conf_csum"; }; EOF - if [ ! -z "${conf_sign_keyname}" ] ; then + if [ -n "$conf_sign_keyname" ] ; then sign_line="sign-images = " sep="" - if [ -n "${kernel_id}" ]; then - sign_line="${sign_line}${sep}\"kernel\"" + if [ -n "$kernel_id" ]; then + sign_line="$sign_line${sep}\"kernel\"" sep=", " fi - if [ -n "${dtb_image}" ]; then - sign_line="${sign_line}${sep}\"fdt\"" + if [ -n "$dtb_image" ]; then + sign_line="$sign_line${sep}\"fdt\"" sep=", " fi - if [ -n "${ramdisk_id}" ]; then - sign_line="${sign_line}${sep}\"ramdisk\"" + if [ -n "$ramdisk_id" ]; then + sign_line="$sign_line${sep}\"ramdisk\"" sep=", " fi - if [ -n "${bootscr_id}" ]; then - sign_line="${sign_line}${sep}\"bootscr\"" + if [ -n "$bootscr_id" ]; then + sign_line="$sign_line${sep}\"bootscr\"" sep=", " fi - if [ -n "${config_id}" ]; then - sign_line="${sign_line}${sep}\"setup\"" + if [ -n "$config_id" ]; then + sign_line="$sign_line${sep}\"setup\"" fi - if [ -n "${loadable_id}" ]; then - loadable_counter=0 - for LOADABLE in ${loadable_id}; do - if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then - loadable_counter=`expr ${loadable_counter} + 1` - sign_line="${sign_line}${sep}\"loadable_${loadable_counter}\"" - fi - done - fi + sign_line="$sign_line;" - sign_line="${sign_line};" - - cat << EOF >> ${its_file} + cat << EOF >> $its_file signature-1 { - algo = "${conf_csum},${conf_sign_algo}"; - key-name-hint = "${conf_sign_keyname}"; - ${sign_line} + algo = "$conf_csum,$conf_sign_algo"; + key-name-hint = "$conf_sign_keyname"; + padding = "$conf_padding_algo"; + $sign_line }; EOF fi - cat << EOF >> ${its_file} - }; -EOF -} - -# -# Emit the fitImage ITS loadables section -# -# $1 ... .its filename -# $2 ... Image name -# $3 ... Path to loadable image -fitimage_emit_section_loadable() { - - loadable_csum="${FIT_HASH_ALG}" - - cat << EOF >> ${1} - loadable-${2} { - description = "Loadable"; - data = /incbin/("${3}"); - type = "loadable"; - arch = "${UBOOT_ARCH}"; - compression = "none"; - hash-1 { - algo = "${loadable_csum=}"; - }; + cat << EOF >> $its_file }; EOF } @@ -421,47 +559,29 @@ EOF # $1 ... .its filename # $2 ... fitImage name # $3 ... include ramdisk -# $4 ... ramdisk name -# $5 ... ramdisk bundle flag fitimage_assemble() { kernelcount=1 dtbcount="" DTBS="" - ramdiskcount=${3} - ramdisk_image_name=${4} - ramdisk_bundle=${5} + ramdiskcount=$3 setupcount="" bootscr_id="" - rm -f ${1} arch/${ARCH}/boot/${2} + default_dtb_image="" + rm -f $1 arch/${ARCH}/boot/$2 - if [ ! -z "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then + if [ -n "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then bbfatal "Keys used to sign images and configuration nodes must be different." fi - fitimage_emit_fit_header ${1} + fitimage_emit_fit_header $1 # # Step 1: Prepare a kernel image section. # - fitimage_emit_section_maint ${1} imagestart + fitimage_emit_section_maint $1 imagestart uboot_prep_kimage - - if [ "${ramdisk_bundle}" = "1" ]; then - initramfs_bundle_path="arch/"${UBOOT_ARCH}"/boot/"${KERNEL_IMAGETYPE_REPLACEMENT}".initramfs" - if [ -e "${initramfs_bundle_path}" ]; then - - # - # Include the kernel/rootfs bundle. - # - - fitimage_emit_section_kernel ${1} "${kernelcount}" "${initramfs_bundle_path}" "${linux_comp}" - else - bbwarn "${initramfs_bundle_path} not found." - fi - else - fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" - fi + fitimage_emit_section_kernel $1 $kernelcount linux.bin "$linux_comp" # # Step 2: Prepare a DTB image section @@ -470,9 +590,9 @@ fitimage_assemble() { if [ -n "${KERNEL_DEVICETREE}" ]; then dtbcount=1 for DTB in ${KERNEL_DEVICETREE}; do - if echo ${DTB} | grep -q '/dts/'; then - bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." - DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + if echo $DTB | grep -q '/dts/'; then + bbwarn "$DTB contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename $DTB | sed 's,\.dts$,.dtb,g'` fi # Skip ${DTB} if it's also provided in ${EXTERNAL_KERNEL_DEVICETREE} @@ -480,26 +600,60 @@ fitimage_assemble() { continue fi - DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" - if [ ! -e "${DTB_PATH}" ]; then - DTB_PATH="arch/${ARCH}/boot/${DTB}" + DTB_PATH="${KERNEL_OUTPUT_DIR}/dts/$DTB" + if [ ! -e "$DTB_PATH" ]; then + DTB_PATH="${KERNEL_OUTPUT_DIR}/$DTB" + fi + + # Strip off the path component from the filename + if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then + DTB=`basename $DTB` + fi + + # Set the default dtb image if it exists in the devicetree. + if [ ${FIT_CONF_DEFAULT_DTB} = $DTB ];then + default_dtb_image=$(echo "$DTB" | tr '/' '_') fi - DTB=$(echo "${DTB}" | tr '/' '_') - DTBS="${DTBS} ${DTB}" - fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH} + DTB=$(echo "$DTB" | tr '/' '_') + + # Skip DTB if we've picked it up previously + echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue + + DTBS="$DTBS $DTB" + DTB=$(echo $DTB | tr '/' '_') + fitimage_emit_section_dtb $1 $DTB $DTB_PATH done fi if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then dtbcount=1 - for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do - DTB=$(echo "${DTB}" | tr '/' '_') - DTBS="${DTBS} ${DTB}" - fitimage_emit_section_dtb ${1} ${DTB} "${EXTERNAL_KERNEL_DEVICETREE}/${DTB}" + for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtb' -printf '%P\n' | sort) \ + $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtbo' -printf '%P\n' | sort); do + # Set the default dtb image if it exists in the devicetree. + if [ ${FIT_CONF_DEFAULT_DTB} = $DTB ];then + default_dtb_image=$(echo "$DTB" | tr '/' '_') + fi + + DTB=$(echo "$DTB" | tr '/' '_') + + # Skip DTB/DTBO if we've picked it up previously + echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue + + DTBS="$DTBS $DTB" + + # Also skip if a symlink. We'll later have each config section point at it + [ $(symlink_points_below $DTB "${EXTERNAL_KERNEL_DEVICETREE}") ] && continue + + DTB=$(echo $DTB | tr '/' '_') + fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB" done fi + if [ -n "${FIT_CONF_DEFAULT_DTB}" ] && [ -z $default_dtb_image ]; then + bbwarn "${FIT_CONF_DEFAULT_DTB} is not available in the list of device trees." + fi + # # Step 3: Prepare a u-boot script section # @@ -508,7 +662,7 @@ fitimage_assemble() { if [ -e "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY}" ]; then cp ${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} ${B} bootscr_id="${UBOOT_ENV_BINARY}" - fitimage_emit_section_boot_script ${1} "${bootscr_id}" ${UBOOT_ENV_BINARY} + fitimage_emit_section_boot_script $1 "$bootscr_id" ${UBOOT_ENV_BINARY} else bbwarn "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} not found." fi @@ -517,49 +671,46 @@ fitimage_assemble() { # # Step 4: Prepare a setup section. (For x86) # - if [ -e arch/${ARCH}/boot/setup.bin ]; then + if [ -e ${KERNEL_OUTPUT_DIR}/setup.bin ]; then setupcount=1 - fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin - fi - - # - # Step 5: Prepare a loadable sections. - # - if [ -n "${FIT_LOADABLES}" ]; then - for LOADABLE in ${FIT_LOADABLES}; do - if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then - fitimage_emit_section_loadable ${1} "${LOADABLE}" ${DEPLOY_DIR_IMAGE}/${LOADABLE} - fi - done + fitimage_emit_section_setup $1 $setupcount ${KERNEL_OUTPUT_DIR}/setup.bin fi # - # Step 6: Prepare a ramdisk section. + # Step 5: Prepare a ramdisk section. # - if [ "${ramdiskcount}" = "1" ] && [ "${ramdisk_bundle}" != "1" ]; then + if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then # Find and use the first initramfs image archive type we find - for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio; do - initramfs_path="${DEPLOY_DIR_IMAGE}/${ramdisk_image_name}.${img}" - echo "Using $initramfs_path" - if [ -e "${initramfs_path}" ]; then - fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${ramdisk_image_name}" "${initramfs_path}" + found= + for img in ${FIT_SUPPORTED_INITRAMFS_FSTYPES}; do + initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" + if [ -e "$initramfs_path" ]; then + bbnote "Found initramfs image: $initramfs_path" + found=true + fitimage_emit_section_ramdisk $1 "$ramdiskcount" "$initramfs_path" break + else + bbnote "Did not find initramfs image: $initramfs_path" fi done + + if [ -z "$found" ]; then + bbfatal "Could not find a valid initramfs type for ${INITRAMFS_IMAGE_NAME}, the supported types are: ${FIT_SUPPORTED_INITRAMFS_FSTYPES}" + fi fi - fitimage_emit_section_maint ${1} sectend + fitimage_emit_section_maint $1 sectend # Force the first Kernel and DTB in the default config kernelcount=1 - if [ -n "${dtbcount}" ]; then + if [ -n "$dtbcount" ]; then dtbcount=1 fi # - # Step 7: Prepare a configurations section + # Step 6: Prepare a configurations section # - fitimage_emit_section_maint ${1} confstart + fitimage_emit_section_maint $1 confstart # kernel-fitimage.bbclass currently only supports a single kernel (no less or # more) to be added to the FIT image along with 0 or more device trees and @@ -570,85 +721,160 @@ fitimage_assemble() { # the default configuration to be used is based on the dtbcount. If there is # no dtb present than select the default configuation to be based on # the kernelcount. - if [ -n "${DTBS}" ]; then - dtb_idx=1 + if [ -n "$DTBS" ]; then + i=1 for DTB in ${DTBS}; do dtb_ext=${DTB##*.} - if [ "${dtb_ext}" = "dtbo" ]; then - fitimage_emit_section_config ${1} "" "${DTB}" "" "" "" "" "" "`expr ${dtb_idx} = ${dtbcount}`" + if [ "$dtb_ext" = "dtbo" ]; then + fitimage_emit_section_config $1 "" "$DTB" "" "$bootscr_id" "" "`expr $i = $dtbcount`" "$default_dtb_image" else - fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "${FIT_LOADABLES}" "`expr ${dtb_idx} = ${dtbcount}`" + fitimage_emit_section_config $1 $kernelcount "$DTB" "$ramdiskcount" "$bootscr_id" "$setupcount" "`expr $i = $dtbcount`" "$default_dtb_image" fi - dtb_idx=`expr ${dtb_idx} + 1` + i=`expr $i + 1` done - unset dtb_idx else defaultconfigcount=1 - fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "${FIT_LOADABLES}" "${defaultconfigcount}" + fitimage_emit_section_config $1 $kernelcount "" "$ramdiskcount" "$bootscr_id" "$setupcount" $defaultconfigcount "$default_dtb_image" fi - fitimage_emit_section_maint ${1} sectend + fitimage_emit_section_maint $1 sectend - fitimage_emit_section_maint ${1} fitend + fitimage_emit_section_maint $1 fitend # - # Step 8: Assemble the image + # Step 7: Assemble the image # ${UBOOT_MKIMAGE} \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ - -f ${1} \ - arch/${ARCH}/boot/${2} + -f $1 \ + ${KERNEL_OUTPUT_DIR}/$2 # - # Step 9: Sign the image and add public key to U-Boot dtb + # Step 8: Sign the image # - if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then - add_key_to_u_boot="" - if [ -n "${UBOOT_DTB_BINARY}" ]; then - # The u-boot.dtb is a symlink to UBOOT_DTB_IMAGE, so we need copy - # both of them, and don't dereference the symlink. - cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B} - add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}" - fi + if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then ${UBOOT_MKIMAGE_SIGN} \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ -F -k "${UBOOT_SIGN_KEYDIR}" \ - $add_key_to_u_boot \ - -r arch/${ARCH}/boot/${2} \ + -r ${KERNEL_OUTPUT_DIR}/$2 \ ${UBOOT_MKIMAGE_SIGN_ARGS} fi } +do_assemble_fitimage() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then + cd ${B} + fitimage_assemble fit-image.its fitImage-none "" + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + ln -sf fitImage-none ${B}/${KERNEL_OUTPUT_DIR}/fitImage + fi + fi +} + +addtask assemble_fitimage before do_install after do_compile + +SYSROOT_DIRS:append = " /sysroot-only" +do_install:append() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \ + [ "${UBOOT_SIGN_ENABLE}" = "1" ]; then + install -D ${B}/${KERNEL_OUTPUT_DIR}/fitImage-none ${D}/sysroot-only/fitImage + fi +} + do_assemble_fitimage_initramfs() { - if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" ; then + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \ + test -n "${INITRAMFS_IMAGE}" ; then cd ${B} - if test -n "${INITRAMFS_IMAGE}" ; then - if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then - fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage "" "" ${INITRAMFS_IMAGE_BUNDLE} - else - fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 ${INITRAMFS_IMAGE_NAME} 0 - fi + if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-bundle "" + ln -sf fitImage-bundle ${B}/${KERNEL_OUTPUT_DIR}/fitImage + else + fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 + fi + fi +} + +addtask assemble_fitimage_initramfs before do_deploy after do_bundle_initramfs + +do_kernel_generate_rsa_keys() { + if [ "${UBOOT_SIGN_ENABLE}" = "0" ] && [ "${FIT_GENERATE_KEYS}" = "1" ]; then + bbwarn "FIT_GENERATE_KEYS is set to 1 even though UBOOT_SIGN_ENABLE is set to 0. The keys will not be generated as they won't be used." + fi + + if [ "${UBOOT_SIGN_ENABLE}" = "1" ] && [ "${FIT_GENERATE_KEYS}" = "1" ]; then + + # Generate keys to sign configuration nodes, only if they don't already exist + if [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key ] || \ + [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt ]; then + + # make directory if it does not already exist + mkdir -p "${UBOOT_SIGN_KEYDIR}" + + bbnote "Generating RSA private key for signing fitImage" + openssl genrsa ${FIT_KEY_GENRSA_ARGS} -out \ + "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \ + "${FIT_SIGN_NUMBITS}" + + bbnote "Generating certificate for signing fitImage" + openssl req ${FIT_KEY_REQ_ARGS} "${FIT_KEY_SIGN_PKCS}" \ + -key "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \ + -out "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt fi - if test -n "${INITRAMFS_RECOVERY_IMAGE}" ; then - fitimage_assemble fit-image-${INITRAMFS_RECOVERY_IMAGE}.its fitImage-${INITRAMFS_RECOVERY_IMAGE} 1 ${INITRAMFS_RECOVERY_IMAGE_NAME} 0 + # Generate keys to sign image nodes, only if they don't already exist + if [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".key ] || \ + [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".crt ]; then + + # make directory if it does not already exist + mkdir -p "${UBOOT_SIGN_KEYDIR}" + + bbnote "Generating RSA private key for signing fitImage" + openssl genrsa ${FIT_KEY_GENRSA_ARGS} -out \ + "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".key \ + "${FIT_SIGN_NUMBITS}" + + bbnote "Generating certificate for signing fitImage" + openssl req ${FIT_KEY_REQ_ARGS} "${FIT_KEY_SIGN_PKCS}" \ + -key "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".key \ + -out "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".crt fi - fi + fi } +addtask kernel_generate_rsa_keys before do_assemble_fitimage after do_compile + +kernel_do_deploy[vardepsexclude] = "DATETIME" kernel_do_deploy:append() { + # Update deploy directory if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then - if [ -n "${INITRAMFS_RECOVERY_IMAGE}" ]; then - bbnote "Copying fit-image-${INITRAMFS_RECOVERY_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_RECOVERY_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + bbnote "Copying fit-image.its source file..." + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-its-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" fi - bbnote "Copying fitImage-${INITRAMFS_RECOVERY_IMAGE} file..." - install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_RECOVERY_IMAGE} "$deployDir/fitImage-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + bbnote "Copying linux.bin file..." + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_RECOVERY_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + fi + fi + + if [ -n "${INITRAMFS_IMAGE}" ]; then + bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + fi + + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + fi fi fi fi From 70960603ef791f50399a7b044f2707ca942f8477 Mon Sep 17 00:00:00 2001 From: Daiane Angolini Date: Mon, 26 Aug 2024 11:08:47 -0300 Subject: [PATCH 07/48] base: kernel-lmp-fitimage: add loadable - Rebased on top of the scarthgap branch Signed-off-by: Daiane Angolini Signed-off-by: Jose Quaresma --- .../classes/kernel-lmp-fitimage.bbclass | 68 ++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass index 18ab17bd2..0ca0a9500 100644 --- a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass +++ b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass @@ -52,6 +52,8 @@ python __anonymous () { d.setVar('EXTERNAL_KERNEL_DEVICETREE', "${RECIPE_SYSROOT}/boot/devicetree") } +# Default value for deployment filenames +FIT_LOADABLES ?= "" # Description string FIT_DESC ?= "Kernel fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" @@ -393,6 +395,7 @@ symlink_points_below() { # $6 ... config ID # $7 ... default flag # $8 ... default DTB image name +# $9 ... loadable ID fitimage_emit_section_config() { conf_csum="${FIT_HASH_ALG}" @@ -410,6 +413,7 @@ fitimage_emit_section_config() { config_id="$6" default_flag="$7" default_dtb_image="$8" + loadable_id="$9" # Test if we have any DTBs at all sep="" @@ -422,6 +426,7 @@ fitimage_emit_section_config() { setup_line="" default_line="" compatible_line="" + loadable_line="" dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") if [ -z "$dtb_image_sect" ]; then @@ -476,6 +481,19 @@ fitimage_emit_section_config() { setup_line="setup = \"setup-$config_id\";" fi + if [ -n "$loadable_id" ]; then + loadable_counter=0 + for LOADABLE in $loadable_id; do + if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then + loadable_counter=`expr ${loadable_counter} + 1` + if [ -z "${loadable_line}" ]; then + conf_desc="${conf_desc}${sep}loadables" + fi + loadable_line="${loadable_line}loadable_${loadable_counter} = \"loadable-${LOADABLE}\"; " + fi + done + fi + if [ "$default_flag" = "1" ]; then # default node is selected based on dtb ID if it is present, # otherwise its selected based on kernel ID @@ -502,6 +520,7 @@ fitimage_emit_section_config() { $ramdisk_line $bootscr_line $setup_line + $loadable_line hash-1 { algo = "$conf_csum"; }; @@ -536,6 +555,16 @@ EOF sign_line="$sign_line${sep}\"setup\"" fi + if [ -n "$loadable_id" ]; then + loadable_counter=0 + for LOADABLE in $loadable_id; do + if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then + loadable_counter=`expr ${loadable_counter} + 1` + sign_line="$sign_line${sep}\"loadable_${loadable_counter}\"" + fi + done + fi + sign_line="$sign_line;" cat << EOF >> $its_file @@ -553,6 +582,30 @@ EOF EOF } + +# +# Emit the fitImage ITS loadables section +# +# $1 ... .its filename +# $2 ... Image name +# $3 ... Path to loadable image +fitimage_emit_section_loadable() { + + loadable_csum="${FIT_HASH_ALG}" + + cat << EOF >> $1 + loadable-$2 { + description = "Loadable"; + data = /incbin/("$3"); + type = "loadable"; + arch = "${UBOOT_ARCH}"; + compression = "none"; + hash-1 { + algo = "${loadable_csum=}"; + }; + }; +EOF +} # # Assemble fitImage # @@ -677,7 +730,18 @@ fitimage_assemble() { fi # - # Step 5: Prepare a ramdisk section. + # Step 5: Prepare a loadable sections. + # + if [ -n "${FIT_LOADABLES}" ]; then + for LOADABLE in ${FIT_LOADABLES}; do + if [ -e ${DEPLOY_DIR_IMAGE}/${LOADABLE} ]; then + fitimage_emit_section_loadable $1 "${LOADABLE}" ${DEPLOY_DIR_IMAGE}/${LOADABLE} + fi + done + fi + + # + # Step 6: Prepare a ramdisk section. # if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then # Find and use the first initramfs image archive type we find @@ -708,7 +772,7 @@ fitimage_assemble() { fi # - # Step 6: Prepare a configurations section + # Step 7: Prepare a configurations section # fitimage_emit_section_maint $1 confstart From 8586d051fff29fd7500470f505590d04eaf4c12d Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 26 Sep 2024 11:16:48 +0100 Subject: [PATCH 08/48] base: libdevmapper: Inherit nopackages This fixes errors from buildhistory changes where packages-split would be empty. Submited: https://lists.openembedded.org/g/openembedded-devel/topic/108648856 Signed-off-by: Jose Quaresma --- meta-lmp-base/recipes-support/lvm2/libdevmapper_2.03.22.bbappend | 1 + 1 file changed, 1 insertion(+) create mode 100644 meta-lmp-base/recipes-support/lvm2/libdevmapper_2.03.22.bbappend diff --git a/meta-lmp-base/recipes-support/lvm2/libdevmapper_2.03.22.bbappend b/meta-lmp-base/recipes-support/lvm2/libdevmapper_2.03.22.bbappend new file mode 100644 index 000000000..1b1e1e0e1 --- /dev/null +++ b/meta-lmp-base/recipes-support/lvm2/libdevmapper_2.03.22.bbappend @@ -0,0 +1 @@ +inherit nopackages From 11cd934735f3b90ebdfcb18208e71ac3bf2f0073 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Tue, 1 Oct 2024 10:12:31 +0100 Subject: [PATCH 09/48] base: u-boot-fio: inherit uuu_bootloader_tag on imx bsp Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: https://github.com/Freescale/meta-freescale/pull/1791 https://github.com/Freescale/meta-freescale/pull/1945 Signed-off-by: Jose Quaresma --- meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2022.04.bb | 5 +++++ meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2023.04.bb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2022.04.bb b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2022.04.bb index d80761d9d..35b58cc87 100644 --- a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2022.04.bb +++ b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2022.04.bb @@ -1,5 +1,10 @@ require u-boot-fio-common.inc +UUU_BOOTLOADER = "uuu_bootloader_tag" +UUU_BOOTLOADER:mx8-generic-bsp = "" +UUU_BOOTLOADER:mx9-generic-bsp = "" +inherit_defer ${UUU_BOOTLOADER} + SRCREV = "605d0aa5c016915058c7b19051f76d592e103b32" SRCBRANCH = "2022.04+lf-6.1.1-1.0.0-fio" LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2023.04.bb b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2023.04.bb index 8e6d009f5..ec664ce35 100644 --- a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2023.04.bb +++ b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_imx-2023.04.bb @@ -1,5 +1,10 @@ require u-boot-fio-common.inc +UUU_BOOTLOADER = "uuu_bootloader_tag" +UUU_BOOTLOADER:mx8-generic-bsp = "" +UUU_BOOTLOADER:mx9-generic-bsp = "" +inherit_defer ${UUU_BOOTLOADER} + SRCREV = "d5bf13df210018527f8b0c136ce0b8be6b0d76f5" SRCBRANCH = "2023.04+lf-6.1.55-2.2.0-fio" LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" From cf10b9067f1a33f491553eaff2cfe9c0fc86bded Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Tue, 1 Oct 2024 10:46:50 +0100 Subject: [PATCH 10/48] base: u-boot-fio-mfgtool: add default lmp-base distro cfg fixes: | ERROR: /srv/oe/build/conf/../../layers/meta-lmp/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_imx-2023.04.bb: | Unable to get checksum for u-boot-fio-mfgtool SRC_URI entry lmp-base-common.cfg: file could not be found | | ERROR: /srv/oe/build/conf/../../layers/meta-lmp/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_imx-2022.04.bb: | Unable to get checksum for u-boot-fio-mfgtool SRC_URI entry lmp-base-common.cfg: file could not be found | | ERROR: /srv/oe/build/conf/../../layers/meta-lmp/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2023.04.bb: | Unable to get checksum for u-boot-fio-mfgtool SRC_URI entry lmp-base-common.cfg: file could not be found Signed-off-by: Jose Quaresma --- .../u-boot-fio-mfgtool/lmp-base-common.cfg | 106 ++++++++++++++++++ .../u-boot/u-boot-fio-mfgtool/lmp-base.cfg | 0 2 files changed, 106 insertions(+) create mode 100644 meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base-common.cfg create mode 100644 meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base.cfg diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base-common.cfg b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base-common.cfg new file mode 100644 index 000000000..f1e779055 --- /dev/null +++ b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base-common.cfg @@ -0,0 +1,106 @@ +# CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_BOOTCOMMAND="reset" +CONFIG_BOOTDELAY=-2 +# CONFIG_BOOTM_NETBSD is not set +# CONFIG_BOOTM_PLAN9 is not set +# CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_BMODE is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTP is not set +# CONFIG_CMD_BOOTZ is not set +# CONFIG_CMD_DEKBLOB is not set +# CONFIG_CMD_DFU is not set +# CONFIG_CMD_DHCP is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_EXPORTENV is not set +CONFIG_CMD_FIOVB=y +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_GETTIME is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_IMPORTENV is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_NET is not set +# CONFIG_CMD_NFS is not set +# CONFIG_CMD_POWEROFF is not set +# CONFIG_CMD_PXE is not set +# CONFIG_CMD_RTC is not set +# CONFIG_CMD_SATA is not set +# CONFIG_CMD_SAVEENV is not set +# CONFIG_CMD_SNTP is not set +# CONFIG_CMD_SYSBOOT is not set +# CONFIG_CMD_TFTPBOOT is not set +# CONFIG_CMD_TIME is not set +# CONFIG_CMD_TIMER is not set +# CONFIG_CMD_USB_MASS_STORAGE is not set +CONFIG_CMD_XIMG=y +# CONFIG_DFU is not set +# CONFIG_DISTRO_DEFAULTS is not set +# CONFIG_DM_SCSI is not set +CONFIG_DM_USB=y +# CONFIG_DM_VIDEO is not set +# CONFIG_DWC_AHSATA is not set +# CONFIG_EFI_LOADER is not set +# CONFIG_ENV_IS_IN_MMC is not set +# CONFIG_ENV_IS_IN_SPI_FLASH is not set +CONFIG_ENV_IS_NOWHERE=y +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_UUU_SUPPORT=y +CONFIG_FIOVB=y +CONFIG_FIT_SIGNATURE_STRICT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT=y +CONFIG_FSL_FASTBOOT_BOOTLOADER2=y +CONFIG_FSL_FASTBOOT_BOOTLOADER_SECONDARY=y +CONFIG_HASH=y +# CONFIG_WATCHDOG is not set +# CONFIG_IMX_WATCHDOG is not set +# CONFIG_LEGACY_IMAGE_FORMAT is not set +# CONFIG_NET is not set +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_OPTEE_LIB=y +CONFIG_OPTEE=y +CONFIG_PARTITION_UUIDS=y +CONFIG_RSA=y +# CONFIG_SATA is not set +# CONFIG_SHA_HW_ACCEL is not set +# CONFIG_SPL_BLK is not set +CONFIG_SPL_CRYPTO=y +# CONFIG_SPL_DM_USB is not set +CONFIG_SPL_DM=y +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set +# CONFIG_SPL_FIT_IMAGE_TINY is not set +CONFIG_SPL_FIT_SIGNATURE_STRICT=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_FIT=y +CONFIG_SPL_HASH=y +# CONFIG_SPL_IMX_HAB is not set +# CONFIG_SPL_LEGACY_IMAGE_FORMAT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set +CONFIG_SPL_LOAD_FIT=y +# CONFIG_SPL_MMC is not set +CONFIG_SPL_OF_CONTROL=y +# CONFIG_SPL_PARTITION_UUIDS is not set +CONFIG_SPL_SHA256=y +CONFIG_SPL_USB_GADGET=y +CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_TEE=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_MASS_STORAGE=y +CONFIG_USB_GADGET_PRODUCT_NUM=0x0152 +CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9 +# CONFIG_USB_HOST_ETHER is not set +# CONFIG_USB_KEYBOARD is not set +# CONFIG_USB_STORAGE is not set +CONFIG_USB=y +CONFIG_USE_BOOTCOMMAND=y +# CONFIG_VIDEO is not set +# CONFIG_BOOTSTD is not set +CONFIG_SHA256=y diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base.cfg b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool/lmp-base.cfg new file mode 100644 index 000000000..e69de29bb From f53debcd2c6a1f96e73da15118ca61b36647007c Mon Sep 17 00:00:00 2001 From: Daiane Angolini Date: Thu, 26 Sep 2024 11:36:55 -0300 Subject: [PATCH 11/48] base/bsp: uboot-fitimage: Adapt the class to scarthgap dir naming Since [1] the uboot-sign class is being refactored and some files were reorganized. Taking concat_dtb_helper as example, the dtb files once installed previous the deploy were migrated to the deploy. It makes only the simple named dtb files being available during the fitimage its creation. Because of that, use the variables with the file names for signed or not signed u-boot dtb files. The instalation directory also changed. [1] https://github.com/openembedded/openembedded-core/commit/5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e Signed-off-by: Daiane Angolini Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/uboot-fitimage.bbclass | 2 +- meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-bsp-common.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-lmp-base/classes/uboot-fitimage.bbclass b/meta-lmp-base/classes/uboot-fitimage.bbclass index 3ea9ec596..4c8173399 100644 --- a/meta-lmp-base/classes/uboot-fitimage.bbclass +++ b/meta-lmp-base/classes/uboot-fitimage.bbclass @@ -126,7 +126,7 @@ uboot_fitimage_assemble() { # u-boot dtb location depends on sign enable if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ]; then - uboot_dtb="${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_IMAGE}" + uboot_dtb="${UBOOT_DTB_SIGNED}" else uboot_dtb="u-boot.dtb" fi diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-bsp-common.inc b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-bsp-common.inc index 8999fd1ff..f7ef8e430 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-bsp-common.inc +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-bsp-common.inc @@ -24,7 +24,7 @@ deploy_nxp_imx() { if [ ! -f "${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}" ]; then # When sign is enabled the final DTB should be copied from deploy dir if [ "${UBOOT_SIGN_ENABLE}" = "1" ]; then - install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name} + install -m 0644 ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name} else install -m 0644 ${B}/${config}/arch/arm/dts/${dtb_name} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name} fi @@ -47,7 +47,7 @@ deploy_nxp_imx() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} # When sign is enabled the final DTB should be copied from deploy dir if [ "${UBOOT_SIGN_ENABLE}" = "1" ]; then - install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} + install -m 0644 ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} else install -m 0644 ${B}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} fi From 5b5a073e226054a318e47ed93911543550a6947c Mon Sep 17 00:00:00 2001 From: Daiane Angolini Date: Wed, 2 Oct 2024 11:02:24 -0300 Subject: [PATCH 12/48] base/bsp: mfgtool-files: Change the image filename for scarthgap Signed-off-by: Daiane Angolini --- .../mfgtool-files/mfgtool-files/full_image.uuu.in | 2 +- .../mfgtool-files/mfgtool-files/imx6ulevk/full_image.uuu.in | 2 +- .../mfgtool-files/mfgtool-files/imx6ullevk/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mm-lpddr4-evk-sec/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mm-lpddr4-evk/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mn-ddr4-evk-sec/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mn-ddr4-evk/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mn-lpddr4-evk-sec/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mn-lpddr4-evk/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mp-lpddr4-evk-sec/full_image.uuu.in | 2 +- .../mfgtool-files/imx8mp-lpddr4-evk/full_image.uuu.in | 2 +- .../mfgtool-files/mfgtool-files/imx8mq-evk/full_image.uuu.in | 2 +- .../mfgtool-files/imx8qm-mek-sec/full_image.uuu.in | 2 +- .../mfgtool-files/mfgtool-files/imx8qm-mek/full_image.uuu.in | 2 +- .../mfgtool-files/imx8ulp-lpddr4-evk/full_image.uuu.in | 2 +- .../mfgtool-files/imx93-11x11-lpddr4x-evk/full_image.uuu.in | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/meta-lmp-base/recipes-support/mfgtool-files/mfgtool-files/full_image.uuu.in b/meta-lmp-base/recipes-support/mfgtool-files/mfgtool-files/full_image.uuu.in index e7a3d569c..c78592390 100644 --- a/meta-lmp-base/recipes-support/mfgtool-files/mfgtool-files/full_image.uuu.in +++ b/meta-lmp-base/recipes-support/mfgtool-files/mfgtool-files/full_image.uuu.in @@ -22,7 +22,7 @@ uuu_version 1.0.1 # Rootfs #FBK: acmd mmc=`cat /tmp/mmcdev`; gunzip -c | dd of=/dev/mmcblk${mmc} bs=4M iflag=fullblock oflag=direct status=progress -#FBK: ucp ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz t:- +#FBK: ucp ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz t:- #FBK: Sync #FBK: DONE diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ulevk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ulevk/full_image.uuu.in index e3fbe5895..bcd2bee46 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ulevk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ulevk/full_image.uuu.in @@ -9,7 +9,7 @@ SDPV: jump FB: ucmd if mmc dev 0; then setenv flash_dev 0; setenv emmc_partconf "mmc partconf ${flash_dev} ${emmc_ack} 1 0"; else setenv flash_dev 1; setenv emmc_partconf "true"; fi; FB: ucmd setenv fastboot_dev mmc FB: ucmd mmc dev ${flash_dev} -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: ucmd mmc dev ${flash_dev} 1; mmc erase 2 0x1FFE FB: flash bootloader ../SPL-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ullevk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ullevk/full_image.uuu.in index e3fbe5895..bcd2bee46 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ullevk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx6ullevk/full_image.uuu.in @@ -9,7 +9,7 @@ SDPV: jump FB: ucmd if mmc dev 0; then setenv flash_dev 0; setenv emmc_partconf "mmc partconf ${flash_dev} ${emmc_ack} 1 0"; else setenv flash_dev 1; setenv emmc_partconf "true"; fi; FB: ucmd setenv fastboot_dev mmc FB: ucmd mmc dev ${flash_dev} -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: ucmd mmc dev ${flash_dev} 1; mmc erase 2 0x1FFE FB: flash bootloader ../SPL-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk-sec/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk-sec/full_image.uuu.in index f65933a94..3a3491b26 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk-sec/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk-sec/full_image.uuu.in @@ -21,7 +21,7 @@ FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb delete_pvalue bootfirm FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue debug 0; else true; fi FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue is_secondary_boot 0; else true; fi -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@.signed FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@.signed diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk/full_image.uuu.in index 1102fa9fc..5818dd5a4 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mm-lpddr4-evk/full_image.uuu.in @@ -9,7 +9,7 @@ SDPV: jump FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${emmc_dev} 1; mmc erase 0 0x2000 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk-sec/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk-sec/full_image.uuu.in index 5841a4104..18f55cf0a 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk-sec/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk-sec/full_image.uuu.in @@ -17,7 +17,7 @@ FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb delete_pvalue bootfirm FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue debug 0; else true; fi FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue is_secondary_boot 0; else true; fi -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@.signed FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@.signed diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk/full_image.uuu.in index af249037a..38d9f3c1e 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-ddr4-evk/full_image.uuu.in @@ -5,7 +5,7 @@ SDPS: boot -f imx-boot-mfgtool FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${emmc_dev} 1; mmc erase 0 0x2000 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk-sec/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk-sec/full_image.uuu.in index 5841a4104..18f55cf0a 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk-sec/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk-sec/full_image.uuu.in @@ -17,7 +17,7 @@ FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb delete_pvalue bootfirm FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue debug 0; else true; fi FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue is_secondary_boot 0; else true; fi -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@.signed FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@.signed diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk/full_image.uuu.in index af249037a..38d9f3c1e 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mn-lpddr4-evk/full_image.uuu.in @@ -5,7 +5,7 @@ SDPS: boot -f imx-boot-mfgtool FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${emmc_dev} 1; mmc erase 0 0x2000 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk-sec/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk-sec/full_image.uuu.in index 85cb0b7ea..b018b27f1 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk-sec/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk-sec/full_image.uuu.in @@ -17,7 +17,7 @@ FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb delete_pvalue bootfirm FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue debug 0; else true; fi FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue is_secondary_boot 0; else true; fi -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@.signed FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@.signed diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk/full_image.uuu.in index 209bcaaa5..3c8227d5c 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mp-lpddr4-evk/full_image.uuu.in @@ -5,7 +5,7 @@ SDPS: boot -f imx-boot-mfgtool FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${emmc_dev} 1; mmc erase 0 0x2000 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mq-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mq-evk/full_image.uuu.in index ced1f9143..6470d470e 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mq-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8mq-evk/full_image.uuu.in @@ -16,7 +16,7 @@ SDPV: jump FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${mmcdev} 1; mmc erase 0 0x2000 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb # secondary boot image should not contain HDMI FW diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek-sec/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek-sec/full_image.uuu.in index acd6fa5fe..96e78a272 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek-sec/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek-sec/full_image.uuu.in @@ -37,5 +37,5 @@ FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb delete_pvalue bootfirm FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue debug 0; else true; fi FB[-t 50000]: ucmd if test -n "${fiovb_rpmb}"; then fiovb write_pvalue is_secondary_boot 0; else true; fi -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: done diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek/full_image.uuu.in index 25dbaee60..6189ec874 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8qm-mek/full_image.uuu.in @@ -17,7 +17,7 @@ SDPV: jump FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev 0 FB: ucmd mmc dev ${mmcdev} 1; mmc erase 0 0x3FFE -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader_s ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8ulp-lpddr4-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8ulp-lpddr4-evk/full_image.uuu.in index f152bfb8a..5027b0930 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8ulp-lpddr4-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx8ulp-lpddr4-evk/full_image.uuu.in @@ -5,7 +5,7 @@ SDPS: boot -f imx-boot-mfgtool FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev 0 FB: ucmd mmc dev ${mmcdev} 1; mmc erase 0 0x3C00 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ diff --git a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx93-11x11-lpddr4x-evk/full_image.uuu.in b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx93-11x11-lpddr4x-evk/full_image.uuu.in index f152bfb8a..5027b0930 100644 --- a/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx93-11x11-lpddr4x-evk/full_image.uuu.in +++ b/meta-lmp-bsp/recipes-support/mfgtool-files/mfgtool-files/imx93-11x11-lpddr4x-evk/full_image.uuu.in @@ -5,7 +5,7 @@ SDPS: boot -f imx-boot-mfgtool FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev 0 FB: ucmd mmc dev ${mmcdev} 1; mmc erase 0 0x3C00 -FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.wic.gz/* +FB: flash -raw2sparse all ../@@MFGTOOL_FLASH_IMAGE@@-@@MACHINE@@.rootfs.wic.gz/* FB: flash bootloader ../imx-boot-@@MACHINE@@ FB: flash bootloader2 ../u-boot-@@MACHINE@@.itb FB: flash bootloader_s ../imx-boot-@@MACHINE@@ From 89ebcf716e2692f58a0c3695ca783042a14e98ef Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 10:10:43 +0100 Subject: [PATCH 13/48] bsp: lmp-machine-custom: drop beagleplay KERNEL_DEVICETREE Use the default KERNEL_DEVICETREE provided Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index f0841de37..1f419e92e 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -733,7 +733,6 @@ LMP_BOOT_FIRMWARE_FILES:append:sota:am62xx = " boot.itb" SOTA_CLIENT_FEATURES:append:am62xx-evm = " ubootenv" ## beagleplay SOTA_CLIENT_FEATURES:append:beagleplay = " ubootenv" -KERNEL_DEVICETREE:beagleplay = "ti/k3-am625-beagleplay.dtb ti/k3-am625-beagleplay-csi2-ov5640.dtbo ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtbo" MACHINE_EXTRA_RRECOMMENDS:append:beagleplay = " wl18xx-calibrator wl18xx-target-scripts wl18xx-fw wlconf" # TI AM64x From c40a38c73e896283c06737163ed140870115d409 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 10:11:46 +0100 Subject: [PATCH 14/48] bsp: linux-lmp-ti-staging: 6.1 -> 6.6 Signed-off-by: Jose Quaresma --- ...-lmp-ti-staging_git.bb => linux-lmp-ti-staging_6.6.bb} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/{linux-lmp-ti-staging_git.bb => linux-lmp-ti-staging_6.6.bb} (84%) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb similarity index 84% rename from meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb rename to meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb index de604da6b..de3df70f3 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_git.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb @@ -1,13 +1,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -include recipes-kernel/linux/kmeta-linux-lmp-6.1.y.inc +include recipes-kernel/linux/kmeta-linux-lmp-${PV}.y.inc KERNEL_REPO ?= "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" KERNEL_REPO_PROTOCOL ?= "https" -KERNEL_BRANCH ?= "ti-linux-6.1.y" +KERNEL_BRANCH ?= "ti-linux-6.6.y" -LINUX_VERSION ?= "6.1.83" -SRCREV_machine ?= "c1c2f1971fbf6ddad93a8c94314fe8221e7aa6be" +LINUX_VERSION ?= "6.6.44" +SRCREV_machine ?= "e3b431a6194fc1b074802d20c9eede8442382b2a" SRCREV_meta ?= "${KERNEL_META_COMMIT}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" From 06a1107a71b8a88248de5f374b0ef876b3f6ffa7 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 31 Oct 2024 17:54:14 +0000 Subject: [PATCH 15/48] bsp: u-boot-ti-staging: refresh patches Drop lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch Signed-off-by: Jose Quaresma --- .../recipes-bsp/u-boot/u-boot-ti-staging.inc | 5 +- ...cept-filesystem-path-to-the-RoT-key.patch} | 39 ++--- ...0002-k3-set-env-variable-device_type.patch | 48 ++++++ .../k3-set-env-variable-device_type.patch | 52 ------ ...en-getting-a-gzip-header-extra-field.patch | 154 ------------------ 5 files changed, 70 insertions(+), 228 deletions(-) rename meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/{k3-accept-filesystem-path-to-the-RoT-key.patch => 0001-k3-accept-filesystem-path-to-the-RoT-key.patch} (63%) create mode 100644 meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0002-k3-set-env-variable-device_type.patch delete mode 100644 meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-set-env-variable-device_type.patch delete mode 100644 meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging.inc b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging.inc index fda872c31..56a3989e6 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging.inc +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging.inc @@ -1,9 +1,8 @@ include recipes-bsp/u-boot/u-boot-lmp-common.inc SRC_URI:append = " \ - file://lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch \ - file://k3-accept-filesystem-path-to-the-RoT-key.patch \ - file://k3-set-env-variable-device_type.patch \ + file://0001-k3-accept-filesystem-path-to-the-RoT-key.patch \ + file://0002-k3-set-env-variable-device_type.patch \ " SRC_URI:append:am64xx-evm = " \ diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-accept-filesystem-path-to-the-RoT-key.patch b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0001-k3-accept-filesystem-path-to-the-RoT-key.patch similarity index 63% rename from meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-accept-filesystem-path-to-the-RoT-key.patch rename to meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0001-k3-accept-filesystem-path-to-the-RoT-key.patch index f67da685e..d773ac950 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-accept-filesystem-path-to-the-RoT-key.patch +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0001-k3-accept-filesystem-path-to-the-RoT-key.patch @@ -1,11 +1,12 @@ -From 7afececd745b26a68822fe6c37addb0492356714 Mon Sep 17 00:00:00 2001 +From 708ff470fb3a70d38ec3bb6c0bf65ae4d143b6ff Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Wed, 28 Jun 2023 10:09:03 +0200 -Subject: [PATCH] k3: accept filesystem path to the RoT key +Subject: [PATCH 1/2] k3: accept filesystem path to the RoT key Upstream-Status: Pending Signed-off-by: Jorge Ramirez-Ortiz +Signed-off-by: Jose Quaresma --- arch/arm/dts/Makefile | 10 ++++++++-- arch/arm/dts/k3-binman.dtsi | 4 ++-- @@ -13,12 +14,12 @@ Signed-off-by: Jorge Ramirez-Ortiz 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 1b9c5f04c3..01b5ae36fe 100644 +index 4d03a0f5b30..d1edd03a922 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -1375,8 +1375,14 @@ targets += $(dtb-y) - # Add any required device tree compiler flags here - DTC_FLAGS += -a 0x8 +@@ -1553,8 +1553,14 @@ DTC_FLAGS += -a 0x8 + + DTC_FLAGS_imx8mp-dhcom-pdk3-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format -PHONY += dtbs -dtbs: $(addprefix $(obj)/, $(dtb-y)) @@ -34,41 +35,41 @@ index 1b9c5f04c3..01b5ae36fe 100644 clean-files := *.dtb *.dtbo *_HS diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi -index 97a3573bdb..c595203e9b 100644 +index 621653e9471..a92815da185 100644 --- a/arch/arm/dts/k3-binman.dtsi +++ b/arch/arm/dts/k3-binman.dtsi -@@ -13,14 +13,14 @@ +@@ -15,14 +15,14 @@ custMpk { filename = "custMpk.pem"; - blob-ext { -- filename = "../keys/custMpk.pem"; + custmpk_pem: blob-ext { +- filename = "arch/arm/mach-k3/keys/custMpk.pem"; + filename = "TI_KEYS/custMpk.pem"; }; }; ti-degenerate-key { filename = "ti-degenerate-key.pem"; - blob-ext { -- filename = "../keys/ti-degenerate-key.pem"; + dkey_pem: blob-ext { +- filename = "arch/arm/mach-k3/keys/ti-degenerate-key.pem"; + filename = "TI_KEYS/ti-degenerate-key.pem"; }; }; }; diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig -index 49edd98014..4ff12d6c5b 100644 +index 821f02b09fc..f63bb94523c 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig -@@ -49,3 +49,10 @@ config TI_COMMON_CMD_OPTIONS - imply CMD_SPI - imply CMD_TIME - imply CMD_USB if USB +@@ -62,3 +62,10 @@ config TI_FDT_FOLDER_PATH + Folder path for kernel device tree default. + This is used along with fdtfile path to locate the kernel + device tree blob. + +config SIGN_KEY_PATH + string "Path to the sign key" + depends on ARCH_K3 -+ default "../keys" ++ default "arch/arm/mach-k3/keys" + help + Path to the folder containing the sign keys -- -2.34.1 +2.47.0 diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0002-k3-set-env-variable-device_type.patch b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0002-k3-set-env-variable-device_type.patch new file mode 100644 index 000000000..00a397524 --- /dev/null +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/0002-k3-set-env-variable-device_type.patch @@ -0,0 +1,48 @@ +From 3a8de682fe0e8b773eaf42c940f7de00b8aee192 Mon Sep 17 00:00:00 2001 +From: Igor Opaniuk +Date: Fri, 21 Jul 2023 18:08:03 +0200 +Subject: [PATCH 2/2] k3: set env variable device_type + +Set environment variable "device_type", which stores device +sec state: gp, hs-fs, hs-se. + +Changed to swicth to simplify the updates. +The same functionality is implemented very similar with the +CONFIG_DISPLAY_CPUINFO and we should use this instead. +Reworked-by: Jose Quaresma + +Upstream-Status: Inappropriate [lmp specific] +Signed-off-by: Igor Opaniuk +Signed-off-by: Jose Quaresma +--- + arch/arm/mach-k3/common.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c +index a371b002863..8405dca28c2 100644 +--- a/arch/arm/mach-k3/common.c ++++ b/arch/arm/mach-k3/common.c +@@ -703,6 +703,20 @@ int misc_init_r(void) + env_set("secure_rprocs", "1"); + } + ++ enum k3_device_type type = get_device_type(); ++ ++ switch (type) { ++ case K3_DEVICE_TYPE_HS_SE: ++ env_set("device_type", "hs-se"); ++ break; ++ case K3_DEVICE_TYPE_HS_FS: ++ env_set("device_type", "hs-fs"); ++ break; ++ case K3_DEVICE_TYPE_GP: ++ env_set("device_type", "gp"); ++ break; ++ } ++ + return 0; + } + +-- +2.47.0 + diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-set-env-variable-device_type.patch b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-set-env-variable-device_type.patch deleted file mode 100644 index 97f4e42f8..000000000 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/k3-set-env-variable-device_type.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0b638ece826c816a2387834975c9b5854dc94f6b Mon Sep 17 00:00:00 2001 -From: Igor Opaniuk -Date: Fri, 21 Jul 2023 18:08:03 +0200 -Subject: [PATCH] k3: set env variable device_type - -Set environment variable "device_type", which stores device -sec state: gp, hs-fs, hs-se. - -Upstream-Status: Inappropriate [lmp specific] -Signed-off-by: Igor Opaniuk ---- - arch/arm/mach-k3/common.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c -index c04f898a55..14619fabdb 100644 ---- a/arch/arm/mach-k3/common.c -+++ b/arch/arm/mach-k3/common.c -@@ -600,6 +600,8 @@ void spl_board_prepare_for_linux(void) - - int misc_init_r(void) - { -+ int device_type; -+ - if (IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS)) { - struct udevice *dev; - int ret; -@@ -611,12 +613,20 @@ int misc_init_r(void) - printf("Failed to probe am65_cpsw_nuss driver\n"); - } - -+ device_type = get_device_type(); - /* Default FIT boot on HS-SE devices */ -- if (get_device_type() == K3_DEVICE_TYPE_HS_SE) { -+ if (device_type == K3_DEVICE_TYPE_HS_SE) { - env_set("boot_fit", "1"); - env_set("secure_rprocs", "1"); -+ env_set("device_type", "hs-se"); - } else { -+ if (device_type == K3_DEVICE_TYPE_HS_FS) { -+ env_set("device_type", "hs-fs"); -+ } else { -+ env_set("device_type", "gp"); -+ } - env_set("secure_rprocs", "0"); -+ - } - - return 0; --- -2.34.1 - diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch deleted file mode 100644 index 576264cf1..000000000 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging/lib-zlib-Fix-a-bug-when-getting-a-gzip-header-extra-field.patch +++ /dev/null @@ -1,154 +0,0 @@ -From patchwork Thu Jun 15 14:54:34 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Oleksandr Suvorov -X-Patchwork-Id: 1795485 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 - header.s=google header.b=CSyLLo1n; - dkim-atps=neutral -Received: from phobos.denx.de (phobos.denx.de - [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qhlh10XPPz20Wy - for ; Fri, 16 Jun 2023 00:54:57 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 42B6B8631D; - Thu, 15 Jun 2023 16:54:52 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=none (p=none dis=none) header.from=foundries.io -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de -Authentication-Results: phobos.denx.de; - dkim=pass (2048-bit key; - unprotected) header.d=foundries.io header.i=@foundries.io - header.b="CSyLLo1n"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id E8C218631F; Thu, 15 Jun 2023 16:54:50 +0200 (CEST) -X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de -X-Spam-Level: -X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, - T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com - [IPv6:2a00:1450:4864:20::32e]) - (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id C8D34862AA - for ; Thu, 15 Jun 2023 16:54:47 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=none (p=none dis=none) header.from=foundries.io -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io -Received: by mail-wm1-x32e.google.com with SMTP id - 5b1f17b1804b1-3f7ebb2b82cso19538235e9.2 - for ; Thu, 15 Jun 2023 07:54:47 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=foundries.io; s=google; t=1686840887; x=1689432887; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:from:to:cc:subject:date:message-id:reply-to; - bh=ZlcZ/TvSHRdVMgcEyiYYvZoSkkmQihHQknCJfDU7dXU=; - b=CSyLLo1nTyuw0pHvCEkGQmkL1dQmaKLnQuf6ADthH1ZO6Var7o0sF94pAH/ZHT+NUy - EsEzQ71hHkuxv4Kig5gX6tASmoGYPtyRsLT8OgiFMGKTPYsbM/ald0MJgSO37xD0OTRg - atIPxO04aVYHPpHw+tLhWMjJlQ/xG52NPAKD6031RUIPb31aLkZ1Qm1ePJYpDHASWb0G - BihW+2SLV4fddKGko+F5loREzS56cFBCodVPydT4Jv6r9mZZB/zAELMa7zC6yzSbOZTK - kDk3Ipkvgx2P1ePSqZxE3bsQYH0sZMGsXx69Sayap75DgWpWfG6JNHLykqf6CR1/J5AF - bVnQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20221208; t=1686840887; x=1689432887; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:x-gm-message-state:from:to:cc:subject:date:message-id - :reply-to; - bh=ZlcZ/TvSHRdVMgcEyiYYvZoSkkmQihHQknCJfDU7dXU=; - b=ERbykPOQJDOHGQhnfs26hT8AtIzb/1J9Y0AzyoM+yxKxnofc4kOq16HB98yzSbbv8B - g2QXsfxHCysvG9SgIG9hQSsfhG/4GW4ATwZrgGx3C0BAe8l7K4FhrK9IRfQWgztMC9QN - 8cUbabeNzQaa9w1shRIuQaJrthkg9/GqE2GdaassqtTfPnM+AUrUrEFVwG6sgjs5zwZw - 7rfBz3/k+4hbB8UjqQsM77YfwqXG495cN5ENfPrdeC6YWEIeMVhop4knbzdoCLAfSjbd - 0uT0WPxrrWtcM99FZuqaFVUtFjhP1yauIjkZRjLrd5rHiWCj2e7ns/pA0OASS3P+Q8Co - nTMw== -X-Gm-Message-State: AC+VfDyPc9oFK6n9Mzw6zdmejxbO2SeZJtBMOZ9f5XxzZfEFUBIOilO7 - Dum6u/M5ISm22SW9judHyAEgDP/Q9h0yajN/Qt8fvw== -X-Google-Smtp-Source: - ACHHUZ5Y3bCKlS9IjeXX4/fZEmVixhD/VdCyBxetYirrE2WP+nIselSwtBGxaL8AwojYk7/8Z1K8AQ== -X-Received: by 2002:adf:db03:0:b0:311:17c5:3a9a with SMTP id - s3-20020adfdb03000000b0031117c53a9amr1286227wri.38.1686840886786; - Thu, 15 Jun 2023 07:54:46 -0700 (PDT) -Received: from localhost.localdomain ([194.104.22.162]) - by smtp.gmail.com with ESMTPSA id - b1-20020a5d5501000000b0030ae69920c9sm21323856wrv.53.2023.06.15.07.54.45 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 15 Jun 2023 07:54:46 -0700 (PDT) -From: Oleksandr Suvorov -To: u-boot@lists.denx.de -Cc: Oleksandr Suvorov -Subject: [PATCH] lib/zlib: Fix a bug when getting a gzip header extra field -Date: Thu, 15 Jun 2023 17:54:34 +0300 -Message-Id: <20230615145434.103140-1-oleksandr.suvorov@foundries.io> -X-Mailer: git-send-email 2.40.1 -MIME-Version: 1.0 -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.denx.de -Sender: "U-Boot" -X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de -X-Virus-Status: Clean - -This fixes CVE-2022-37434 [1] and bases on 2 commits from Mark -Adler's zlib master repo - the original fix of CVE bug [2] and -the fix for the fix [3]. - -[1] -https://github.com/advisories/GHSA-cfmr-vrgj-vqwv -[2] -https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1 -[3] -https://github.com/madler/zlib/commit/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d - -CVE: CVE-2022-37434 - -Fixes: e89516f031d ("zlib: split up to match original source tree") - -Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/uboot/patch/20230615145434.103140-1-oleksandr.suvorov@foundries.io/] -Signed-off-by: Oleksandr Suvorov ---- - - lib/zlib/inflate.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/zlib/inflate.c b/lib/zlib/inflate.c -index 30dfe155995..8f767b7b9d2 100644 ---- a/lib/zlib/inflate.c -+++ b/lib/zlib/inflate.c -@@ -455,8 +455,9 @@ int ZEXPORT inflate(z_streamp strm, int flush) - if (copy > have) copy = have; - if (copy) { - if (state->head != Z_NULL && -- state->head->extra != Z_NULL) { -- len = state->head->extra_len - state->length; -+ state->head->extra != Z_NULL && -+ (len = state->head->extra_len - state->length) < -+ state->head->extra_max) { - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); From 5d34d7e9b42a418da977da7349ce95e60f706a4a Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 10:19:07 +0100 Subject: [PATCH 16/48] bsp: u-boot-bb.org: drop beagleplay repo The beagleplay is now available in the default tree. Signed-off-by: Jose Quaresma --- .../meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend deleted file mode 100644 index 1f6a63248..000000000 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-ti-staging:${THISDIR}/${PN}:" - -include u-boot-ti-staging.inc From 8c03fa8e58c31ba1b3f5756e72b45f578c7a1a46 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 10:39:09 +0100 Subject: [PATCH 17/48] base: kmeta-linux-lmp-6.6.y: bump to cc8b1802 Relevant changes: - cc8b1802 ktypes/standard: enable CONFIG_CRC64 Signed-off-by: Jose Quaresma --- meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc b/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc index f439cec99..4f321ccf5 100644 --- a/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc +++ b/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc @@ -1,4 +1,4 @@ KERNEL_META_REPO ?= "git://github.com/foundriesio/lmp-kernel-cache.git" KERNEL_META_REPO_PROTOCOL ?= "https" KERNEL_META_BRANCH ?= "linux-v6.6.y" -KERNEL_META_COMMIT ?= "71eca07f3eaeb261e3f194f246d27a508ba0443d" +KERNEL_META_COMMIT ?= "cc8b1802b145ab26c2c451b9b3eb3d4a962f5e68" From f3a9e169e87b31253f334146041aa0e141a42f34 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 12:04:31 +0100 Subject: [PATCH 18/48] bsp: lmp-machine-custom: add beagleplay LMP_BOOT_FIRMWARE_FILES Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 1f419e92e..8f0b9793c 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -734,6 +734,8 @@ SOTA_CLIENT_FEATURES:append:am62xx-evm = " ubootenv" ## beagleplay SOTA_CLIENT_FEATURES:append:beagleplay = " ubootenv" MACHINE_EXTRA_RRECOMMENDS:append:beagleplay = " wl18xx-calibrator wl18xx-target-scripts wl18xx-fw wlconf" +LMP_BOOT_FIRMWARE_FILES:beagleplay = "tispl.bin u-boot.img tiboot3.bin" +LMP_BOOT_FIRMWARE_FILES:append:sota:beagleplay = " boot.itb" # TI AM64x MACHINE_FEATURES:append:am64xx = " optee" From 6c6c058b4785fb344cedc81eb589152650ad54fe Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 4 Nov 2024 14:33:07 +0000 Subject: [PATCH 19/48] bsp: linux-lmp-ti-staging: drop non-existent kernel 6.6.44 devicetrees Signed-off-by: Jose Quaresma --- .../linux/linux-lmp-ti-staging_6.6.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb index de3df70f3..7db0d7856 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb @@ -25,3 +25,20 @@ module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" + +# not found in linux-lmp-ti-staging-6.6.44 +# meta-ti-bsp/conf/machine/am62xx-evm.conf +# meta-ti-bsp/conf/machine/beagleplay.conf +KERNEL_DEVICETREE:remove:am62xx = " \ + ti/k3-am625-phyboard-lyra-1-4-ghz-opp.dtbo \ +" + +# not found in linux-lmp-ti-staging-6.6.44 +# meta-ti-bsp/conf/machine/include/am64xx.inc +KERNEL_DEVICETREE:remove:am64xx = " \ + ti/k3-am642-hummingboard-t-pcie.dtbo \ + ti/k3-am642-hummingboard-t-usb3.dtbo \ + ti/k3-am642-hummingboard-t.dtb \ + ti/k3-am642-phyboard-electra-gpio-fan.dtbo \ + ti/k3-am642-phyboard-electra-pcie-usb2.dtbo \ +" From 1468f4d0217731cd18bd259b97080d356404e327 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 3 Oct 2024 16:59:08 +0100 Subject: [PATCH 20/48] bsp: ti-mfgtool-files: also add multiconfig depends Signed-off-by: Jose Quaresma --- .../recipes-support/ti-mfgtool-files/ti-mfgtool-files_0.1.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-support/ti-mfgtool-files/ti-mfgtool-files_0.1.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-support/ti-mfgtool-files/ti-mfgtool-files_0.1.bb index e8b051fa0..5d7535215 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-support/ti-mfgtool-files/ti-mfgtool-files_0.1.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-support/ti-mfgtool-files/ti-mfgtool-files_0.1.bb @@ -36,5 +36,7 @@ do_deploy() { # Make sure the fitImage and u-boot are deployed do_deploy[depends] += "virtual/bootloader:do_deploy" +# for tiboot3*.bin +do_deploy[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy" addtask deploy after do_compile before do_build From 9cf54fdbef263b19403c34a54f3f9416b5f7609c Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 31 Oct 2024 15:14:32 +0000 Subject: [PATCH 21/48] bsp: lmp-mfgtool: am62xx-evm u-boot dfu is now using UBOOT_CONFIG_FRAGMENTS Signed-off-by: Jose Quaresma --- .../conf/machine/include/lmp-mfgtool-machine-custom.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc index 0c83601a8..e43bfc5f9 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc @@ -140,7 +140,7 @@ PREFERRED_PROVIDER_virtual/optee-os:k3 = "optee-os-fio-mfgtool" KERNEL_IMAGETYPE:k3 = "fitImage" KERNEL_CLASSES:k3 = " kernel-lmp-fitimage " # TI AM62XX EVM -UBOOT_MACHINE:am62xx-evm-k3r5 = "am62x_evm_r5_usbdfu_defconfig" +UBOOT_CONFIG_FRAGMENTS:am62xx-evm-k3r5 = "am62x_r5_usbdfu.config" # Cross machines / BSPs PREFERRED_VERSION_u-boot-fio-mfgtool:imx-nxp-bsp ?= "imx-2022.04" From 3b01cbebf372df1bd691d3b3fd412b2dbc8adb03 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 31 Oct 2024 15:15:15 +0000 Subject: [PATCH 22/48] bsp: lmp-mfgtool: disable TI k3 u-boot sign Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc index e43bfc5f9..acafbd7e2 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc @@ -139,6 +139,7 @@ EXTRA_IMAGEDEPENDS:remove:k3 = "u-boot-default-script" PREFERRED_PROVIDER_virtual/optee-os:k3 = "optee-os-fio-mfgtool" KERNEL_IMAGETYPE:k3 = "fitImage" KERNEL_CLASSES:k3 = " kernel-lmp-fitimage " +UBOOT_SIGN_ENABLE:k3 = "0" # TI AM62XX EVM UBOOT_CONFIG_FRAGMENTS:am62xx-evm-k3r5 = "am62x_r5_usbdfu.config" From e3e94bbbbd66d9893443fdf15f99fff5e15c660f Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Tue, 8 Oct 2024 10:36:29 +0100 Subject: [PATCH 23/48] bsp: tegra: update bbappends for L4T R35.6.0 Signed-off-by: Jose Quaresma --- ...egra-configs_35.5.0.bbappend => tegra-configs_35.6.0.bbappend} | 0 ...5.5.0.bbappend => tegra-helper-scripts-native_35.6.0.bbappend} | 0 ...-l4t-r35.5.0.bbappend => optee-os_3.21.0-l4t-r35.6.0.bbappend} | 0 ...4t-r35.5.0.bbappend => optee-test_3.21.0-l4t-r35.6.0.bbappend} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/{tegra-configs_35.5.0.bbappend => tegra-configs_35.6.0.bbappend} (100%) rename meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/{tegra-helper-scripts-native_35.5.0.bbappend => tegra-helper-scripts-native_35.6.0.bbappend} (100%) rename meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/{optee-os_3.21.0-l4t-r35.5.0.bbappend => optee-os_3.21.0-l4t-r35.6.0.bbappend} (100%) rename meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/{optee-test_3.21.0-l4t-r35.5.0.bbappend => optee-test_3.21.0-l4t-r35.6.0.bbappend} (100%) diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-configs_35.5.0.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-configs_35.6.0.bbappend similarity index 100% rename from meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-configs_35.5.0.bbappend rename to meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-configs_35.6.0.bbappend diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.5.0.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend similarity index 100% rename from meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.5.0.bbappend rename to meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-os_3.21.0-l4t-r35.5.0.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-os_3.21.0-l4t-r35.6.0.bbappend similarity index 100% rename from meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-os_3.21.0-l4t-r35.5.0.bbappend rename to meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-os_3.21.0-l4t-r35.6.0.bbappend diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-test_3.21.0-l4t-r35.5.0.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-test_3.21.0-l4t-r35.6.0.bbappend similarity index 100% rename from meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-test_3.21.0-l4t-r35.5.0.bbappend rename to meta-lmp-bsp/dynamic-layers/tegra/recipes-security/optee/optee-test_3.21.0-l4t-r35.6.0.bbappend From 21b603472c2a529db13154e2ecacd1acf8cd9e6d Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 9 Aug 2023 15:34:38 +0000 Subject: [PATCH 24/48] base: lmp: systemd: enable coredump When we have lmpdebug in DISTRO_FEATURES it will be good to enable systemd coredump Signed-off-by: Jose Quaresma --- meta-lmp-base/conf/distro/include/lmp.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-lmp-base/conf/distro/include/lmp.inc b/meta-lmp-base/conf/distro/include/lmp.inc index 3e56f31bb..2bbc49461 100644 --- a/meta-lmp-base/conf/distro/include/lmp.inc +++ b/meta-lmp-base/conf/distro/include/lmp.inc @@ -65,6 +65,7 @@ PACKAGECONFIG:remove:pn-cryptsetup = "ssh-token" PACKAGECONFIG:append:pn-cryptsetup = " luks2" PACKAGECONFIG:append:pn-cryptsetup-native = " luks2" PACKAGECONFIG:pn-tpm2-tss = "policy" +PACKAGECONFIG:append:pn-systemd = "${@bb.utils.contains('DISTRO_FEATURES', 'lmpdebug', ' coredump', '', d)}" # Alternatives used by nss-altfiles NSS_ALT_TYPES ?= "hosts,pwd,grp,spwd,sgrp" From a02e2776c8ca3dec8d52792c4e5325f47d920a2c Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 14 Oct 2024 17:33:37 +0100 Subject: [PATCH 25/48] base: lmp: remove pending IMAGE_NAME_SUFFIX The IMAGE_NAME already includes the IMAGE_NAME_SUFFIX in the scarthgap IMAGE_NAME="lmp-base-console-image-intel-corei7-64.rootfs-20241014163026" Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/lmp.bbclass | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meta-lmp-base/classes/lmp.bbclass b/meta-lmp-base/classes/lmp.bbclass index 98e3ce3e5..196c49f01 100644 --- a/meta-lmp-base/classes/lmp.bbclass +++ b/meta-lmp-base/classes/lmp.bbclass @@ -201,23 +201,23 @@ IMAGE_CMD:ota-ext4:append () { if [ -z "${OSTREE_OTA_EXT4_LUKS_PASSPHRASE}" ]; then bbfatal "Unable to find passphrase for LUKS-based ota-ext4 (define OSTREE_OTA_EXT4_LUKS_PASSPHRASE)" fi - cp ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4-orig + cp ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4-orig - block_size=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 | grep "^Block size" | cut -d ':' -f 2 | tr -d ' '` - block_count=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 | grep "^Block count" | cut -d ':' -f 2 | tr -d ' '` + block_size=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 | grep "^Block size" | cut -d ':' -f 2 | tr -d ' '` + block_count=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 | grep "^Block count" | cut -d ':' -f 2 | tr -d ' '` luks_size=33554432 # 32m new_block_count=$(expr ${block_count} - $(expr ${luks_size} / ${block_size})) bbdebug 1 "Rootfs: block size: $block_size, block count: $block_count" bbdebug 1 "Resizing Rootfs: old block count: $block_count, new block count: $new_block_count" - resize2fs -p ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 ${new_block_count} + resize2fs -p ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 ${new_block_count} # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) - fsck.ext4 -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 || [ $? -le 3 ] + fsck.ext4 -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 || [ $? -le 3 ] # After resize2fs we need to make sure the file size (simulating the block device) stays the same - dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=$ROOTFS_SIZE count=0 bs=1024 + dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 seek=$ROOTFS_SIZE count=0 bs=1024 - echo ${OSTREE_OTA_EXT4_LUKS_PASSPHRASE} | cryptsetup reencrypt --encrypt --key-slot 31 --pbkdf-memory ${OSTREE_OTA_EXT4_LUKS_PBKDF2_MEM} --disable-locks --reduce-device-size 32m ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 - cryptsetup config --label otaroot ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 - cryptsetup luksDump ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 + echo ${OSTREE_OTA_EXT4_LUKS_PASSPHRASE} | cryptsetup reencrypt --encrypt --key-slot 31 --pbkdf-memory ${OSTREE_OTA_EXT4_LUKS_PBKDF2_MEM} --disable-locks --reduce-device-size 32m ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 + cryptsetup config --label otaroot ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 + cryptsetup luksDump ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 fi } OSTREE_OTA_EXT4_LUKS ?= "0" From 6e812bc34cbf8c64d80aa2acec013e2cf8523775 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 14 Oct 2024 17:38:44 +0100 Subject: [PATCH 26/48] base: lmp: drop luks unused ota-ext4 backup image This image is not used anywhere Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/lmp.bbclass | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-lmp-base/classes/lmp.bbclass b/meta-lmp-base/classes/lmp.bbclass index 196c49f01..a5acb850a 100644 --- a/meta-lmp-base/classes/lmp.bbclass +++ b/meta-lmp-base/classes/lmp.bbclass @@ -201,7 +201,6 @@ IMAGE_CMD:ota-ext4:append () { if [ -z "${OSTREE_OTA_EXT4_LUKS_PASSPHRASE}" ]; then bbfatal "Unable to find passphrase for LUKS-based ota-ext4 (define OSTREE_OTA_EXT4_LUKS_PASSPHRASE)" fi - cp ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4-orig block_size=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 | grep "^Block size" | cut -d ':' -f 2 | tr -d ' '` block_count=`dumpe2fs -h ${IMGDEPLOYDIR}/${IMAGE_NAME}.ota-ext4 | grep "^Block count" | cut -d ':' -f 2 | tr -d ' '` From 6cc4c1cdc1077ac735a263ec765d00a0c34bfa93 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 16:46:09 -0300 Subject: [PATCH 27/48] base/bsp: u-boot-fio: update to the 2024.04+fio baseline Signed-off-by: Ricardo Salveti --- ...t-fio-mfgtool_2023.04.bb => u-boot-fio-mfgtool_2024.04.bb} | 2 +- .../u-boot/{u-boot-fio_2023.04.bb => u-boot-fio_2024.04.bb} | 4 ++-- meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/rpi/lmp.cfg | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) rename meta-lmp-base/recipes-bsp/u-boot/{u-boot-fio-mfgtool_2023.04.bb => u-boot-fio-mfgtool_2024.04.bb} (84%) rename meta-lmp-base/recipes-bsp/u-boot/{u-boot-fio_2023.04.bb => u-boot-fio_2024.04.bb} (58%) diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2023.04.bb b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2024.04.bb similarity index 84% rename from meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2023.04.bb rename to meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2024.04.bb index 45684f5d6..0adc55ba5 100644 --- a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2023.04.bb +++ b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio-mfgtool_2024.04.bb @@ -2,7 +2,7 @@ SUMMARY = "Produces a Manufacturing Tool compatible U-Boot" DESCRIPTION = "U-Boot recipe that produces a Manufacturing Tool compatible \ binary to be used in updater environment" -require recipes-bsp/u-boot/u-boot-fio_2023.04.bb +require recipes-bsp/u-boot/u-boot-fio_${PV}.bb # Environment config is not required for mfgtool SRC_URI:remove = "file://fw_env.config" diff --git a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2023.04.bb b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2024.04.bb similarity index 58% rename from meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2023.04.bb rename to meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2024.04.bb index 8a1996a52..a9df5f552 100644 --- a/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2023.04.bb +++ b/meta-lmp-base/recipes-bsp/u-boot/u-boot-fio_2024.04.bb @@ -1,5 +1,5 @@ require u-boot-fio-common.inc -SRCREV = "349b9c93a6f7218d7988caab249f4ad1196f3c30" -SRCBRANCH = "2023.04+fio" +SRCREV = "30cd2b39fb4989dc0e4c69bc5c73b1f169951bf1" +SRCBRANCH = "2024.04+fio" LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/rpi/lmp.cfg b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/rpi/lmp.cfg index e77749b27..a56df5862 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/rpi/lmp.cfg +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/rpi/lmp.cfg @@ -5,3 +5,4 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3 CONFIG_OF_BOARD=y # CONFIG_USE_PREBOOT is not set CONFIG_BOOTCOMMAND="fatload mmc 0:1 ${loadaddr} /boot.itb; setenv verify 1; source ${loadaddr}; env default -a; saveenv; reset" +CONFIG_VIDEO=y From b9bb5d8753c4408994e4b539982cc982c83d827d Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 19:17:36 -0300 Subject: [PATCH 28/48] bsp: u-boot-ostree-scr-fit: qemu: fix default conf entry When a default dtb is not used the fit now points to the default kernel index, which is 1 by default. Signed-off-by: Ricardo Salveti --- .../recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm/boot.cmd | 2 +- .../recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm64/boot.cmd | 2 +- .../u-boot/u-boot-ostree-scr-fit/qemuriscv64/boot.cmd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm/boot.cmd b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm/boot.cmd index e571afa01..413a03a47 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm/boot.cmd +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm/boot.cmd @@ -6,7 +6,7 @@ setenv devnum 0 setenv bootcmd_resetvars 'setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2' setenv bootcmd_otenv 'run bootcmd_resetvars; ext4load ${devtype} ${devnum}:2 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} kernel_image bootargs kernel_image2 bootargs2' setenv bootcmd_load_f 'ext4load ${devtype} ${devnum}:2 ${ramdisk_addr_r} "/boot"${kernel_image}' -setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf- ${ramdisk_addr_r}#conf- ${fdt_addr}' +setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf-1 ${ramdisk_addr_r}#conf-1 ${fdt_addr}' setenv bootcmd_rollbackenv 'setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2}' setenv bootcmd_set_rollback 'if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi' setenv bootostree 'run bootcmd_load_f; run bootcmd_run' diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm64/boot.cmd b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm64/boot.cmd index a01578ee6..97e686dcd 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm64/boot.cmd +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuarm64/boot.cmd @@ -9,7 +9,7 @@ setenv bootcmd_resetvars 'setenv kernel_image; setenv bootdir; setenv bootargs; setenv bootcmd_otenv 'run bootcmd_resetvars; ext4load ${devtype} ${devnum}:2 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} kernel_image bootdir bootargs kernel_image2 bootdir2 bootargs2' setenv bootcmd_load_f 'ext4load ${devtype} ${devnum}:2 ${ramdisk_addr_r} ${kernel_image}' setenv bootcmd_load_r 'ext4load ${devtype} ${devnum}:2 ${ramdisk_addr_r} ${bootdir}/recovery.img' -setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf- ${ramdisk_addr_r}#conf- ${fdt_addr}' +setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf-1 ${ramdisk_addr_r}#conf-1 ${fdt_addr}' setenv bootcmd_rollbackenv 'setenv kernel_image ${kernel_image2}; setenv bootdir ${bootdir2}; setenv bootargs ${bootargs2}' setenv bootcmd_set_rollback 'if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi' setenv bootostree 'if test "${recovery}" = "1"; then run bootcmd_load_r; setenv recovery; saveenv; else run bootcmd_load_f; fi; run bootcmd_run' diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuriscv64/boot.cmd b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuriscv64/boot.cmd index b31d92581..d0f9fc3ad 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuriscv64/boot.cmd +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/qemuriscv64/boot.cmd @@ -11,7 +11,7 @@ setenv bootcmd_updfdt 'cp ${fdtcontroladdr} ${fdt_addr_r} 1000' setenv bootcmd_resetvars 'setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2' setenv bootcmd_otenv 'run bootcmd_resetvars; ext4load ${devtype} ${devnum}:2 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} kernel_image bootargs kernel_image2 bootargs2' setenv bootcmd_load_f 'ext4load ${devtype} ${devnum}:2 ${ramdisk_addr_r} "/boot"${kernel_image}' -setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf- ${ramdisk_addr_r}#conf- ${fdt_addr_r}' +setenv bootcmd_run 'bootm ${ramdisk_addr_r}#conf-1 ${ramdisk_addr_r}#conf-1 ${fdt_addr_r}' setenv bootcmd_rollbackenv 'setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2}' setenv bootcmd_set_rollback 'if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi' setenv bootostree 'run bootcmd_load_f; run bootcmd_run' From eef97fde8eb35073b33980bd2d044019b4b00434 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 20:24:54 -0300 Subject: [PATCH 29/48] base: lmp: bump version for the 5.0.4 yocto release Based on scarthgap. Signed-off-by: Ricardo Salveti --- meta-lmp-base/conf/distro/include/lmp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-lmp-base/conf/distro/include/lmp.inc b/meta-lmp-base/conf/distro/include/lmp.inc index 2bbc49461..5f13456d0 100644 --- a/meta-lmp-base/conf/distro/include/lmp.inc +++ b/meta-lmp-base/conf/distro/include/lmp.inc @@ -1,4 +1,4 @@ -DISTRO_VERSION = "4.0.20" +DISTRO_VERSION = "5.0.4" # These default to 'oecore' and 'nodistro' SDK_NAME_PREFIX = "${DISTRO}" From 55058cb2ff4c2ca3162bccf43ca9ac17579a051d Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 13:27:16 -0300 Subject: [PATCH 30/48] bsp: lmp-machine-custom: add kernel serial arguments for rpi5 Signed-off-by: Ricardo Salveti --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 8f0b9793c..89e95f35d 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -35,10 +35,12 @@ ENABLE_UART:rpi = "1" ## Mimic meta-raspberrypi behavior KERNEL_SERIAL:rpi ?= "${@oe.utils.conditional("ENABLE_UART", "1", "console=ttyS0,115200", "", d)}" KERNEL_SERIAL:raspberrypi-cm3 ?= "console=ttyAMA0,115200" +KERNEL_SERIAL:raspberrypi5 ?= "console=ttyAMA10,115200" OSTREE_KERNEL_ARGS_COMMON_RPI ?= "coherent_pool=1M 8250.nr_uarts=1 console=tty1 cgroup_enable=memory ${KERNEL_SERIAL} ${OSTREE_KERNEL_ARGS_COMMON}" OSTREE_KERNEL_ARGS:raspberrypi3 ?= "vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ${OSTREE_KERNEL_ARGS_COMMON_RPI}" OSTREE_KERNEL_ARGS:raspberrypi-cm3 ?= "vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ${OSTREE_KERNEL_ARGS_COMMON_RPI}" OSTREE_KERNEL_ARGS:raspberrypi4 ?= "vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ${OSTREE_KERNEL_ARGS_COMMON_RPI}" +OSTREE_KERNEL_ARGS:raspberrypi5 ?= "pci=pcie_bus_safe vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 ${OSTREE_KERNEL_ARGS_COMMON_RPI}" ## U-Boot entrypoints for rpi UBOOT_ENTRYPOINT:rpi = "0x00200000" UBOOT_DTB_LOADADDRESS:rpi = "0x02600000" From 08a0680462dcafdd52ff29202d9a6aadad113701 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 13:28:14 -0300 Subject: [PATCH 31/48] bsp: linux-lmp-rpi: update to 6.6.22, from meta-rpi scarthgap Align base version with the same default version used in meta-rpi. Signed-off-by: Ricardo Salveti --- meta-lmp-bsp/recipes-kernel/linux/linux-lmp-rpi_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-rpi_git.bb b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-rpi_git.bb index 7a0b6bf91..1193d14c2 100644 --- a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-rpi_git.bb +++ b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-rpi_git.bb @@ -1,8 +1,8 @@ -include recipes-kernel/linux/kmeta-linux-lmp-6.1.y.inc +include recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc -LINUX_VERSION ?= "6.1.77" -KBRANCH = "rpi-6.1.y" -SRCREV_machine = "77fc1fbcb5c013329af9583307dd1ff3cd4752aa" +LINUX_VERSION ?= "6.6.22" +KBRANCH = "rpi-6.6.y" +SRCREV_machine = "c04af98514c26014a4f29ec87b3ece95626059bd" SRCREV_meta = "${KERNEL_META_COMMIT}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" From c6441585189f60d9a2df28be767cdeb0ad969786 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Oct 2024 15:46:58 -0300 Subject: [PATCH 32/48] base: kmeta-linux-lmp-6.6.y: bump to 16feae8a Relevant changes: - 16feae8a bsp: add BSP fragments for raspberrypi5 - 9bff1de1 bsp: raspberrypi4: config updates for 6.6 - 94d1435a kver: bumping to v6.6.54 - 3c4731cb netfilter: Enable CONFIG_NETFILTER_XTABLES_COMPAT - 1dd9e613 features/intel-npu: introduce Intel NPU fragment - 12e25b9a bsp/intel-corei7-64: enable Intel IOMMU support - 130af14e features/intel-pinctrl: add pinctrl driver for Intel Meteor Lake - dd8d897b full_nohz: remove RCU_FAST_NO_HZ gone from upstream - 8f915afd cgl: drop SELINUX_DISABLE option - 18f9024a nft_test.cfg: Enable CONFIG_VETH - f4c820c0 features/nf_tables: Add net_fib_* options for greater ptest coverage - 754686f5 features/nf_tables: nft_objref is now builtin - 4bf6d3f7 features/net_sched: Add MULTIQ and NET_EMATCH config - d3a802b6 features/net: Add xdp feature config - 97f449ea features/vfio: remove CONFIG_VFIO_VIRQFD Signed-off-by: Ricardo Salveti --- meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc b/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc index 4f321ccf5..b0dffc9fe 100644 --- a/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc +++ b/meta-lmp-base/recipes-kernel/linux/kmeta-linux-lmp-6.6.y.inc @@ -1,4 +1,4 @@ KERNEL_META_REPO ?= "git://github.com/foundriesio/lmp-kernel-cache.git" KERNEL_META_REPO_PROTOCOL ?= "https" KERNEL_META_BRANCH ?= "linux-v6.6.y" -KERNEL_META_COMMIT ?= "cc8b1802b145ab26c2c451b9b3eb3d4a962f5e68" +KERNEL_META_COMMIT ?= "16feae8a4ea6595371ff285c89648c196fe35ccf" From 44a2533f0c6daa5cd34fc1f67554733bd6bf6467 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 28 Oct 2024 16:28:40 +0000 Subject: [PATCH 33/48] bsp: lmp-machine-custom: drop imx93 devicetrees that do not exist in our tree Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 89e95f35d..a0c68a0bd 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -498,6 +498,8 @@ PREFERRED_VERSION_optee-os-fio-mfgtool:mx93-nxp-bsp = "3.21.0-imx" PREFERRED_VERSION_optee-os-tadevkit:mx93-nxp-bsp = "3.21.0-imx" PREFERRED_PROVIDER_virtual/kernel:mx93-nxp-bsp ?= "linux-lmp-fslc-imx" PREFERRED_VERSION_u-boot-fio:mx93-nxp-bsp ?= "imx-2023.04" +# linux-lmp-fslc-imx_6.1 does't have this devicetrees +KERNEL_DEVICETREE:remove:mx93-nxp-bsp = "freescale/${KERNEL_DEVICETREE_BASENAME}-i2c-spi-slave.dtb freescale/${KERNEL_DEVICETREE_BASENAME}-iw612-otbr.dtb" ## iMX93 DDR4 EVK UBOOT_SIGN_ENABLE:sota:imx93-11x11-lpddr4x-evk ?= "1" OSTREE_KERNEL_ARGS:imx93-11x11-lpddr4x-evk ?= "console=tty1 console=ttyLP0,115200 earlycon rootfstype=ext4" From 23d95d3f11f7816eb5485401ebec9794dc283643 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 4 Nov 2024 10:22:01 +0000 Subject: [PATCH 34/48] base: edk2-firmware: Increase ScratchMemory buffer for openssl Signed-off-by: Jose Quaresma --- ...se-ScratchMemory-buffer-for-openssl-.patch | 41 +++++++++++++++++++ .../recipes-bsp/uefi/edk2-firmware_%.bbappend | 4 ++ 2 files changed, 45 insertions(+) create mode 100644 meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware/0001-CryptoPkg-Increase-ScratchMemory-buffer-for-openssl-.patch diff --git a/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware/0001-CryptoPkg-Increase-ScratchMemory-buffer-for-openssl-.patch b/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware/0001-CryptoPkg-Increase-ScratchMemory-buffer-for-openssl-.patch new file mode 100644 index 000000000..e9595c10c --- /dev/null +++ b/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware/0001-CryptoPkg-Increase-ScratchMemory-buffer-for-openssl-.patch @@ -0,0 +1,41 @@ +From 46e407d9654d5c8986b0f7b61de3aa223b1df399 Mon Sep 17 00:00:00 2001 +From: Jorge Ramirez-Ortiz +Date: Thu, 31 Oct 2024 15:12:04 +0100 +Subject: [PATCH] CryptoPkg: Increase ScratchMemory buffer for openssl 3.0.15 + +Openssl 3.0.15 has a larger memory footprint. + +Updating from EDK 2022.2 (openssl 1.1.j) to 2024.2 (openssl 3.0.15) +causes our EFI provisioning application[1] to fail due to an out of +memory condition. + +On inspection, at the time of that fault, 2022.2 had an additional 900 +pages. This is why this patch proposes the increase of the ScratchMemory +buffer by that same ammount. + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git + +Upstream-Status: Submitted [https://github.com/tianocore/edk2/pull/6394] + +Signed-off-by: Jorge Ramirez-Ortiz +Signed-off-by: Jose Quaresma +--- + CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c b/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c +index 0d2ca604ea..bb066f0dd0 100644 +--- a/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c ++++ b/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c +@@ -33,7 +33,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent + #define RT_PAGE_FREE 0x00000000 + #define RT_PAGE_USED 0x00000001 + +-#define MIN_REQUIRED_BLOCKS 600 ++#define MIN_REQUIRED_BLOCKS 1100 + + // + // Memory Page Table +-- +2.25.1 + diff --git a/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend b/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend index c81474e6a..8146a8358 100644 --- a/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend +++ b/meta-lmp-base/dynamic-layers/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend @@ -1,5 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + do_install:append:qemuarm64-secureboot-ebbr() { install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/FV/QEMU*.fd ${D}/firmware/ # QEMU requires that the images be minimum of 64M in size truncate -s 64M ${D}/firmware/QEMU*.fd } + +SRC_URI += "file://0001-CryptoPkg-Increase-ScratchMemory-buffer-for-openssl-.patch" From 016e5f098fed0be822b4d8f457f361b55d381ea4 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 23 Sep 2024 18:42:24 +0100 Subject: [PATCH 35/48] Revert "systemd: add job to fix timesyncd update" This reverts commit 5cb0fa15a5aefbd2c93971d6954a565710eaf6c4. Signed-off-by: Jose Quaresma --- .../systemd/systemd/systemd-timesyncd-update.service | 11 ----------- meta-lmp-base/recipes-core/systemd/systemd_%.bbappend | 5 ----- 2 files changed, 16 deletions(-) delete mode 100644 meta-lmp-base/recipes-core/systemd/systemd/systemd-timesyncd-update.service diff --git a/meta-lmp-base/recipes-core/systemd/systemd/systemd-timesyncd-update.service b/meta-lmp-base/recipes-core/systemd/systemd/systemd-timesyncd-update.service deleted file mode 100644 index 28624c2c2..000000000 --- a/meta-lmp-base/recipes-core/systemd/systemd/systemd-timesyncd-update.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Systemd Timesync Update Fixes -After=local-fs.target -Before=systemd-timesyncd.service -DefaultDependencies=no - -[Service] -ExecStart=/bin/sh -c 'if [ -L /var/lib/systemd/timesync ]; then /bin/rm -fv /var/lib/systemd/timesync && /bin/mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync; fi' - -[Install] -WantedBy=sysinit.target diff --git a/meta-lmp-base/recipes-core/systemd/systemd_%.bbappend b/meta-lmp-base/recipes-core/systemd/systemd_%.bbappend index 9fbaf8208..a510f36e3 100644 --- a/meta-lmp-base/recipes-core/systemd/systemd_%.bbappend +++ b/meta-lmp-base/recipes-core/systemd/systemd_%.bbappend @@ -55,7 +55,6 @@ EXTRA_OEMESON += ' \ SRC_URI:append = " \ file://0001-tmpfiles-tmp.conf-reduce-cleanup-age-to-half.patch \ file://systemd-networkd-wait-online.service.in-use-any-by-d.patch \ - file://systemd-timesyncd-update.service \ " # Depend on systemd-boot as the efi payload is provided by a different recipe @@ -76,10 +75,6 @@ do_install:append() { (cd ${D}${localstatedir}; rmdir -v --parents log/journal) fi - # Workaround for https://github.com/systemd/systemd/issues/11329 - install -m 0644 ${WORKDIR}/systemd-timesyncd-update.service ${D}${systemd_system_unitdir} - ln -sf ../systemd-timesyncd-update.service ${D}${systemd_system_unitdir}/sysinit.target.wants/systemd-timesyncd-update.service - # Remove systemd-boot as it is provided by a separated recipe and we can't disable via pkgconfig if ${@bb.utils.contains('PACKAGECONFIG', 'efi', 'true', 'false', d)}; then rm -r ${D}${nonarch_libdir}/systemd/boot From 23b596cc6b2717122f99db5832042bca346bb3eb Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Tue, 12 Nov 2024 15:29:07 +0000 Subject: [PATCH 36/48] base: systemd: refresh lmp patch Signed-off-by: Jose Quaresma --- ...tworkd-wait-online.service.in-use-any-by-d.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meta-lmp-base/recipes-core/systemd/systemd/systemd-networkd-wait-online.service.in-use-any-by-d.patch b/meta-lmp-base/recipes-core/systemd/systemd/systemd-networkd-wait-online.service.in-use-any-by-d.patch index c10d0f2d0..b432ecc7d 100644 --- a/meta-lmp-base/recipes-core/systemd/systemd/systemd-networkd-wait-online.service.in-use-any-by-d.patch +++ b/meta-lmp-base/recipes-core/systemd/systemd/systemd-networkd-wait-online.service.in-use-any-by-d.patch @@ -1,4 +1,4 @@ -From 42a417bfb62227d83bbcc1232ced1d0ddb0431d6 Mon Sep 17 00:00:00 2001 +From cb1df2c39effacd4ec86a06b3b9fcafaceb38814 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 2 Jul 2019 21:01:15 -0300 Subject: [PATCH] systemd-networkd-wait-online.service.in: use --any by default @@ -10,23 +10,24 @@ in the configured state. Upstream-Status: Inappropriate [lmp specific] Signed-off-by: Ricardo Salveti +Signed-off-by: Jose Quaresma --- units/systemd-networkd-wait-online.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/systemd-networkd-wait-online.service.in b/units/systemd-networkd-wait-online.service.in -index 10d8b08c8e..6dd5f79377 100644 +index 7768121f5f..7d26e04fe3 100644 --- a/units/systemd-networkd-wait-online.service.in +++ b/units/systemd-networkd-wait-online.service.in -@@ -18,7 +18,7 @@ Before=network-online.target shutdown.target +@@ -19,7 +19,7 @@ Before=network-online.target shutdown.target [Service] Type=oneshot --ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online -+ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online --any +-ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online ++ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online --any RemainAfterExit=yes [Install] -- -2.25.1 +2.47.0 From 008c0d31a602cc428ca843d2c6b7e0f692881475 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 12 Nov 2024 22:15:14 +0100 Subject: [PATCH 37/48] base: systemd-boot display order By using the sort-key[1] label in the conf files, this PR positions ostree deployments above UEFI provisioning applications. [1] https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting Signed-off-by: Jorge Ramirez-Ortiz --- .../efitools/efitools/lockdown.conf | 1 + .../recipes-bsp/efitools/efitools/unlock.conf | 1 + .../ostree/ostree/0007-sort-key.patch | 46 +++++++++++++++++++ .../recipes-extended/ostree/ostree_%.bbappend | 1 + 4 files changed, 49 insertions(+) create mode 100644 meta-lmp-base/recipes-extended/ostree/ostree/0007-sort-key.patch diff --git a/meta-lmp-base/recipes-bsp/efitools/efitools/lockdown.conf b/meta-lmp-base/recipes-bsp/efitools/efitools/lockdown.conf index 7a4e881d1..3ae8286b3 100644 --- a/meta-lmp-base/recipes-bsp/efitools/efitools/lockdown.conf +++ b/meta-lmp-base/recipes-bsp/efitools/efitools/lockdown.conf @@ -1,2 +1,3 @@ title UEFI Secure Boot Provisioning efi /LockDown.efi +sort-key 99 diff --git a/meta-lmp-base/recipes-bsp/efitools/efitools/unlock.conf b/meta-lmp-base/recipes-bsp/efitools/efitools/unlock.conf index 0fa5acd9b..bdb72d90a 100644 --- a/meta-lmp-base/recipes-bsp/efitools/efitools/unlock.conf +++ b/meta-lmp-base/recipes-bsp/efitools/efitools/unlock.conf @@ -1,2 +1,3 @@ title UEFI Secure Boot PK Clear efi /UnLock-signed.efi +sort-key 99 \ No newline at end of file diff --git a/meta-lmp-base/recipes-extended/ostree/ostree/0007-sort-key.patch b/meta-lmp-base/recipes-extended/ostree/ostree/0007-sort-key.patch new file mode 100644 index 000000000..3fa5a4c41 --- /dev/null +++ b/meta-lmp-base/recipes-extended/ostree/ostree/0007-sort-key.patch @@ -0,0 +1,46 @@ +From 17b91cfdf0299535dcb82e3e4f2201c0bd77d6db Mon Sep 17 00:00:00 2001 +From: Jorge Ramirez-Ortiz +Date: Tue, 12 Nov 2024 21:32:36 +0100 +Subject: [PATCH] systemd-boot display order + +Use sort-key to display ostree deployments at the top. Other factors +might alter the position but they should always be above the secure boot +uefi EFI applications. + +Signed-off-by: Jorge Ramirez-Ortiz +--- + src/libostree/ostree-bootconfig-parser.c | 2 +- + src/libostree/ostree-sysroot-deploy.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/libostree/ostree-bootconfig-parser.c b/libostree/ostree-bootconfig-parser.c +index 4c3e80d..d3fb6b3 100644 +--- a/src/libostree/ostree-bootconfig-parser.c ++++ b/src/libostree/ostree-bootconfig-parser.c +@@ -210,7 +210,7 @@ ostree_bootconfig_parser_write_at (OstreeBootconfigParser *self, int dfd, const + * in the bootconfig example of the BootLoaderspec document: + * https://systemd.io/BOOT_LOADER_SPECIFICATION + */ +- const char *fields[] = { "title", "version", "options", "devicetree", "linux", "initrd" }; ++ const char *fields[] = { "title", "version", "options", "devicetree", "linux", "initrd", "sort-key" }; + g_autoptr (GHashTable) keys_written = g_hash_table_new (g_str_hash, g_str_equal); + g_autoptr (GString) buf = g_string_new (""); + +diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c +index f9c496d..0df24df 100644 +--- a/src/libostree/ostree-sysroot-deploy.c ++++ b/src/libostree/ostree-sysroot-deploy.c +@@ -2290,6 +2290,11 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, + g_autofree char *version_key + = g_strdup_printf ("%d", n_deployments - ostree_deployment_get_index (deployment)); + ostree_bootconfig_parser_set (bootconfig, OSTREE_COMMIT_META_KEY_VERSION, version_key); ++ ++g_autofree char *sort_key ++ = g_strdup_printf ("%d", 0); ++ ostree_bootconfig_parser_set (bootconfig, "sort-key", sort_key); ++ + g_autofree char *boot_relpath + = g_strconcat (bootprefix, bootcsumdir, "/", kernel_layout->kernel_namever, NULL); + ostree_bootconfig_parser_set (bootconfig, "linux", boot_relpath); +-- +2.34.1 diff --git a/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend b/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend index cd6f9a1b0..9f8ad1be0 100644 --- a/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend +++ b/meta-lmp-base/recipes-extended/ostree/ostree_%.bbappend @@ -11,6 +11,7 @@ SRC_URI:append = " \ file://0004-Add-support-for-systemd-boot-bootloader.patch \ file://0005-ostree-decrease-default-grub.cfg-timeout-and-set-def.patch \ file://0006-Add-support-systemd-boot-automatic-boot-assesment.patch \ + file://0007-sort-key.patch \ " PACKAGECONFIG:remove = "static" From 2844304c2018a3af6a218a9b8a38e7330cbfefb7 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Fri, 15 Nov 2024 14:51:38 +0000 Subject: [PATCH 38/48] bsp: linux-lmp-ti-staging: bump scarthgap.202411141406 Signed-off-by: Jose Quaresma --- .../recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb index 7db0d7856..4fd2b7ec0 100644 --- a/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb +++ b/meta-lmp-bsp/dynamic-layers/meta-ti-bsp/recipes-kernel/linux/linux-lmp-ti-staging_6.6.bb @@ -7,7 +7,7 @@ KERNEL_REPO_PROTOCOL ?= "https" KERNEL_BRANCH ?= "ti-linux-6.6.y" LINUX_VERSION ?= "6.6.44" -SRCREV_machine ?= "e3b431a6194fc1b074802d20c9eede8442382b2a" +SRCREV_machine ?= "541c20281af79a7df96bb94b4e3a923092d7ceff" SRCREV_meta ?= "${KERNEL_META_COMMIT}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" From d462b146588af3b0af240ceee58241e36ba634b6 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 19 Nov 2024 09:14:19 +0100 Subject: [PATCH 39/48] base: optee-os-fio-se05x: yocto multiple-repo support Define SRCREV_FORMAT for the Plug-and-Trust expansion. Signed-off-by: Jorge Ramirez-Ortiz --- meta-lmp-base/recipes-security/optee/optee-os-fio-se05x.inc | 2 ++ meta-lmp-base/recipes-security/optee/optee-os-fio.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio-se05x.inc b/meta-lmp-base/recipes-security/optee/optee-os-fio-se05x.inc index 533cca068..d52e09b84 100644 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio-se05x.inc +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio-se05x.inc @@ -10,6 +10,8 @@ SRC_URI:append = " \ " SRCREV_plug-and-trust ?= "1b8fa0caf728859c429e306d081af030620e0e4d" +SRCREV_FORMAT ?= "optee-os-fio_plug-and-trust" + # To be replaced based on the actual board OEFID SE05X_OEFID ?= "0xA1F4" diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio.inc b/meta-lmp-base/recipes-security/optee/optee-os-fio.inc index 084c3533c..2b2b64b81 100644 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio.inc +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio.inc @@ -22,7 +22,7 @@ PROVIDES = "virtual/optee-os" SRCBRANCH ?= "master" OPTEE_OS_REPO ?= "git://git.codelinaro.org/clo/foundriesio/optee_os.git" -SRC_URI = "${OPTEE_OS_REPO};protocol=https;branch=${SRCBRANCH}" +SRC_URI = "${OPTEE_OS_REPO};protocol=https;name=optee-os-fio;branch=${SRCBRANCH}" S = "${WORKDIR}/git" B = "${WORKDIR}/build" From c3bf9b680b5433dd6fa2b578ec31b4c5f98a7ed7 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Fri, 17 May 2024 16:27:55 +0100 Subject: [PATCH 40/48] [FIXME] bsp: lmp-machine-custom: imx6ullevk: drop KERNEL_DEVICETREE | NOTE: make -j 16 CC=arm-lmp-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/linux-imx6ullevk-standard-build=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/linux-imx6ullevk-standard-build=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot= -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot= -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native= -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/kernel -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-build-artifacts=/usr/src/kernel LD=arm-lmp-linux-gnueabi-ld.bfd OBJCOPY=arm-lmp-linux-gnueabi-objcopy STRIP=arm-lmp-linux-gnueabi-strip HOSTCC=gcc HOSTCFLAGS=-isystem/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/usr/include -O2 -pipe HOSTLDFLAGS=-L/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/usr/lib -L/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/lib -Wl,-rpath,/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/oe/build/tmp-lmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread HOSTCPP=gcc -E HOSTCXX=g++ HOSTCXXFLAGS=-isystem/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native/usr/include -O2 -pipe HOSTPKG_CONFIG=pkg-config-native PAHOLE=false nxp/imx/imx6ull-14x14-evk-btwifi.dtb CC=arm-lmp-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/linux-imx6ullevk-standard-build=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/linux-imx6ullevk-standard-build=/usr/src/debug/linux-lmp-fslc-imx/6.1.70+git -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot= -fmacro-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot= -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work/imx6ullevk-lmp-linux-gnueabi/linux-lmp-fslc-imx/6.1.70+git/recipe-sysroot-native= -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source=/usr/src/kernel -fdebug-prefix-map=/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-build-artifacts=/usr/src/kernel LD=arm-lmp-linux-gnueabi-ld.bfd OBJCOPY=arm-lmp-linux-gnueabi-objcopy STRIP=arm-lmp-linux-gnueabi-strip | make[1]: *** No rule to make target 'arch/arm/boot/dts/nxp/imx/imx6ull-14x14-evk-btwifi.dtb'. Stop. | make: *** [/srv/oe/build/tmp-lmp/work-shared/imx6ullevk/kernel-source/Makefile:1471: nxp/imx/imx6ull-14x14-evk-btwifi.dtb] Error 2 Signed-off-by: Jose Quaresma --- .../conf/machine/include/lmp-machine-custom.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index a0c68a0bd..b0bf741f2 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -222,6 +222,16 @@ UBOOT_SIGN_ENABLE:sota:imx6ullevk ?= "1" SOTA_CLIENT_FEATURES:append:imx6ullevk = " ubootenv" KERNEL_DEVICETREE:imx6ullevk = "imx6ull-14x14-evk.dtb" BOOTSCR_LOAD_ADDR:imx6ullevk = "0x85000000" +# conf/machine/imx6ullevk.conf +KERNEL_DEVICETREE:remove:imx6ullevk = " \ + nxp/imx/imx6ull-14x14-evk-btwifi.dtb \ + nxp/imx/imx6ull-14x14-evk-emmc.dtb \ + nxp/imx/imx6ull-14x14-evk-gpmi-weim.dtb \ + nxp/imx/imx6ull-14x14-evk-reve.dtb \ + nxp/imx/imx6ull-14x14-evk-reve-btwifi.dtb \ + nxp/imx/imx6ull-14x14-evk-reve-emmc.dtb \ + nxp/imx/imx6ull-14x14-evk-reve-gpmi-weim.dtb \ +" # iMX8QM SOTA_CLIENT_FEATURES:append:mx8qm-generic-bsp = " ubootenv" From 91bb28e4eaead8325c5f27de1b09ff02eda6b047 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 26 Sep 2024 14:54:24 +0100 Subject: [PATCH 41/48] [FIXME] bsp: lmp-machine-custom: drop recovery The PR663 is need on top of the meta-lmp-base/classes/kernel-lmp-fitimage.bbclass https://github.com/foundriesio/meta-lmp/pull/663/commits/a2adf25f3894f1dcd53a5ab641f68be7eb0330a5 Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index b0bf741f2..635416bc9 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -79,7 +79,8 @@ UBOOT_ENTRYPOINT:qemuarm64 = "0x40080000" MACHINE_FEATURES:append:qemuarm64-secureboot = " optee" OSTREE_SPLIT_BOOT:qemuarm64-secureboot = "1" OSTREE_DEPLOY_USR_OSTREE_BOOT:qemuarm64-secureboot = "1" -INITRAMFS_RECOVERY_IMAGE:qemuarm64-secureboot = "initramfs-ostree-lmp-recovery" +# https://github.com/foundriesio/meta-lmp/pull/663/commits/a2adf25f3894f1dcd53a5ab641f68be7eb0330a5 +#INITRAMFS_RECOVERY_IMAGE:qemuarm64-secureboot = "initramfs-ostree-lmp-recovery" WKS_FILE:sota:qemuarm64-secureboot = "sdimage-split-boot-sota.wks.in" ## Use same minimal memory amount as suggested by op-tee QB_MEM:qemuarm64-secureboot = "-m 1057" From 9a89032bb6452c52e1d63adebe2a6d38b76151dd Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 14 Nov 2024 11:13:37 +0000 Subject: [PATCH 42/48] [FIXME] bsp: tegra-helper-scripts: drop initrd-flash fork The PR1083 needs to be implemented on top of the new initrd-flash API using hooks https://github.com/foundriesio/meta-lmp/pull/1083/commits/482398b4d467936ac5a5a970e6d2855bec44aa71 New initrd-flash API using hooks https://github.com/OE4T/meta-tegra/commit/f619e64dddef91ff80b3013ea4e6a51a54083a66 https://github.com/OE4T/meta-tegra/commit/1d1466fa269e6e9e58b7e0509995389b009fdfee Signed-off-by: Jose Quaresma --- ...egra-helper-scripts-native_35.6.0.bbappend | 1 - .../tegra-helper-scripts/initrd-flash.sh | 596 ------------------ 2 files changed, 597 deletions(-) delete mode 100644 meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend delete mode 100644 meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend deleted file mode 100644 index 5a789ac09..000000000 --- a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.6.0.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/tegra-helper-scripts:" diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh b/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh deleted file mode 100644 index 9d3fc27b8..000000000 --- a/meta-lmp-bsp/dynamic-layers/tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh +++ /dev/null @@ -1,596 +0,0 @@ -#!/bin/bash - -set -o pipefail - -me=$(basename "$0") -here=$(readlink -f $(dirname "$0")) - -declare -A DEFAULTS - -usage() { - cat <&2 - exit 1 -fi - -. .env.initrd-flash - -# The .presigning-vars file is generated when binaries -# are signed during the build -PRESIGNED= -if [ -e .presigning-vars ]; then - . .presigning-vars - PRESIGNED=yes -fi - -usb_instance= -instance_args= -keyfile= -sbk_keyfile= -skip_bootloader=0 -format_mmc_part= -early_final_status=0 -erase_nvme=0 - -ARGS=$(getopt -n $(basename "$0") -l "usb-instance:,format-mmc-part:,help,skip-bootloader,erase-nvme" -o "u:v:h" -- "$@") -if [ $? -ne 0 ]; then - usage >&2 - exit 1 -fi -eval set -- "$ARGS" -unset ARGS - -while true; do - case "$1" in - --usb-instance) - usb_instance="$2" - shift 2 - ;; - --skip-bootloader) - skip_bootloader=1 - shift - ;; - --format-mmc-part) - format_mmc_part="$2" - shift 2 - ;; - --erase-nvme) - erase_nvme=1 - shift - ;; - -u) - keyfile="$2" - shift 2 - ;; - -v) - sbk_keyfile="$2" - shift 2 - ;; - -h|--help) - usage - exit 0 - ;; - --) - shift - break - ;; - *) - echo "Error processing options" >&2 - usage - exit 1 - ;; - esac -done - -# When the secureboot package is not installed, we have -# to handle signing/RCM booting a bit differently, due to -# the way the NVIDIA flashing scripts work -have_odmsign_func=0 -if [ -e "$here/odmsign.func" ]; then - have_odmsign_func=1 -fi -if [ -n "$PRESIGNED" ]; then - if [ -n "$keyfile" -o -n "$sbk_keyfile" ]; then - echo "WARN: binaries already signed; ignoring signing options" >&2 - keyfile= - sbk_keyfile= - fi -elif [ -n "$keyfile" -o -n "$sbk_keyfile" ] && [ $have_odmsign_func -eq 0 ]; then - echo "ERR: missing odmsign.func from secureboot package, cannot sign binaries" >&2 - exit 1 -fi - -wait_for_rcm() { - "$here/find-jetson-usb" --wait "$usb_instance" -} - -copy_signed_binaries() { - local signdir="${1:-signed}" - local xmlfile="${2:-flash.xml.tmp}" - local destdir="${3:-.}" - local blksize partnumber partname partsize partfile partguid parttype partfilltoend - local line - - while read line; do - eval "$line" - [ -n "$partfile" ] || continue - if [ ! -e "$signdir/$partfile" ]; then - if [ ! -e "$destdir/$partfile" ] && ! echo "$partfile" | grep -q "FILE"; then - echo "ERR: could not copy $partfile from $signdir" >&2 - return 1 - fi - else - cp "$signdir/$partfile" "$destdir" - fi - done < <("$here/nvflashxmlparse" -t boot "$signdir/$xmlfile"; "$here/nvflashxmlparse" -t rootfs "$signdir/$xmlfile") -} - -sign_binaries() { - if [ -n "$PRESIGNED" ]; then - cp doflash.sh flash_signed.sh - if ! copy_bootloader_files bootloader_staging; then - return 1 - fi - return 0 - fi - if [ -z "$BOARDID" -o -z "$FAB" ]; then - wait_for_rcm - fi - if [ -e external-flash.xml.in ]; then - "$here/nvflashxmlparse" --extract --type rootfs --change-device-type=sdmmc_user -o external-flash.xml.tmp external-flash.xml.in - if MACHINE=$MACHINE BOARDID=$BOARDID FAB=$FAB BOARDSKU=$BOARDSKU BOARDREV=$BOARDREV CHIPREV=$CHIPREV CHIP_SKU=$CHIP_SKU \ - "$here/$FLASH_HELPER" --no-flash --sign -u "$keyfile" -v "$sbk_keyfile" $instance_args \ - external-flash.xml.tmp $DTBFILE $EMMC_BCTS $ODMDATA $LNXFILE $ROOTFS_IMAGE; then - if [ $have_odmsign_func -eq 0 ]; then - cp signed/flash.xml.tmp external-secureflash.xml - copy_signed_binaries - else - mv secureflash.xml external-secureflash.xml - fi - else - return 1 - fi - . ./boardvars.sh - fi - if MACHINE=$MACHINE BOARDID=$BOARDID FAB=$FAB BOARDSKU=$BOARDSKU BOARDREV=$BOARDREV CHIPREV=$CHIPREV CHIP_SKU=$CHIP_SKU \ - "$here/$FLASH_HELPER" --no-flash --sign -u "$keyfile" -v "$sbk_keyfile" $instance_args \ - flash.xml.in $DTBFILE $EMMC_BCTS $ODMDATA $LNXFILE $ROOTFS_IMAGE; then - if [ $have_odmsign_func -eq 0 ]; then - cp signed/flash.xml.tmp secureflash.xml - cp signed/flash.idx flash.idx - copy_signed_binaries - else - cp flashcmd.txt flash_signed.sh - fi - else - return 1 - fi - if ! copy_bootloader_files bootloader_staging; then - return 1 - fi - . ./boardvars.sh - return 0 -} - -prepare_for_rcm_boot() { - if [ $have_odmsign_func -eq 1 ]; then - local dtbfile_for_rcmboot=kernel_$DTBFILE - if [ "$CHIPID" = "0x19" ]; then - cp kernel_$DTBFILE rcm_kernel_$DTBFILE - dtbfile_for_rcmboot=rcm_kernel_$DTBFILE - fi - "$here/rewrite-tegraflash-args" -o rcm-boot.sh --bins kernel=initrd-flash.img,kernel_dtb=$dtbfile_for_rcmboot --cmd rcmboot --add="--securedev" flash_signed.sh || return 1 - if [ "$CHIPID" = "0x23" ]; then - sed -i -e's,mb2_t234_with_mb2_bct_MB2,mb2_t234_with_mb2_cold_boot_bct_MB2,' -e's, uefi_jetson, rcmboot_uefi_jetson,' rcm-boot.sh || return 1 - fi - chmod +x rcm-boot.sh - fi -} - -run_rcm_boot() { - if [ $have_odmsign_func -eq 1 ]; then - if [ -z "$BR_CID" ]; then - if ./rcm-boot.sh | tee rcm-boot.output; then - BR_CID=$(grep BR_CID: rcm-boot.output | cut -d: -f2) - return 0 - else - return 1 - fi - fi - ./rcm-boot.sh || return 1 - else - MACHINE=$MACHINE BOARDID=$BOARDID FAB=$FAB BOARDSKU=$BOARDSKU BOARDREV=$BOARDREV CHIPREV=$CHIPREV CHIP_SKU=$CHIP_SKU \ - "$here/$FLASH_HELPER" --rcm-boot -u "$keyfile" -v "$sbk_keyfile" \ - flash.xml.in $DTBFILE $EMMC_BCTS $ODMDATA initrd-flash.img $ROOTFS_IMAGE || return 1 - fi -} - -mount_partition() { - local dev="$1" - local mnt=$(cat /proc/mounts | grep "^$dev" | cut -d' ' -f2) - local i=$(echo $mnt|awk -F' ' '{print NF}') - while [ $i -ne 0 ]; do - local mnt=$(echo ${mnt} | cut -d' ' -f$i) - if ! umount "${mnt}" > /dev/null 2>&1; then - echo "ERR: unmount ${mnt} on device $dev failed" >&2 - return 1 - fi - i=$(expr $i - 1) - done - if udisksctl mount -b "$dev" > /dev/null; then - cat /proc/mounts | grep "^$dev" | cut -d' ' -f2 - return 0 - fi - echo "" - return 1 -} - -unmount_and_release() { - local mnt="$1" - local dev="$2" - local remain=3 - if [ -n "$mnt" ]; then - udisksctl unmount --force -b "$dev" - fi - while [ $remain -gt 0 ]; do - if udisksctl power-off -b "$dev"; then - return 0 - fi - sleep 1 - remain=$(expr $remain - 1) - done - return 1 -} - -wait_for_usb_storage() { - local sessid="$1" - local name="$2" - local count=0 - local output candidate cand_model cand_vendor - - echo -n "Waiting for USB storage device $name from $sessid..." >&2 - while [ -z "$output" ]; do - for candidate in /dev/sd[a-z]; do - [ -b "$candidate" ] || continue - cand_model=$(udevadm info --query=property $candidate | grep '^ID_MODEL=' | cut -d= -f2) - if [ "$cand_model" = "$sessid" ]; then - cand_vendor=$(udevadm info --query=property $candidate | grep '^ID_VENDOR=' | cut -d= -f2) - if [ "$cand_vendor" = "$name" ]; then - echo "[$candidate]" >&2 - output="$candidate" - break - elif [ "$name" != "flashpkg" -a "$cand_vendor" = "flashpkg" ]; then - # This could happen if there was a failure on the device side - echo "[got flashpkg when expecting $name]" >&2 - echo "" - early_final_status=1 - return 1 - fi - fi - done - if [ -z "$output" ]; then - sleep 1 - count=$(expr $count \+ 1) - if [ $count -ge 5 ]; then - echo -n "." >&2 - count=0 - fi - fi - done - echo "$output" - return 0 -} - -copy_bootloader_files() { - local dest="$1" - local partnumber partloc partname start_location partsize partfile partattrs partsha - local devnum instnum - local is_spi is_mmcboot - rm -f "$dest/partitions.conf" - while IFS=", " read partnumber partloc start_location partsize partfile partattrs partsha; do - # Need to trim off leading blanks - devnum=$(echo "$partloc" | cut -d':' -f 1) - instnum=$(echo "$partloc" | cut -d':' -f 2) - partname=$(echo "$partloc" | cut -d':' -f 3) - # SPI is 3:0 - # eMMC boot blocks (boot0/boot1) are 0:3 - # eMMC user is 1:3 - # NVMe (any external device) is 9:0 - if [ $devnum -eq 3 -a $instnum -eq 0 ] || [ $devnum -eq 0 -a $instnum -eq 3 ]; then - if [ -n "$partfile" ]; then - cp "$partfile" "$dest/" - fi - if [ $devnum -eq 3 -a $instnum -eq 0 ]; then - is_spi=yes - elif [ $devnum -eq 0 -a $instnum -eq 3 ]; then - is_mmcboot=yes - fi - echo "$partname:$start_location:$partsize:$partfile" >> "$dest/partitions.conf" - fi - done < flash.idx - if [ -n "$is_spi" ]; then - if [ -n "$is_mmcboot" ]; then - echo "ERR: found bootloader entries for both SPI flash and eMMC boot partitions" >&2 - return 1 - fi - echo "spi" > "$dest/boot_device_type" - elif [ -n "$is_mmcboot" ]; then - echo "mmcboot" > "$dest/boot_device_type" - else - echo "ERR: no SPI or eMMC boot partition entries found" >&2 - return 1 - fi - return 0 -} - -generate_flash_package() { - local dev=$(wait_for_usb_storage "$session_id" "flashpkg") - local exports - - if [ -z "$dev" ]; then - echo "ERR: could not locate USB storage device for sending flashing commands" >&2 - return 1 - fi - local devsize=$(cat /sys/block/$(basename $dev)/size 2>/dev/null) - echo "Device size in blocks: $devsize" >&2 - local mnt=$(mount_partition "$dev") - if [ -z "$mnt" ]; then - echo "ERR: could not mount USB storage for writing flashing commands" >&2 - return 1 - fi - - mkdir "$mnt/flashpkg/conf" - rm -f "$mnt/flashpkg/conf/command_sequence" - touch "$mnt/flashpkg/conf/command_sequence" - if [ $skip_bootloader -eq 0 ]; then - echo "bootloader" >> "$mnt/flashpkg/conf/command_sequence" - mkdir "$mnt/flashpkg/bootloader" - cp bootloader_staging/* "$mnt/flashpkg/bootloader" - fi - - if [ -n "$format_mmc_part" ]; then - echo "format-mmc-part $format_mmc_part" >> "$mnt/flashpkg/conf/command_sequence" - fi - if [ $erase_nvme -eq 1 ]; then - echo "erase-nvme" >> "$mnt/flashpkg/conf/command_sequence" - fi - if [ $EXTERNAL_ROOTFS_DRIVE -eq 1 -a $BOOT_PARTITIONS_ON_EMMC -eq 1 ]; then - echo "export-devices mmcblk0 $ROOTFS_DEVICE" >> "$mnt/flashpkg/conf/command_sequence" - else - [ $EXTERNAL_ROOTFS_DRIVE -eq 0 -o $NO_INTERNAL_STORAGE -eq 1 ] || echo "erase-mmc" >> "$mnt/flashpkg/conf/command_sequence" - echo "export-devices $ROOTFS_DEVICE" >> "$mnt/flashpkg/conf/command_sequence" - fi - - echo "extra" >> "$mnt/flashpkg/conf/command_sequence" - echo "reboot" >> "$mnt/flashpkg/conf/command_sequence" - - unmount_and_release "$mnt" "$dev" || return 1 -} - -write_wic_to_device() { - local devname="$1" - local dev=$(wait_for_usb_storage "$session_id" "$devname") - local rc=0 - - if [ -z "$dev" ]; then - echo "ERR: could not find $devname" >&2 - return 1 - fi - - # Flash the actual wic - bmaptool copy --nobmap $ROOTFS_IMAGE $dev - - if ! unmount_and_release "" "$dev"; then - rc=1 - fi - return $rc -} - -write_to_device() { - local devname="$1" - local flashlayout="$2" - local dev=$(wait_for_usb_storage "$session_id" "$devname") - local opts="$3" - local rewritefiles="secureflash.xml" - local datased simgname rc=1 - local extraarg - - if [ -z "$dev" ]; then - echo "ERR: could not find $devname" >&2 - return 1 - fi - if [ -e external-secureflash.xml ]; then - rewritefiles="external-secureflash.xml,$rewritefiles" - fi - "$here/nvflashxmlparse" --rewrite-contents-from=$rewritefiles -o initrd-flash.xml "$flashlayout" - if [ -n "$DATAFILE" ]; then - datased="-es,DATAFILE,$DATAFILE," - else - datased="-e/DATAFILE/d" - fi - if [ "$devname" = "mmcblk0" -a $BOOT_PARTITIONS_ON_EMMC -eq 1 ]; then - extraarg="--honor-start-locations" - fi - - # Drop rootfs flashing when required via external wic - if [ $EXTERNAL_ROOTFS_WIC_FLASH -eq 1 ]; then - sed -i -e"s,APPFILE_b,," -e"s,APPFILE,," $datased initrd-flash.xml - else - # XXX - # For the pre-signed case, the flash layout will contain the - # name of the sparseimage file, and we need to convert it back to - # the raw image name. - # XXX - simgname="${ROOTFS_IMAGE%.*}.img" - sed -i -e"s,$simgname,$ROOTFS_IMAGE," -e"s,APPFILE_b,$ROOTFS_IMAGE," -e"s,APPFILE,$ROOTFS_IMAGE," -e"s,DTB_FILE,kernel_$DTBFILE," $datased initrd-flash.xml - fi - if "$here/make-sdcard" -y $opts $extraarg initrd-flash.xml "$dev"; then - rc=0 - fi - if ! unmount_and_release "" "$dev"; then - rc=1 - fi - return $rc -} - -get_final_status() { - local dtstamp="$1" - local dev=$(wait_for_usb_storage "$session_id" "flashpkg") - local mnt final_status logdir logfile - if [ -z "$dev" ]; then - echo "ERR: could not get final status from device" >&2 - return 1 - fi - mnt=$(mount_partition "$dev") - if [ -z "$mnt" ]; then - echo "ERR: could not mount USB device to get final status from device" >&2 - return 1 - fi - final_status=$(cat $mnt/flashpkg/status) - if [ -d "$mnt/flashpkg/logs" ]; then - logdir="device-logs-$dtstamp" - if [ -d "$logdir" ]; then - echo "Logs directory $logdir already exists, replacing" >&2 - rm -rf "$logdir" - fi - mkdir "$logdir" - for logfile in "$mnt"/flashpkg/logs/*; do - [ -f "$logfile" ] || continue - cp "$logfile" "$logdir/" - done - fi - unmount_and_release "$mnt" "$dev" || return 1 - echo "Final status: $final_status" - return 0 -} - -dtstamp=$(date +"%Y-%m-%d-%H.%M.%S") -logfile="log.initrd-flash.$dtstamp" -stepnumber=1 - -step_banner() { - local msg="$1" - echo "== Step $stepnumber: $msg at $(date -Is) ==" | tee -a "$logfile" - stepnumber=$(expr $stepnumber \+ 1) -} - -echo "Starting at $(date -Is)" | tee "$logfile" -echo "Machine: ${MACHINE}" | tee "$logfile" -echo "Rootfs device: ${BOOTDEV}" | tee "$logfile" -if ! wait_for_rcm 2>&1 | tee -a "$logfile"; then - echo "ERR: Device not found at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -if [ -z "$usb_instance" -a -e ".found-jetson" ]; then - . .found-jetson -fi -if [ -n "$usb_instance" ]; then - instance_args="--usb-instance $usb_instance" -fi -step_banner "Signing binaries" -rm -rf bootloader_staging -mkdir bootloader_staging -if ! sign_binaries 2>&1 >>"$logfile"; then - echo "ERR: signing failed at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -if [ -z "$PRESIGNED" ]; then - [ ! -f ./boardvars.sh ] || . ./boardvars.sh -fi -step_banner "Boot Jetson via RCM" -if ! prepare_for_rcm_boot 2>&1 >>"$logfile"; then - echo "ERR: Preparing RCM boot command failed at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -if ! wait_for_rcm 2>&1 | tee -a "$logfile"; then - echo "ERR: Device not found at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -if ! run_rcm_boot 2>&1 >>"$logfile"; then - echo "ERR: RCM boot failed at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -[ ! -f ./boardvars.sh ] || . ./boardvars.sh - -if [ -z "$BR_CID" ]; then - echo "ERR: did not get unique ID at $(date -Is)" | tee -a "$logfile" - exit 1 -fi - -session_id=$("$here/brcid-to-uid" $BR_CID) -session_id=$(echo -n "$session_id" | tail -c8) - -# Boot device flashing -step_banner "Sending flash sequence commands" -if ! generate_flash_package 2>&1 | tee -a "$logfile"; then - echo "ERR: could not create command package at $(date -Is)" | tee -a "$logfile" - exit 1 -fi -if [ $EXTERNAL_ROOTFS_DRIVE -eq 1 ]; then - keep_going=1 - if [ $BOOT_PARTITIONS_ON_EMMC -eq 1 ]; then - step_banner "Writing boot partitions to internal storage device" - if ! write_to_device mmcblk0 flash.xml.in --no-final-part 2>&1 | tee -a "$logfile"; then - echo "ERR: write failure to internal storage at $(date -Is)" | tee -a "$logfile" - if [ $early_final_status -eq 0 ]; then - exit 1 - fi - fi - fi - if [ $early_final_status -eq 0 ]; then - step_banner "Writing partitions on external storage device" - if [ $EXTERNAL_ROOTFS_WIC_FLASH -eq 1 ]; then - if ! write_wic_to_device $ROOTFS_DEVICE 2>&1 | tee -a "$logfile"; then - echo "ERR: wic write failure to external storage at $(date -Is)" | tee -a "$logfile" - if [ $early_final_status -eq 0 ]; then - exit 1 - fi - fi - else - if ! write_to_device $ROOTFS_DEVICE external-flash.xml.in 2>&1 | tee -a "$logfile"; then - echo "ERR: write failure to external storage at $(date -Is)" | tee -a "$logfile" - if [ $early_final_status -eq 0 ]; then - exit 1 - fi - fi - fi - fi -else - step_banner "Writing partitions on internal storage device" - if ! write_to_device $ROOTFS_DEVICE flash.xml.in 2>&1 | tee -a "$logfile"; then - echo "ERR: write failure to internal storage at $(date -Is)" | tee -a "$logfile" - if [ $early_final_status -eq 0 ]; then - exit 1 - fi - fi -fi -step_banner "Waiting for final status from device" -if ! get_final_status "$dtstamp" 2>&1 | tee -a "$logfile"; then - echo "ERR: failed to retrieve device status at $(date -Is)" | tee -a "$logfile" - echo "Host-side log: $logfile" - echo "Device-side logs stored in: device-logs-$dtstamp" - exit 1 -fi -echo "Successfully finished at $(date -Is)" | tee -a "$logfile" -echo "Host-side log: $logfile" -echo "Device-side logs stored in: device-logs-$dtstamp" -exit 0 From 44d50312dcba8d982a650db459839ccc617446da Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 14 Nov 2024 12:52:11 +0000 Subject: [PATCH 43/48] [FIXME] bsp: tegra-flash-init: drop format-mmc-support The PR1083 needs to be implemented on top of the new initrd-flash API using hooks https://github.com/foundriesio/meta-lmp/pull/1083/commits/7340131185416ca42f6a7f07d5b6f3f3c1719bf7 New initrd-flash API using hooks https://github.com/OE4T/meta-tegra/commit/f619e64dddef91ff80b3013ea4e6a51a54083a66 https://github.com/OE4T/meta-tegra/commit/1d1466fa269e6e9e58b7e0509995389b009fdfee Signed-off-by: Jose Quaresma --- .../add-format-mmc-support.patch | 23 ------------------- .../initrdscripts/tegra-flash-init_%.bbappend | 3 --- 2 files changed, 26 deletions(-) delete mode 100644 meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init/add-format-mmc-support.patch delete mode 100644 meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init_%.bbappend diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init/add-format-mmc-support.patch b/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init/add-format-mmc-support.patch deleted file mode 100644 index bd5c97cfa..000000000 --- a/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init/add-format-mmc-support.patch +++ /dev/null @@ -1,23 +0,0 @@ -Add support for formating mmc partitions. - -Upstream-Status: Pending - -diff --git a/init-flash.sh b/init-flash.sh -index dd4ebc9c..eb130086 100644 ---- a/init-flash.sh -+++ b/init-flash.sh -@@ -158,6 +158,14 @@ else - echo "/dev/mmcblk0 does not exist, skipping" > /tmp/flashpkg/flashpkg/logs/erase-mmc.log - fi - ;; -+ format-mmc-part) -+ mmcpart=$args -+ if [ -b /dev/$mmcpart ]; then -+ mkfs.ext4 /dev/$mmcpart 2>&1 > /tmp/flashpkg/flashpkg/logs/format-mmc-part.log -+ else -+ echo "$mmcpart does not exist, skipping" > /tmp/flashpkg/flashpkg/logs/format-mmc-part.log -+ fi -+ ;; - erase-nvme) - if [ -b /dev/nvme0n1 ]; then - blkdiscard -f /dev/nvme0n1 2>&1 > /tmp/flashpkg/flashpkg/logs/erase-nvme.log diff --git a/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init_%.bbappend b/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init_%.bbappend deleted file mode 100644 index c180cb311..000000000 --- a/meta-lmp-bsp/dynamic-layers/tegra/recipes-core/initrdscripts/tegra-flash-init_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://add-format-mmc-support.patch" From dd121aaf12fa992fb7e47deb39162951b3778ea5 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 14 Nov 2024 14:32:04 +0000 Subject: [PATCH 44/48] [WIP] base: kernel-lmp-fitimage: set FIT_CONF_PREFIX Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/kernel-lmp-fitimage.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass index 0ca0a9500..f4ce691c1 100644 --- a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass +++ b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass @@ -4,6 +4,11 @@ # SPDX-License-Identifier: MIT # +FIT_CONF_PREFIX:am62xx = "conf-ti_" +FIT_CONF_PREFIX:am64xx = "conf-ti_" +FIT_CONF_PREFIX:mx8-nxp-bsp = "conf-freescale_" +FIT_CONF_PREFIX:mx9-nxp-bsp = "conf-freescale_" + inherit kernel-uboot kernel-artifact-names uboot-config def get_fit_replacement_type(d): From c7e5368b782d91856b1fce9994de77ac9bb7a20d Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 14 Nov 2024 16:50:35 +0000 Subject: [PATCH 45/48] [WIP] Revert "base: kernel-lmp-fitimage: set FIT_CONF_PREFIX" This reverts commit 523a2c3164439e15229cdd53b9ad42046c14c50a. Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/kernel-lmp-fitimage.bbclass | 5 ----- 1 file changed, 5 deletions(-) diff --git a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass index f4ce691c1..0ca0a9500 100644 --- a/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass +++ b/meta-lmp-base/classes/kernel-lmp-fitimage.bbclass @@ -4,11 +4,6 @@ # SPDX-License-Identifier: MIT # -FIT_CONF_PREFIX:am62xx = "conf-ti_" -FIT_CONF_PREFIX:am64xx = "conf-ti_" -FIT_CONF_PREFIX:mx8-nxp-bsp = "conf-freescale_" -FIT_CONF_PREFIX:mx9-nxp-bsp = "conf-freescale_" - inherit kernel-uboot kernel-artifact-names uboot-config def get_fit_replacement_type(d): From afd2bd06cb6453990c563ff534d674edf2c51644 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 14 Nov 2024 16:50:23 +0000 Subject: [PATCH 46/48] [WIP] bsp: lmp-machine-custom/lmp-mfgtool-machine-custom: set FIT_CONF_PREFIX Signed-off-by: Jose Quaresma --- meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc | 4 ++++ .../conf/machine/include/lmp-mfgtool-machine-custom.inc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 635416bc9..047d816cf 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -153,6 +153,8 @@ OSTREE_KERNEL_ARGS:mx6-generic-bsp ?= "console=tty1 console=ttymxc0,115200 ${OST OSTREE_KERNEL_ARGS:mx6ull-generic-bsp ?= "console=tty1 console=ttymxc0,115200 ${OSTREE_KERNEL_ARGS_COMMON}" OSTREE_KERNEL_ARGS:mx7d-generic-bsp ?= "console=tty1 console=ttymxc0,115200 ${OSTREE_KERNEL_ARGS_COMMON}" OSTREE_KERNEL_ARGS:mx7ulp-generic-bsp ?= "console=tty1 console=ttyLP0,115200 ${OSTREE_KERNEL_ARGS_COMMON}" +FIT_CONF_PREFIX:mx8-nxp-bsp = "conf-freescale_" +FIT_CONF_PREFIX:mx9-nxp-bsp = "conf-freescale_" # Embedded Artists i.MX7ULP COM UBOOT_SIGN_ENABLE:sota:imx7ulpea-ucom ?= "1" @@ -729,6 +731,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove:k3 = "kernel-image-image" KERNEL_DEVICETREE:beaglebone-yocto = "${DTB_FILES}" # TI AM62x +FIT_CONF_PREFIX:am62xx = "conf-ti_" MACHINE_FEATURES:append:am62xx = " optee" PREFERRED_PROVIDER_u-boot-fw-utils:am62xx = "libubootenv" PREFERRED_RPROVIDER_u-boot-fw-utils:am62xx = "libubootenv" @@ -753,6 +756,7 @@ LMP_BOOT_FIRMWARE_FILES:beagleplay = "tispl.bin u-boot.img tiboot3.bin" LMP_BOOT_FIRMWARE_FILES:append:sota:beagleplay = " boot.itb" # TI AM64x +FIT_CONF_PREFIX:am64xx = "conf-ti_" MACHINE_FEATURES:append:am64xx = " optee" PREFERRED_PROVIDER_u-boot-fw-utils:am64xx = "libubootenv" PREFERRED_RPROVIDER_u-boot-fw-utils:am64xx = "libubootenv" diff --git a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc index acafbd7e2..3d7ae79ef 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc @@ -145,3 +145,7 @@ UBOOT_CONFIG_FRAGMENTS:am62xx-evm-k3r5 = "am62x_r5_usbdfu.config" # Cross machines / BSPs PREFERRED_VERSION_u-boot-fio-mfgtool:imx-nxp-bsp ?= "imx-2022.04" +FIT_CONF_PREFIX:mx8-nxp-bsp = "conf-freescale_" +FIT_CONF_PREFIX:mx9-nxp-bsp = "conf-freescale_" +FIT_CONF_PREFIX:am62xx = "conf-ti_" +FIT_CONF_PREFIX:am64xx = "conf-ti_" From 30555357320e352b1078107fdcf89a3bb24b3366 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Thu, 28 Nov 2024 14:15:24 +0100 Subject: [PATCH 47/48] [WIP] op-tee: update to OP-TEE 4.2 tag Update our fork to 4.2.0 Requires that we test all affected platforms. - need to check TEGRA still on 3.21 probably broken Signed-off-by: Jorge Ramirez-Ortiz --- ...client_3.21.0.bb => optee-client_4.2.0.bb} | 2 +- ...ples_3.21.0.bb => optee-examples_4.2.0.bb} | 0 ....21.0.bb => optee-os-fio-mfgtool_4.2.0.bb} | 0 .../optee/optee-os-fio_3.21.0.bb | 4 ---- .../optee/optee-os-fio_4.2.0.bb | 4 ++++ ...t_3.21.0.bb => optee-os-tadevkit_4.2.0.bb} | 0 .../0001-regression-1000-disable-1039.patch | 15 +++++++----- ...tee-test_3.21.0.bb => optee-test_4.2.0.bb} | 2 +- .../machine/include/lmp-machine-custom.inc | 24 +++++++++---------- ...0.bbappend => optee-client_4.2.0.bbappend} | 0 ...d => optee-os-fio-mfgtool_4.2.0%.bbappend} | 0 ...x.bb => optee-os-fio-mfgtool_4.2.0-imx.bb} | 0 .../optee/optee-os-fio_3.21.0-imx.bb | 6 ----- ....bbappend => optee-os-fio_4.2.0%.bbappend} | 0 .../optee/optee-os-fio_4.2.0-imx.bb | 6 +++++ ...pend => optee-os-tadevkit_4.2.0%.bbappend} | 0 ...-imx.bb => optee-os-tadevkit_4.2.0-imx.bb} | 4 ++-- ...1.0.bbappend => optee-test_4.2.0.bbappend} | 0 18 files changed, 35 insertions(+), 32 deletions(-) rename meta-lmp-base/recipes-security/optee/{optee-client_3.21.0.bb => optee-client_4.2.0.bb} (70%) rename meta-lmp-base/recipes-security/optee/{optee-examples_3.21.0.bb => optee-examples_4.2.0.bb} (100%) rename meta-lmp-base/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0.bb => optee-os-fio-mfgtool_4.2.0.bb} (100%) delete mode 100644 meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb create mode 100644 meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb rename meta-lmp-base/recipes-security/optee/{optee-os-tadevkit_3.21.0.bb => optee-os-tadevkit_4.2.0.bb} (100%) rename meta-lmp-base/recipes-security/optee/{optee-test_3.21.0.bb => optee-test_4.2.0.bb} (68%) rename meta-lmp-bsp/recipes-security/optee/{optee-client_3.21.0.bbappend => optee-client_4.2.0.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0%.bbappend => optee-os-fio-mfgtool_4.2.0%.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0-imx.bb => optee-os-fio-mfgtool_4.2.0-imx.bb} (100%) delete mode 100644 meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio_3.21.0%.bbappend => optee-os-fio_4.2.0%.bbappend} (100%) create mode 100644 meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb rename meta-lmp-bsp/recipes-security/optee/{optee-os-tadevkit_3.21.0%.bbappend => optee-os-tadevkit_4.2.0%.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-tadevkit_3.21.0-imx.bb => optee-os-tadevkit_4.2.0-imx.bb} (53%) rename meta-lmp-bsp/recipes-security/optee/{optee-test_3.21.0.bbappend => optee-test_4.2.0.bbappend} (100%) diff --git a/meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb similarity index 70% rename from meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb index 4fba709b5..9468369d4 100644 --- a/meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb @@ -1,6 +1,6 @@ require optee-client-fio.inc -SRCREV = "8533e0e6329840ee96cf81b6453f257204227e6c" +SRCREV = "3eac340a781c00ccd61b151b0e9c22a8c6e9f9f0" SRC_URI += " \ file://0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \ diff --git a/meta-lmp-base/recipes-security/optee/optee-examples_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-examples_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-examples_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-examples_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb deleted file mode 100644 index 146f53f11..000000000 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -require optee-os-fio.inc - -SRCREV = "9048d3d2873b7d7d9f2b5594ce55c342b4cb6049" -SRCBRANCH = "3.21+fio" diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb new file mode 100644 index 000000000..b8ce0ce71 --- /dev/null +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb @@ -0,0 +1,4 @@ +require optee-os-fio.inc + +SRCREV = "a88bd7ef912657e9a73bf87ef7c0a0f76db1cbd4" +SRCBRANCH = "4.2.0+fio" diff --git a/meta-lmp-base/recipes-security/optee/optee-os-tadevkit_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-tadevkit_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-os-tadevkit_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-os-tadevkit_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch b/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch index 7be63fac2..448d086e9 100644 --- a/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch +++ b/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch @@ -1,6 +1,6 @@ -From 9cdaa16531f91c28621d8d8592560df817860eb0 Mon Sep 17 00:00:00 2001 +From 9c6fd3bba91930deaf7d86f4af1739999e805934 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz -Date: Wed, 29 Mar 2023 14:16:55 +0200 +Date: Wed, 20 Nov 2024 17:43:27 +0100 Subject: [PATCH] regression 1000: disable 1039 This test requires the TA to be signed with a key located @@ -17,10 +17,10 @@ Signed-off-by: Jorge Ramirez-Ortiz 1 file changed, 2 insertions(+) diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c -index de32c41..1aa2e8b 100644 +index 9981d01..226e5dc 100644 --- a/host/xtest/regression_1000.c +++ b/host/xtest/regression_1000.c -@@ -3197,6 +3197,7 @@ out: +@@ -3269,6 +3269,7 @@ out: ADBG_CASE_DEFINE(regression, 1038, xtest_tee_test_1038, "Test MTE (Memory Tag Extension)"); @@ -28,11 +28,14 @@ index de32c41..1aa2e8b 100644 static void xtest_tee_test_1039(ADBG_Case_t *c) { TEEC_Session session = { }; -@@ -3221,3 +3222,4 @@ static void xtest_tee_test_1039(ADBG_Case_t *c) - +@@ -3291,6 +3292,7 @@ static void xtest_tee_test_1039(ADBG_Case_t *c) + } ADBG_CASE_DEFINE(regression, 1039, xtest_tee_test_1039, "Test subkey verification"); +#endif + + struct test_1040_thread_arg { + TEEC_Result res; -- 2.34.1 diff --git a/meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb similarity index 68% rename from meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb index 6697608b4..3a18853cb 100644 --- a/meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb @@ -1,6 +1,6 @@ require optee-test-fio.inc -SRCREV = "9c872638bc38324d8c65b9296ebec3d124e19466" +SRCREV = "526d5bac1b65f907f67c05cd07beca72fbab88dd" # Due OpenSSL 3.0 deprecated warnings CFLAGS += "-Wno-error=deprecated-declarations" diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 047d816cf..4381aceed 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -288,9 +288,9 @@ PREFERRED_PROVIDER_u-boot-default-script:mx8ulp-generic-bsp = "u-boot-base-scr" PREFERRED_PROVIDER_u-boot-default-script:sota:mx8ulp-generic-bsp = "u-boot-ostree-scr-fit" SOTA_CLIENT_FEATURES:append:mx8ulp-generic-bsp = " ubootenv" LMP_BOOT_FIRMWARE_FILES:mx8ulp-nxp-bsp = "imx-boot u-boot.itb" -PREFERRED_VERSION_optee-os-fio:mx8ulp-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-fio-mfgtool:mx8ulp-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-tadevkit:mx8ulp-nxp-bsp = "3.21.0-imx" +PREFERRED_VERSION_optee-os-fio:mx8ulp-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-fio-mfgtool:mx8ulp-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-tadevkit:mx8ulp-nxp-bsp = "4.2.0-imx" PREFERRED_VERSION_u-boot-fio:mx8ulp-nxp-bsp ?= "imx-2023.04" ## iMX8ULP LPDDR4 EVK UBOOT_SIGN_ENABLE:sota:imx8ulp-lpddr4-evk ?= "1" @@ -506,9 +506,9 @@ PREFERRED_PROVIDER_u-boot-default-script:mx93-generic-bsp = "u-boot-base-scr" PREFERRED_PROVIDER_u-boot-default-script:sota:mx93-generic-bsp = "u-boot-ostree-scr-fit" SOTA_CLIENT_FEATURES:append:mx93-generic-bsp = " ubootenv" LMP_BOOT_FIRMWARE_FILES:mx93-nxp-bsp = "imx-boot u-boot.itb" -PREFERRED_VERSION_optee-os-fio:mx93-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-fio-mfgtool:mx93-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-tadevkit:mx93-nxp-bsp = "3.21.0-imx" +PREFERRED_VERSION_optee-os-fio:mx93-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-fio-mfgtool:mx93-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-tadevkit:mx93-nxp-bsp = "4.2.0-imx" PREFERRED_PROVIDER_virtual/kernel:mx93-nxp-bsp ?= "linux-lmp-fslc-imx" PREFERRED_VERSION_u-boot-fio:mx93-nxp-bsp ?= "imx-2023.04" # linux-lmp-fslc-imx_6.1 does't have this devicetrees @@ -814,12 +814,12 @@ OSTREE_KERNEL_ARGS:sun8i ?= "earlycon console=ttyS0,115200 ${OSTREE_KERNEL_ARGS_ ## iMX targets should use the u-boot release based on the NXP BSP PREFERRED_VERSION_u-boot-fio:imx-nxp-bsp ?= "imx-2022.04" ## Prefer OP-TEE releases from our layer instead of using the .imx fork -PREFERRED_VERSION_optee-client:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-client:mx9-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-examples:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-examples:mx9-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-test:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-test:mx9-nxp-bsp = "3.21.0" +PREFERRED_VERSION_optee-client:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-client:mx9-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-examples:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-examples:mx9-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-test:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-test:mx9-nxp-bsp = "4.2.0" ## We don't use imx-boot-container just yet UBOOT_PROVIDES_BOOT_CONTAINER:mx8m-generic-bsp = "0" ## No need to install u-boot, already a WKS dependency diff --git a/meta-lmp-bsp/recipes-security/optee/optee-client_3.21.0.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-client_4.2.0.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-client_3.21.0.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-client_4.2.0.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0-imx.bb similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0-imx.bb rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0-imx.bb diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb deleted file mode 100644 index 99301a040..000000000 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb +++ /dev/null @@ -1,6 +0,0 @@ -require recipes-security/optee/optee-os-fio.inc - -SRCREV = "380f236654c9fb3221848bc50ad9c4b759ac848d" -SRCBRANCH = "3.21+fio-imx" - -DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb new file mode 100644 index 000000000..a640807ab --- /dev/null +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb @@ -0,0 +1,6 @@ +require recipes-security/optee/optee-os-fio.inc + +SRCREV = "5891192fbbc290cab0567744dec5be784b72b311" +SRCBRANCH = "4.2.0+fio-imx" + +DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb similarity index 53% rename from meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb rename to meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb index 67feec1f6..7c75deb03 100644 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb @@ -1,6 +1,6 @@ # Needed an explicit PV setting due the require/include chain -PV = "3.21.0-imx" +PV = "4.2.0-imx" -require recipes-security/optee/optee-os-tadevkit_3.21.0.bb +require recipes-security/optee/optee-os-tadevkit_4.2.0.bb DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-test_3.21.0.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-test_4.2.0.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-test_3.21.0.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-test_4.2.0.bbappend From 7af2dcf8457d6c1f9bf3835135458fe982281666 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 3 Dec 2024 06:54:46 +0100 Subject: [PATCH 48/48] [WIP] op-tee: use the 4.2.0 wip branches Signed-off-by: Jorge Ramirez-Ortiz --- meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb | 2 +- meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb index b8ce0ce71..4e70bf659 100644 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb @@ -1,4 +1,4 @@ require optee-os-fio.inc SRCREV = "a88bd7ef912657e9a73bf87ef7c0a0f76db1cbd4" -SRCBRANCH = "4.2.0+fio" +SRCBRANCH = "4.2.0+fio-wip" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb index a640807ab..1251fb7b5 100644 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb @@ -1,6 +1,6 @@ require recipes-security/optee/optee-os-fio.inc SRCREV = "5891192fbbc290cab0567744dec5be784b72b311" -SRCBRANCH = "4.2.0+fio-imx" +SRCBRANCH = "4.2.0+fio-imx-wip" DEFAULT_PREFERENCE = "-1"