-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build/ | ||
build-*/ | ||
.sel4_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[submodule "kernel"] | ||
path = kernel | ||
url = https://github.com/seL4/seL4.git | ||
[submodule "projects/sel4runtime"] | ||
path = projects/sel4runtime | ||
url = https://github.com/seL4/sel4runtime.git | ||
[submodule "projects/util_libs"] | ||
path = projects/util_libs | ||
url = https://github.com/seL4/util_libs.git | ||
[submodule "projects/seL4_libs"] | ||
path = projects/seL4_libs | ||
url = https://github.com/seL4/seL4_libs.git | ||
[submodule "projects/musllibc"] | ||
path = projects/musllibc | ||
url = https://github.com/seL4/musllibc.git | ||
[submodule "tools/seL4"] | ||
path = tools/seL4 | ||
url = https://github.com/seL4/seL4_tools.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
projects/hello/easy-settings.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tools/seL4/cmake-tool/init-build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.7.2) | ||
|
||
project(helloworld C CXX ASM) # create a new C project called 'Hello' | ||
|
||
include(settings.cmake) | ||
|
||
# We must build the debug kernel because the tutorials rely on seL4_DebugPutChar | ||
# and they don't initialize a platsupport driver. | ||
ApplyCommonReleaseVerificationSettings(FALSE FALSE) | ||
|
||
add_executable(helloworld src/main.c) # add files to our project. Paths are relative to this file. | ||
|
||
target_link_libraries(helloworld sel4muslcsys muslc) # we need to link against the standard C lib for printf | ||
|
||
# Set this image as the rootserver | ||
DeclareRootserver(helloworld) | ||
|
||
if(SIMULATION) | ||
ApplyCommonSimulationSettings(${KernelSel4Arch}) | ||
GenerateSimulateScript() | ||
else() | ||
if(KernelArchX86) | ||
set(KernelIOMMU ON CACHE BOOL "" FORCE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(SIMULATION ON CACHE BOOL "Include only simulation compatible tests") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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(SEL4_CONFIG_DEFAULT_ADVANCED ON) | ||
if(SIMULATION) | ||
include(simulation) | ||
endif() | ||
include(rootserver) | ||
include(application_settings) | ||
include(${CMAKE_CURRENT_LIST_DIR}/easy-settings.cmake) | ||
|
||
correct_platform_strings() | ||
|
||
find_package(seL4 REQUIRED) | ||
find_package(musllibc REQUIRED) | ||
find_package(util_libs REQUIRED) | ||
find_package(seL4_libs REQUIRED) | ||
find_package(elfloader-tool REQUIRED) | ||
|
||
# Platform config | ||
sel4_configure_platform_settings() | ||
|
||
# Import kernel, elfloader | ||
sel4_import_kernel() | ||
elfloader_import_project() | ||
|
||
# Import libraries | ||
sel4_import_libsel4() | ||
util_libs_import_libraries() | ||
sel4_libs_import_libraries() | ||
|
||
# Set up environment build flags and imports musllibc and runtime libraries | ||
musllibc_setup_build_environment_with_sel4runtime() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <stdio.h> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
printf("Hello, World!\n"); | ||
|
||
return 0; | ||
} |
Submodule sel4runtime
added at
d935dd