mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00

- add initial support for aarch64 - SMP support is currently missing - uhyve and kernel are tested on Libre AML-S905X-CC (https://libre.computer/products/boards/aml-s905x-cc/) - only GICv2 support is integrated
32 lines
986 B
CMake
32 lines
986 B
CMake
cmake_minimum_required(VERSION 3.7)
|
|
include(../../cmake/HermitCore.cmake)
|
|
|
|
project(arch_aarch64_kernel C ASM)
|
|
|
|
set_parent(AARCH64_KERNEL_TARGET ${PROJECT_NAME})
|
|
set_parent(ARCH_KERNEL_TARGET ${PROJECT_NAME})
|
|
set_parent(AARCH64_KERNEL_C_TARGET ${AARCH64_KERNEL_TARGET}_c)
|
|
|
|
set_source_files_properties(kernel/*.S PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp")
|
|
|
|
add_custom_target(${AARCH64_KERNEL_TARGET})
|
|
|
|
# compiling kernel code here
|
|
add_definitions(-D__KERNEL__)
|
|
|
|
### C sources ###
|
|
|
|
file(GLOB KERNEL_SOURCES "kernel/*.c")
|
|
file(GLOB KERNEL_S_SOURCES "kernel/*.S")
|
|
file(GLOB LIBKERN_S_SOURCES "libkern/*.S")
|
|
file(GLOB MM_SOURCES "mm/*.c")
|
|
|
|
add_library(${AARCH64_KERNEL_C_TARGET} OBJECT
|
|
${KERNEL_SOURCES} ${KERNEL_S_SOURCES} ${MM_SOURCES} ${LIBKERN_S_SOURCES})
|
|
|
|
target_include_directories(${AARCH64_KERNEL_C_TARGET} BEFORE
|
|
PUBLIC ${HERMIT_KERNEL_INCLUDES}
|
|
PRIVATE ${GENERATED_CONFIG_DIR})
|
|
|
|
target_compile_options(${AARCH64_KERNEL_C_TARGET}
|
|
PRIVATE ${HERMIT_KERNEL_FLAGS})
|