Bug 3002

Summary: The kernel information is missing from the image details screen when opening an existing image using the 'Images' button
Product: [Build System, Metadata & Runtime] Hob Reporter: Belen Barros Pena <belen.barros.pena>
Component: hobAssignee: Ioana Grigoropol <ioanax.grigoropol>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.damian, cristian.iorga, dvhart, poky.bs.watcher, poky.watcher, valentin.popa
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard: Patch merged
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
blank-kernel-info.png
none
kernel-info-1.png
none
kernel-info-2.png
none
kernel-info-3.png
none
less-info.png none

Description Belen Barros Pena 2012-08-23 13:24:22 UTC
Created attachment 725 [details]
blank-kernel-info.png

I've been told we should be able to display the latest kernel. Screenshot attached.
Comment 1 Darren Hart 2012-08-24 02:51:25 UTC
There are a few factors to consider here. The kernel can either be a separate file in the tmp/deploy/images directory (bzImage-$VERSION-hash-$REVISION-$TIMESTAMP.bin) or included in the live image as vmlinuz.

Some information can be discovered from the separate bzImage file as:
$ strings tmp/deploy/images/bzImage-3.4.6+git1+7ff48aa47c50b6455d60ca93bc81260ce8fe1a1b_1+19f7e43b54aef08d58135ed2a897d77b624b320a-r4.0-qemux86-20120803224046.bin | grep 3.4.6
3.4.6-yocto-standard (dvhart@rage) #1 SMP PREEMPT Fri Aug 3 15:40:53 PDT 2012

The value "3.4.6-yocto-standard" coupled with the machine "qemux86" is a fairly complete description, althoug including the two commit IDs (meta-machine) would be ideal:

3.4.6-yocto-standard qemux86 7ff48aa47c50b6455d60ca93bc81260ce8fe1a1b 19f7e43b54aef08d58135ed2a897d77b624b320a

For the embedded kernel, this could still be accomplished using the mtools suite:

$ mcopy -i core-image-minimal-fri2-20120730232939.hddimg ::vmlinuz vmlinuz
$ strings vmlinuz | grep 3.2.18
3.2.18-yocto-standard (dvhart@rage) #1 SMP PREEMPT Mon Jul 30 11:03:43 PDT 2012
$ rm vmlinuz

However, the commit IDs will not be available from the embedded vmlinuz.

A more robust string to grep for would also be required of course.

Another approach would be to display something like "<embedded in image>" or a similar phrase for the kernel version information when using a live hddimg.


Another point that may need to be discussed is the use model here. How does the user get to this screen? Is it only after a successful build? Or can they get here if they download an image and somehow select it? If the latter, then the FileCreated field doesn't map very well.

Does this help you move forward?
Comment 2 Belen Barros Pena 2012-08-24 08:56:31 UTC
Hi Darren,

Thanks for the comment. Just a small clarification: we currently only display kernel information for qemu images. We added it to eliminate the kernel selection step when running qemu images in the emulator. Here is the original bug:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2476

Currently, Hob does not display kernel information for images built for non-qemu machines. Building live images for qemu machines doesn't seem to be a very common case, since right now the emulator cannot run live images. Still, I would rather display specific details (even without the commit id's) than a generic string. I have a question though: can you change the embedded kernel? If the answer is no, we should not show the 'change' button.

To be honest, I didn't give any thought to how kernel information should be displayed. I am happy to go with whatever you suggest. I've attached a couple of Hob screenshots so that you can see what's shown at the moment. If you have any suggestions on how to improve it, please let us know.

And about your question, you can retrieve information for any image, not only the ones you build yourself. Although for images you have not build or built in the past we display less details. I've also attached a screenshot for you to see (less-info.png). The 'Files created' field is still probably useful even if you have not built the image yourself, since it gives you the image types, but I agree that in that case the label doesn't work that well: since it is not your image, you have created nothing. If you have a better suggestion for this label (maybe 'Image types'?), please let me know.

Thanks!

Belen
Comment 3 Belen Barros Pena 2012-08-24 08:56:58 UTC
Created attachment 730 [details]
kernel-info-1.png
Comment 4 Belen Barros Pena 2012-08-24 08:57:16 UTC
Created attachment 731 [details]
kernel-info-2.png
Comment 5 Belen Barros Pena 2012-08-24 08:57:35 UTC
Created attachment 732 [details]
kernel-info-3.png
Comment 6 Belen Barros Pena 2012-08-24 08:58:03 UTC
Created attachment 733 [details]
less-info.png
Comment 7 Darren Hart 2012-09-27 19:47:00 UTC
Changing the kernel isn't likely to be useful at image creation time. "The kernel" includes both the kernel image itself as well as all the modules it may have installed in the root filesystem. Extricating this and rebuilding it after the build doesn't make sense. The time to change the kernel is during package selection when you can pick linux-yocto or linux-yocto-rt or linux-yocto-tiny and one of 3 versions of each.

Presenting "bzImage-atom-pc.bin" is basically useless as it adds no useful information.
Comment 8 Ioana Grigoropol 2012-09-28 09:09:41 UTC
Belen, could you please let me know what was decided for the kernel information value ? Which approach should be implemented ?

Thanks
Comment 9 Belen Barros Pena 2012-09-28 09:57:51 UTC
The reason why we are showing kernel information for qemu images is that, when running an image, users were asked to select which kernel to use. That made the (in theory) simple process of running a qemu image in the emulator a bit of a nightmare, since upon clicking 'run' users were presented with a file selection dialog without being told what was required from them (to select a kernel. See https://bugzilla.yoctoproject.org/show_bug.cgi?id=2155). I was also asked what if users wanted to select a different kernel (see https://bugzilla.yoctoproject.org/show_bug.cgi?id=2476) 

To address all this, we added the kernel information to the details screen for qemu images, so that when you click 'run' we assume the kernel to be used is the one shown and we skip the kernel selection process. We also added a 'change' button just in case you wanted to select a different kernel. 

If the above does not make sense or is unnecessary, let's get rid of it all. As long as users can run a qemu image in the emulator without being asked to select which kernel to use, I'm happy.
Comment 10 Darren Hart 2012-09-28 15:00:13 UTC
As the image contains kernel modules and the kernel modules are dependent on the kernel itself, images are therefore tied to a specific kernel. While there are reasons that selecting a kernel makes sense (iterative development), but that really isn't HOBs domain anyway as I understand it.
Comment 11 Belen Barros Pena 2012-09-28 15:12:00 UTC
Thanks, Darren!

If I understand correctly, neither selecting a kernel to run an image nor changing the kernel you are using make any sense in the case of Hob, so I vote for taking the kernel line out from the image details screen.

Darren: if you feel we should include the kernel information (without the 'change' functionality), let me know. We can open a bug for a future release and discuss which information is useful and how we should present it.




(In reply to comment #10)
> As the image contains kernel modules and the kernel modules are dependent on
> the kernel itself, images are therefore tied to a specific kernel. While
> there are reasons that selecting a kernel makes sense (iterative
> development), but that really isn't HOBs domain anyway as I understand it.
Comment 12 Darren Hart 2012-09-28 15:15:45 UTC
For the current release, I think the right thing to do is remove it entirely. If HOB sees more iterative development use cases, we can revisit this in the future. Note that if we do, there will likely be a lot more work to do than dialogs in HOB.
Comment 13 Belen Barros Pena 2012-09-28 15:20:02 UTC
Great. Ioana: whenever you can, could you remove the kernel information and the 'change' button?

Thanks!

(In reply to comment #12)
> For the current release, I think the right thing to do is remove it
> entirely. If HOB sees more iterative development use cases, we can revisit
> this in the future. Note that if we do, there will likely be a lot more work
> to do than dialogs in HOB.
Comment 14 Ioana Grigoropol 2012-09-28 16:12:31 UTC
Sent patch to list.
Comment 15 Ioana Grigoropol 2012-10-04 13:01:05 UTC
Patch merged
Comment 16 Belen Barros Pena 2012-10-04 14:14:18 UTC
verified