summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/image_type_tezi.bbclass24
1 files changed, 18 insertions, 6 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index 8dce981..2a0b915 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -37,7 +37,7 @@ def rootfs_tezi_emmc(d):
has_devicetree = d.getVar('KERNEL_DEVICETREE', True)
if has_devicetree:
for dtb in d.getVar('KERNEL_DEVICETREE', True).split():
- bootfiles.append(os.path.join(deploydir, kernel + "-" + dtb))
+ bootfiles.append(os.path.join(deploydir, dtb))
args = ['du', '-kLc']
args.extend(bootfiles)
@@ -222,8 +222,8 @@ IMAGE_CMD_teziimg () {
if test -n "${KERNEL_DEVICETREE}"; then
for DTS_FILE in ${KERNEL_DEVICETREE}; do
DTS_BASE_NAME=`basename ${DTS_FILE} .dtb`
- if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
- KERNEL_DEVICETREE_FILES="${KERNEL_DEVICETREE_FILES} ${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb"
+ if [ -e "${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb" ]; then
+ KERNEL_DEVICETREE_FILES="${KERNEL_DEVICETREE_FILES} ${DTS_BASE_NAME}.dtb"
else
bbfatal "${DTS_FILE} does not exist."
fi
@@ -237,16 +237,28 @@ IMAGE_CMD_teziimg () {
# The first transform strips all folders from the files to tar, the
# second transform "moves" them in a subfolder ${IMAGE_NAME}_${PV}.
# The third transform removes zImage from the device tree.
- ${IMAGE_CMD_TAR} --transform='s/.*\///' --transform 's,^,${IMAGE_NAME}-Tezi_${PV}/,' --transform="flags=r;s|${KERNEL_IMAGETYPE}-||" -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}-Tezi_${PV}${TDX_VERDATE}.tar image.json toradexlinux.png marketing.tar prepare.sh wrapup.sh ${SPL_BINARY} ${UBOOT_BINARY_TEZI} ${UBOOT_ENV_TEZI} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE_FILES} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar.xz
+ ${IMAGE_CMD_TAR} \
+ --transform='s/.*\///' \
+ --transform 's,^,${IMAGE_NAME}-Tezi_${PV}/,' \
+ --transform="flags=r;s|${KERNEL_IMAGETYPE}-||" \
+ -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}-Tezi_${PV}${TDX_VERDATE}.tar \
+ image.json toradexlinux.png marketing.tar prepare.sh wrapup.sh ${SPL_BINARY} ${UBOOT_BINARY_TEZI} ${UBOOT_ENV_TEZI} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE_FILES} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar.xz
;;
*)
# Create bootfs...
- ${IMAGE_CMD_TAR} --transform="flags=r;s|${KERNEL_IMAGETYPE}-||" -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar -C ${DEPLOY_DIR_IMAGE} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE_FILES}
+ ${IMAGE_CMD_TAR} \
+ --transform="flags=r;s|${KERNEL_IMAGETYPE}-||" \
+ -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar -C ${DEPLOY_DIR_IMAGE} \
+ ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE_FILES}
xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar > ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar.xz
# The first transform strips all folders from the files to tar, the
# second transform "moves" them in a subfolder ${IMAGE_NAME}-Tezi_${PV}.
- ${IMAGE_CMD_TAR} --transform='s/.*\///' --transform 's,^,${IMAGE_NAME}-Tezi_${PV}/,' -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}-Tezi_${PV}${TDX_VERDATE}.tar image.json toradexlinux.png marketing.tar prepare.sh wrapup.sh ${SPL_BINARY} ${UBOOT_BINARY_TEZI} ${UBOOT_ENV_TEZI} ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar.xz ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar.xz
+ ${IMAGE_CMD_TAR} \
+ --transform='s/.*\///' \
+ --transform 's,^,${IMAGE_NAME}-Tezi_${PV}/,' \
+ -chf ${IMGDEPLOYDIR}/${IMAGE_NAME}-Tezi_${PV}${TDX_VERDATE}.tar \
+ image.json toradexlinux.png marketing.tar prepare.sh wrapup.sh ${SPL_BINARY} ${UBOOT_BINARY_TEZI} ${UBOOT_ENV_TEZI} ${IMGDEPLOYDIR}/${IMAGE_NAME}.bootfs.tar.xz ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar.xz
;;
esac
}