Bug 11842 - Setting NOHDD=1 and NOISO=1 no longer allows you to build a >4GB image
Summary: Setting NOHDD=1 and NOISO=1 no longer allows you to build a >4GB image
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-26 21:17 UTC by brian avery
Modified: 2017-08-09 08:55 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2017-07-26 21:17:30 UTC
Sometimes we need to make an x86 image that is greater than 4GB. On pyro the following works:
in local.conf:
IMAGE_ROOTFS_EXTRA_SPACE = "10000000"                                                                                                 NOHDD="1"                                                                                                                             NOISO="1

In master , you now get the  4 GB error even with the above added to local.conf

A git bisect shows:
Summary: There was 1 WARNING message shown.                                                                                           
ec251ee98fdbf83bb7f36b179ba3978d7c31b66e is the first bad commit                                                                      
commit ec251ee98fdbf83bb7f36b179ba3978d7c31b66e                                                                                       
Author: Joshua Lock <joshua.g.lock@intel.com>                                                                                         
Date:   Wed Jul 12 20:08:21 2017 +0100                                                                                                
                                                                                                                                      
    x86-base: build only hddimg, rather than iso and hddimg, for x86 machines                                                         
                                                                                                                                      
    (From OE-Core rev: 1e05d488f9f09230d2f7cd3f43a385ad206066f8)                                                                      
                                                                                                                                      
    Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>                                                                              
    Signed-off-by: Ross Burton <ross.burton@intel.com>                                                                                
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>                                                                
                                                                                                                                      
:040000 040000 aaa11bdbad4a90bbf9dcb400bb1110be30ab8d61 8d34cec7eb350d7f06f48a4ef888bc3efe73905e M      meta                          
bisect run success                                                                                                                    
bavery@echidna:~/work/esdk-menuconfig/poky$ git status                                                                                
HEAD detached at 1b11a65                                                                                                              
You are currently bisecting, started from branch 'master'.                                                                            
  (use "git bisect reset" to get back to the original branch)
Comment 1 brian avery 2017-07-26 21:18:12 UTC
adding todor since he ran across this first.
Comment 2 Joshua Lock 2017-07-27 11:01:51 UTC
The logic of build_live() in image.bbclass may be incorrect. 

It's overriding the NOISO and NOHDD settings when resp. iso and hddimg are in IMAGE_FSTYPES but doesn't do so when live is in IMAGE_FSTYPES.

It's not clear to me on first read through whether build_live() should be setting the NOISO and NOHDD values in d, or just using their value to determine its own return value.
Comment 3 Ed Bartosh 2017-07-28 11:14:18 UTC
I was able to produce more than 9.6Gb ext4 image on master (commit id 3c1c4ceaa470957fe5633d65215f165a38d61be7) with these settings in local.conf:

NOHDD="1"
NOISO="1"
IMAGE_ROOTFS_EXTRA_SPACE = "10000000"

$ ls -lh tmp/deploy/images/qemux86-64/
total 28M
lrwxrwxrwx 2 ed users   76 Jul 28 13:00 bzImage -> bzImage--4.10.17+git0+e92bd55409_6648a34e00-r0-qemux86-64-20170728093839.bin
-rw-r--r-- 2 ed users 6.7M Jul 28 13:00 bzImage--4.10.17+git0+e92bd55409_6648a34e00-r0-qemux86-64-20170728093839.bin
lrwxrwxrwx 2 ed users   76 Jul 28 13:00 bzImage-qemux86-64.bin -> bzImage--4.10.17+git0+e92bd55409_6648a34e00-r0-qemux86-64-20170728093839.bin
-rw-r--r-- 2 ed users 1.4K Jul 28 13:34 core-image-minimal-qemux86-64-20170728103327.qemuboot.conf
-rw-r--r-- 2 ed users 9.6G Jul 28 13:34 core-image-minimal-qemux86-64-20170728103327.rootfs.ext4
-rw-r--r-- 2 ed users  905 Jul 28 13:34 core-image-minimal-qemux86-64-20170728103327.rootfs.manifest
-rw-r--r-- 2 ed users 3.2M Jul 28 13:34 core-image-minimal-qemux86-64-20170728103327.rootfs.tar.bz2
-rw-r--r-- 1 ed users  89K Jul 28 13:34 core-image-minimal-qemux86-64-20170728103327.testdata.json
lrwxrwxrwx 2 ed users   56 Jul 28 13:34 core-image-minimal-qemux86-64.ext4 -> core-image-minimal-qemux86-64-20170728103327.rootfs.ext4
lrwxrwxrwx 2 ed users   60 Jul 28 13:34 core-image-minimal-qemux86-64.manifest -> core-image-minimal-qemux86-64-20170728103327.rootfs.manifest
lrwxrwxrwx 2 ed users   58 Jul 28 13:34 core-image-minimal-qemux86-64.qemuboot.conf -> core-image-minimal-qemux86-64-20170728103327.qemuboot.conf
lrwxrwxrwx 2 ed users   59 Jul 28 13:34 core-image-minimal-qemux86-64.tar.bz2 -> core-image-minimal-qemux86-64-20170728103327.rootfs.tar.bz2
lrwxrwxrwx 1 ed users   58 Jul 28 13:34 core-image-minimal-qemux86-64.testdata.json -> core-image-minimal-qemux86-64-20170728103327.testdata.json
-rw-r--r-- 2 ed users 6.1M Jul 28 13:00 modules--4.10.17+git0+e92bd55409_6648a34e00-r0-qemux86-64-20170728093839.tgz
lrwxrwxrwx 2 ed users   76 Jul 28 13:00 modules-qemux86-64.tgz -> modules--4.10.17+git0+e92bd55409_6648a34e00-r0-qemux86-64-20170728093839.tgz

Please, clarify which image you're trying to produce and which error did you get. Thanks.
Comment 4 Ed Bartosh 2017-07-28 12:29:00 UTC
Reproduced on genericx86 machine.
Comment 5 Ed Bartosh 2017-07-28 13:10:07 UTC
NOHDD and NOISO variables seem to influence only 'live' image build. Their purpose is to disable generation of hdd or iso only if live image build is requested. By default both hdd and iso are generated if 'live' is in IMAGE_FSTYPES. 

In this particular case hddimg image is explicitly requested, but live image is not, so NOHDD=1 has not effect.

I'd suggest this change to make user experience less confusing:
diff --git a/meta/conf/machine/include/x86-base.inc b/meta/conf/machine/include/x86-base.inc
index a29641a..bc0c27b 100644
--- a/meta/conf/machine/include/x86-base.inc
+++ b/meta/conf/machine/include/x86-base.inc
@@ -10,7 +10,8 @@ MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \
 
 MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
 
-IMAGE_FSTYPES ?= "hddimg"
+IMAGE_FSTYPES ?= "live"
+NOISO ?= "1"
 
 KERNEL_IMAGETYPE ?= "bzImage"


It produces the same result (only hddimg is built), but allows usage of NOHDD and NOISO variables.

Please, let me know if this fixes this issue for you and I'll send this patch for review.
Comment 6 Todor Minchev 2017-07-28 17:29:45 UTC
+1. The patch looks good and does what it should.

@ed - are you going to send it upstream?
Comment 8 Ed Bartosh 2017-08-09 08:55:29 UTC
The fix has been merged into poky master. Commit id: b8cb2bb17508020899a5ffaa29aee941922d68e0