add a basic build system skeleton
This commit is contained in:
parent
779d5ee325
commit
68b3865f61
6 changed files with 85 additions and 0 deletions
3
CMakeLists.txt
Normal file
3
CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
|
||||||
|
FIND_PACKAGE(PythonInterp 3 REQUIRED)
|
||||||
|
ADD_SUBDIRECTORY(kernel)
|
39
docs/layout.md
Normal file
39
docs/layout.md
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
libk/ git submodule containing the (platform-indipendent) kernel library
|
||||||
|
kernel/
|
||||||
|
arch/ architecture-dependant code/data
|
||||||
|
arm/
|
||||||
|
3ds/
|
||||||
|
rpi/
|
||||||
|
aarch64/
|
||||||
|
rpi3/
|
||||||
|
x86/
|
||||||
|
pc/
|
||||||
|
x86_64/
|
||||||
|
pc/
|
||||||
|
cpu/ Contains links to used hw and contains initialization code
|
||||||
|
arm/
|
||||||
|
arm7tdmi/
|
||||||
|
…
|
||||||
|
cortexa53-32/
|
||||||
|
aarch64/
|
||||||
|
cortexa53/
|
||||||
|
x86/
|
||||||
|
486/ (generic x86 cpu)
|
||||||
|
…
|
||||||
|
pentium4/ (current x86 cpu)
|
||||||
|
x86_64/
|
||||||
|
pentium4/ (generic x86_64 cpu)
|
||||||
|
…
|
||||||
|
skylake/ (current x86_64 cpu)
|
||||||
|
hw/
|
||||||
|
fpu/
|
||||||
|
x87/
|
||||||
|
vfp/
|
||||||
|
sse/
|
||||||
|
…
|
||||||
|
timer/
|
||||||
|
pit/
|
||||||
|
…
|
||||||
|
…
|
||||||
|
|
||||||
|
During Make period a kernel/curr_config.h gets generated that contains things like endianess, address space size, registers, etc
|
1
kernel/CMakeLists.txt
Normal file
1
kernel/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ENABLE_LANGUAGE(C CXX ASM-ATT)
|
14
toolchains/arm-none-eabi.cmake
Normal file
14
toolchains/arm-none-eabi.cmake
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
INCLUDE(CMakeForceCompiler)
|
||||||
|
SET(CMAKE_SYSTEM_NAME Generic)
|
||||||
|
SET(CMAKE_SYSTEM_VERSION 0)
|
||||||
|
#CMAKE_FORCE_C_COMPILER($ENV{HOME}/opt/bin/i686-elf-gcc GNU)
|
||||||
|
SET(CMAKE_C_COMPILER $ENV{HOME}/opt/bin/arm-none-eabi-gcc)
|
||||||
|
#CMAKE_FORCE_CXX_COMPILER($ENV{HOME}/opt/bin/i686-elf-g++ GNU)
|
||||||
|
SET(CMAKE_CXX_COMPILER $ENV{HOME}/opt/bin/arm-none-eabi-g++)
|
||||||
|
SET(CMAKE_ASM_COMPILER $ENV{HOME}/opt/bin/arm-none-eabi-as)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/opt)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH .)
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
14
toolchains/i686-elf.cmake
Normal file
14
toolchains/i686-elf.cmake
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
INCLUDE(CMakeForceCompiler)
|
||||||
|
SET(CMAKE_SYSTEM_NAME Generic)
|
||||||
|
SET(CMAKE_SYSTEM_VERSION 0)
|
||||||
|
#CMAKE_FORCE_C_COMPILER($ENV{HOME}/opt/bin/i686-elf-gcc GNU)
|
||||||
|
SET(CMAKE_C_COMPILER $ENV{HOME}/opt/bin/i686-elf-gcc)
|
||||||
|
#CMAKE_FORCE_CXX_COMPILER($ENV{HOME}/opt/bin/i686-elf-g++ GNU)
|
||||||
|
SET(CMAKE_CXX_COMPILER $ENV{HOME}/opt/bin/i686-elf-g++)
|
||||||
|
SET(CMAKE_ASM_COMPILER $ENV{HOME}/opt/bin/i686-elf-as)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/opt)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH .)
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
14
toolchains/x86_64-elf.cmake
Normal file
14
toolchains/x86_64-elf.cmake
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
INCLUDE(CMakeForceCompiler)
|
||||||
|
SET(CMAKE_SYSTEM_NAME Generic)
|
||||||
|
SET(CMAKE_SYSTEM_VERSION 0)
|
||||||
|
#CMAKE_FORCE_C_COMPILER($ENV{HOME}/opt/bin/i686-elf-gcc GNU)
|
||||||
|
SET(CMAKE_C_COMPILER $ENV{HOME}/opt/bin/x86_64-elf-gcc)
|
||||||
|
#CMAKE_FORCE_CXX_COMPILER($ENV{HOME}/opt/bin/i686-elf-g++ GNU)
|
||||||
|
SET(CMAKE_CXX_COMPILER $ENV{HOME}/opt/bin/x86_64-elf-g++)
|
||||||
|
SET(CMAKE_ASM_COMPILER $ENV{HOME}/opt/bin/x86_64-elf-as)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/opt)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
list(APPEND CMAKE_MODULE_PATH .)
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
Loading…
Reference in a new issue