Skip to contentSkip to conversation

image: Add missing depends on virtual/kernel for depmod data

PATCH In review Richard Purdie 5 participants 8 messages Jan 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image: Add missing depends on virtual/kernel for depmod data

We need the depmod data so that the kernel depmod command works successfully at rootfs time. The fact this was working inconsistently is now highlighted after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

We fix it by adding the missing dependency.

meta/classes/image.bbclass +4 -2
index 22b6970..5b88f53 100644
@@ -72,8 +72,10 @@ LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
 LDCONFIGDEPEND_libc-uclibc = ""
 LDCONFIGDEPEND_libc-musl = ""
 
-do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
-do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
+do_rootfs[depends] += " \
+    makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \
+    virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \
+    virtual/kernel:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_packagedata"
 
 def command_variables(d):
#1 lore raw
Quoted 9 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully at rootfs time. The fact this was working inconsistently is now highlighted after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

We fix it by adding the missing dependency.

Looks good here.

Out of curiosity, was this hiding before, or did it only come about due to our recent moves to the work-shared kernel builds ?

Bruce

Quoted 22 lines
meta/classes/image.bbclass +4 -2
index 22b6970..5b88f53 100644
@@ -72,8 +72,10 @@ LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
  LDCONFIGDEPEND_libc-uclibc = ""
  LDCONFIGDEPEND_libc-musl = ""
 
-do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
-do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
+do_rootfs[depends] += " \
+    makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \
+    virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \
+    virtual/kernel:do_populate_sysroot"
  do_rootfs[recrdeptask] += "do_packagedata"
 
  def command_variables(d):
#2 lore raw
Quoted 11 lines · Bruce Ashfield
Quoted 10 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully
at rootfs time. The fact this was working inconsistently is now highlighted
after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

Quoted 6 lines
Quoted 1 line

We fix it by adding the missing dependency.

Looks good here.

Out of curiosity, was this hiding before, or did it only come about due to our recent moves to the work-shared kernel builds ?

I'm being dense I guess. I went to go verify what virtual/kernel do_populate_sysroot is doing in the current state of things, in order to be sure it copied over the right files, and I couldn't find it quickly. Where is this defined?

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#3 lore raw
Quoted 17 lines · Darren
Quoted 15 lines · Bruce Ashfield
Quoted 11 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully
at rootfs time. The fact this was working inconsistently is now highlighted
after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

We fix it by adding the missing dependency.

Looks good here.

Quoted 7 lines
Quoted 2 lines

Out of curiosity, was this hiding before, or did it only come about due to our recent moves to the work-shared kernel builds ?

I'm being dense I guess. I went to go verify what virtual/kernel do_populate_sysroot is doing in the current state of things, in order to be sure it copied over the right files, and I couldn't find it quickly. Where is this defined?

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=11ef55a93bd2bbd95e203fab3aa237322923ffd9

Specifically:

sysroot_stage_all () {
sysroot_stage_dir ${D}${datadir}/kernel-depmod ${SYSROOT_DESTDIR}${datadir}/kernel-depmod
}

Cheers,

Richard

Reviewed-by Darren Hart
#4 lore raw
Quoted 30 lines · Richard Purdie
Quoted 18 lines · Darren
Quoted 15 lines · Bruce Ashfield
Quoted 11 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully
at rootfs time. The fact this was working inconsistently is now highlighted
after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

We fix it by adding the missing dependency.

Looks good here.

Quoted 7 lines
Quoted 2 lines

Out of curiosity, was this hiding before, or did it only come about due to our recent moves to the work-shared kernel builds ?

I'm being dense I guess. I went to go verify what virtual/kernel do_populate_sysroot is doing in the current state of things, in order to be sure it copied over the right files, and I couldn't find it quickly. Where is this defined?

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=11ef55a93bd2bbd95e203
fab3aa237322923ffd9

Quoted 6 lines

Specifically:

sysroot_stage_all () {
sysroot_stage_dir ${D}${datadir}/kernel-depmod
${SYSROOT_DESTDIR}${datadir}/kernel-depmod
}

Right, I thought of this while driving in :-) -ENOCOFFEE

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#5 lore raw
In reply to Bruce Ashfield
Quoted 9 lines · Bruce Ashfield
Quoted 8 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully at rootfs time. The fact this was working inconsistently is now highlighted after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

Quoted 6 lines
Quoted 1 line

We fix it by adding the missing dependency.

Looks good here.

Out of curiosity, was this hiding before, or did it only come about due to our recent moves to the work-shared kernel builds ?

It was hiding before, it just used to silently do things differently depending on whether certain files were present or not. Now we get a hard error.

Cheers,

Richard

#6 lore raw
In reply to Richard Purdie
Quoted 9 lines · Richard Purdie

We need the depmod data so that the kernel depmod command works successfully at rootfs time. The fact this was working inconsistently is now highlighted after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

We fix it by adding the missing dependency.

On a similar note, I have a patch that makes kernel depmod optional when generating images. I used it to create an image that can be used as a container without also including kernel depmod info. I shall post it.

#7 lore raw
Quoted 12 lines · On Tuesday 27 January 2015 11:20:53 Dan McGregor wrote:

On 27 January 2015 at 09:29, Richard Purdie

Quoted 9 lines · <[email protected]> wrote:

We need the depmod data so that the kernel depmod command works successfully at rootfs time. The fact this was working inconsistently is now highlighted after the command was made to error out. A simple test case is:

bitbake virtual/kernel image
bitbake vrituak/kernel -c clean
bitbake image -c rootfs -f

Quoted 6 lines
Quoted 1 line

We fix it by adding the missing dependency.

On a similar note, I have a patch that makes kernel depmod optional when generating images. I used it to create an image that can be used as a container without also including kernel depmod info. I shall post it.

Thanks - that's part of a task that's been on my list for a while:

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

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre