History log of /seL4-l4v-master/seL4/CMakeLists.txt
Revision Date Author Comments
# f68eaf49 01-Aug-2020 Stefan O'Rear <sorear@fastmail.com>

riscv: Set compiler ABI for hardfloat builds

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>


# b3ed7731 30-Jul-2020 Stefan O'Rear <sorear@fastmail.com>

CMake: kernel.elf LINK_DEPENDS linker script

This causes the kernel to be relinked and downstream build steps run
when the linker script is modified. Roughly copied from the dependency
handling used by the elfloader's build system.

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>


# 8c556d58 17-Nov-2019 Yanyan Shen <yanyan.shen@data61.csiro.au>

riscv: Enable compiler flag for FPU for RV64

The F and D extensions are enabled for RV64 when KernelHaveFPU
is enabled. Note that we still use the lp64 abi: no floating-point
arguments will be passed in registers

Signed-off-by: Yanyan Shen <yanyan.shen@data61.csiro.au>


# 79da0792 01-Mar-2020 Gerwin Klein <gerwin.klein@data61.csiro.au>

Convert license tags to SPDX identifiers

This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.


# 497d3c66 03-Feb-2020 Matthew <matt.phillips121@gmail.com>

Specify 32 bit to the clang assembler

If using clang, pass the -m32 flag to the assembler


# 554f812d 08-Nov-2016 Anna Lyons <Anna.Lyons@data61.csiro.au>

mcs: scheduling context donation over ipc

After this commit, threads blocked on an endpoint can recieve a
scheduling context from the thread that wakes the blocked thread.


# 3576377b 30-Jul-2019 Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>

CMake: Use unambiguous Python 2 executable name

Use the specific executable name "python2" to distinguish it from
"python" on distributions that install Python 3 as "python".


# bc61a7f3 24-Jun-2019 Anna Lyons <anna@gh.st>

python2 --> python3

Update all scripts and build system to call python3, given python2's
upcoming doom. Use sys.maxsize instead of sys.maxint in one script
(maxint does not exist in python3).


# d5ded0c4 06-May-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

CMake: Process platform files in -C config

Allow projects that use the kernel as a subproject to configure the
kernel in -C scripts.

CMake supports providing a script via -C upon first initialisation of a
build directory. This script is expected to populate the configuration
cache for the rest of the build to depend on. This is how standalone
kernel builds are currently configured. However in buildsystems that add
the kernel as a subproject, it was up to the application to modify
configuration properties before or after the kernel was imported. This
lead to circular dependencies where properties were changed by a module
later in the build, but this then invalidated properties that were set
based on the first property's original value. This lead to running CMake
multiple times in order for settings to reach a stable state.

We now assume that most shared system configuration occurs in initial -C
settings evaluation. seL4Config.cmake is a configuration module that the
kernel exports that allows a configuration script to set kernel platform
and architecture settings in a way that doesn't introduce circular
dependencies.

seL4Config can be imported into other configuration files. This should
make it easier for a full system configuration script to query and
configure kernel configuration values without introducing circular
dependencies on configuration properties.


# 375a98c8 19-Jun-2019 Siwei Zhuang <siwei.zhuang@data61.csiro.au>

CMake: Generate device headers from DTS for spike

The DTS compilation was arm platforms only. Moving it to the top level
config file, making it available to RISCV platforms. The generated files
are almost identical with minor differences. A new argument(--arch) is
added to the hardware_gen.py for the differences.


# a0cf1557 28-Apr-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

CMake: use kernel_all.c for executable

When kernel_all.i was being used as an input for kernel.elf, CMake would
add gcc -MD flags for generating an output dependency file. However GCC
doesn't run the preprocessor on .i files which have already been
preprocessed. This would lead to the expected dependency file not being
created. Ninja would cope by ignoring the missing file and printing an
error with debug flags. However, ccache was parsing the -MD flags and
the missing dependency file caused cache lookup failures resulting in
persistent cache misses on every compilation rerun.

Using kernel_all.c as the input, can mean that we preprocess the file
twice, however for regular builds we don't need to create a
kernel_all_pp.c, and when creating a kernel_all_pp.c for verification we
don't care about speed as much and so can run the preprocessor twice.


# ffa9fda8 21-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: use consistent styling for all cmake files

Add .cmake-format.yaml which defines custom functions with kwargs to
style nicely


# 86ed25b8 21-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

cmake: use snake_case for RegisterDriver & CPPFile

Our upcoming cmake styling tool requires any custom functions you want
styled nicely to be lower case. We only need to style these two nicely,
as they have kwargs we would like aligned.


# f6e5e218 20-Mar-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

Remove symlinked libsel4 files from include dir

These files can be included normally using libsel4 include paths. This
removes situations where the same file is available under different
include paths due to symlinking into different directory structures.


# 63632cb3 23-Jan-2019 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

CMake: Update to use new common, preprocessed ldscripts


# 895726d4 11-Mar-2019 Jasper Lowell <jasper.lowell@data61.csiro.au>

Add initial LLVM toolchain support


# d52341df 12-Mar-2019 Siwei Zhuang <siwei.zhuang@data61.csiro.au>

cmake: Update the RISCV build to work with GCC 8.2.0


# 7bf089c5 20-Feb-2019 Oliver Scott <Oliver.Scott@data61.csiro.au>

serial-refactor: Update config.cmake and rename drivers

Updated config.cmake in drivers/serial to use the marco properly
and added license. Renamed all serial drivers to conform to style.
Moved include for configurations scripts below tools used by the kernel.


# 282d6a90 18-Feb-2019 Oliver Scott <Oliver.Scott@data61.csiro.au>

serial-refactor: Move kernelDTSList to arm

Currently dts support is only for arm so makes
sense to move into arm config.cmake. Will eventually add RISC-V to
the dts list too.


# 0ac07923 09-Dec-2018 Simon Shields <simon.shields@data61.csiro.au>

arm: generate memory region tables from dts

This change adds infrastructure to automatically generate the
physBase macro, the avail_p_regs array, and the dev_p_regs array
based on a device tree. Platforms can opt-in to using this
by adding DTS files to the KernelDTSList variable.

The Python script uses the hardware.yml file to determine which
devices in the device tree are of interest to the kernel and should
be hidden from userspace and instead mapped into the kernel. Note that
currently the kernel mappings are not (yet) generated, however most
of the infrastructure needed to make that happen is present.


# 43b7bca8 21-Aug-2018 Adam Felizzi <Adam.Felizzi@data61.csiro.au>

CMake: CPPFile EXACT_NAME creates a temp copy

Modified the behaviour of the EXACT_INPUT option within the
CPPFile helper function. Now named EXACT_NAME, the option
copies the input file to a temporary file. The name of the
temporary file is also passed in by the caller. This
step in necessary in getting the CPP step to correctly
depend on the targets given by the caller
(through EXTRA_DEPS). Also updated the CPP generation of the
kernel_all.i file to reflect the change.


# 2bf255c8 21-Aug-2018 Adam Felizzi <Adam.Felizzi@data61.csiro.au>

tools: Ignore option for circular_includes script

Added an "ignore" argument to the circular_includes script. This
allows the caller to specify files for the script to ignore when
it parses the source file. Rather than creating a special
ignore case for "kernel_all.c" in the script itself, the user
parses the file as an argument (plus others if needed). Updated
the kernels cmake file to reflect the change.


# c1c5e2f0 21-May-2018 Adam Felizzi <a.felizzi@student.unsw.edu.au>

CMake: syscall_header_gen now called with python

Updated the command for calling 'syscall_header_gen.py' with
python. This allows the script to be called with the
desired version of python.


# c9644f6b 05-Apr-2018 Kent McLeod <Kent.Mcleod@data61.csiro.au>

RISC-V: Add CMake build files


# 91e44d38 22-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Correctly disable FPU usage on aarch64

aarch64 has different flags for preventing the usage of FPU registers


# 6081ecef 22-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Only pass -marm for aarch32

The -marm flag is not present on aarch64 toolchains


# c42f3381 21-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Explicitly set ARM and not thumb compilation

Some toolchains default to thumb compilation for some reason


# 066c736f 21-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Fix typo


# 764b19dc 21-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Avoid circular dependencies in prune generation

This fixes a case where modifying certain kernel files would cause subsequent ninja
invocations to complain of circular dependencies due to the prune generation seeing
an include directory that it was not suppose to.


# 4a30b46d 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: add_compile_options and link flags directly

Introduces a macro for adding immediately to the compile options and the exe linker
flags. We are able to directly call add_compile_options as all compilation is happening
through cmake and so we do not need to construct our own duplicate argument lists for
manually applying to both the ASM and C flags


# 9b86333d 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: string APPEND where possible


# 3f506c89 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Remove now unused macros


# 68da26ac 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Directly use include_directories

Since all compilation is now being handled by cmake the AddHeader wrapper that was adding
include directories directly to the ASM flags and C flags is no longer needed and we can
just use the regular source relative include_directories


# 11b6b78d 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Remove unused custom_command_c_fflags

By using CPPFile there is now no need for custom_command_c_flags as we are pulling
the includes rom what was given to include_directories instead


# a214cbb4 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Refactor file kernel compilation using CPPFile and changing source file properties

CPPFile is a more robuse verision of GenCPPCommand and allows us to drop the
`custom_command_c_flags` as cmake can directly perform compilation.

Changing the LANGUAGE of the SOURCE file from CPPFile allows us to pass a file with a .i
name to GCC, which gcc already knows to not preprocess again. This removes the need for
the custom compilation step.

Due to external tools depending on the kernel_all_pp.c output we still need to provide
this.


# f685dc07 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: CPPFile for bitfield generation

CPPFile is a more robuse verision of GenCPPCommand and allows us to drop the
`custom_command_c_flags` as cmake can directly perform compilatio


# ea35fa52 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: CPPFile for pruner generation

CPPFile is a more robuse verision of GenCPPCommand and allows us to drop the
`custom_command_c_flags` as cmake can directly perform compilation


# f9e11037 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Provide configuration includes directly to include_directories

include_directories makes these directories directly available to all compilation that
happens, without needing to provide additional target link directories. This is the
first step to removing the `custom_command_c_flags` variable


# daf619fa 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Refactor dependency tracking for generated files and targets

This change is perofrm two refactors
* Separates the notion of 'targets' and 'files' instead of having a single list
for all of them
* Groups targets by providing new targets instead of a list

Whilst more verbose for the moment the separation of 'targets' and 'files' is needed
to refactor and change the generation targets.


# c77e3b52 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: kernel_all.c does not depend upon any generation

`c_arguments_deps` is meant to be the dependencies needed if directly using the CMAKE_C_FLAGS
variable, but we are not using that here and so the dependency is redundant


# c499f700 14-Feb-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Custom linker script as kernel target property

Whilst the kernel is currently the only thing that gets linked and so whilst this change is
functionally the same, it is a bit neater


# 43a81850 05-Dec-2017 Claudia Tu <claudia.tu@unsw.edu.au>

Fix: check KernelArmMach for exynos


# 7fd27836 15-Nov-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

Refactor mct.c into mct.h and hardware.c

This prepares for inlinining the generic timer in header files, which will reduce the
redundancy for all platforms that use it.

Since mct.c shared code with the generic timer, both could not define a
resetTimer function. This commit splits the logic and definitions used
by exynos4 and exynos4* into common definitions in mct.h, with the
unique code for both in hardware.c


# 4b211478 06-Nov-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

Add stdint MAX definitions

- UINTPTR_MAX
- UINT64_MAX
- UINT32_MAX
- INT64_MAX
- INT32_MAX


# 89fb678d 01-Nov-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Invoke compilations without echo and xargs

Newer versions of cmake provide a COMMAND_EXPAND_LISTS option that allows a quoted string,
such as "a;b" to be given to a COMMAND parameter and have it expand into multiple arguments.
Using this we can much more nicely generate some of our COMMAND invocations, at the cost of
requiring a more recent cmake version


# 9dc8c3b0 01-Nov-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Avoid calling OS specific shell commands

cmake provides a command-line tool mode (via -E) to allow for doing common shell
operations in an OS agnostic way. Using this makes these scripts more portable
across OSes and environments


# 836e802a 29-Oct-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Just use march for setting ARM kernel compilation options


# c04d9ce8 24-Oct-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Use check_c_compiler_flag

This is more robust than manually using check_c_sources_compile


# d53fea25 03-Oct-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

cmake: Add missing bitfield generation dependency

The GenHBFTarget creates both a command and a target for a bitfield header. For correct
dependencies and parallelism you need to depend both the command *and* the target.
Currently only the target is being depended upon, meaning that rebuilds do not happen
correctly. This change adds the produced file, i.e. the command, as a dependency as well.


# a1e6354a 28-Sep-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Supper compiler versions that disagree on mcpu and march

Differing versions of gcc disagree on which combinations of mcpu and march are valid,
particularly around the armv7ve architecture. The solution here is to only set march
if it would not cause a conflict


# 0b730720 16-Mar-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Add a CMake based build system

This commit adds an alternate build system using CMake that operates indepenently of
the existing Kconfig+Kbuild+make based build system