Re: [OE-core] [PATCH RFC] kernel.bbclass: symlink initramfs kernel bundle to kernel

2017-01-04 Thread Bruce Ashfield

On 2017-01-04 3:57 PM, California Sullivan wrote:

Image creation seems to always grab ${type} (usually bzImage), even if
we specifically use INITRAMFS_IMAGE_BUNDLE to create a bundled
initramfs/kernel. Work around this by linking ${type}.initramfs to
${type} as a final step when it exists.

Signed-off-by: California Sullivan 
---
I've been experimenting with initramfs stuff lately and discovered that
despite the bundled initramfs being built, it isn't being used by image
creation by default. This is one way to solve the issue, but ultimately
its probably a deficiency with image creation. Anyone with more
knowledge in this area have some thoughts?


I'm also not clear why the image creation wouldn't be grabbing whatever
is named in the INITRAMFS variables.

Is there some interaction between the python in image.bbclass and 
kernel.bbclass ? I see both trying to set the depends on

do_image_complete when INITRAMFS_IMAGE is defined.

.. but yah, other than creating the dependency on the initramfs build,
I don't see the image creation with any extra conditionals to switch to
the initramfs bundled kernel.

So your change should hold up, but I agree it doesn't feel right.

Bruce



 meta/classes/kernel.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3630042..5b5a642 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -618,6 +618,10 @@ kernel_do_deploy() {
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs 
${DEPLOYDIR}/${initramfs_base_name}.bin
ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${initramfs_symlink_name}.bin
+   if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+   echo "INITRAMFS_IMAGE_BUNDLE is set. Linking to 
${type}..."
+   ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${type}
+   fi
fi
done
 }



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH RFC] kernel.bbclass: symlink initramfs kernel bundle to kernel

2017-01-04 Thread California Sullivan
Image creation seems to always grab ${type} (usually bzImage), even if
we specifically use INITRAMFS_IMAGE_BUNDLE to create a bundled
initramfs/kernel. Work around this by linking ${type}.initramfs to
${type} as a final step when it exists.

Signed-off-by: California Sullivan 
---
I've been experimenting with initramfs stuff lately and discovered that
despite the bundled initramfs being built, it isn't being used by image
creation by default. This is one way to solve the issue, but ultimately
its probably a deficiency with image creation. Anyone with more
knowledge in this area have some thoughts?

 meta/classes/kernel.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3630042..5b5a642 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -618,6 +618,10 @@ kernel_do_deploy() {
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs 
${DEPLOYDIR}/${initramfs_base_name}.bin
ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${initramfs_symlink_name}.bin
+   if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+   echo "INITRAMFS_IMAGE_BUNDLE is set. Linking to 
${type}..."
+   ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${type}
+   fi
fi
done
 }
-- 
2.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core