[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH 6/7] wic:bootimg-efi:try other place for efi
From:       Tom Rini <trini () konsulko ! com>
Date:       2018-08-31 13:52:28
Message-ID: 20180831135228.GN26633 () bill-the-cat
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Fri, Aug 31, 2018 at 10:15:09AM +0800, Jiang Lu wrote:

> When there is no useful efi in $kerneldir, try copy
> all efi from EFI/BOOT into boot image.
> 
> Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
> ---
> .../wic/files/wic/plugins/source/bootimg-efi.py              | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> 
> diff --git a/meta/recipes-support/wic/files/wic/plugins/source/bootimg-efi.py \
> b/meta/recipes-support/wic/files/wic/plugins/source/bootimg-efi.py index \
>                 0eb86a0..d435268 100644
> --- a/meta/recipes-support/wic/files/wic/plugins/source/bootimg-efi.py
> +++ b/meta/recipes-support/wic/files/wic/plugins/source/bootimg-efi.py
> @@ -231,6 +231,18 @@ class BootimgEFIPlugin(SourcePlugin):
> else:
> raise WicError("unrecognized bootimg-efi loader: %s" %
> source_params['loader'])
> +            os.listdir("%s/EFI/BOOT/" % hdddir)
> +            found_efi = False
> +            for x in os.listdir("%s/EFI/BOOT/" % hdddir) :
> +                if x.endswith(".efi"):
> +                    found_efi = True
> +                    break;
> +            if not found_efi:
> +                cp_cmd = "cp %s/EFI/BOOT/*.efi %s/EFI/BOOT/" % (kernel_dir, \
> hdddir) +                try:
> +                    exec_cmd(cp_cmd, True)
> +                except:
> +                    pass
> except KeyError:
> raise WicError("bootimg-efi requires a loader, none specified")

I'm not sure this is the right approach.  If you don't have things set
up for automagic finding you should use bootimg-partition and
IMAGE_BOOT_FILES.  I'm doing this right now for some EFI projects
because it's also bad form to dump everything into EFI/BOOT and some
things should end up in EFI/vendorname or similar.

-- 
Tom


["signature.asc" (application/pgp-signature)]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic