[OE-core] [PATCH] bootimg-efi.py: Use IMGDEPLOYDIR instead of DEPLOY_DIR_IMAGE for initrd

Ed Bartosh ed.bartosh at linux.intel.com
Mon Jul 3 08:36:02 UTC 2017


On Fri, Jun 30, 2017 at 10:53:30AM -0700, Alejandro Hernandez wrote:
> When using wic to create an image from a certain build, wic is expecting
> to find initrd at the final destination of our images (DEPLOY_DIR_IMAGE),
> which is wrong, since the initrd file has not been copied to the final
> directory yet,

Is it possible to ensure that initrd is deployed before wic is run by
making do_image_wic depend on initrd deploy task?

> so instead of trying to use an initrd file from 
> DEPLOY_DIR_IMAGE we get it from IMGDEPLOYDIR, which is the directory 
> where the resulting images are placed before their final destination, 
> and its where we can find the correct initrd file for our image.
> 
> Signed-off-by: Alejandro Hernandez <alejandro.hernandez at linux.intel.com>
> ---
>  scripts/lib/wic/plugins/source/bootimg-efi.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
> index 9879cb9fceb..d1d445ecfe1 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-efi.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
> @@ -105,9 +105,9 @@ class BootimgEFIPlugin(SourcePlugin):
>  
>          if initrd:
>              # obviously we need to have a common common deploy var
> -            bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
> +            bootimg_dir = get_bitbake_var("IMGDEPLOYDIR")
>              if not bootimg_dir:
> -                raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
> +                raise WicError("Couldn't find IMGDEPLOYDIR, exiting")
>  
>              cp_cmd = "cp %s/%s %s" % (bootimg_dir, initrd, hdddir)
>              exec_cmd(cp_cmd, True)
> -- 
> 2.12.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
--
Regards,
Ed



More information about the Openembedded-core mailing list