-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.cmake
67 lines (52 loc) · 1.84 KB
/
settings.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
#
cmake_minimum_required(VERSION 3.7.2)
set(project_dir "${CMAKE_CURRENT_LIST_DIR}/../../")
file(GLOB project_modules ${project_dir}/projects/*)
list(
APPEND
CMAKE_MODULE_PATH
${project_dir}/kernel
${project_dir}/tools/seL4/cmake-tool/helpers/
${project_dir}/tools/seL4/elfloader-tool/
${project_modules}
)
set(NANOPB_SRC_ROOT_FOLDER "${project_dir}/tools/nanopb" CACHE INTERNAL "")
set(BBL_PATH ${project_dir}/tools/riscv-pk CACHE STRING "BBL Folder location")
set(SEL4_CONFIG_DEFAULT_ADVANCED ON)
include(application_settings)
include(${CMAKE_CURRENT_LIST_DIR}/easy-settings.cmake)
correct_platform_strings()
find_package(seL4 REQUIRED)
sel4_configure_platform_settings()
set(valid_platforms ${KernelPlatform_all_strings} ${correct_platform_strings_platform_aliases})
set_property(CACHE PLATFORM PROPERTY STRINGS ${valid_platforms})
if(NOT "${PLATFORM}" IN_LIST valid_platforms)
message(FATAL_ERROR "Invalid PLATFORM selected: \"${PLATFORM}\"
Valid platforms are: \"${valid_platforms}\"")
endif()
if(KernelArchARM)
set(KernelArmExportPMUUser ON CACHE BOOL "" FORCE)
elseif(KernelArchX86)
set(KernelExportPMCUser ON CACHE BOOL "" FORCE)
endif()
set(KernelDangerousCodeInjection ON CACHE BOOL "" FORCE)
if(KernelPlatformQEMUArmVirt)
set(SIMULATION ON CACHE BOOL "" FORCE)
endif()
if(SIMULATION)
ApplyCommonSimulationSettings(${KernelSel4Arch})
else()
if(KernelArchX86)
set(KernelIOMMU ON CACHE BOOL "" FORCE)
endif()
endif()
if(((NOT SIMULATION) OR KernelSel4ArchIA32) AND NOT KernelHardwareDebugAPIUnsupported)
set(HardwareDebugAPI ON CACHE BOOL "" FORCE)
else()
set(HardwareDebugAPI OFF CACHE BOOL "" FORCE)
endif()
ApplyCommonReleaseVerificationSettings(${RELEASE} ${VERIFICATION})