From 2ed26ee37472d48d04cf9c6cc7c3be806d06a900 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Sun, 3 Nov 2024 06:35:50 +0100
Subject: [PATCH] examples: adjust LOAD_ADDR on arm64

Change the load address on arm64 such that it is compatible with the memory
available on qemu_arm64_defconfig.

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

diff --git a/examples/api/Makefile b/examples/api/Makefile
index ca4eb1f71a..ec1643e487 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -9,8 +9,12 @@ ifeq ($(ARCH),powerpc)
 LOAD_ADDR = 0x40000
 endif
 ifeq ($(ARCH),arm)
+ifdef CONFIG_64BIT
+LOAD_ADDR = 0x40400000
+else
 LOAD_ADDR = 0x1000000
 endif
+endif
 ifeq ($(ARCH),mips)
 ifdef CONFIG_64BIT
 LOAD_ADDR = 0xffffffff80200000
-- 
2.39.5