Skip to contentSkip to conversation

image.bbclass: depends on virtual/kernel

PATCH NAK [email protected] 6 participants 10 messages Nov 22, 2013 – Nov 25, 2013

lore
Share & tools
lore
#0 lore raw

cover image.bbclass: depends on virtual/kernel

From: Chen Qi <[email protected]>

The following changes since commit d60b4ff3517487bd111c6d7e1410882280229377:

yocto-bsp: Add missing format specifier in bblayers error message (2013-11-21 14:20:28 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/image-kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/image-kernel

Chen Qi (1):
image.bbclass: depends on virtual/kernel

 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 image.bbclass: depends on virtual/kernel

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

---
 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +1 -1
index bc60f0d..ccb6bf3 100644
@@ -10,7 +10,7 @@ inherit gzipnative
 
 LICENSE = "MIT"
 PACKAGES = ""
-DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross"
+DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross virtual/kernel"
 RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}"
 RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
 
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 8 lines · On Fri, Nov 22, 2013 at 01:39:02PM +0800, [email protected] wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Even when it's not really build time requirement for images I understand the scenario above and this seems like better place than packagegroup where it was before.

My only concern is small initramfs images like meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb:inherit image

which could in turn be DEPENDS of real virtual/kernel causing circular dependency.

Quoted 26 lines
---
 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +1 -1
index bc60f0d..ccb6bf3 100644
@@ -10,7 +10,7 @@ inherit gzipnative
 
 LICENSE = "MIT"
 PACKAGES = ""
-DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross"
+DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross virtual/kernel"
 RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}"
 RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
 
Signature · 6 lines
1.7.9.5

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, 2013-11-22 at 13:39 +0800, [email protected] wrote:

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Not all images do actually need a kernel, and this will cause a dependency loop for old-style initramfs images that are dependencies of virtual/kernel itself.

If you just want to ensure that the kernel is available at deployment time, perhaps you could make virtual/kernel be a dependency of do_deploy specifically (rather than do_configure as you have it here). Alternatively, if this is a specific problem for core-image-minimal, maybe the virtual/kernel dependency should just go in there.

p.

#4 lore raw
Quoted 12 lines · Phil Blundell
Quoted 6 lines · On Fri, 2013-11-22 at 13:39 +0800, [email protected] wrote:

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Not all images do actually need a kernel, and this will cause a dependency loop for old-style initramfs images that are dependencies of virtual/kernel itself.

Quoted 5 lines

If you just want to ensure that the kernel is available at deployment time, perhaps you could make virtual/kernel be a dependency of do_deploy specifically (rather than do_configure as you have it here). Alternatively, if this is a specific problem for core-image-minimal, maybe the virtual/kernel dependency should just go in there.

I think it just happens that core-image-minimal doesn't install any kernel modules so shows the symptoms.

The best thing to do here is probably have a dependency on specifically on virtual/kernel:do_deploy since anyone building an image would usually want to trigger that. I appreciate there are some cases where you wouldn't but those are in a minority.

Cheers,

Richard

#5 lore raw
In reply to [email protected]
Quoted 10 lines · On Fri, Nov 22, 2013 at 3:39 AM, <[email protected]> wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

If I have a board without modules there's no need to have the depends. Why you need this?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw
Quoted 10 lines · Otavio Salvador
Quoted 9 lines · On Fri, Nov 22, 2013 at 3:39 AM, <[email protected]> wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Quoted 5 lines
Quoted 1 line

If I have a board without modules there's no need to have the depends. Why you need this?

The first quenstion in my mind when I read the post:

Odd...wasn't core-image-minimal purposedly lean, mutilated and without kernel modules ?
(Not that really 'used' it, just booted 'cause was small and could always fit on nand/nor)

It has always been like this: if one needs the kernel and the modules can add that in his machine.conf.
For more demanding tasks, the next logical step is core-image-base.

My 2 cents

Andrea

Quoted 8 lines

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#7 lore raw
Quoted 16 lines · Andrea Adami
Quoted 10 lines · Otavio Salvador
Quoted 9 lines · On Fri, Nov 22, 2013 at 3:39 AM, <[email protected]> wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Quoted 4 lines
Quoted 1 line

If I have a board without modules there's no need to have the depends. Why you need this?

Quoted 6 lines

The first quenstion in my mind when I read the post:

Odd...wasn't core-image-minimal purposedly lean, mutilated and without kernel modules ?
(Not that really 'used' it, just booted 'cause was small and could always fit on nand/nor)

What I want to do here is to trigger building of kernel when building out an image. I'm not proposing to make all images have kernel -modules installed.

Quoted 2 lines

It has always been like this: if one needs the kernel and the modules can add that in his machine.conf.

Previously, the kernel is built out by default because packagegroup-core-boot has a dependency on it. Now the dependency is gone.

I'm not talking about installing kernel modules onto images.

Best Regards,
Chen Qi

Quoted 18 lines

For more demanding tasks, the next logical step is core-image-base.

My 2 cents

Andrea

Quoted 8 lines

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
Quoted 23 lines · ChenQi
Quoted 22 lines · Andrea Adami
Quoted 12 lines · Otavio Salvador
Quoted 10 lines · On Fri, Nov 22, 2013 at 3:39 AM, <[email protected]> wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Quoted 5 lines
Quoted 1 line

If I have a board without modules there's no need to have the depends. Why you need this?

The first quenstion in my mind when I read the post:

Quoted 8 lines
Quoted 4 lines

Odd...wasn't core-image-minimal purposedly lean, mutilated and without kernel modules ?
(Not that really 'used' it, just booted 'cause was small and could always fit on nand/nor)

What I want to do here is to trigger building of kernel when building out an image. I'm not proposing to make all images have kernel -modules installed.

Yes but you're proposing *all* images to depends on kernel. This is not a need.

Quoted 8 lines
Quoted 2 lines

It has always been like this: if one needs the kernel and the modules can add that in his machine.conf.

Previously, the kernel is built out by default because packagegroup-core-boot has a dependency on it. Now the dependency is gone.

I'm not talking about installing kernel modules onto images.

and I am not keen to have all image depending on kernel build. Sorry.

Nack!

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#9 lore raw
Quoted 39 lines · Otavio Salvador
Quoted 23 lines · ChenQi
Quoted 22 lines · Andrea Adami
Quoted 12 lines · Otavio Salvador
Quoted 10 lines · On Fri, Nov 22, 2013 at 3:39 AM, <[email protected]> wrote:

From: Chen Qi <[email protected]>

Add 'virtual/kernel' to DEPENDS in image.bbclass so that the kernel can get built by default. Otherwise, the kernel will not get built unless it's required by other packages like v86d. As a result, if we build 'core-image-minimal' for qemumips, the kernel is not built, and we have 'bitbake linux-yocto' before we can use runqemu to start the target.

Quoted 5 lines
Quoted 1 line

If I have a board without modules there's no need to have the depends. Why you need this?

The first quenstion in my mind when I read the post:

Quoted 8 lines
Quoted 4 lines

Odd...wasn't core-image-minimal purposedly lean, mutilated and without kernel modules ?
(Not that really 'used' it, just booted 'cause was small and could always fit on nand/nor)

What I want to do here is to trigger building of kernel when building out an image. I'm not proposing to make all images have kernel -modules installed.

Yes but you're proposing *all* images to depends on kernel. This is not a need.

Quoted 4 lines
Quoted 2 lines

It has always been like this: if one needs the kernel and the modules can add that in his machine.conf.

Quoted 8 lines
Quoted 4 lines

Previously, the kernel is built out by default because packagegroup-core-boot has a dependency on it. Now the dependency is gone.

I'm not talking about installing kernel modules onto images.

and I am not keen to have all image depending on kernel build. Sorry.

Nack!

Right now we have a fairly serious regression where the documented use cases in the manual don't work and people find that behaviours that used to work no longer do. This is quite damaging.

I'd appreciate working towards a constructive resolution of the regression, thanks.

Richard