Skip to content

Commit 5146dbb

Browse files
nashifAnas Nashif
authored and
Anas Nashif
committed
arch: architecture defines kernel entry
Make defining the kernel entry architecture specific and move it to the architecture domain. Signed-off-by: Anas Nashif <[email protected]>
1 parent 2bbe6af commit 5146dbb

File tree

7 files changed

+14
-1
lines changed

7 files changed

+14
-1
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,13 @@ add_custom_target(
519519
offsets_h
520520
)
521521

522+
get_property(E_KERNEL_ENTRY GLOBAL PROPERTY E_KERNEL_ENTRY)
523+
522524
set(zephyr_lnk
523525
${LINKERFLAGPREFIX},-Map=${PROJECT_BINARY_DIR}/${KERNEL_MAP_NAME}
524526
-u_OffsetAbsSyms
525527
-u_ConfigAbsSyms
526-
-e${CONFIG_KERNEL_ENTRY}
528+
${E_KERNEL_ENTRY}
527529
${LINKERFLAGPREFIX},--start-group
528530
${LINKERFLAGPREFIX},--whole-archive
529531
${ZEPHYR_LIBS_PROPERTY}

arch/arc/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ zephyr_cc_option(-fno-delete-null-pointer-checks)
1010

1111
zephyr_cc_option_ifdef (CONFIG_LTO -flto)
1212

13+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
14+
1315
add_subdirectory(soc/${SOC_PATH})
1416
add_subdirectory(core)

arch/arm/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(ARCH_FOR_cortex-m4 armv7e-m )
77
set(ARCH_FOR_cortex-m23 armv8-m.base)
88
set(ARCH_FOR_cortex-m33 armv8-m.main)
99

10+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
11+
1012
if(${ARCH_FOR_${GCC_M_CPU}})
1113
set(ARCH_FLAG -march=${ARCH_FOR_${GCC_M_CPU}})
1214
endif()

arch/nios2/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ else()
3232
zephyr_cc_option(-mno-hw-div)
3333
endif()
3434

35+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
3536

3637
add_subdirectory(soc/${SOC_PATH})
3738
add_subdirectory(core)

arch/riscv32/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
add_subdirectory(soc)
22
add_subdirectory(core)
33

4+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
5+
46
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littleriscv)

arch/x86/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ endif()
2323
zephyr_cc_option_ifdef (CONFIG_LTO -flto)
2424
zephyr_cc_option_ifndef(CONFIG_SSE_FP_MATH -mno-sse)
2525

26+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
27+
2628
if(CMAKE_VERBOSE_MAKEFILE)
2729
set(GENIDT_EXTRA_ARGS --verbose)
2830
else()

arch/xtensa/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ else()
77
add_subdirectory(soc/${SOC_PATH})
88
endif()
99

10+
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
11+
1012
add_subdirectory(core)

0 commit comments

Comments
 (0)