riscv: qemu: define standalone load address

We need to define the standalone load address to use standalone
application on qemu-riscv. Define it and set it equal to
CONFIG_SYS_LOAD_ADDR.

To not overwrite it, change the assigned of CONFIG_STANDALONE_LOAD_ADDR
in arch/riscv/config.mk to a conditional one.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Lukas Auer 2019-01-04 01:37:34 +01:00 committed by Andes
parent 7eb792970e
commit 91882c472d
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ PLATFORM_LDFLAGS += -m $(64bit-emul)
EFI_LDS := elf_riscv64_efi.lds
endif
CONFIG_STANDALONE_LOAD_ADDR = 0x00000000
CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections \

View File

@ -17,6 +17,8 @@
#define CONFIG_SYS_BOOTM_LEN SZ_16M
#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000
/* Environment options */
#define CONFIG_ENV_SIZE SZ_4K