summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2018-01-09 21:32:28 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2018-01-12 19:57:43 +0100
commita5a60ae7133fc9b893f3d44c793ccc322fd913d3 (patch)
tree6b538263b066e1780dee5d19ed5acaa56ae5456a /target
parent9ca35e7ead58b872cca3ff9d7e3976863f8f8715 (diff)
add basic rtems support as a new playground
Diffstat (limited to 'target')
-rw-r--r--target/Makefile12
-rw-r--r--target/config/Config.in.libc12
-rw-r--r--target/config/Config.in.os22
-rw-r--r--target/rtems/Config.in0
-rw-r--r--target/rtems/Makefile33
-rw-r--r--target/rtems/arch.lst14
6 files changed, 78 insertions, 15 deletions
diff --git a/target/Makefile b/target/Makefile
index 9882e4d84..b95be18b5 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -140,11 +140,6 @@ config-prepare: $(ADK_TOPDIR)/.config
>$(BUILD_DIR)/.frostedapps
endif
-ifeq ($(ADK_TARGET_OS_ZEPHYR),y)
-config-prepare: $(ADK_TOPDIR)/.config
- echo foo
-endif
-
ifeq ($(ADK_TARGET_OS_FROSTED),y)
prepare: frosted-prepare
compile: frosted-compile
@@ -152,6 +147,13 @@ install: frosted-install
targethelp: frosted-targethelp
endif
+ifeq ($(ADK_TARGET_OS_RTEMS),y)
+prepare: rtems-prepare
+compile: rtems-compile
+install: rtems-install
+targethelp: rtems-targethelp
+endif
+
ifeq ($(ADK_TARGET_OS_ZEPHYR),y)
prepare: zephyr-prepare
compile: zephyr-compile
diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc
index ebf477bbb..14a49955e 100644
--- a/target/config/Config.in.libc
+++ b/target/config/Config.in.libc
@@ -130,6 +130,7 @@ config ADK_TARGET_LIB_NEWLIB
ADK_TARGET_ARCH_XTENSA) && \
(ADK_TARGET_OS_BAREMETAL || \
ADK_TARGET_OS_FROSTED || \
+ ADK_TARGET_OS_RTEMS || \
ADK_TARGET_OS_ZEPHYR )
help
https://sourceware.org/newlib/
@@ -176,7 +177,8 @@ config ADK_TARGET_LIB_NEWLIB_2_5_0
depends on ADK_TARGET_LIB_NEWLIB \
&& !ADK_TARGET_ARCH_RISCV \
&& !ADK_TARGET_ARCH_XTENSA \
- && !ADK_TARGET_OS_FROSTED
+ && !ADK_TARGET_OS_FROSTED \
+ && !ADK_TARGET_OS_RTEMS
config ADK_TARGET_LIB_NEWLIB_RISCV
bool "2.4.0-riscv"
@@ -198,18 +200,18 @@ endchoice
choice
prompt "Threading"
+depends on ADK_TARGET_LIB_UCLIBC_NG
config ADK_TARGET_WITH_NPTL
bool "enable NPTL"
- depends on ADK_TARGET_SUPPORTS_NPTL && ADK_TARGET_SUPPORTS_THREADS && !ADK_TARGET_LIB_NEWLIB
+ depends on ADK_TARGET_SUPPORTS_NPTL && ADK_TARGET_SUPPORTS_THREADS
config ADK_TARGET_WITH_LT
bool "enable Linuxthreads"
- depends on ADK_TARGET_SUPPORTS_LT && ADK_TARGET_SUPPORTS_THREADS && ADK_TARGET_LIB_UCLIBC_NG
+ depends on ADK_TARGET_SUPPORTS_LT && ADK_TARGET_SUPPORTS_THREADS
config ADK_TARGET_WITHOUT_THREADS
bool "disable threads"
- depends on ADK_TARGET_LIB_UCLIBC_NG || ADK_TARGET_LIB_NEWLIB
endchoice
@@ -278,4 +280,4 @@ config ADK_TARGET_SUFFIX
default "muslfdpic" if ADK_TARGET_LIB_MUSL && ADK_TARGET_BINFMT_FDPIC
default "musl" if ADK_TARGET_LIB_MUSL
default "eabi" if ADK_TARGET_LIB_NEWLIB && ADK_TARGET_ARCH_ARM
- default "elf" if ADK_TARGET_LIB_NEWLIB
+ default "elf" if ADK_TARGET_LIB_NEWLIB && ADK_TARGET_OS_BAREMETAL
diff --git a/target/config/Config.in.os b/target/config/Config.in.os
index 6d77dfa4b..7fff1d521 100644
--- a/target/config/Config.in.os
+++ b/target/config/Config.in.os
@@ -9,6 +9,16 @@ config ADK_TARGET_OS_LINUX
help
Create a Linux system or toolchain.
+config ADK_TARGET_OS_BAREMETAL
+ bool "Bare metal"
+ help
+ Create a bare metal appliance or toolchain.
+
+config ADK_TARGET_OS_RTEMS
+ bool "RTEMS"
+ help
+ Create a RTEMS appliance or toolchain.
+
config ADK_TARGET_OS_FROSTED
bool "Frosted"
help
@@ -19,9 +29,11 @@ config ADK_TARGET_OS_ZEPHYR
help
Create a zephyr appliance or toolchain.
-config ADK_TARGET_OS_BAREMETAL
- bool "Bare metal"
- help
- Create a bare metal appliance or toolchain.
-
endchoice
+
+config ADK_TARGET_OS
+ string
+ default "linux" if ADK_TARGET_OS_LINUX
+ default "frosted" if ADK_TARGET_OS_FROSTED
+ default "rtems5.0.0" if ADK_TARGET_OS_RTEMS
+ default "zephyr" if ADK_TARGET_OS_ZEPHYR
diff --git a/target/rtems/Config.in b/target/rtems/Config.in
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/target/rtems/Config.in
diff --git a/target/rtems/Makefile b/target/rtems/Makefile
new file mode 100644
index 000000000..b33391269
--- /dev/null
+++ b/target/rtems/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+prepare:
+ if [ ! -d $(BUILD_DIR)/rtems ]; then \
+ cd $(BUILD_DIR) ;\
+ git clone git://git.rtems.org/rtems.git ;\
+ fi
+ if [ ! -f $(BUILD_DIR)/rtems/configure ]; then \
+ cd $(BUILD_DIR)/rtems && ./bootstrap ;\
+ fi
+ -mkdir $(BUILD_DIR)/rtems-build
+ cd $(BUILD_DIR)/rtems-build && \
+ PATH='$(TARGET_PATH)' $(BUILD_DIR)/rtems/configure \
+ --prefix=$(BUILD_DIR)/rtems-install
+ --target=$(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_OS) \
+ --enable-tests=samples \
+
+compile:
+ PATH='$(TARGET_PATH)' $(MAKE) -C \
+ $(BUILD_DIR)/rtems-build
+
+install:
+ -mkdir $(BUILD_DIR)/rtems-install
+ PATH='$(TARGET_PATH)' $(MAKE) -C \
+ $(BUILD_DIR)/rtems-build install
+
+clean:
+
+targethelp:
+
diff --git a/target/rtems/arch.lst b/target/rtems/arch.lst
new file mode 100644
index 000000000..fbc2ed8bf
--- /dev/null
+++ b/target/rtems/arch.lst
@@ -0,0 +1,14 @@
+arm
+bfin
+lm32
+m68k
+mips
+nios2
+or1k
+ppc
+riscv
+sh
+sparc
+sparc64
+x86
+x86_64