[PATCH v2] x86: add $(srctree) as include dir for sbat.o

Jan Stancek posted 1 patch 1 month, 2 weeks ago
arch/x86/boot/compressed/Makefile | 1 +
1 file changed, 1 insertion(+)
[PATCH v2] x86: add $(srctree) as include dir for sbat.o
Posted by Jan Stancek 1 month, 2 weeks ago
CONFIG_EFI_SBAT_FILE can be a relative path. When compiling with
objdir != srctree the build currently fails because it can't find
the file set in CONFIG_EFI_SBAT_FILE:
    arch/x86/boot/compressed/sbat.S: Assembler messages:
    arch/x86/boot/compressed/sbat.S:6: Error: file not found: kernel.sbat

Add $(srctree) as include dir for sbat.o.

Fixes: 61b57d35396a ("x86/efi: Implement support for embedding SBAT data for x86")
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 arch/x86/boot/compressed/Makefile | 1 +
 1 file changed, 1 insertion(+)

Changes in v2: updated shortlog

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 68f9d7a1683b..b8b2b7bea1d3 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -113,6 +113,7 @@ vmlinux-objs-$(CONFIG_EFI_SBAT) += $(obj)/sbat.o
 
 ifdef CONFIG_EFI_SBAT
 $(obj)/sbat.o: $(CONFIG_EFI_SBAT_FILE)
+AFLAGS_sbat.o += -I $(srctree)
 endif
 
 $(obj)/vmlinux: $(vmlinux-objs-y) $(vmlinux-libs-y) FORCE
-- 
2.47.3
Re: [PATCH v2] x86: add $(srctree) as include dir for sbat.o
Posted by Vitaly Kuznetsov 1 month, 1 week ago
Jan Stancek <jstancek@redhat.com> writes:

> CONFIG_EFI_SBAT_FILE can be a relative path. When compiling with
> objdir != srctree the build currently fails because it can't find
> the file set in CONFIG_EFI_SBAT_FILE:
>     arch/x86/boot/compressed/sbat.S: Assembler messages:
>     arch/x86/boot/compressed/sbat.S:6: Error: file not found: kernel.sbat
>
> Add $(srctree) as include dir for sbat.o.
>
> Fixes: 61b57d35396a ("x86/efi: Implement support for embedding SBAT data for x86")
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  arch/x86/boot/compressed/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> Changes in v2: updated shortlog
>
> diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
> index 68f9d7a1683b..b8b2b7bea1d3 100644
> --- a/arch/x86/boot/compressed/Makefile
> +++ b/arch/x86/boot/compressed/Makefile
> @@ -113,6 +113,7 @@ vmlinux-objs-$(CONFIG_EFI_SBAT) += $(obj)/sbat.o
>  
>  ifdef CONFIG_EFI_SBAT
>  $(obj)/sbat.o: $(CONFIG_EFI_SBAT_FILE)
> +AFLAGS_sbat.o += -I $(srctree)
>  endif
>  
>  $(obj)/vmlinux: $(vmlinux-objs-y) $(vmlinux-libs-y) FORCE

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Thanks for the fix!

-- 
Vitaly