arch/qemu-armv7a: kernel mode cmake support

This allows to build kernel mode NuttX with cmake.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This commit is contained in:
Yanfeng Liu 2025-01-02 18:02:55 +08:00 committed by Xiang Xiao
parent 75aa80dba8
commit 6fb12b0284
2 changed files with 5 additions and 1 deletions

View file

@ -29,7 +29,7 @@ add_subdirectory(common)
target_include_directories(arch BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} common target_include_directories(arch BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} common
${ARCH_SUBDIR}) ${ARCH_SUBDIR})
if(NOT CONFIG_BUILD_FLAT) if(CONFIG_BUILD_PROTECTED)
target_include_directories(arch_interface BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} target_include_directories(arch_interface BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR}
common ${ARCH_SUBDIR}) common ${ARCH_SUBDIR})
endif() endif()

View file

@ -30,4 +30,8 @@ if(CONFIG_ARCH_IDLE_CUSTOM)
list(APPEND SRCS qemu_idle.c) list(APPEND SRCS qemu_idle.c)
endif() endif()
if(CONFIG_BUILD_KERNEL)
list(APPEND SRCS qemu_pgalloc.c)
endif()
target_sources(arch PRIVATE ${SRCS}) target_sources(arch PRIVATE ${SRCS})