[U-Boot,20/25] efi_loader: Don't enable in SPL/TPL by default

Message ID 20181106222142.94537-21-sjg@chromium.org
State New
Delegated to: Simon Glass
Headers show
Series
  • sandbox: Changes and improvements to support verified boot
Related show

Commit Message

Simon Glass Nov. 6, 2018, 10:21 p.m.
Generally this functionality is not useful in SPL or TPL. Update the
Makefile so that it is not built.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Alexander Graf Nov. 14, 2018, 1:28 p.m. | #1
On 11/06/2018 11:21 PM, Simon Glass wrote:
> Generally this functionality is not useful in SPL or TPL. Update the
> Makefile so that it is not built.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>   lib/Makefile | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 4d2e22027d0..4dba3628e78 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -5,10 +5,10 @@
>   
>   ifndef CONFIG_SPL_BUILD
>   
> -obj-$(CONFIG_EFI) += efi/
> -obj-$(CONFIG_EFI_LOADER) += efi_driver/
> -obj-$(CONFIG_EFI_LOADER) += efi_loader/
> -obj-$(CONFIG_EFI_LOADER) += efi_selftest/
> +obj-$(CONFIG_$(SPL_TPL_)EFI) += efi/
> +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_driver/
> +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_loader/
> +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_selftest/

This is already in the "ifndef CONFIG_SPL_BUILD" segment.

I'd rather like to see you remove that whole ifndef section including 
lzma, bzip2, tizen etc and convert (at least most of it) to the SPL_TPL_ 
magic you applied here.


Alex

>   obj-$(CONFIG_LZMA) += lzma/
>   obj-$(CONFIG_BZIP2) += bzip2/
>   obj-$(CONFIG_TIZEN) += tizen/
Simon Glass Nov. 18, 2018, 9:23 p.m. | #2
Hi Alex,

On Wed, 14 Nov 2018 at 06:28, Alexander Graf <agraf@suse.de> wrote:
>
> On 11/06/2018 11:21 PM, Simon Glass wrote:
> > Generally this functionality is not useful in SPL or TPL. Update the
> > Makefile so that it is not built.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >   lib/Makefile | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/Makefile b/lib/Makefile
> > index 4d2e22027d0..4dba3628e78 100644
> > --- a/lib/Makefile
> > +++ b/lib/Makefile
> > @@ -5,10 +5,10 @@
> >
> >   ifndef CONFIG_SPL_BUILD
> >
> > -obj-$(CONFIG_EFI) += efi/
> > -obj-$(CONFIG_EFI_LOADER) += efi_driver/
> > -obj-$(CONFIG_EFI_LOADER) += efi_loader/
> > -obj-$(CONFIG_EFI_LOADER) += efi_selftest/
> > +obj-$(CONFIG_$(SPL_TPL_)EFI) += efi/
> > +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_driver/
> > +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_loader/
> > +obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_selftest/
>
> This is already in the "ifndef CONFIG_SPL_BUILD" segment.
>
> I'd rather like to see you remove that whole ifndef section including
> lzma, bzip2, tizen etc and convert (at least most of it) to the SPL_TPL_
> magic you applied here.

Actually we can drop this patch. I wrote it thinking I might want to
control whether EFI_LOADER is in SPL, but in fact in the end I didn't
need to. Sorry for the noise.

Regards,
Simon

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 4d2e22027d0..4dba3628e78 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -5,10 +5,10 @@ 
 
 ifndef CONFIG_SPL_BUILD
 
-obj-$(CONFIG_EFI) += efi/
-obj-$(CONFIG_EFI_LOADER) += efi_driver/
-obj-$(CONFIG_EFI_LOADER) += efi_loader/
-obj-$(CONFIG_EFI_LOADER) += efi_selftest/
+obj-$(CONFIG_$(SPL_TPL_)EFI) += efi/
+obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_driver/
+obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_loader/
+obj-$(CONFIG_$(SPL_TPL_)EFI_LOADER) += efi_selftest/
 obj-$(CONFIG_LZMA) += lzma/
 obj-$(CONFIG_BZIP2) += bzip2/
 obj-$(CONFIG_TIZEN) += tizen/