* [PATCH] kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code
@ 2013-09-27 16:23 Jason Wessel
2013-09-27 21:06 ` Andrea Adami
0 siblings, 1 reply; 3+ messages in thread
From: Jason Wessel @ 2013-09-27 16:23 UTC (permalink / raw)
To: Openembedded-core
Activating the INITRAMFS_TASK can cause circular dependencies, but
that is up to the end user to resolve in recipes. The INITRAMFS_TASK
should also trigger immediate linking of the cpio task in the first
compile pass. This was a subtle regression introduced by: 609d5a9ab
(kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency
and bundling).
This patch restores the previous behavior and only affects the
INITRAMFS_TASK which is not set by any of the default build profiles
in oe-core.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
meta/classes/kernel.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8cf66ce..73c525f 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -156,6 +156,12 @@ kernel_do_compile() {
# different initramfs image. The way to do that in the kernel
# is to specify:
# make ...args... CONFIG_INITRAMFS_SOURCE=some_other_initramfs.cpio
+ if [ "$use_alternate_initrd" = "" ] && [ "${INITRAMFS_TASK}" != "" ] ; then
+ # The old style way of copying an prebuilt image and building it
+ # is turned on via INTIRAMFS_TASK != ""
+ copy_initramfs
+ use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
+ fi
oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code
2013-09-27 16:23 [PATCH] kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code Jason Wessel
@ 2013-09-27 21:06 ` Andrea Adami
2013-09-27 21:20 ` Jason Wessel
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Adami @ 2013-09-27 21:06 UTC (permalink / raw)
To: Jason Wessel; +Cc: Openembedded-core
Jason,
there is one more problem here:
| DEBUG: Executing shell function do_compile
| Copying initramfs into ./usr ...
| cp: cannot create regular file
'/oe/oe-core/build/tmp-eglibc/work/poodle-oe-linux-gnueabi/linux-yocto-tiny-kexecboot/3.10.11+gitAUTOINC+dad2b7e1ce_e1aa804148-r0/linux-poodle-tiny-build/usr/.':
No such file or directory
I'm solving it this way:
copy_initramfs() {
echo "Covpying initramfs into ./usr ..."
+ mkdir -p ${B}/usr
# Find and use the first initramfs image archive type we find
Please take care of this.
Thanks
Andrea
On Fri, Sep 27, 2013 at 6:23 PM, Jason Wessel
<jason.wessel@windriver.com> wrote:
> Activating the INITRAMFS_TASK can cause circular dependencies, but
> that is up to the end user to resolve in recipes. The INITRAMFS_TASK
> should also trigger immediate linking of the cpio task in the first
> compile pass. This was a subtle regression introduced by: 609d5a9ab
> (kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency
> and bundling).
>
> This patch restores the previous behavior and only affects the
> INITRAMFS_TASK which is not set by any of the default build profiles
> in oe-core.
>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
> meta/classes/kernel.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 8cf66ce..73c525f 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -156,6 +156,12 @@ kernel_do_compile() {
> # different initramfs image. The way to do that in the kernel
> # is to specify:
> # make ...args... CONFIG_INITRAMFS_SOURCE=some_other_initramfs.cpio
> + if [ "$use_alternate_initrd" = "" ] && [ "${INITRAMFS_TASK}" != "" ] ; then
> + # The old style way of copying an prebuilt image and building it
> + # is turned on via INTIRAMFS_TASK != ""
> + copy_initramfs
> + use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
> + fi
> oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
> if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
> gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
> --
> 1.7.9.5
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code
2013-09-27 21:06 ` Andrea Adami
@ 2013-09-27 21:20 ` Jason Wessel
0 siblings, 0 replies; 3+ messages in thread
From: Jason Wessel @ 2013-09-27 21:20 UTC (permalink / raw)
To: Andrea Adami; +Cc: Openembedded-core
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
On 09/27/2013 04:06 PM, Andrea Adami wrote:
> | DEBUG: Executing shell function do_compile
> | Copying initramfs into ./usr ...
> | cp: cannot create regular file
> '/oe/oe-core/build/tmp-eglibc/work/poodle-oe-linux-gnueabi/linux-yocto-tiny-kexecboot/3.10.11+gitAUTOINC+dad2b7e1ce_e1aa804148-r0/linux-poodle-tiny-build/usr/.':
I suppose that one makes sense given that the compile directory might not exist. My testing did not show this problem because my working env was "dirty".
Thanks for the report, your fix is perfectly fine. I'll send a v2.
Jason.
[-- Attachment #2: Type: text/html, Size: 1129 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-27 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 16:23 [PATCH] kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code Jason Wessel
2013-09-27 21:06 ` Andrea Adami
2013-09-27 21:20 ` Jason Wessel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox