aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/fsl-eula-unpack.bbclass19
-rw-r--r--classes/fsl-vivante-kernel-driver-handler.bbclass6
-rw-r--r--classes/image_types_fsl.bbclass2
-rw-r--r--classes/imx-boot-container.bbclass14
-rw-r--r--classes/kernel-itbimage.bbclass493
-rw-r--r--classes/machine-overrides-extender.bbclass30
-rw-r--r--classes/mfgtool-initramfs-image.bbclass5
-rw-r--r--classes/use-imx-headers.bbclass4
-rw-r--r--classes/use-imx-security-controller-firmware.bbclass12
-rw-r--r--classes/uuu_bootloader_tag.bbclass11
10 files changed, 69 insertions, 527 deletions
diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass
index 5e66a1fc..a16a1871 100644
--- a/classes/fsl-eula-unpack.bbclass
+++ b/classes/fsl-eula-unpack.bbclass
@@ -39,6 +39,12 @@ FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V24 = "417b82f17fc02b88125331ed
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V24.1 = "b3b0bab6ff55420d043cf1652c52d788"
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V25 = "f35df765ff17e69043ea21f350e3229c"
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V27 = "e565271ec9a80ce47abbddc4bffe56fa"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V29 = "28241cb895217d7946e40e7227136d02"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V30 = "03bcadc8dc0a788f66ca9e2b89f56c6f"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V31 = "dedee5689786754f61ea3a76035c8a81"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V32 = "17d2319de7baa686e8a755ba58a9ebf5"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V33 = "e4098ac4459cb81b07d3f0c22b3e8370"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V34 = "be5ff43682ed6c57dfcbeb97651c2829"
FSL_EULA_FILE_MD5SUMS = " \
${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V8} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V10} \
@@ -73,11 +79,17 @@ FSL_EULA_FILE_MD5SUMS = " \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V24.1} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V25} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V27} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V29} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V30} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V31} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V32} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V33} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V34} \
"
# The checksum for the EULA in the layer
FSL_EULA_FILE_MD5SUM ?= \
- "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V27}"
+ "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V34}"
LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}"
LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE"
@@ -158,13 +170,12 @@ python do_unpack() {
else:
bb.note("Freescale EULA has been accepted for '%s'" % pkg)
- # The binary unpack needs to be done first so 'S' is valid
- bb.build.exec_func('fsl_bin_do_unpack', d)
-
try:
bb.build.exec_func('base_do_unpack', d)
except:
raise
+
+ bb.build.exec_func('fsl_bin_do_unpack', d)
}
do_unpack[vardepsexclude] += "FSL_EULA_FILE"
diff --git a/classes/fsl-vivante-kernel-driver-handler.bbclass b/classes/fsl-vivante-kernel-driver-handler.bbclass
index 54954aab..c226b0ab 100644
--- a/classes/fsl-vivante-kernel-driver-handler.bbclass
+++ b/classes/fsl-vivante-kernel-driver-handler.bbclass
@@ -41,9 +41,9 @@ python fsl_vivante_kernel_driver_handler () {
return
if use_vivante_kernel_driver_module != "1":
- e.data.appendVar('RPROVIDES:${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv')
- e.data.appendVar('RREPLACES:${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv')
- e.data.appendVar('RCONFLICTS:${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv')
+ e.data.appendVar('RPROVIDES:${KERNEL_PACKAGE_NAME}-base', ' ${MLPREFIX}kernel-module-imx-gpu-viv')
+ e.data.appendVar('RREPLACES:${KERNEL_PACKAGE_NAME}-base', ' ${MLPREFIX}kernel-module-imx-gpu-viv')
+ e.data.appendVar('RCONFLICTS:${KERNEL_PACKAGE_NAME}-base', ' ${MLPREFIX}kernel-module-imx-gpu-viv')
}
addhandler fsl_vivante_kernel_driver_handler
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index cdd16a66..cdfbb97e 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -37,7 +37,7 @@ do_image_wic[depends] += " \
"
# We need to apply a fixup inside of the partition table
-IMAGE_CMD:wic:append:mxs() {
+IMAGE_CMD:wic:append:mxs-generic-bsp() {
# Change partition type for mxs processor family
bbnote "Setting partition type to 0x53 as required for mxs' SoC family."
echo -n S | dd of=$out${IMAGE_NAME_SUFFIX}.wic bs=1 count=1 seek=450 conv=notrunc
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass
index 3ffa7cbd..711bbd9e 100644
--- a/classes/imx-boot-container.bbclass
+++ b/classes/imx-boot-container.bbclass
@@ -29,20 +29,13 @@ ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-o
# appropriate dependencies for populate binaries task
do_resolve_and_populate_binaries[depends] += " \
${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \
- imx-atf:do_deploy \
+ ${IMX_DEFAULT_ATF_PROVIDER}:do_deploy \
${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \
"
-# Append make flags to include ATF load address
-EXTRA_OEMAKE += "ATF_LOAD_ADDR=${ATF_LOAD_ADDR}"
-
# Define an additional task that collects binary output from dependent packages
# and deploys them into the U-Boot build folder
do_resolve_and_populate_binaries() {
- if [ ! -n "${ATF_LOAD_ADDR}" ]; then
- bberror "ATF_LOAD_ADDR is undefined, result binary would be unusable!"
- fi
-
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
@@ -54,7 +47,7 @@ do_resolve_and_populate_binaries() {
cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/
done
if [ -n "${ATF_MACHINE_NAME}" ]; then
- cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin
+ cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin
else
bberror "ATF binary is undefined, result binary would be unusable!"
fi
@@ -85,7 +78,6 @@ do_deploy:append() {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -m 0644 ${B}/${config}/u-boot.itb ${DEPLOYDIR}/u-boot.itb-${MACHINE}-${type}
install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type}
# When there's more than one word in UBOOT_CONFIG,
# this will overwrite the links created in
@@ -94,8 +86,8 @@ do_deploy:append() {
# word in UBOOT_CONFIG. This is also how all other
# artifacts handled by oe-core's u-boot.inc are
# treated.
- ln -sf u-boot.itb-${MACHINE}-${type} u-boot.itb
ln -sf flash.bin-${MACHINE}-${type} flash.bin
+ ln -sf flash.bin-${MACHINE}-${type} imx-boot
fi
done
unset j
diff --git a/classes/kernel-itbimage.bbclass b/classes/kernel-itbimage.bbclass
deleted file mode 100644
index 51a87319..00000000
--- a/classes/kernel-itbimage.bbclass
+++ /dev/null
@@ -1,493 +0,0 @@
-inherit kernel-uboot uboot-sign
-
-python __anonymous () {
- kerneltypes = d.getVar('KERNEL_IMAGETYPES') or ""
- if 'itbImage' in kerneltypes.split():
- depends = d.getVar("DEPENDS")
- depends = "%s u-boot-mkimage-native dtc-native" % depends
- d.setVar("DEPENDS", depends)
-
- if d.getVar("UBOOT_ARCH") == "x86":
- replacementtype = "bzImage"
- else:
- replacementtype = "vmlinux"
-
- # 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 'itbImage' in typeformake.split():
- d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('itbImage', replacementtype))
-
- image = d.getVar('INITRAMFS_IMAGE')
- if image:
- d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
- def extraimage_getdepends(task):
- deps = ""
- for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
- deps += " %s:%s" % (dep, task)
- return deps
-
- d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_lic'))
- d.appendVarFlag('do_image_complete', 'depends', extraimage_getdepends('do_populate_sysroot'))
-
- # Verified boot will sign the fitImage and append the public key to
- # U-Boot dtb. We ensure the U-Boot dtb is deployed before assembling
- # the fitImage:
- if d.getVar('UBOOT_SIGN_ENABLE') == "1":
- uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'
- d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
-}
-
-# Options for the device tree compiler passed to mkimage '-D' feature:
-UBOOT_MKIMAGE_DTCOPTS ??= ""
-
-#
-# Emit the fitImage ITS header
-#
-# $1 ... .its filename
-fitimage_emit_fit_header() {
- cat << EOF >> ${1}
-/dts-v1/;
-
-/ {
- description = "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}";
- #address-cells = <1>;
-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
-}
-
-#
-# Emit the fitImage ITS kernel section
-#
-# $1 ... .its filename
-# $2 ... Image counter
-# $3 ... Path to kernel image
-# $4 ... Compression type
-fitimage_emit_section_kernel() {
-
- kernel_csum="sha1"
-
- ENTRYPOINT=${UBOOT_ENTRYPOINT}
- if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
- ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
- awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'`
- fi
-
- cat << EOF >> ${1}
- kernel@${2} {
- description = "Linux kernel";
- data = /incbin/("${3}");
- type = "kernel";
- arch = "${UBOOT_ARCH}";
- os = "linux";
- compression = "${4}";
- load = <${UBOOT_LOADADDRESS}>;
- entry = <${ENTRYPOINT}>;
- hash@1 {
- algo = "${kernel_csum}";
- };
- };
-EOF
-}
-
-#
-# Emit the fitImage ITS DTB section
-#
-# $1 ... .its filename
-# $2 ... Image counter
-# $3 ... Path to DTB image
-fitimage_emit_section_dtb() {
-
- dtb_csum="sha1"
-
- if [ -n "${DTB_LOAD}" ]; then
- dtb_loadline="load = <${DTB_LOAD}>;"
- fi
-
- cat << EOF >> ${1}
- fdt@${2} {
- description = "Flattened Device Tree blob";
- data = /incbin/("${3}");
- type = "flat_dt";
- arch = "${UBOOT_ARCH}";
- compression = "none";
- ${dtb_loadline}
- hash@1 {
- algo = "${dtb_csum}";
- };
- };
-EOF
-}
-
-#
-# Emit the fitImage ITS setup section
-#
-# $1 ... .its filename
-# $2 ... Image counter
-# $3 ... Path to setup image
-fitimage_emit_section_setup() {
-
- setup_csum="sha1"
-
- cat << EOF >> ${1}
- setup@${2} {
- description = "Linux setup.bin";
- data = /incbin/("${3}");
- type = "x86_setup";
- arch = "${UBOOT_ARCH}";
- os = "linux";
- compression = "none";
- load = <0x00090000>;
- entry = <0x00090000>;
- hash@1 {
- algo = "${setup_csum}";
- };
- };
-EOF
-}
-
-#
-# Emit the fitImage ITS ramdisk section
-#
-# $1 ... .its filename
-# $2 ... Image counter
-# $3 ... Path to ramdisk image
-fitimage_emit_section_ramdisk() {
-
- ramdisk_csum="sha1"
- ramdisk_ctype="none"
- ramdisk_loadline=""
- ramdisk_entryline=""
-
- if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
- ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
- fi
- if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
- ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
- fi
-
- case $3 in
- *.gz)
- ramdisk_ctype="gzip"
- ;;
- *.bz2)
- ramdisk_ctype="bzip2"
- ;;
- *.lzma)
- ramdisk_ctype="lzma"
- ;;
- *.lzo)
- ramdisk_ctype="lzo"
- ;;
- *.lz4)
- ramdisk_ctype="lz4"
- ;;
- esac
-
- cat << EOF >> ${1}
- ramdisk@${2} {
- description = "${INITRAMFS_IMAGE}";
- data = /incbin/("${3}");
- type = "ramdisk";
- arch = "${UBOOT_ARCH}";
- os = "linux";
- compression = "${ramdisk_ctype}";
- ${ramdisk_loadline}
- ${ramdisk_entryline}
- hash@1 {
- algo = "${ramdisk_csum}";
- };
- };
-EOF
-}
-
-#
-# Emit the fitImage ITS configuration section
-#
-# $1 ... .its filename
-# $2 ... Linux kernel ID
-# $3 ... DTB image name
-# $4 ... ramdisk ID
-# $5 ... config ID
-# $6 ... default flag
-fitimage_emit_section_config() {
-
- conf_csum="sha1"
- if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
- conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
- fi
-
- # Test if we have any DTBs at all
- conf_desc="Linux kernel"
- kernel_line="kernel = \"kernel@${2}\";"
- fdt_line=""
- ramdisk_line=""
- setup_line=""
- default_line=""
-
- if [ -n "${3}" ]; then
- conf_desc="${conf_desc}, FDT blob"
- fdt_line="fdt = \"fdt@${3}\";"
- fi
-
- if [ -n "${4}" ]; then
- conf_desc="${conf_desc}, ramdisk"
- ramdisk_line="ramdisk = \"ramdisk@${4}\";"
- fi
-
- if [ -n "${5}" ]; then
- conf_desc="${conf_desc}, setup"
- setup_line="setup = \"setup@${5}\";"
- fi
-
- if [ "${6}" = "1" ]; then
- default_line="default = \"conf@${3}\";"
- fi
-
- cat << EOF >> ${1}
- ${default_line}
- conf@${3} {
- description = "${6} ${conf_desc}";
- ${kernel_line}
- ${fdt_line}
- ${ramdisk_line}
- ${setup_line}
- hash@1 {
- algo = "${conf_csum}";
- };
-EOF
-
- if [ ! -z "${conf_sign_keyname}" ] ; then
-
- sign_line="sign-images = \"kernel\""
-
- if [ -n "${3}" ]; then
- sign_line="${sign_line}, \"fdt\""
- fi
-
- if [ -n "${4}" ]; then
- sign_line="${sign_line}, \"ramdisk\""
- fi
-
- if [ -n "${5}" ]; then
- sign_line="${sign_line}, \"setup\""
- fi
-
- sign_line="${sign_line};"
-
- cat << EOF >> ${1}
- signature@1 {
- algo = "${conf_csum},rsa2048";
- key-name-hint = "${conf_sign_keyname}";
- ${sign_line}
- };
-EOF
- fi
-
- cat << EOF >> ${1}
- };
-EOF
-}
-
-#
-# Assemble fitImage
-#
-# $1 ... .its filename
-# $2 ... fitImage name
-# $3 ... include ramdisk
-fitimage_assemble() {
- kernelcount=1
- dtbcount=""
- DTBS=""
- ramdiskcount=${3}
- setupcount=""
- rm -f ${1} arch/${ARCH}/boot/${2}
-
- fitimage_emit_fit_header ${1}
-
- #
- # Step 1: Prepare a kernel image section.
- #
- fitimage_emit_section_maint ${1} imagestart
-
- uboot_prep_kimage
- fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}"
-
- #
- # Step 2: Prepare a DTB image section
- #
- 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'`
- fi
- DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
- DTB=`basename ${DTB}`
- if [ ! -e "${DTB_PATH}" ]; then
- DTB_PATH="arch/${ARCH}/boot/${DTB}"
- fi
-
- DTBS="${DTBS} ${DTB}"
- fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
- done
- fi
-
- #
- # Step 3: Prepare a setup section. (For x86)
- #
- if [ -e arch/${ARCH}/boot/setup.bin ]; then
- setupcount=1
- fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin
- fi
-
- #
- # Step 4: Prepare a ramdisk section.
- #
- if [ "x${ramdiskcount}" = "x1" ] ; then
- # Find and use the first initramfs image archive type we find
- for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do
- initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
- echo "Using $initramfs_path"
- if [ -e "${initramfs_path}" ]; then
- fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}"
- break
- fi
- done
- fi
-
- fitimage_emit_section_maint ${1} sectend
-
- # Force the first Kernel and DTB in the default config
- kernelcount=1
- if [ -n "${dtbcount}" ]; then
- dtbcount=1
- fi
-
- #
- # Step 5: Prepare a configurations section
- #
- fitimage_emit_section_maint ${1} confstart
-
- if [ -n "${DTBS}" ]; then
- i=1
- for DTB in ${DTBS}; do
- fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
- i=`expr ${i} + 1`
- done
- fi
-
- fitimage_emit_section_maint ${1} sectend
-
- fitimage_emit_section_maint ${1} fitend
-
- #
- # Step 6: Assemble the image
- #
- uboot-mkimage \
- ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
- -f ${1} \
- arch/${ARCH}/boot/${2}
-
- #
- # Step 7: Sign the image and add public key to U-Boot dtb
- #
- if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
- uboot-mkimage \
- ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
- -F -k "${UBOOT_SIGN_KEYDIR}" \
- -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \
- -r arch/${ARCH}/boot/${2}
- fi
-}
-
-do_assemble_fitimage() {
- if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then
- cd ${B}
- fitimage_assemble itb-image.its itbImage
- fi
-}
-
-addtask assemble_fitimage before do_install after do_compile
-
-do_assemble_fitimage_initramfs() {
- if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage" && \
- test -n "${INITRAMFS_IMAGE}" ; then
- cd ${B}
- fitimage_assemble itb-image-${INITRAMFS_IMAGE}.its itbImage-${INITRAMFS_IMAGE} 1
- fi
-}
-
-addtask assemble_fitimage_initramfs before do_deploy after do_install
-
-
-kernel_do_deploy[vardepsexclude] = "DATETIME"
-kernel_do_deploy:append() {
- # Update deploy directory
- if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then
- cd ${B}
- echo "Copying fit-image.its source file..."
- its_base_name="itbImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
- its_symlink_name=itbImage-its-${MACHINE}
- install -m 0644 itb-image.its ${DEPLOYDIR}/${its_base_name}.its
- linux_bin_base_name="itbImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
- linux_bin_symlink_name=itbImage-linux.bin-${MACHINE}
- install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin
-
- if [ -n "${INITRAMFS_IMAGE}" ]; then
- echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..."
- its_initramfs_base_name="itbImage-its-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}"
- its_initramfs_symlink_name=itbImage-its-${INITRAMFS_IMAGE_NAME}
- install -m 0644 itb-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its
- fit_initramfs_base_name="itbImage-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}"
- fit_initramfs_symlink_name=itbImage-${INITRAMFS_IMAGE_NAME}
- install -m 0644 arch/${ARCH}/boot/itbImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin
- fi
-
- cd ${DEPLOYDIR}
- ln -sf ${its_base_name}.its ${its_symlink_name}.its
- ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin
-
- if [ -n "${INITRAMFS_IMAGE}" ]; then
- ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its
- ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin
- fi
- fi
-}
diff --git a/classes/machine-overrides-extender.bbclass b/classes/machine-overrides-extender.bbclass
index 876ddd10..58cb45b1 100644
--- a/classes/machine-overrides-extender.bbclass
+++ b/classes/machine-overrides-extender.bbclass
@@ -12,19 +12,17 @@
#
# MACHINEOVERRIDES_EXTENDER_FILTER_OUT:override = "group1 group2"
#
-# Copyright 2016-2018 (C) O.S. Systems Software LTDA.
+# Copyright 2016-2018, 2022 (C) O.S. Systems Software LTDA.
def machine_overrides_extender(d):
machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES') or '').split(':')
# Gather the list of overrides to filter out
- machine_overrides_filter_out = []
+ machine_overrides_filter_out = (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT') or '').split()
for override in machine_overrides:
machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT:%s' % override) or '').split()
- # Drop any overrides of filter_out prior extending
- machine_overrides = [o for o in machine_overrides if o not in machine_overrides_filter_out]
-
+ # Extend the overrides
for override in machine_overrides:
extender = d.getVar('MACHINEOVERRIDES_EXTENDER:%s' % override)
@@ -40,6 +38,9 @@ def machine_overrides_extender(d):
for e in extender:
machine_overrides.insert(index, e)
+ # Drop any overrides of filter_out after extending
+ machine_overrides = [o for o in machine_overrides if o not in machine_overrides_filter_out]
+
return ':'.join(machine_overrides)
python machine_overrides_extender_handler() {
@@ -54,3 +55,22 @@ python machine_overrides_extender_handler() {
machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed"
addhandler machine_overrides_extender_handler
+
+python machineoverrides_filtered_out_qa_handler() {
+ filtered_out = (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT') or "").split()
+ qa_error = d.getVar('MACHINEOVERRIDES_FILTERED_OUT_QA_ERROR')
+
+ for var in d.overridedata:
+ # We need to allow the overrides being used in the extender
+ # so avoid processing it.
+ if 'MACHINEOVERRIDES_EXTENDER' in var:
+ continue
+
+ for (r, o) in d.overridedata[var]:
+ common = list(set(o.split(":")).intersection(filtered_out))
+ if len(common) > 0:
+ raise bb.parse.SkipRecipe(qa_error % common)
+}
+
+machineoverrides_filtered_out_qa_handler[eventmask] = "bb.event.RecipeParsed"
+addhandler machineoverrides_filtered_out_qa_handler
diff --git a/classes/mfgtool-initramfs-image.bbclass b/classes/mfgtool-initramfs-image.bbclass
index 1d4c5513..c8c9e22b 100644
--- a/classes/mfgtool-initramfs-image.bbclass
+++ b/classes/mfgtool-initramfs-image.bbclass
@@ -12,8 +12,9 @@ FEATURE_PACKAGES_mtd = "packagegroup-fsl-mfgtool-mtd"
FEATURE_PACKAGES_extfs = "packagegroup-fsl-mfgtool-extfs"
FEATURE_PACKAGES_f2fs = "packagegroup-fsl-mfgtool-f2fs"
-IMAGE_FSTYPES = "cpio.gz.u-boot"
-IMAGE_FSTYPES:mxs = "cpio.gz.u-boot"
+ZSTD_COMPRESSION_LEVEL ?= "-10"
+SOC_DEFAULT_IMAGE_FSTYPES = "cpio.zst.u-boot"
+SOC_DEFAULT_IMAGE_FSTYPES:mxs-generic-bsp = "cpio.gz.u-boot"
IMAGE_ROOTFS_SIZE ?= "8192"
# Filesystems enabled by default
diff --git a/classes/use-imx-headers.bbclass b/classes/use-imx-headers.bbclass
index c6c7f043..4baf4574 100644
--- a/classes/use-imx-headers.bbclass
+++ b/classes/use-imx-headers.bbclass
@@ -13,14 +13,14 @@
#
# Copyright 2018 (C) O.S. Systems Software LTDA.
-DEPENDS:append:imx = " linux-imx-headers"
+DEPENDS:append:imx-nxp-bsp = " linux-imx-headers"
# Set runtime dependency of -dev for package inheriting this class to
# linux-imx-headers-dev package. This is required in order to propagate
# headers into the SDK
RDEPENDS:${PN}-dev += "linux-imx-headers-dev"
-PACKAGE_ARCH:imx ?= "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:imx-nxp-bsp ?= "${MACHINE_SOCARCH}"
STAGING_INCDIR_IMX = "${STAGING_INCDIR}/imx"
diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass
index 9650059b..eb88fb99 100644
--- a/classes/use-imx-security-controller-firmware.bbclass
+++ b/classes/use-imx-security-controller-firmware.bbclass
@@ -16,16 +16,16 @@
# This behavior ensures that derivatives which requires SECO Firmware to be
# present in the image file have it properly defined.
-SECO_FIRMWARE_NAME ?= ""
-
-SECO_FIRMWARE_NAME:mx8qm = "mx8qmb0-ahab-container.img"
-SECO_FIRMWARE_NAME:mx8qxp = \
+SECO_FIRMWARE_NAME ?= ""
+SECO_FIRMWARE_NAME:mx8qm-nxp-bsp = "mx8qmb0-ahab-container.img"
+SECO_FIRMWARE_NAME:mx8qxp-nxp-bsp = \
"${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', 'mx8qxb0-ahab-container.img', \
'mx8qxc0-ahab-container.img', d)}"
-SECO_FIRMWARE_NAME:mx8dxl = "mx8dxla1-ahab-container.img"
+SECO_FIRMWARE_NAME:mx8dx-nxp-bsp = "mx8qxc0-ahab-container.img"
+SECO_FIRMWARE_NAME:mx8dxl-nxp-bsp = "mx8dxla1-ahab-container.img"
python () {
- if "mx8m" in d.getVar('MACHINEOVERRIDES').split(":"):
+ if "mx8m-generic-bsp" in d.getVar('MACHINEOVERRIDES').split(":"):
return # We need to allow the recipes to be parsed for this case
seco_firmware = d.getVar('SECO_FIRMWARE_NAME')
diff --git a/classes/uuu_bootloader_tag.bbclass b/classes/uuu_bootloader_tag.bbclass
new file mode 100644
index 00000000..fb6acd72
--- /dev/null
+++ b/classes/uuu_bootloader_tag.bbclass
@@ -0,0 +1,11 @@
+# Append a tag to the bootloader image used in the SD card image. The tag
+# contains the size of the bootloader image so UUU can easily find the end of
+# the bootloader in the SD card image.
+do_deploy:append() {
+ if [ "${UUU_BOOTLOADER}" != "" ]; then
+ cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED}
+ ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER}
+ stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \
+ >> ${DEPLOYDIR}/${UUU_BOOTLOADER}
+ fi
+}