From c82c837b4750e3c3cd405ed524cc2d1322831071 Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 1 Jul 2025 21:46:15 -0400 Subject: kernel-fitimage-legacyhs: rename kernel-uboot class Rename old snapshot of the kernel-uboot.bbclass to indicate it is still being used by the FIT processing for the legacy HS devices. Signed-off-by: Denys Dmytriyenko Signed-off-by: Ryan Eatmon --- .../classes/kernel-fitimage-legacyhs.bbclass | 2 +- .../classes/kernel-uboot-deprecated.bbclass | 51 ---------------------- meta-ti-bsp/classes/kernel-uboot-legacyhs.bbclass | 51 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 52 deletions(-) delete mode 100644 meta-ti-bsp/classes/kernel-uboot-deprecated.bbclass create mode 100644 meta-ti-bsp/classes/kernel-uboot-legacyhs.bbclass diff --git a/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass index ca133457..558e8954 100644 --- a/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass +++ b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass @@ -1,4 +1,4 @@ -inherit ti-secdev kernel-uboot-deprecated uboot-sign-legacyhs +inherit ti-secdev kernel-uboot-legacyhs uboot-sign-legacyhs FITIMAGE_HASH_ALGO ?= "sha1" FITIMAGE_PACK_TEE ?= "0" diff --git a/meta-ti-bsp/classes/kernel-uboot-deprecated.bbclass b/meta-ti-bsp/classes/kernel-uboot-deprecated.bbclass deleted file mode 100644 index 6d4aff6b..00000000 --- a/meta-ti-bsp/classes/kernel-uboot-deprecated.bbclass +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright OpenEmbedded Contributors -# -# SPDX-License-Identifier: MIT -# - -# fitImage kernel compression algorithm -FIT_KERNEL_COMP_ALG ?= "gzip" -FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz" - -# Kernel image type passed to mkimage (i.e. kernel kernel_noload...) -UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel" - -uboot_prep_kimage() { - if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then - vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" - linux_suffix="" - linux_comp="none" - elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then - rm -f linux.bin - cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin - vmlinux_path="" - linux_suffix="" - linux_comp="none" - else - vmlinux_path="vmlinux" - # Use vmlinux.initramfs for linux.bin when INITRAMFS_IMAGE_BUNDLE set - # As per the implementation in kernel.bbclass. - # See do_bundle_initramfs function - if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ] && [ -e vmlinux.initramfs ]; then - vmlinux_path="vmlinux.initramfs" - fi - linux_suffix="${FIT_KERNEL_COMP_ALG_EXTENSION}" - linux_comp="${FIT_KERNEL_COMP_ALG}" - fi - - [ -n "${vmlinux_path}" ] && ${KERNEL_OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin - - if [ "${linux_comp}" != "none" ] ; then - if [ "${linux_comp}" = "gzip" ] ; then - gzip -9 linux.bin - elif [ "${linux_comp}" = "lzo" ] ; then - lzop -9 linux.bin - elif [ "${linux_comp}" = "lzma" ] ; then - xz --format=lzma -f -6 linux.bin - fi - mv -f "linux.bin${linux_suffix}" linux.bin - fi - - echo "${linux_comp}" -} diff --git a/meta-ti-bsp/classes/kernel-uboot-legacyhs.bbclass b/meta-ti-bsp/classes/kernel-uboot-legacyhs.bbclass new file mode 100644 index 00000000..6d4aff6b --- /dev/null +++ b/meta-ti-bsp/classes/kernel-uboot-legacyhs.bbclass @@ -0,0 +1,51 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# fitImage kernel compression algorithm +FIT_KERNEL_COMP_ALG ?= "gzip" +FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz" + +# Kernel image type passed to mkimage (i.e. kernel kernel_noload...) +UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel" + +uboot_prep_kimage() { + if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then + vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" + linux_suffix="" + linux_comp="none" + elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then + rm -f linux.bin + cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin + vmlinux_path="" + linux_suffix="" + linux_comp="none" + else + vmlinux_path="vmlinux" + # Use vmlinux.initramfs for linux.bin when INITRAMFS_IMAGE_BUNDLE set + # As per the implementation in kernel.bbclass. + # See do_bundle_initramfs function + if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ] && [ -e vmlinux.initramfs ]; then + vmlinux_path="vmlinux.initramfs" + fi + linux_suffix="${FIT_KERNEL_COMP_ALG_EXTENSION}" + linux_comp="${FIT_KERNEL_COMP_ALG}" + fi + + [ -n "${vmlinux_path}" ] && ${KERNEL_OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin + + if [ "${linux_comp}" != "none" ] ; then + if [ "${linux_comp}" = "gzip" ] ; then + gzip -9 linux.bin + elif [ "${linux_comp}" = "lzo" ] ; then + lzop -9 linux.bin + elif [ "${linux_comp}" = "lzma" ] ; then + xz --format=lzma -f -6 linux.bin + fi + mv -f "linux.bin${linux_suffix}" linux.bin + fi + + echo "${linux_comp}" +} -- cgit v1.2.3-54-g00ecf