summaryrefslogtreecommitdiffstats
path: root/meta/classes/bootimg.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-06-29 20:06:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-01 15:40:00 +0100
commitb3c79c4d0f1aaed5b2901ce6d87bd3348ca3435d (patch)
treeec055388712d800a177220853f7434c0600bc064 /meta/classes/bootimg.bbclass
parent53ddebed1b2a1f677778344c52d69af1e6fde77b (diff)
downloadpoky-b3c79c4d0f1aaed5b2901ce6d87bd3348ca3435d.tar.gz
bootimg.bbclass:iso: use mkisofs -iso-level 3 for large iso
There will be problems when rootfs.img is larger than 4GB: mkisofs: Value too large for defined data type. File /path/to/iso/rootfs.img is too large for current mkisofs settings - ignoring And will get a wrong iso. Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3 when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need leave a few space for other files. [YOCTO #6449] (From OE-Core rev: 40cdf918dc2507a1270a4d933b2c2f46a514d6e2) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/bootimg.bbclass')
-rw-r--r--meta/classes/bootimg.bbclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 4abe00e944..605edc911e 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -136,19 +136,30 @@ build_iso() {
136 mkisofs_compress_opts="-r" 136 mkisofs_compress_opts="-r"
137 fi 137 fi
138 138
139 # Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
140 # when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
141 # leave a few space for other files.
142 mkisofs_iso_level=""
143 rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img`
144 # 4080218931 = 3.8 * 1024 * 1024 * 1024
145 if [ $rootfs_img_size -gt 4080218931 ]; then
146 bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs"
147 mkisofs_iso_level="-iso-level 3"
148 fi
149
139 if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then 150 if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
140 # PCBIOS only media 151 # PCBIOS only media
141 mkisofs -V ${BOOTIMG_VOLUME_ID} \ 152 mkisofs -V ${BOOTIMG_VOLUME_ID} \
142 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ 153 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
143 -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ 154 -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
144 $mkisofs_compress_opts \ 155 $mkisofs_compress_opts \
145 ${MKISOFS_OPTIONS} ${ISODIR} 156 ${MKISOFS_OPTIONS} $mkisofs_iso_level ${ISODIR}
146 else 157 else
147 # EFI only OR EFI+PCBIOS 158 # EFI only OR EFI+PCBIOS
148 mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \ 159 mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
149 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ 160 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
150 -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ 161 -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
151 $mkisofs_compress_opts ${MKISOFS_OPTIONS} \ 162 $mkisofs_compress_opts ${MKISOFS_OPTIONS} $mkisofs_iso_level \
152 -eltorito-alt-boot -eltorito-platform efi \ 163 -eltorito-alt-boot -eltorito-platform efi \
153 -b efi.img -no-emul-boot \ 164 -b efi.img -no-emul-boot \
154 ${ISODIR} 165 ${ISODIR}