U-Boot provides an API for standalone applications. Examples are
provided in directory examples/.
-config STANDALONE_LOAD_ADDR
- depends on EXAMPLES
- hex "Address in memory to link standalone applications to"
- default 0xffffffff80200000 if MIPS && 64BIT
- default 0x8c000000 if SH
- default 0x82000000 if ARC
- default 0x80f00000 if MICROBLAZE
- default 0x80300000 if ARCH_OMAP2PLUS || FSL_LSCH2 || FSL_LSCH3
- default 0x80200000 if MIPS && 32BIT
- default 0x0c100000 if ARM
- default 0x02000000 if NIOS2
- default 0x00040000 if PPC || X86
- default 0x00020000 if M68K
- default 0x0 if RISCV
- default SYS_LOAD_ADDR
- help
- This option defines a board specific value for the address where
- standalone program gets loaded, thus overwriting the architecture
- dependent default settings.
-
endmenu
extra-$(CONFIG_SPI_FLASH_ATMEL) += atmel_df_pow2
extra-$(CONFIG_PPC) += sched
+# Environment variable loadaddr is set from CONFIG_SYS_LOAD_ADDR.
+# Run the examples 4 MiB above this address.
+LOAD_ADDR:=${shell printf 0x%X $$(( $(CONFIG_SYS_LOAD_ADDR) + 0x400000 ))}
+
#
# Some versions of make do not handle trailing white spaces properly;
# leading to build failures. The problem was found with GNU Make 3.80.
# source file.
ccflags-y += $(call cc-option,-fno-toplevel-reorder)
-LDFLAGS_STANDALONE += -Ttext $(CONFIG_STANDALONE_LOAD_ADDR)
+LDFLAGS_STANDALONE += -Ttext $(LOAD_ADDR)
#########################################################################