summaryrefslogtreecommitdiff
path: root/target/arc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-10-23 08:38:20 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-10-23 08:38:31 +0200
commitf6de4889c74356a8e7c91a65ef765e3b32bf17f9 (patch)
tree674a61106e34a66af766f898c8b8a871d617d343 /target/arc
parentb6e55ac8d5a98900c6e0cfa0091e488679680af3 (diff)
arc: add support for free nSIM simulator, thx to Alexey for hints to get it running
Diffstat (limited to 'target/arc')
-rw-r--r--target/arc/Makefile55
-rw-r--r--target/arc/kernel/nsim-arcv15
-rw-r--r--target/arc/kernel/nsim-arcv24
-rw-r--r--target/arc/systems/nsim-arcv17
-rw-r--r--target/arc/systems/nsim-arcv27
-rw-r--r--target/arc/uclibc.config30
6 files changed, 87 insertions, 21 deletions
diff --git a/target/arc/Makefile b/target/arc/Makefile
index 03afae8f0..76f76f4d4 100644
--- a/target/arc/Makefile
+++ b/target/arc/Makefile
@@ -5,3 +5,58 @@ include $(ADK_TOPDIR)/rules.mk
include $(ADK_TOPDIR)/mk/kernel-build.mk
include $(ADK_TOPDIR)/mk/image.mk
+KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
+
+# target helper text
+ifeq ($(ADK_TARGET_FS),archive)
+targethelp:
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV1),y)
+ @echo './scripts/nsim.sh arcv1 $(FW_DIR)/${TARGET_KERNEL}'
+endif
+ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV2),y)
+ @echo './scripts/nsim.sh arcv2 $(FW_DIR)/${TARGET_KERNEL}'
+endif
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+imageinstall: createinitramfs targethelp
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
diff --git a/target/arc/kernel/nsim-arcv1 b/target/arc/kernel/nsim-arcv1
new file mode 100644
index 000000000..e13a1b63d
--- /dev/null
+++ b/target/arc/kernel/nsim-arcv1
@@ -0,0 +1,5 @@
+CONFIG_ARC=y
+CONFIG_ARC_PLAT_SIM=y
+CONFIG_ISA_ARCOMPACT=y
+CONFIG_ARC_CPU_770=y
+CONFIG_ARC_BUILTIN_DTB_NAME="nsim_700"
diff --git a/target/arc/kernel/nsim-arcv2 b/target/arc/kernel/nsim-arcv2
new file mode 100644
index 000000000..38fd1c27e
--- /dev/null
+++ b/target/arc/kernel/nsim-arcv2
@@ -0,0 +1,4 @@
+CONFIG_ARC=y
+CONFIG_ARC_PLAT_SIM=y
+CONFIG_ISA_ARCV2=y
+CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs"
diff --git a/target/arc/systems/nsim-arcv1 b/target/arc/systems/nsim-arcv1
new file mode 100644
index 000000000..0971845c8
--- /dev/null
+++ b/target/arc/systems/nsim-arcv1
@@ -0,0 +1,7 @@
+config ADK_TARGET_SYSTEM_NSIM_ARCV1
+ bool "Synopsys NSIM Emulator (ARCv1)"
+ select ADK_CPU_ARC700
+ select ADK_TARGET_WITH_SERIAL
+ help
+ Support for NSIM Emulator for ARCv1.
+
diff --git a/target/arc/systems/nsim-arcv2 b/target/arc/systems/nsim-arcv2
new file mode 100644
index 000000000..2f0e0d084
--- /dev/null
+++ b/target/arc/systems/nsim-arcv2
@@ -0,0 +1,7 @@
+config ADK_TARGET_SYSTEM_NSIM_ARCV2
+ bool "Synopsys NSIM Emulator (ARCv2)"
+ select ADK_CPU_ARC_HS
+ select ADK_TARGET_WITH_SERIAL
+ help
+ Support for NSIM Emulator for ARCv2.
+
diff --git a/target/arc/uclibc.config b/target/arc/uclibc.config
index 9d3c95809..296fb8bf4 100644
--- a/target/arc/uclibc.config
+++ b/target/arc/uclibc.config
@@ -1,33 +1,24 @@
#
# Automatically generated file; DO NOT EDIT.
-# uClibc 0.9.34-git C Library Configuration
+# uClibc-ng 1.0.7 C Library Configuration
#
-# TARGET_alpha is not set
TARGET_arc=y
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_c6x is not set
# TARGET_cris is not set
-# TARGET_e1 is not set
-# TARGET_frv is not set
# TARGET_h8300 is not set
-# TARGET_hppa is not set
# TARGET_i386 is not set
-# TARGET_i960 is not set
-# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_metag is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
-# TARGET_nios is not set
# TARGET_nios2 is not set
+# TARGET_or1k is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
-# TARGET_sh64 is not set
# TARGET_sparc is not set
-# TARGET_v850 is not set
-# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
@@ -37,11 +28,11 @@ TARGET_arc=y
TARGET_ARCH="arc"
FORCE_OPTIONS_FOR_ARCH=y
CONFIG_ARC_CPU_700=y
+# CONFIG_ARC_CPU_HS is not set
+CONFIG_ARC_PAGE_SIZE_8K=y
+# CONFIG_ARC_PAGE_SIZE_16K is not set
+# CONFIG_ARC_PAGE_SIZE_4K is not set
TARGET_SUBARCH=""
-# UCLIBC_FORMAT_FDPIC_ELF is not set
-# UCLIBC_FORMAT_FLAT is not set
-# UCLIBC_FORMAT_FLAT_SEP_DATA is not set
-# UCLIBC_FORMAT_SHARED_FLAT is not set
#
# Using ELF file format
@@ -84,8 +75,6 @@ LDSO_LD_LIBRARY_PATH=y
UCLIBC_CTOR_DTOR=y
# LDSO_GNU_HASH_SUPPORT is not set
# HAS_NO_THREADS is not set
-# LINUXTHREADS_OLD is not set
-# LINUXTHREADS_NEW is not set
UCLIBC_HAS_THREADS_NATIVE=y
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_TLS=y
@@ -99,6 +88,8 @@ MALLOC_GLIBC_COMPAT=y
UCLIBC_HAS_OBSTACK=y
UCLIBC_DYNAMIC_ATEXIT=y
COMPAT_ATEXIT=y
+UCLIBC_HAS_UTMPX=y
+UCLIBC_HAS_UTMP=y
UCLIBC_SUSV2_LEGACY=y
UCLIBC_SUSV3_LEGACY=y
# UCLIBC_SUSV3_LEGACY_MACROS is not set
@@ -167,6 +158,7 @@ UCLIBC_HAS_LIBNSL_STUB=y
#
UCLIBC_HAS_STRING_GENERIC_OPT=y
UCLIBC_HAS_STRING_ARCH_OPT=y
+UCLIBC_HAS_STDIO_FUTEXES=y
UCLIBC_HAS_CTYPE_TABLES=y
UCLIBC_HAS_CTYPE_SIGNED=y
# UCLIBC_HAS_CTYPE_UNSAFE is not set
@@ -201,7 +193,6 @@ UCLIBC_HAS_SIGNUM_MESSAGES=y
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_GNU_GETOPT=y
UCLIBC_HAS_GETOPT_LONG=y
-UCLIBC_HAS_STDIO_FUTEXES=y
UCLIBC_HAS_GNU_GETSUBOPT=y
#
@@ -217,8 +208,6 @@ UCLIBC_HAS_FTW=y
UCLIBC_HAS_FTS=y
UCLIBC_HAS_GLOB=y
UCLIBC_HAS_GNU_GLOB=y
-UCLIBC_HAS_UTMP=y
-UCLIBC_HAS_UTMPX=y
#
# Library Installation Options
@@ -253,4 +242,3 @@ UCLIBC_EXTRA_CFLAGS=""
WARNINGS="-Wall"
# EXTRA_WARNINGS is not set
# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set