[U-Boot] [PATCH v2 3/8] riscv: Add EFI application infrastructure

Alexander Graf agraf at suse.de
Mon Apr 23 05:59:17 UTC 2018



On 23.04.18 07:54, 陳建志 wrote:
>> The hello world binary and a few selftests require to build EFI target binaries, not just the EFI host environment.
>>
>> This patch adds all required files to generate an EFI binary for RISC-V.
>>
>> Signed-off-by: Alexander Graf <agraf at suse.de>
>>
>> ---
>>
>> new in v2
>> ---
>>  arch/riscv/config.mk               |  5 ++
>>  arch/riscv/lib/Makefile            | 11 +++++
>>  arch/riscv/lib/elf_riscv32_efi.lds | 70 +++++++++++++++++++++++++++  arch/riscv/lib/elf_riscv64_efi.lds | 70 +++++++++++++++++++++++++++
>>  arch/riscv/lib/reloc_riscv_efi.c   | 97 ++++++++++++++++++++++++++++++++++++++
>>  5 files changed, 253 insertions(+)
>>  create mode 100644 arch/riscv/lib/elf_riscv32_efi.lds
>>  create mode 100644 arch/riscv/lib/elf_riscv64_efi.lds
>>  create mode 100644 arch/riscv/lib/reloc_riscv_efi.c
>>
>> diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk index 69f4cf6ce8..9175aa765d 100644
>> --- a/arch/riscv/config.mk
>> +++ b/arch/riscv/config.mk
>> @@ -19,10 +19,12 @@ endif
>>
>>  ifdef CONFIG_32BIT
>>  PLATFORM_LDFLAGS       += -m $(32bit-emul)
>> +EFI_LDS                        := elf_riscv32_efi.lds
>>  endif
>>
>>  ifdef CONFIG_64BIT
>>  PLATFORM_LDFLAGS       += -m $(64bit-emul)
>> +EFI_LDS                        := elf_riscv64_efi.lds
>>  endif
>>
>>  CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \ @@ -31,3 +33,6 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
>>  PLATFORM_CPPFLAGS      += -ffixed-gp -fpic
>>  PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2 -ffunction-sections  LDFLAGS_u-boot += --gc-sections -static -pie
>> +
>> +EFI_CRT0               := crt0_riscv_efi.o
>> +EFI_RELOC              := reloc_riscv_efi.o
> 
> Hi Alexander
> 
> make fail as below
> 
> make[1]: *** No rule to make target 'arch/riscv/lib/crt0_riscv_efi.o',
> needed by '__build'.  Stop.
> Makefile:1340: recipe for target 'arch/riscv/lib' failed
> 
> Shall crt0_riscv_efi.c be uploaded there ?

Sorry, I forgot to send out v3 where I fixed that bit :). I'll do that
immediately.


Alex


More information about the U-Boot mailing list