diff mbox series

[4/4] examples: use QEMU compatible LOAD_ADDR on RISC-V

Message ID 20241123084754.59182-5-heinrich.schuchardt@canonical.com
State Accepted, archived
Delegated to: Heinrich Schuchardt
Headers show
Series examples: allow building API examples on RISC-V | expand

Commit Message

Heinrich Schuchardt Nov. 23, 2024, 8:47 a.m. UTC
On some RISC-V including QEMU $loadaddr is 0x80200000.
For bootelf to work choose a different LOAD_ADDR to which the demo ELF
binary is relocated.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 examples/api/Makefile | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/examples/api/Makefile b/examples/api/Makefile
index 13e859cf080..722c7e45904 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -22,6 +22,9 @@  else
 LOAD_ADDR = 0x80200000
 endif
 endif
+ifeq ($(ARCH),riscv)
+LOAD_ADDR = 0x84000000
+endif
 
 # Resulting ELF and binary exectuables will be named demo and demo.bin
 extra-y = demo