All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub
Date: Mon, 26 Sep 2016 16:50:15 +0800	[thread overview]
Message-ID: <CAEUhbmU5=4+fMz7yREKQgBBtghGJgpf8z+yOmMx3ST_97XoJ9Q@mail.gmail.com> (raw)
In-Reply-To: <1474838857-25045-4-git-send-email-sjg@chromium.org>

Hi Simon,

On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass <sjg@chromium.org> wrote:
> At present we use a CONFIG option in efi.h to determine whether we are
> building the EFI stub or not. This means that the same header cannot be
> used for EFI_LOADER support. The CONFIG option will be enabled for the
> whole build, even when not building the stub.
>
> Use a different define instead, set up just for the files that make up the
> stub.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Add new patch to tidy up selection of building the EFI stub
>
>  include/efi.h    | 7 +++++--
>  lib/efi/Makefile | 4 ++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/include/efi.h b/include/efi.h
> index d07187c..3d58780 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -30,8 +30,11 @@ struct efi_device_path;
>
>  #define EFI_BITS_PER_LONG      BITS_PER_LONG
>
> -/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */
> -#ifdef CONFIG_EFI_STUB_64BIT
> +/*
> + * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set
> + * in lib/efi/Makefile, when building the stub.
> + */
> +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB)

I don't understand why this is needed?

>  #undef EFI_BITS_PER_LONG
>  #define EFI_BITS_PER_LONG      64
>  #endif
> diff --git a/lib/efi/Makefile b/lib/efi/Makefile
> index e32dc14..9449600 100644
> --- a/lib/efi/Makefile
> +++ b/lib/efi/Makefile
> @@ -9,9 +9,9 @@ obj-$(CONFIG_EFI_STUB) += efi_info.o
>
>  CFLAGS_REMOVE_efi_stub.o := -mregparm=3 \
>         $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
> -CFLAGS_efi_stub.o := -fpic -fshort-wchar
> +CFLAGS_efi_stub.o := -fpic -fshort-wchar -DEFI_STUB
>  CFLAGS_REMOVE_efi.o := -mregparm=3 \
>         $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
> -CFLAGS_efi.o := -fpic -fshort-wchar
> +CFLAGS_efi.o := -fpic -fshort-wchar -DEFI_STUB
>
>  extra-$(CONFIG_EFI_STUB) += efi_stub.o efi.o
> --

Regards,
Bin

  reply	other threads:[~2016-09-26  8:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-25 21:27 [U-Boot] [PATCH v2 1/8] x86: Add implementations of setjmp() and longjmp() Simon Glass
2016-09-25 21:27 ` [U-Boot] [PATCH v2 2/8] efi: Use asmlinkage for EFIAPI Simon Glass
2016-09-26  8:50   ` Bin Meng
2016-10-13 14:35   ` [U-Boot] [U-Boot,v2,2/8] " Alexander Graf
2016-09-25 21:27 ` [U-Boot] [PATCH v2 3/8] efi: Fix missing EFIAPI specifiers Simon Glass
2016-10-13 14:35   ` [U-Boot] [U-Boot,v2,3/8] " Alexander Graf
2016-09-25 21:27 ` [U-Boot] [PATCH v2 4/8] x86: Tidy up selection of building the EFI stub Simon Glass
2016-09-26  8:50   ` Bin Meng [this message]
2016-09-27  0:35     ` Simon Glass
2016-09-27  2:44       ` Bin Meng
2016-09-27 17:55         ` Simon Glass
2016-09-28  1:23           ` Bin Meng
2016-09-28 14:43             ` Simon Glass
2016-09-29  3:37               ` Bin Meng
2016-09-29  5:08                 ` Alexander Graf
2016-09-29  5:37                   ` Bin Meng
2016-09-29  7:13                     ` Alexander Graf
2016-09-29  7:28                       ` Bin Meng
2016-09-29  8:06                         ` Alexander Graf
2016-09-29  8:24                           ` Bin Meng
2016-09-25 21:27 ` [U-Boot] [PATCH v2 5/8] arm: efi: Add a hello world test program Simon Glass
2016-09-26  7:36   ` Alexander Graf
2016-09-27 21:28     ` Tom Rini
2016-10-03 21:50       ` Simon Glass
2016-10-04  3:15         ` Alexander Graf
2016-10-04 15:37           ` Simon Glass
2016-10-04 15:50             ` Alexander Graf
2016-10-18 20:37               ` Simon Glass
2016-10-19  7:07                 ` Alexander Graf
2016-11-07 15:45                   ` Simon Glass
2016-09-26  8:50   ` Bin Meng
2016-09-25 21:27 ` [U-Boot] [PATCH v2 6/8] x86: efi: Add EFI loader support for x86 Simon Glass
2016-10-13 14:35   ` [U-Boot] [U-Boot, v2, " Alexander Graf
2016-09-25 21:27 ` [U-Boot] [PATCH v2 7/8] x86: efi: Add a hello world test program Simon Glass
2016-09-25 21:27 ` [U-Boot] [PATCH v2 8/8] x86: Enable EFI loader support Simon Glass
2016-09-26  7:00 ` [U-Boot] [PATCH v2 1/8] x86: Add implementations of setjmp() and longjmp() Bin Meng
2016-09-26  7:05   ` Alexander Graf
2016-09-26  7:21     ` Bin Meng
2016-09-26  7:28       ` Alexander Graf
2016-09-27  0:34         ` Simon Glass
2016-09-27  2:59           ` Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEUhbmU5=4+fMz7yREKQgBBtghGJgpf8z+yOmMx3ST_97XoJ9Q@mail.gmail.com' \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.