image_types_digi: restrict boot image artifacts using KERNEL_IMAGETYPE
When we use a fitImage kernel type, all the boot artifacts are inside the FIT image, so there is no need to add them to the boot image additionally. We were using TRUSTFENCE_FIT_IMG to do this filtering, which uses a fitImage kernel type underneath. This commit uses KERNEL_IMAGETYPE instead, as this way, we can use kernel FIT images out of Trustfence and still prevent polluting the boot images with not-needed artifacts. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
e915a14b4b
commit
3eed042d80
|
|
@ -22,7 +22,7 @@ IMAGE_CMD:boot.vfat() {
|
|||
BOOTIMG_FILES="$(readlink -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin)"
|
||||
BOOTIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Exclude DTB and DTBO from VFAT image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
if [ -n "${KERNEL_DEVICETREE}" ]; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
# Remove potential sub-folders
|
||||
|
|
@ -61,7 +61,7 @@ IMAGE_CMD:boot.vfat() {
|
|||
mcopy -i ${IMGDEPLOYDIR}/${IMAGE_NAME}.boot.vfat ${BOOTIMG_FILES_SYMLINK} ::/
|
||||
|
||||
# Exclude boot scripts from VFAT image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Copy boot scripts into the VFAT image
|
||||
for item in ${BOOT_SCRIPTS}; do
|
||||
src=`echo $item | awk -F':' '{ print $1 }'`
|
||||
|
|
@ -90,7 +90,7 @@ do_image_boot_ubifs[depends] += " \
|
|||
IMAGE_CMD:boot.ubifs() {
|
||||
BOOTIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Exclude DTB and DTBO from UBIFS image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
if [ -n "${KERNEL_DEVICETREE}" ]; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
# Remove potential sub-folders
|
||||
|
|
@ -117,7 +117,7 @@ IMAGE_CMD:boot.ubifs() {
|
|||
done
|
||||
|
||||
# Exclude boot scripts from UBIFS image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Hard-link boot scripts into the temporary folder
|
||||
for item in ${BOOT_SCRIPTS}; do
|
||||
src="$(echo ${item} | awk -F':' '{ print $1 }')"
|
||||
|
|
@ -148,7 +148,7 @@ IMAGE_CMD:recovery.vfat() {
|
|||
cp --remove-destination ${IMGDEPLOYDIR}/${IMAGE_NAME}.boot.vfat ${IMGDEPLOYDIR}/${IMAGE_NAME}.recovery.vfat
|
||||
|
||||
# Exclude initRAMFS from VFAT image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Copy the recovery initramfs into the VFAT image
|
||||
mcopy -i ${IMGDEPLOYDIR}/${IMAGE_NAME}.recovery.vfat -s ${DEPLOY_DIR_IMAGE}/${RECOVERY_INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot.tf ::/uramdisk-recovery.img
|
||||
fi
|
||||
|
|
@ -169,7 +169,7 @@ do_image_recovery_ubifs[depends] += " \
|
|||
IMAGE_CMD:recovery.ubifs() {
|
||||
RECOVERYIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Exclude DTB and DTBO from VFAT image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
if [ -n "${KERNEL_DEVICETREE}" ]; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
# Remove potential sub-folders
|
||||
|
|
@ -191,7 +191,7 @@ IMAGE_CMD:recovery.ubifs() {
|
|||
done
|
||||
|
||||
# Exclude bootscript from VFAT image when creating a FIT image
|
||||
if [ "${TRUSTFENCE_FIT_IMG}" != "1" ]; then
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Hard-link boot scripts into the temporary folder
|
||||
for item in ${BOOT_SCRIPTS}; do
|
||||
src="$(echo ${item} | awk -F':' '{ print $1 }')"
|
||||
|
|
|
|||
Loading…
Reference in New Issue