forked from seL4/sel4webserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.cmake
90 lines (80 loc) · 3.08 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# Copyright 2019, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(DATA61_BSD)
#
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)
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(KernelARMPlatform 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")
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(KernelARMPlatform 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(KernelARMPlatform tx2 CACHE STRING "" FORCE)
set(KernelArmHypervisorSupport ON CACHE BOOL "" FORCE)
set(VmVirtioNet ON CACHE BOOL "" FORCE)
set(VmDtbFile ON CACHE BOOL "" FORCE)
endif()
set(KernelSel4Arch "arm_hyp" CACHE STRING "" FORCE)
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)