summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-24 14:26:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-25 16:34:23 +0000
commited41be01dce170e4e8f9532f4aaa635204278dd7 (patch)
tree71d9884afefd1c0a3ca101737d9821d5b88f7922 /meta/conf
parentf8539239bc473279cc475b07c22e1e96514c6d2f (diff)
downloadpoky-ed41be01dce170e4e8f9532f4aaa635204278dd7.tar.gz
bitbake.conf/image.bbclass: Move image type information into image_types.bbclass
Image generation code in .conf files is hard to read as it needs to be single line. By moving this to a separate class, multiline functions can be used instead improving readability. It also declutters bitbake.conf. There is no real functional change with this patch but it highlights the need for improvements in places such as the IMAGE_EXTRA_OPTION ext* specific variable which makes no sense. (From OE-Core rev: a5c403f0fc71f38c0669691da7f637303ea09a27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/bitbake.conf41
1 files changed, 0 insertions, 41 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 22532db7fe..8e89945096 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -355,47 +355,6 @@ IMAGE_OVERHEAD_FACTOR ?= 1.3
355# Comment this option if you want default genext2fs behavior (i.e. create minimal inode number) 355# Comment this option if you want default genext2fs behavior (i.e. create minimal inode number)
356IMAGE_EXTRA_OPTION ?= "-i 8192" 356IMAGE_EXTRA_OPTION ?= "-i 8192"
357 357
358IMAGE_CMD = ""
359IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
360IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2"
361IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
362IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${IMAGE_EXTRA_OPTION} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
363IMAGE_CMD_ext2.gz = "rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz; genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${IMAGE_EXTRA_OPTION} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz; rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz"
364IMAGE_CMD_ext3 = "genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${IMAGE_EXTRA_OPTION} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"
365IMAGE_CMD_ext3.gz = "rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz; genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${IMAGE_EXTRA_OPTION} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz; rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz"
366IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
367IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend"
368IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
369IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
370IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
371IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)"
372IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)"
373IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg"
374IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
375
376EXTRA_IMAGECMD = ""
377EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x40000"
378EXTRA_IMAGECMD_yaffs2 = "1"
379EXTRA_IMAGECMD_squashfs = ""
380EXTRA_IMAGECMD_squashfs-lzma = ""
381EXTRA_IMAGECMD_cpio = ""
382EXTRA_IMAGECMD_cpio.gz = ""
383EXTRA_IMAGECMD_ubi = ""
384EXTRA_IMAGECMD_ubifs = ""
385
386IMAGE_DEPENDS = ""
387IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
388IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native"
389IMAGE_DEPENDS_cramfs = "cramfs-native"
390IMAGE_DEPENDS_ext2 = "genext2fs-native"
391IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
392IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
393IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
394IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
395IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
396IMAGE_DEPENDS_ubi = "mtd-utils-native"
397IMAGE_DEPENDS_ubifs = "mtd-utils-native"
398
399EXTRA_IMAGEDEPENDS = "" 358EXTRA_IMAGEDEPENDS = ""
400 359
401################################################################## 360##################################################################