[OE-core] [PATCH] kernel.bbclass: Delay rm_work to run after do_bundle_initramfs

Martin Jansa martin.jansa at gmail.com
Thu Oct 31 08:26:25 UTC 2013


On Thu, Oct 31, 2013 at 09:24:40AM +0800, Xufeng Zhang wrote:
> From: "Signed-off-by: Xufeng Zhang" <xufeng.zhang at windriver.com>
> 
> Since kernel will build twice when we are trying to bundle kernel
> and initramfs together after commit 609d5a9ab("kernel.bbclass,
> image.bbclass: Implement kernel INITRAMFS dependency and bundling"),
> thus, the second building for kernel would fail if rm_work is done
> previously.
> 
> To fix this problem, we need to delay the rm_work task for kernel
> to run after do_bundle_initramfs task.
> 
> [YOCTO #5416]
> 
> Signed-off-by: Xufeng Zhang <xufeng.zhang at windriver.com>
> ---
>  meta/classes/kernel.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index dedfab7..6154df0 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -29,6 +29,9 @@ python __anonymous () {
>      image_task = d.getVar('INITRAMFS_TASK', True)
>      if image_task:
>          d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}')
> +
> +    if image or image_task:
> +        d.appendVarFlag('do_rm_work', 'depends', " %s:do_bundle_initramfs" % d.getVar('PN', True))
>  }

Why not add "before" param to addtask?

addtask bundle_initramfs after do_compile before do_build

could do the trick

>  inherit kernel-arch deploy
> -- 
> 1.8.3.3
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131031/4fb17e5a/attachment-0002.sig>


More information about the Openembedded-core mailing list