diff options
author | Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2015-07-10 17:41:03 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-10 12:40:29 -0700 |
commit | 661734759e73abd86d8184ae1dc4e91ba9cac83d (patch) | |
tree | b6b2c99290def1776b66692a331eafbc63b77573 /meta/classes/bootimg.bbclass | |
parent | d00f88b8ebad3064b69ad7986b4443568bb714fb (diff) | |
download | poky-661734759e73abd86d8184ae1dc4e91ba9cac83d.tar.gz |
bootimg.bbclass:iso: determine the -iso-level only if there is a rootfs
It may be possible that some bootable images do not use a rootfs; this
may be the case if the bootable image utilize only an initrd for all its
needs.
If there is not rootfs, the size calculation will fail. Furthermore, given
that the iso9660 conformance level is determined using the size of rootfs,
it makes sense to not make the calculation if there is not such rootfs.
(From OE-Core rev: 57064ac9ccd8a3783789d11feb5a51351cd924bf)
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/bootimg.bbclass')
-rw-r--r-- | meta/classes/bootimg.bbclass | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index ebc927edc7..5adcacc0f3 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass | |||
@@ -142,11 +142,14 @@ build_iso() { | |||
142 | # when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need | 142 | # when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need |
143 | # leave a few space for other files. | 143 | # leave a few space for other files. |
144 | mkisofs_iso_level="" | 144 | mkisofs_iso_level="" |
145 | rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img` | 145 | |
146 | # 4080218931 = 3.8 * 1024 * 1024 * 1024 | 146 | if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then |
147 | if [ $rootfs_img_size -gt 4080218931 ]; then | 147 | rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img` |
148 | bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs" | 148 | # 4080218931 = 3.8 * 1024 * 1024 * 1024 |
149 | mkisofs_iso_level="-iso-level 3" | 149 | if [ $rootfs_img_size -gt 4080218931 ]; then |
150 | bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs" | ||
151 | mkisofs_iso_level="-iso-level 3" | ||
152 | fi | ||
150 | fi | 153 | fi |
151 | 154 | ||
152 | if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then | 155 | if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then |