diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-24 14:26:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-25 16:34:23 +0000 |
commit | ed41be01dce170e4e8f9532f4aaa635204278dd7 (patch) | |
tree | 71d9884afefd1c0a3ca101737d9821d5b88f7922 /meta/conf/bitbake.conf | |
parent | f8539239bc473279cc475b07c22e1e96514c6d2f (diff) | |
download | poky-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/bitbake.conf')
-rw-r--r-- | meta/conf/bitbake.conf | 41 |
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) |
356 | IMAGE_EXTRA_OPTION ?= "-i 8192" | 356 | IMAGE_EXTRA_OPTION ?= "-i 8192" |
357 | 357 | ||
358 | IMAGE_CMD = "" | ||
359 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" | ||
360 | IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2" | ||
361 | IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" | ||
362 | IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${IMAGE_EXTRA_OPTION} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}" | ||
363 | IMAGE_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" | ||
364 | IMAGE_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" | ||
365 | IMAGE_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" | ||
366 | IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" | ||
367 | IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend" | ||
368 | IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." | ||
369 | IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ." | ||
370 | IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." | ||
371 | IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)" | ||
372 | IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)" | ||
373 | IMAGE_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" | ||
374 | IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}" | ||
375 | |||
376 | EXTRA_IMAGECMD = "" | ||
377 | EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x40000" | ||
378 | EXTRA_IMAGECMD_yaffs2 = "1" | ||
379 | EXTRA_IMAGECMD_squashfs = "" | ||
380 | EXTRA_IMAGECMD_squashfs-lzma = "" | ||
381 | EXTRA_IMAGECMD_cpio = "" | ||
382 | EXTRA_IMAGECMD_cpio.gz = "" | ||
383 | EXTRA_IMAGECMD_ubi = "" | ||
384 | EXTRA_IMAGECMD_ubifs = "" | ||
385 | |||
386 | IMAGE_DEPENDS = "" | ||
387 | IMAGE_DEPENDS_jffs2 = "mtd-utils-native" | ||
388 | IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native" | ||
389 | IMAGE_DEPENDS_cramfs = "cramfs-native" | ||
390 | IMAGE_DEPENDS_ext2 = "genext2fs-native" | ||
391 | IMAGE_DEPENDS_ext2.gz = "genext2fs-native" | ||
392 | IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" | ||
393 | IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" | ||
394 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" | ||
395 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" | ||
396 | IMAGE_DEPENDS_ubi = "mtd-utils-native" | ||
397 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" | ||
398 | |||
399 | EXTRA_IMAGEDEPENDS = "" | 358 | EXTRA_IMAGEDEPENDS = "" |
400 | 359 | ||
401 | ################################################################## | 360 | ################################################################## |