From mboxrd@z Thu Jan 1 00:00:00 1970 From: matt@console-pimps.org (Matt Fleming) Date: Wed, 2 Jul 2014 12:15:28 +0100 Subject: [PATCH v2 5/5] efi: efistub: convert into static library In-Reply-To: <1403792617-25792-6-git-send-email-ard.biesheuvel@linaro.org> References: <1403792617-25792-1-git-send-email-ard.biesheuvel@linaro.org> <1403792617-25792-6-git-send-email-ard.biesheuvel@linaro.org> Message-ID: <20140702111528.GL7539@console-pimps.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, 26 Jun, at 04:23:37PM, Ard Biesheuvel wrote: > This patch changes both x86 and arm64 efistub implementations from #including > shared .c files under drivers/firmware/efi to building the shared code as a > static library. > > The x86 code uses a stub built into the boot executable which uncompresses the > kernel at boot time. In this case, the library is linked into the decompressor. > > In the arm64 case, the stub is part of the kernel proper so the library is > linked into the kernel proper as well. > > Signed-off-by: Ard Biesheuvel OK, this breaks the ia64 build because of the following... /drivers/firmware/efi/libstub/efi-stub-helper.c:14:21: fatal error: asm/efi.h: No such file or directory > diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile > index e1096539eedb..d9abdbc962f1 100644 > --- a/drivers/firmware/efi/Makefile > +++ b/drivers/firmware/efi/Makefile > @@ -1,7 +1,7 @@ > # > # Makefile for linux kernel > # > -obj-$(CONFIG_EFI) += efi.o vars.o > +obj-$(CONFIG_EFI) += efi.o vars.o libstub/ > obj-$(CONFIG_EFI_VARS) += efivars.o > obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o > obj-$(CONFIG_UEFI_CPER) += cper.o I guess what we need is CONFIG_EFI_LIBSTUB selected by both CONFIG_EFI_STUB (for x86) and CONFIG_EFI_ARMSTUB (for arm64)? e.g. obj-$(CONFIG_EFI_LIBSTUB) libstub/ -- Matt Fleming, Intel Open Source Technology Center