diff mbox series

[3/8] efi_loader: selftest: Do not build relocation tests for risc-v

Message ID 20180418134030.55127-4-agraf@suse.de
State New
Headers show
Series riscv: Enable efi_loader support | expand

Commit Message

Alexander Graf April 18, 2018, 1:40 p.m. UTC
The relocation selftest doesn't compile for me on RISC-V. Disable for now.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 lib/efi_selftest/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Heinrich Schuchardt April 18, 2018, 3:48 p.m. UTC | #1
On 04/18/2018 03:40 PM, Alexander Graf wrote:
> The relocation selftest doesn't compile for me on RISC-V. Disable for now.

Can this problem be reproduced with one of the qemu targets?
Does loading a binary work?

> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  lib/efi_selftest/Makefile | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile
> index 31b444fc8b..ede7831449 100644
> --- a/lib/efi_selftest/Makefile
> +++ b/lib/efi_selftest/Makefile
> @@ -35,9 +35,10 @@ ifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
>  obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
>  endif
>  
> -# TODO: As of v2018.01 the relocation code for the EFI application cannot
> -# be built on x86_64.
> +# TODO: As of v2018.05 the relocation code for the EFI application cannot
> +# be built on x86_64 / RISC-V.
>  ifeq ($(CONFIG_X86_64),)
> +ifeq ($(CONFIG_RISCV),)

Elsewhere we abbreviate (!A && !B) as:

ifeq ($(CONFIG_X86_64)$(CONFIG_RISCV),)

Regards

Heinrich

>  
>  ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
>  
> @@ -63,6 +64,8 @@ $(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
>  
>  $(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
>  
> -endif
> +endif # CONFIG_CMD_BOOTEFI_SELFTEST
>  
> -endif
> +endif # !CONFIG_RISCV
> +
> +endif # !CONFIG_X86_64
>
Alexander Graf April 18, 2018, 4:41 p.m. UTC | #2
> Am 18.04.2018 um 17:48 schrieb Heinrich Schuchardt <xypron.glpk@gmx.de>:
> 
>> On 04/18/2018 03:40 PM, Alexander Graf wrote:
>> The relocation selftest doesn't compile for me on RISC-V. Disable for now.
> 
> Can this problem be reproduced with one of the qemu targets?

It already fails to compile, you don‘t need to run it ;).

> Does loading a binary work?

That‘s the next step. I wanted to get this out as a first step, then see what binary I could make work. The goal is obviously a grub port.

Alex
Heinrich Schuchardt April 19, 2018, 5:57 a.m. UTC | #3
On 04/18/2018 03:40 PM, Alexander Graf wrote:
> The relocation selftest doesn't compile for me on RISC-V. Disable for now.

This is the command that fails:

riscv64-linux-gnu-ld.bfd -nostdlib -znocombreloc -T ./arch/riscv/lib/ \
-shared -Bsymbolic lib/efi_selftest/efi_selftest_miniapp_return.o \
arch/riscv/lib/ -o lib/efi_selftest/efi_selftest_miniapp_return_efi.so
riscv64-linux-gnu-ld.bfd: read in flex scanner failed

In arch/riscv/lib/ the linker scripts (*.lds) are missing.

So I suggest instead of not building the unit test the missing files
should be created.

Best regards

Heinrich

> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  lib/efi_selftest/Makefile | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile
> index 31b444fc8b..ede7831449 100644
> --- a/lib/efi_selftest/Makefile
> +++ b/lib/efi_selftest/Makefile
> @@ -35,9 +35,10 @@ ifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
>  obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
>  endif
>  
> -# TODO: As of v2018.01 the relocation code for the EFI application cannot
> -# be built on x86_64.
> +# TODO: As of v2018.05 the relocation code for the EFI application cannot
> +# be built on x86_64 / RISC-V.
>  ifeq ($(CONFIG_X86_64),)
> +ifeq ($(CONFIG_RISCV),)
>  
>  ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
>  
> @@ -63,6 +64,8 @@ $(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
>  
>  $(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
>  
> -endif
> +endif # CONFIG_CMD_BOOTEFI_SELFTEST
>  
> -endif
> +endif # !CONFIG_RISCV
> +
> +endif # !CONFIG_X86_64
>
diff mbox series

Patch

diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile
index 31b444fc8b..ede7831449 100644
--- a/lib/efi_selftest/Makefile
+++ b/lib/efi_selftest/Makefile
@@ -35,9 +35,10 @@  ifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
 obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
 endif
 
-# TODO: As of v2018.01 the relocation code for the EFI application cannot
-# be built on x86_64.
+# TODO: As of v2018.05 the relocation code for the EFI application cannot
+# be built on x86_64 / RISC-V.
 ifeq ($(CONFIG_X86_64),)
+ifeq ($(CONFIG_RISCV),)
 
 ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
 
@@ -63,6 +64,8 @@  $(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
 
 $(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
 
-endif
+endif # CONFIG_CMD_BOOTEFI_SELFTEST
 
-endif
+endif # !CONFIG_RISCV
+
+endif # !CONFIG_X86_64