Bug 5581

Summary: Kernel file is not generated under tmp/deploy/images/machine
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ionut Chisanovici <ionutx.chisanovici>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: bluelightning, dvhart, poky.bs.watcher, poky.watcher, richard.purdie, yi.zhao
Version: 1.6   
Target Milestone: 1.6 M1   
Hardware: x86   
OS: mips   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ionut Chisanovici 2013-11-21 14:20:36 UTC
I tried to build some core-image-minimal images for qemuppc and qemumips machines but I cannot start the machines with runqemu as there is no kernel files generated under tmp/deploy/images/machine
There is no bzImage.bin or vmlinux.bin files.

Build Configuration:
BB_VERSION        = "1.21.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "powerpc-poky-linux"
MACHINE           = "qemuppc"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20131121"
TUNE_FEATURES     = "m32 fpu-hard ppc7400 altivec"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:215dab864e7cf74394840621ad0754db593708f1"

[ionut@ionut-fedora build]$ runqemu qemuppc

Continuing with the following parameters:
KERNEL: [/home/ionut/work/poky/build/tmp/deploy/images/qemuppc/vmlinux-qemuppc.bin]
ROOTFS: [/home/ionut/work/poky/build/tmp/deploy/images/qemuppc/core-image-minimal-qemuppc.ext3]
FSTYPE: [ext3]
Acquiring lockfile for tap0...
Using preconfigured tap device 'tap0'
If this is not intended, use flock on /tmp/qemu-tap-locks/tap0.lock to make runqemu skip tap0.
Error: Kernel image file /home/ionut/work/poky/build/tmp/deploy/images/qemuppc/vmlinux-qemuppc.bin doesn't exist

[ionut@ionut-fedora qemuppc]$ pwd
/home/ionut/work/poky/build/tmp/deploy/images/qemuppc
[ionut@ionut-fedora qemuppc]$ ll
total 9092
-rw-r--r-- 1 ionut ionut 8388608 Nov 21 16:01 core-image-minimal-qemuppc-20131121133331.rootfs.ext3
-rw-r--r-- 1 ionut ionut 2397193 Nov 21 16:01 core-image-minimal-qemuppc-20131121133331.rootfs.tar.bz2
lrwxrwxrwx 1 ionut ionut      53 Nov 21 16:01 core-image-minimal-qemuppc.ext3 -> core-image-minimal-qemuppc-20131121133331.rootfs.ext3
lrwxrwxrwx 1 ionut ionut      56 Nov 21 16:01 core-image-minimal-qemuppc.tar.bz2 -> core-image-minimal-qemuppc-20131121133331.rootfs.tar.bz2
-rw-r--r-- 1 ionut ionut     294 Nov 21 16:01 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt

Also on Ubuntu 13:

Build Configuration:
BB_VERSION        = "1.21.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.04"
TARGET_SYS        = "mips-poky-linux"
MACHINE           = "qemumips"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20131121"
TUNE_FEATURES     = "o32 bigendian fpu-hard mips32"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:215dab864e7cf74394840621ad0754db593708f1"

ionut@ionut-ubuntu:~/work/poky/build$ runqemu qemumips

Continuing with the following parameters:
KERNEL: [/home/ionut/work/poky/build/tmp/deploy/images/qemumips/vmlinux-qemumips.bin]
ROOTFS: [/home/ionut/work/poky/build/tmp/deploy/images/qemumips/core-image-minimal-qemumips.ext3]
FSTYPE: [ext3]
Setting up tap interface under sudo
[sudo] password for ionut: 
Acquiring lockfile for tap0...
Error: Kernel image file /home/ionut/work/poky/build/tmp/deploy/images/qemumips/vmlinux-qemumips.bin doesn't exist

ionut@ionut-ubuntu:~/work/poky/build$ cd tmp/deploy/images/qemumips/
ionut@ionut-ubuntu:~/work/poky/build/tmp/deploy/images/qemumips$ ll
total 9676
drwxr-xr-x 2 ionut ionut    4096 nov 21 16:02 ./
drwxr-xr-x 3 ionut ionut    4096 nov 21 16:01 ../
-rw-r--r-- 1 ionut ionut 8780800 nov 21 16:02 core-image-minimal-qemumips-20131121133130.rootfs.ext3
-rw-r--r-- 1 ionut ionut 2385132 nov 21 16:02 core-image-minimal-qemumips-20131121133130.rootfs.tar.bz2
lrwxrwxrwx 1 ionut ionut      54 nov 21 16:02 core-image-minimal-qemumips.ext3 -> core-image-minimal-qemumips-20131121133130.rootfs.ext3
lrwxrwxrwx 1 ionut ionut      57 nov 21 16:02 core-image-minimal-qemumips.tar.bz2 -> core-image-minimal-qemumips-20131121133130.rootfs.tar.bz2
-rw-r--r-- 1 ionut ionut     294 nov 21 16:01 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
Comment 2 Darren Hart 2013-11-21 18:01:33 UTC
Do you see this in a clean build environment?

Did you delete the vmlinux* and modules files manually prior to the build?

Do the files get created if you run "bitbake linux-yocto -c deploy -f" ?
Comment 3 Ionut Chisanovici 2013-11-22 09:15:37 UTC
(In reply to comment #2)
> Do you see this in a clean build environment?

Yes, every time I did the builds above the envs were cleaned.

> 
> Did you delete the vmlinux* and modules files manually prior to the build?

No I didn't do that.

> 
> Do the files get created if you run "bitbake linux-yocto -c deploy -f" ?

Yes they are:

[ionut@ionut-fedora qemuppc]$ ll
total 138680
-rw-r--r-- 1 ionut ionut  8388608 Nov 21 16:01 core-image-minimal-qemuppc-20131121133331.rootfs.ext3
-rw-r--r-- 1 ionut ionut  2397193 Nov 21 16:01 core-image-minimal-qemuppc-20131121133331.rootfs.tar.bz2
lrwxrwxrwx 1 ionut ionut       53 Nov 21 16:01 core-image-minimal-qemuppc.ext3 -> core-image-minimal-qemuppc-20131121133331.rootfs.ext3
lrwxrwxrwx 1 ionut ionut       56 Nov 21 16:01 core-image-minimal-qemuppc.tar.bz2 -> core-image-minimal-qemuppc-20131121133331.rootfs.tar.bz2
-rw-rw-r-- 2 ionut ionut 35362028 Nov 22 11:15 modules--3.10.17+git0+6ad20f049a_3e99f981fe-r0-qemuppc-20131122080528.tgz
lrwxrwxrwx 1 ionut ionut       73 Nov 22 11:15 modules-qemuppc.tgz -> modules--3.10.17+git0+6ad20f049a_3e99f981fe-r0-qemuppc-20131122080528.tgz
-rw-rw-r-- 2 ionut ionut      294 Nov 22 11:15 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
lrwxrwxrwx 1 ionut ionut       73 Nov 22 11:15 vmlinux -> vmlinux--3.10.17+git0+6ad20f049a_3e99f981fe-r0-qemuppc-20131122080528.bin
-rw-r--r-- 2 ionut ionut 97386141 Nov 22 11:15 vmlinux--3.10.17+git0+6ad20f049a_3e99f981fe-r0-qemuppc-20131122080528.bin
lrwxrwxrwx 1 ionut ionut       73 Nov 22 11:15 vmlinux-qemuppc.bin -> vmlinux--3.10.17+git0+6ad20f049a_3e99f981fe-r0-qemuppc-20131122080528.bin

ionut@ionut-ubuntu:~/work/poky/build/tmp/deploy/images/qemumips$ ll
total 130000
drwxrwxr-x 2 ionut ionut     4096 nov 22 10:22 ./
drwxr-xr-x 3 ionut ionut     4096 nov 21 16:01 ../
-rw-r--r-- 1 ionut ionut  8780800 nov 21 16:02 core-image-minimal-qemumips-20131121133130.rootfs.ext3
-rw-r--r-- 1 ionut ionut  2385132 nov 21 16:02 core-image-minimal-qemumips-20131121133130.rootfs.tar.bz2
lrwxrwxrwx 1 ionut ionut       54 nov 21 16:02 core-image-minimal-qemumips.ext3 -> core-image-minimal-qemumips-20131121133130.rootfs.ext3
lrwxrwxrwx 1 ionut ionut       57 nov 21 16:02 core-image-minimal-qemumips.tar.bz2 -> core-image-minimal-qemumips-20131121133130.rootfs.tar.bz2
-rw-rw-r-- 2 ionut ionut 31574134 nov 22 10:22 modules--3.10.17+git0+6ad20f049a_e87d2cb44b-r0-qemumips-20131122080702.tgz
lrwxrwxrwx 1 ionut ionut       74 nov 22 10:22 modules-qemumips.tgz -> modules--3.10.17+git0+6ad20f049a_e87d2cb44b-r0-qemumips-20131122080702.tgz
-rw-rw-r-- 2 ionut ionut      294 nov 22 10:22 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
lrwxrwxrwx 1 ionut ionut       74 nov 22 10:22 vmlinux -> vmlinux--3.10.17+git0+6ad20f049a_e87d2cb44b-r0-qemumips-20131122080702.bin
-rw-r--r-- 2 ionut ionut 91622868 nov 22 10:22 vmlinux--3.10.17+git0+6ad20f049a_e87d2cb44b-r0-qemumips-20131122080702.bin
lrwxrwxrwx 1 ionut ionut       74 nov 22 10:22 vmlinux-qemumips.bin -> vmlinux--3.10.17+git0+6ad20f049a_e87d2cb44b-r0-qemumips-20131122080702.bin
Comment 4 Darren Hart 2013-11-22 18:55:55 UTC
So you do a clean checkout, no shared sstate, run "bitbake core-image-minimal", it completes without errors and the vmlinux files are not deployed in tmp/deploy/images/$MACHINE. You then run "bitbake linux-yocto -c deploy -f", and the files appear?

Is that correct?

I haven't been able to reproduce that from a clean build.

Paul, is there possibly some stamp breakage happening here?
Comment 5 Ionut Chisanovici 2013-11-25 07:53:25 UTC
(In reply to comment #4)
> So you do a clean checkout, no shared sstate, run "bitbake
> core-image-minimal", it completes without errors and the vmlinux files are
> not deployed in tmp/deploy/images/$MACHINE. You then run "bitbake
> linux-yocto -c deploy -f", and the files appear?
> 
> Is that correct?

Yes, that's correct.
Comment 6 Ionut Chisanovici 2013-11-26 10:29:52 UTC
Darren, this is happening on for the qemuppc and qemumips machines.
For qemux86 machines, the kernel files are generate.

Cheers,
Ionut
Comment 7 Darren Hart 2013-11-26 16:21:59 UTC
Yes, I understand. I have been unable to reproduce with qemumips. Hrm.
Comment 8 Paul Eggleton 2013-11-27 21:25:03 UTC
I'm not sure why this is happening, but several folks have reported it. Tracking the caue down, assuming it can be reproduced currently, should be pretty easy - use "git bisect" to find when "bitbake -g" doesn't report linux-yocto.do_deploy in task-depends.dot.
Comment 9 Richard Purdie 2013-11-28 15:35:38 UTC
*** Bug 5587 has been marked as a duplicate of this bug. ***
Comment 10 Richard Purdie 2013-11-29 10:53:12 UTC
I'm pretty sure this is from http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bba44c613f12079081fb0a20cbd2e99adc5276c3 and is an unintended side effect.
Comment 11 Richard Purdie 2013-11-29 16:25:23 UTC
Confirmed that this commit was the problem. There is magic in base.bbclass for do_build:

do_build[recrdeptask] = "do_deploy"

which meant that once virtual/kernel was into DEPENDS, it ended up getting its deploy task run. I've sent out a patch which adds in a proper dependency in the right place.
Comment 13 Ionut Chisanovici 2013-12-02 10:32:27 UTC
This is now fixed for both qemuppc and qemumips machines.
Verified.