diff options
-rw-r--r-- | meta/classes/bootimg.bbclass | 24 | ||||
-rw-r--r-- | meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb | 19 |
2 files changed, 40 insertions, 3 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index fdd4ea9561..c61c4e985e 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass | |||
@@ -19,13 +19,15 @@ | |||
19 | 19 | ||
20 | # External variables (also used by syslinux.bbclass) | 20 | # External variables (also used by syslinux.bbclass) |
21 | # ${INITRD} - indicates a filesystem image to use as an initrd (optional) | 21 | # ${INITRD} - indicates a filesystem image to use as an initrd (optional) |
22 | # ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1 | ||
22 | # ${NOISO} - skip building the ISO image if set to 1 | 23 | # ${NOISO} - skip building the ISO image if set to 1 |
23 | # ${NOHDD} - skip building the HDD image if set to 1 | 24 | # ${NOHDD} - skip building the HDD image if set to 1 |
24 | # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional) | 25 | # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional) |
25 | 26 | ||
26 | do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ | 27 | do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ |
27 | mtools-native:do_populate_sysroot \ | 28 | mtools-native:do_populate_sysroot \ |
28 | cdrtools-native:do_populate_sysroot" | 29 | cdrtools-native:do_populate_sysroot \ |
30 | ${@oe.utils.ifelse(d.getVar('COMPRESSISO'),'zisofs-tools-native:do_populate_sysroot','')}" | ||
29 | 31 | ||
30 | PACKAGES = " " | 32 | PACKAGES = " " |
31 | EXCLUDE_FROM_WORLD = "1" | 33 | EXCLUDE_FROM_WORLD = "1" |
@@ -33,6 +35,8 @@ EXCLUDE_FROM_WORLD = "1" | |||
33 | HDDDIR = "${S}/hddimg" | 35 | HDDDIR = "${S}/hddimg" |
34 | ISODIR = "${S}/iso" | 36 | ISODIR = "${S}/iso" |
35 | EFIIMGDIR = "${S}/efi_img" | 37 | EFIIMGDIR = "${S}/efi_img" |
38 | COMPACT_ISODIR = "${S}/iso.z" | ||
39 | COMPRESSISO ?= "0" | ||
36 | 40 | ||
37 | BOOTIMG_VOLUME_ID ?= "boot" | 41 | BOOTIMG_VOLUME_ID ?= "boot" |
38 | BOOTIMG_EXTRA_SPACE ?= "512" | 42 | BOOTIMG_EXTRA_SPACE ?= "512" |
@@ -97,18 +101,32 @@ build_iso() { | |||
97 | install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR} | 101 | install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR} |
98 | fi | 102 | fi |
99 | 103 | ||
104 | if [ "${COMPRESSISO}" = "1" ] ; then | ||
105 | # create compact directory, compress iso | ||
106 | mkdir -p ${COMPACT_ISODIR} | ||
107 | mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img | ||
108 | |||
109 | # move compact iso to iso, then remove compact directory | ||
110 | mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img | ||
111 | rm -Rf ${COMPACT_ISODIR} | ||
112 | mkisofs_compress_opts="-R -z -D -l" | ||
113 | else | ||
114 | mkisofs_compress_opts="-r" | ||
115 | fi | ||
116 | |||
100 | if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then | 117 | if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then |
101 | # PCBIOS only media | 118 | # PCBIOS only media |
102 | mkisofs -V ${BOOTIMG_VOLUME_ID} \ | 119 | mkisofs -V ${BOOTIMG_VOLUME_ID} \ |
103 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ | 120 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ |
104 | -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} -r \ | 121 | -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ |
122 | $mkisofs_compress_opts \ | ||
105 | ${MKISOFS_OPTIONS} ${ISODIR} | 123 | ${MKISOFS_OPTIONS} ${ISODIR} |
106 | else | 124 | else |
107 | # EFI only OR EFI+PCBIOS | 125 | # EFI only OR EFI+PCBIOS |
108 | mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \ | 126 | mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \ |
109 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ | 127 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ |
110 | -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ | 128 | -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ |
111 | -r ${MKISOFS_OPTIONS} \ | 129 | $mkisofs_compress_opts ${MKISOFS_OPTIONS} \ |
112 | -eltorito-alt-boot -eltorito-platform efi \ | 130 | -eltorito-alt-boot -eltorito-platform efi \ |
113 | -b efi.img -no-emul-boot \ | 131 | -b efi.img -no-emul-boot \ |
114 | ${ISODIR} | 132 | ${ISODIR} |
diff --git a/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb new file mode 100644 index 0000000000..1501307cdb --- /dev/null +++ b/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | # zisofs-tools-native OE build file | ||
2 | # Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
3 | SUMMARY = "A set of tools for iso file compression" | ||
4 | DESCRIPTION = "A set of tools for iso file compression" | ||
5 | HOMEPAGE = "http://http://freecode.com/projects/zisofs-tools" | ||
6 | SECTION = "console/utils" | ||
7 | LICENSE = "GPLv2" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
9 | |||
10 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2" | ||
11 | |||
12 | SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c" | ||
13 | SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3" | ||
14 | |||
15 | inherit native | ||
16 | |||
17 | do_install() { | ||
18 | oe_runmake install INSTALLROOT=${D} bindir=${bindir} | ||
19 | } | ||