-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsettings.cmake
More file actions
165 lines (154 loc) · 3.75 KB
/
Copy pathsettings.cmake
File metadata and controls
165 lines (154 loc) · 3.75 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#
# Copyright 2019, 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}/../../")
set(SEL4_CONFIG_DEFAULT_ADVANCED ON)
set(supported "exynos5422;qemu-arm-virt;odroidc2;tx2")
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}
)
include(application_settings)
if("${PLATFORM}" STREQUAL "")
set(PLATFORM "exynos5422")
endif()
if(NOT "${PLATFORM}" IN_LIST supported)
message(FATAL_ERROR "PLATFORM: ${PLATFORM} not supported. Supported: ${supported}")
endif()
if("${PLATFORM}" STREQUAL "exynos5422")
set(KernelPlatform
exynos5
CACHE STRING "" FORCE
)
set(KernelARMPlatform
exynos5422
CACHE STRING "" FORCE
)
# Due to historic reasons, on ARMv7/AARCH32 hypervisor support is not
# enabled by setting KernelArmHypervisorSupport, but a special architecture
# 'arm_hyp' must be selected.
set(KernelSel4Arch
"arm_hyp"
CACHE STRING "" FORCE
)
endif()
if("${PLATFORM}" STREQUAL "qemu-arm-virt")
if(MULTI_VM_LAN)
message(
FATAL_ERROR "The Multi-VM configuration is not supported on the qemu-arm-virt platform"
)
endif()
set(KernelPlatform
qemu-arm-virt
CACHE STRING "" FORCE
)
set(QEMU_MEMORY "2048")
set(qemu_sim_extra_args
"-netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device virtio-net,netdev=mynet0,mac=52:55:00:d1:55:01"
)
# For QEMU, setting KernelArmCPU implicitly selects AARCH32/AARCH64 also.
# For AARCH64, enabling KernelArmHypervisorSupport activates hypervisor
# support. On AARCH32, due to historic reasons, hypervisor support is
# enabled by selecting a special kernel architecture:
# set(KernelSel4Arch "arm_hyp" CACHE STRING "" FORCE)
set(KernelArmCPU
cortex-a53
CACHE STRING "" FORCE
)
set(KernelArmHypervisorSupport
ON
CACHE BOOL "" FORCE
)
endif()
if("${PLATFORM}" STREQUAL "odroidc2")
set(KernelPlatform
odroidc2
CACHE STRING "" FORCE
)
set(KernelArmHypervisorSupport
ON
CACHE BOOL "" FORCE
)
set(VmDtbFile
ON
CACHE BOOL "" FORCE
)
endif()
if("${PLATFORM}" STREQUAL "tx2")
set(KernelPlatform
tx2
CACHE STRING "" FORCE
)
set(KernelArmHypervisorSupport
ON
CACHE BOOL "" FORCE
)
set(VmVirtioNet
ON
CACHE BOOL "" FORCE
)
set(VmDtbFile
ON
CACHE BOOL "" FORCE
)
endif()
set(KernelRootCNodeSizeBits
18
CACHE STRING "" FORCE
)
set(KernelArmVtimerUpdateVOffset
OFF
CACHE BOOL "" FORCE
)
set(KernelArmDisableWFIWFETraps
ON
CACHE BOOL "" FORCE
)
set(VmPCISupport
ON
CACHE BOOL "" FORCE
)
if(MULTI_VM_LAN)
set(VmVirtioConsole
ON
CACHE BOOL "" FORCE
)
set(VmVirtioNetVirtqueue
ON
CACHE BOOL "" FORCE
)
endif()
set(VmInitRdFile
ON
CACHE BOOL "" FORCE
)
# CAmkES Settings
set(CAmkESCPP
ON
CACHE BOOL "" FORCE
)
# capDL settings
set(CapDLLoaderMaxObjects
90000
CACHE STRING "" FORCE
)
set(LibUSB
OFF
CACHE BOOL "" FORCE
)
find_package(seL4 REQUIRED)
sel4_configure_platform_settings()
# Set up elfloader settings for our platform
ApplyData61ElfLoaderSettings(${KernelARMPlatform} ${KernelSel4Arch})
# Release settings
ApplyCommonReleaseVerificationSettings(FALSE FALSE)
if(KernelSel4ArchAarch32)
# Set correct aarch32 TLS register config
set(KernelArmTLSReg
tpidruro
CACHE STRING "" FORCE
)
endif()