diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 9 | ||||
-rw-r--r-- | meta/classes/image_types.bbclass | 50 | ||||
-rw-r--r-- | meta/classes/image_types_uboot.bbclass | 18 |
3 files changed, 39 insertions, 38 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index af789f4588..c06dee2f0c 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -118,7 +118,7 @@ def rootfs_variables(d): | |||
118 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', | 118 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', |
119 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', | 119 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', |
120 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', | 120 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', |
121 | 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED'] | 121 | 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED'] |
122 | variables.extend(rootfs_command_variables(d)) | 122 | variables.extend(rootfs_command_variables(d)) |
123 | variables.extend(variable_depends(d)) | 123 | variables.extend(variable_depends(d)) |
124 | return " ".join(variables) | 124 | return " ".join(variables) |
@@ -343,7 +343,7 @@ python setup_debugfs () { | |||
343 | 343 | ||
344 | python () { | 344 | python () { |
345 | vardeps = set() | 345 | vardeps = set() |
346 | # We allow COMPRESSIONTYPES to have duplicates. That avoids breaking | 346 | # We allow CONVERSIONTYPES to have duplicates. That avoids breaking |
347 | # derived distros when OE-core or some other layer independently adds | 347 | # derived distros when OE-core or some other layer independently adds |
348 | # the same type. There is still only one command for each type, but | 348 | # the same type. There is still only one command for each type, but |
349 | # presumably the commands will do the same when the type is the same, | 349 | # presumably the commands will do the same when the type is the same, |
@@ -351,7 +351,7 @@ python () { | |||
351 | # | 351 | # |
352 | # Without de-duplication, gen_conversion_cmds() below | 352 | # Without de-duplication, gen_conversion_cmds() below |
353 | # would create the same compression command multiple times. | 353 | # would create the same compression command multiple times. |
354 | ctypes = set(d.getVar('COMPRESSIONTYPES', True).split()) | 354 | ctypes = set(d.getVar('CONVERSIONTYPES', True).split()) |
355 | old_overrides = d.getVar('OVERRIDES', 0) | 355 | old_overrides = d.getVar('OVERRIDES', 0) |
356 | 356 | ||
357 | def _image_base_type(type): | 357 | def _image_base_type(type): |
@@ -456,9 +456,10 @@ python () { | |||
456 | # Create input image first. | 456 | # Create input image first. |
457 | gen_conversion_cmds(type) | 457 | gen_conversion_cmds(type) |
458 | localdata.setVar('type', type) | 458 | localdata.setVar('type', type) |
459 | cmd = "\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True) | 459 | cmd = "\t" + (localdata.getVar("CONVERSION_CMD_" + ctype, True) or localdata.getVar("COMPRESS_CMD_" + ctype, True)) |
460 | if cmd not in cmds: | 460 | if cmd not in cmds: |
461 | cmds.append(cmd) | 461 | cmds.append(cmd) |
462 | vardeps.add('CONVERSION_CMD_' + ctype) | ||
462 | vardeps.add('COMPRESS_CMD_' + ctype) | 463 | vardeps.add('COMPRESS_CMD_' + ctype) |
463 | subimage = type + "." + ctype | 464 | subimage = type + "." + ctype |
464 | if subimage not in subimages: | 465 | if subimage not in subimages: |
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 2b97397a51..4d928667e8 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -29,7 +29,7 @@ def imagetypes_getdepends(d): | |||
29 | for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split(): | 29 | for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split(): |
30 | adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps) | 30 | adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps) |
31 | for ctype in resttypes: | 31 | for ctype in resttypes: |
32 | adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps) | 32 | adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps) |
33 | 33 | ||
34 | # Sort the set so that ordering is consistant | 34 | # Sort the set so that ordering is consistant |
35 | return " ".join(sorted(deps)) | 35 | return " ".join(sorted(deps)) |
@@ -214,7 +214,7 @@ IMAGE_CMD_wic () { | |||
214 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES" | 214 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES" |
215 | 215 | ||
216 | # Rebuild when the wks file or vars in WICVARS change | 216 | # Rebuild when the wks file or vars in WICVARS change |
217 | USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}" | 217 | USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}" |
218 | WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}" | 218 | WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}" |
219 | do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}" | 219 | do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}" |
220 | 220 | ||
@@ -316,29 +316,29 @@ IMAGE_TYPES = " \ | |||
316 | wic wic.gz wic.bz2 wic.lzma \ | 316 | wic wic.gz wic.bz2 wic.lzma \ |
317 | " | 317 | " |
318 | 318 | ||
319 | COMPRESSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap" | 319 | CONVERSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap" |
320 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 320 | CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
321 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" | 321 | CONVERSION_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" |
322 | COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 322 | CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
323 | COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz" | 323 | CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz" |
324 | COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" | 324 | CONVERSION_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" |
325 | COMPRESS_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 325 | CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
326 | COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" | 326 | CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" |
327 | COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" | 327 | CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" |
328 | COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" | 328 | CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" |
329 | COMPRESS_CMD_sha224sum = "sha224sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha224sum" | 329 | CONVERSION_CMD_sha224sum = "sha224sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha224sum" |
330 | COMPRESS_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha256sum" | 330 | CONVERSION_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha256sum" |
331 | COMPRESS_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum" | 331 | CONVERSION_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum" |
332 | COMPRESS_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum" | 332 | CONVERSION_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum" |
333 | COMPRESS_CMD_bmap = "bmaptool create ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap" | 333 | CONVERSION_CMD_bmap = "bmaptool create ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap" |
334 | COMPRESS_DEPENDS_lzma = "xz-native" | 334 | CONVERSION_DEPENDS_lzma = "xz-native" |
335 | COMPRESS_DEPENDS_gz = "" | 335 | CONVERSION_DEPENDS_gz = "" |
336 | COMPRESS_DEPENDS_bz2 = "pbzip2-native" | 336 | CONVERSION_DEPENDS_bz2 = "pbzip2-native" |
337 | COMPRESS_DEPENDS_xz = "xz-native" | 337 | CONVERSION_DEPENDS_xz = "xz-native" |
338 | COMPRESS_DEPENDS_lz4 = "lz4-native" | 338 | CONVERSION_DEPENDS_lz4 = "lz4-native" |
339 | COMPRESS_DEPENDS_zip = "zip-native" | 339 | CONVERSION_DEPENDS_zip = "zip-native" |
340 | COMPRESS_DEPENDS_sum = "mtd-utils-native" | 340 | CONVERSION_DEPENDS_sum = "mtd-utils-native" |
341 | COMPRESS_DEPENDS_bmap = "bmap-tools-native" | 341 | CONVERSION_DEPENDS_bmap = "bmap-tools-native" |
342 | 342 | ||
343 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" | 343 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" |
344 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" | 344 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" |
diff --git a/meta/classes/image_types_uboot.bbclass b/meta/classes/image_types_uboot.bbclass index 19e4aa2e47..f72d9b25ec 100644 --- a/meta/classes/image_types_uboot.bbclass +++ b/meta/classes/image_types_uboot.bbclass | |||
@@ -8,19 +8,19 @@ oe_mkimage () { | |||
8 | fi | 8 | fi |
9 | } | 9 | } |
10 | 10 | ||
11 | COMPRESSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot" | 11 | CONVERSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot" |
12 | 12 | ||
13 | COMPRESS_DEPENDS_u-boot = "u-boot-mkimage-native" | 13 | CONVERSION_DEPENDS_u-boot = "u-boot-mkimage-native" |
14 | COMPRESS_CMD_u-boot = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none" | 14 | CONVERSION_CMD_u-boot = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none" |
15 | 15 | ||
16 | COMPRESS_DEPENDS_gz.u-boot = "u-boot-mkimage-native" | 16 | CONVERSION_DEPENDS_gz.u-boot = "u-boot-mkimage-native" |
17 | COMPRESS_CMD_gz.u-boot = "${COMPRESS_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip clean" | 17 | CONVERSION_CMD_gz.u-boot = "${CONVERSION_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip clean" |
18 | 18 | ||
19 | COMPRESS_DEPENDS_bz2.u-boot = "u-boot-mkimage-native" | 19 | CONVERSION_DEPENDS_bz2.u-boot = "u-boot-mkimage-native" |
20 | COMPRESS_CMD_bz2.u-boot = "${COMPRESS_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2 clean" | 20 | CONVERSION_CMD_bz2.u-boot = "${CONVERSION_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2 clean" |
21 | 21 | ||
22 | COMPRESS_DEPENDS_lzma.u-boot = "u-boot-mkimage-native" | 22 | CONVERSION_DEPENDS_lzma.u-boot = "u-boot-mkimage-native" |
23 | COMPRESS_CMD_lzma.u-boot = "${COMPRESS_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean" | 23 | CONVERSION_CMD_lzma.u-boot = "${CONVERSION_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean" |
24 | 24 | ||
25 | IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot" | 25 | IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot" |
26 | 26 | ||