Hi Paul,

sorry for late answer - I read only now you are talking about FIT.

On 09/05/2014 16:44, Bruce Ashfield wrote:
>>
>>  
>>
>> My first question is, is there a better place to be making the FIT image?
>>
> 
> It depends on if everything you need to construct the FIT image is
> in the kernel's build directory, or also available in the sysroot/deploy
> directories.
> 
> If you need kernel build artifacts, doing it in the bbappend (or a .inc,
> .bbclass, etc) of the kernel recipe is the right place.
> 

Indeed. This is what I did in a couple of projects. I added an
image_types_itb.bbclass to produce the FIT image. The IMAGE_FIT_ITS
variable contains the filename of the description file to be passed to
the mkimage tool, and can be overwritten by the image receipe.
Compressions are not needed for this image type, and I should be removed.

Is this the right place to post the patch ? Or should be addressed to
meta-oe ?

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================
>From 0cb68067149657079cad88b029f04cddcadf613a Mon Sep 17 00:00:00 2001
From: Stefano Babic <sba...@denx.de>
Date: Thu, 26 Sep 2013 17:21:00 +0200
Subject: [PATCH] meta: add support for FIT images

Signed-off-by: Stefano Babic <sba...@denx.de>
---
 meta/classes/image_types_itb.bbclass | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 meta/classes/image_types_itb.bbclass

diff --git a/meta/classes/image_types_itb.bbclass b/meta/classes/image_types_itb.bbclass
new file mode 100644
index 0000000..1c43c79
--- /dev/null
+++ b/meta/classes/image_types_itb.bbclass
@@ -0,0 +1,25 @@
+inherit image_types kernel-arch
+
+oe_mkimage () {
+	cp ${IMAGE_FIT_ITS}  ${DEPLOY_DIR_IMAGE}/.
+
+	FIT_ITS=`basename ${IMAGE_FIT_ITS}`
+	mkimage -f ${FIT_ITS} ${DEPLOY_DIR_IMAGE}/$1.itb
+}
+
+COMPRESSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot"
+
+COMPRESS_DEPENDS_u-boot = "u-boot-mkimage-native"
+COMPRESS_CMD_u-boot      = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none"
+
+COMPRESS_DEPENDS_gz.u-boot = "u-boot-mkimage-native"
+COMPRESS_CMD_gz.u-boot      = "${COMPRESS_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip"
+
+COMPRESS_DEPENDS_bz2.u-boot = "u-boot-mkimage-native"
+COMPRESS_CMD_bz2.u-boot      = "${COMPRESS_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2"
+
+COMPRESS_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
+COMPRESS_CMD_lzma.u-boot      = "${COMPRESS_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma"
+
+IMAGE_TYPES += "ext2.itb ext2.gz.itb ext2.bz2.itb ext2.lzma.itb ext3.gz.itb ext4.gz.itb"
+
-- 
1.9.1

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to