Parcourir la source

add basic support for architecture c-sky, not yet working

Waldemar Brodkorb il y a 7 ans
Parent
commit
53361ff710

+ 3 - 0
mk/vars.mk

@@ -81,6 +81,9 @@ GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_VENDOR)-$(ADK_TARGET_LINUXTYPE)-$
 ifeq ($(ADK_TARGET_ARCH_C6X),y)
 GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_LINUXTYPE)
 endif
+ifeq ($(ADK_TARGET_ARCH_CSKY),y)
+GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-unknown-$(ADK_TARGET_LINUXTYPE)
+endif
 ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
 GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_SUFFIX)
 endif

+ 1 - 0
target/arch.lst

@@ -7,6 +7,7 @@ bfin
 c6x
 cr16
 cris
+csky
 epiphany
 frv
 h8300

+ 7 - 0
target/config/Config.in.binutils

@@ -4,6 +4,7 @@
 choice
 prompt "Binutils version"
 default ADK_TOOLCHAIN_BINUTILS_ARC if ADK_TARGET_ARCH_ARC
+default ADK_TOOLCHAIN_BINUTILS_CSKY if ADK_TARGET_ARCH_CSKY
 default ADK_TOOLCHAIN_BINUTILS_NDS32 if ADK_TARGET_ARCH_NDS32
 default ADK_TOOLCHAIN_BINUTILS_2_20_1 if ADK_TARGET_ARCH_AVR32
 default ADK_TOOLCHAIN_BINUTILS_GIT if ADK_TARGET_ARCH_MIPS
@@ -13,11 +14,13 @@ default ADK_TOOLCHAIN_BINUTILS_2_28
 config ADK_TOOLCHAIN_BINUTILS_GIT
 	bool "git"
 	depends on !ADK_TARGET_ARCH_AVR32
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_NDS32
 
 config ADK_TOOLCHAIN_BINUTILS_2_28
 	bool "2.28"
 	depends on !ADK_TARGET_ARCH_AVR32
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_RISCV32
 	depends on !ADK_TARGET_ARCH_RISCV64
@@ -30,6 +33,10 @@ config ADK_TOOLCHAIN_BINUTILS_ARC
 	bool "arc-2016.09-release"
 	depends on ADK_TARGET_ARCH_ARC
 
+config ADK_TOOLCHAIN_BINUTILS_CSKY
+	bool "2.27-c-sky"
+	depends on ADK_TARGET_ARCH_CSKY
+
 config ADK_TOOLCHAIN_BINUTILS_2_20_1
 	bool "2.20.1"
 	depends on ADK_TARGET_ARCH_AVR32

+ 8 - 0
target/config/Config.in.compiler

@@ -17,6 +17,7 @@ choice
 prompt "GCC version"
 depends on ADK_BUILD_COMPILER_GCC
 default ADK_TOOLCHAIN_GCC_ARC if ADK_TARGET_ARCH_ARC
+default ADK_TOOLCHAIN_GCC_CSKY if ADK_TARGET_ARCH_CSKY
 default ADK_TOOLCHAIN_GCC_OR1K if ADK_TARGET_ARCH_OR1K
 default ADK_TOOLCHAIN_GCC_NDS32 if ADK_TARGET_ARCH_NDS32
 default ADK_TOOLCHAIN_GCC_4_2 if ADK_TARGET_ARCH_METAG
@@ -29,6 +30,7 @@ default ADK_TOOLCHAIN_GCC_7
 config ADK_TOOLCHAIN_GCC_GIT
 	bool "git"
 	depends on !ADK_TARGET_ARCH_AVR32
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_METAG
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_OR1K
@@ -38,6 +40,7 @@ config ADK_TOOLCHAIN_GCC_GIT
 config ADK_TOOLCHAIN_GCC_7
 	bool "7.1.0"
 	depends on !ADK_TARGET_ARCH_AVR32
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_METAG
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_OR1K
@@ -54,6 +57,11 @@ config ADK_TOOLCHAIN_GCC_4_9
 	depends on ADK_TARGET_ARCH_LM32
 	depends on ADK_TARGET_SYSTEM_KINETIS_K70
 
+config ADK_TOOLCHAIN_GCC_CSKY
+	bool "csky"
+	select ADK_DISABLE_HONOUR_CFLAGS
+	depends on ADK_TARGET_ARCH_CSKY
+
 config ADK_TOOLCHAIN_GCC_OR1K
 	bool "or1k"
 	select ADK_DISABLE_HONOUR_CFLAGS

+ 10 - 0
target/config/Config.in.cpu

@@ -479,6 +479,15 @@ config ADK_TARGET_CPU_CRIS_CRISV32
 	select ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_CRIS
 
+# c-sky
+config ADK_TARGET_CPU_CSKY_CK610
+	bool "ck610"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	depends on ADK_TARGET_ARCH_CSKY
+
 # epiphany
 config ADK_TARGET_CPU_EPIPHANY
 	bool "epiphany"
@@ -2069,6 +2078,7 @@ config ADK_TARGET_CPU_ARCH
 	default "cr16" if ADK_TARGET_ARCH_CR16
 	default "cris" if ADK_TARGET_CPU_CRIS_CRISV10
 	default "crisv32" if ADK_TARGET_CPU_CRIS_CRISV32
+	default "csky" if ADK_TARGET_ARCH_CSKY
 	default "epiphany" if ADK_TARGET_ARCH_EPIPHANY
 	default "frv" if ADK_TARGET_ARCH_FRV
 	default "i486" if ADK_TARGET_CPU_X86_I486

+ 14 - 0
target/config/Config.in.kernelversion

@@ -10,6 +10,7 @@ default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
 default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_KINETIS_K70
 default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_ADSP_BF537
+default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_CSKY
 default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_LM32
 default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_CRIS
 default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_METAG
@@ -32,6 +33,7 @@ config ADK_TARGET_KERNEL_VERSION_4_12
 	bool "4.12.3"
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_CRIS
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_METAG
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_RISCV32
@@ -41,6 +43,7 @@ config ADK_TARGET_KERNEL_VERSION_4_12
 config ADK_TARGET_KERNEL_VERSION_4_9
 	bool "4.9.38"
 	depends on !ADK_TARGET_ARCH_CRIS
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_METAG
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_RISCV32
@@ -53,6 +56,7 @@ config ADK_TARGET_KERNEL_VERSION_4_6
 
 config ADK_TARGET_KERNEL_VERSION_4_4
 	bool "4.4.77"
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
 	depends on !ADK_TARGET_ARCH_OR1K
@@ -66,6 +70,7 @@ config ADK_TARGET_KERNEL_VERSION_4_1
 	bool "4.1.42"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NIOS2
 	depends on !ADK_TARGET_ARCH_NDS32
@@ -83,6 +88,7 @@ config ADK_TARGET_KERNEL_VERSION_3_16
 	bool "3.16.43"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -105,6 +111,7 @@ config ADK_TARGET_KERNEL_VERSION_3_10
 	bool "3.10.105"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -128,6 +135,7 @@ config ADK_TARGET_KERNEL_VERSION_3_4
 	bool "3.4.113"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -155,6 +163,7 @@ config ADK_TARGET_KERNEL_VERSION_3_2
 	bool "3.2.88"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -177,6 +186,7 @@ config ADK_TARGET_KERNEL_VERSION_2_6_32
 	bool "2.6.32.70"
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_BFIN
+	depends on !ADK_TARGET_ARCH_CSKY
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_NDS32
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -207,6 +217,7 @@ config ADK_TARGET_KERNEL_GIT_REPO
 	default "https://github.com/SolidRun/linux-armada38x.git" if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	default "https://github.com/beagleboard/linux.git" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
 	default "https://github.com/m-labs/linux-milkymist.git" if ADK_TARGET_ARCH_LM32
+	default "https://github.com/c-sky/linux-4.9.y.git" if ADK_TARGET_ARCH_CSKY
 	default "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
 	help
 	  GIT repository to use.
@@ -221,6 +232,7 @@ config ADK_TARGET_KERNEL_GIT_REPO_NAME
 	default "clearfog" if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	default "bb" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
 	default "lm32" if ADK_TARGET_ARCH_LM32
+	default "csky" if ADK_TARGET_ARCH_CSKY
 	default "linus"
 
 config ADK_TARGET_KERNEL_GIT
@@ -229,6 +241,7 @@ config ADK_TARGET_KERNEL_GIT
 	default "cfa29b46af94d83e31aa000dbaee553f9c4d670c" if ADK_TARGET_BOARD_BCM28XX
 	default "f8d3b2a0fa5054aaed0f14cd457db9d8922bb167" if ADK_TARGET_SYSTEM_ADSP_BF537
 	default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
+	default "314c498ddc8c43a66ca96ff3af7da98e10fa1cc6" if ADK_TARGET_ARCH_CSKY
 	default "1d008423ab5fd12459f53342e4d17585ec63cfe4" if ADK_TARGET_SYSTEM_KINETIS_K70
 	default "902739f3353150ac9eb69ad995098f3079d862a3" if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	default "27e61f66e7f03cc6199ddc2787340a01b80c6ed6" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -237,6 +250,7 @@ config ADK_TARGET_KERNEL_GIT
 config ADK_TARGET_KERNEL_GIT_VER
 	string "kernel version"
 	depends on ADK_TARGET_KERNEL_VERSION_GIT
+	default "4.9.13" if ADK_TARGET_ARCH_CSKY
 	default "4.9.37" if ADK_TARGET_BOARD_BCM28XX
 	default "3.14.79" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
 	default "4.4.37" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK

+ 2 - 0
target/config/Config.in.libc

@@ -17,6 +17,7 @@ config ADK_TARGET_LIB_UCLIBC_NG
 		ADK_TARGET_ARCH_BFIN || \
 		ADK_TARGET_ARCH_C6X || \
 		ADK_TARGET_ARCH_CRIS || \
+		ADK_TARGET_ARCH_CSKY || \
 		ADK_TARGET_ARCH_FRV || \
 		ADK_TARGET_ARCH_H8300 || \
 		ADK_TARGET_ARCH_HPPA || \
@@ -97,6 +98,7 @@ config ADK_TARGET_LIB_NEWLIB
 		ADK_TARGET_ARCH_BFIN || \
 		ADK_TARGET_ARCH_CR16 || \
 		ADK_TARGET_ARCH_CRIS || \
+		ADK_TARGET_ARCH_CSKY || \
 		ADK_TARGET_ARCH_EPIPHANY || \
 		ADK_TARGET_ARCH_FRV || \
 		ADK_TARGET_ARCH_H8300 || \

+ 56 - 0
target/csky/Makefile

@@ -0,0 +1,56 @@
+# 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
+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}'
+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

+ 1 - 0
target/csky/kernel/generic-csky

@@ -0,0 +1 @@
+CONFIG_CSKY=y

+ 246 - 0
target/csky/uclibc-ng.config

@@ -0,0 +1,246 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# uClibc-ng 1.0.24 C Library Configuration
+#
+# TARGET_aarch64 is not set
+# TARGET_alpha is not set
+# TARGET_arc is not set
+# 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_csky=y
+# TARGET_frv is not set
+# TARGET_h8300 is not set
+# TARGET_hppa is not set
+# TARGET_i386 is not set
+# TARGET_ia64 is not set
+# TARGET_lm32 is not set
+# TARGET_m68k is not set
+# TARGET_metag is not set
+# TARGET_microblaze is not set
+# TARGET_mips is not set
+# TARGET_nds32 is not set
+# TARGET_nios2 is not set
+# TARGET_or1k is not set
+# TARGET_powerpc is not set
+# TARGET_sh is not set
+# TARGET_sparc is not set
+# TARGET_x86_64 is not set
+# TARGET_xtensa is not set
+
+#
+# Target Architecture Features and Options
+#
+TARGET_ARCH="csky"
+FORCE_OPTIONS_FOR_ARCH=y
+CK610=y
+# CK810 is not set
+# CK807 is not set
+# CONFIG_NDS32_PAGE_SIZE_4K is not set
+# CONFIG_NDS32_PAGE_SIZE_8K is not set
+TARGET_SUBARCH=""
+
+#
+# Using ELF file format
+#
+ARCH_HAS_DEPRECATED_SYSCALLS=y
+ARCH_ANY_ENDIAN=y
+ARCH_LITTLE_ENDIAN=y
+# ARCH_WANTS_BIG_ENDIAN is not set
+ARCH_WANTS_LITTLE_ENDIAN=y
+ARCH_HAS_MMU=y
+ARCH_USE_MMU=y
+UCLIBC_HAS_FLOATS=y
+UCLIBC_HAS_FPU=y
+DO_C99_MATH=y
+DO_XSI_MATH=y
+# UCLIBC_HAS_FENV is not set
+UCLIBC_HAS_LONG_DOUBLE_MATH=y
+KERNEL_HEADERS=""
+HAVE_DOT_CONFIG=y
+
+#
+# General Library Settings
+#
+DOPIC=y
+HAVE_SHARED=y
+# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
+LDSO_LDD_SUPPORT=y
+LDSO_CACHE_SUPPORT=y
+# LDSO_PRELOAD_ENV_SUPPORT is not set
+# LDSO_PRELOAD_FILE_SUPPORT is not set
+LDSO_BASE_FILENAME="ld.so"
+# LDSO_STANDALONE_SUPPORT is not set
+# LDSO_PRELINK_SUPPORT is not set
+# UCLIBC_STATIC_LDCONFIG is not set
+LDSO_RUNPATH=y
+LDSO_RUNPATH_OF_EXECUTABLE=y
+LDSO_SAFE_RUNPATH=y
+LDSO_SEARCH_INTERP_PATH=y
+LDSO_LD_LIBRARY_PATH=y
+LDSO_NO_CLEANUP=y
+UCLIBC_CTOR_DTOR=y
+# LDSO_GNU_HASH_SUPPORT is not set
+# HAS_NO_THREADS is not set
+# UCLIBC_HAS_LINUXTHREADS is not set
+UCLIBC_HAS_THREADS_NATIVE=y
+UCLIBC_HAS_THREADS=y
+UCLIBC_HAS_TLS=y
+PTHREADS_DEBUG_SUPPORT=y
+UCLIBC_HAS_SYSLOG=y
+UCLIBC_HAS_LFS=y
+# MALLOC is not set
+# MALLOC_SIMPLE is not set
+MALLOC_STANDARD=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
+UCLIBC_SUSV4_LEGACY=y
+# UCLIBC_STRICT_HEADERS is not set
+# UCLIBC_HAS_STUBS is not set
+UCLIBC_HAS_SHADOW=y
+UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
+UCLIBC_HAS___PROGNAME=y
+UCLIBC_HAS_PTY=y
+ASSUME_DEVPTS=y
+UNIX98PTY_ONLY=y
+UCLIBC_HAS_GETPT=y
+UCLIBC_HAS_LIBUTIL=y
+UCLIBC_HAS_TM_EXTENSIONS=y
+UCLIBC_HAS_TZ_CACHING=y
+UCLIBC_HAS_TZ_FILE=y
+UCLIBC_HAS_TZ_FILE_READ_MANY=y
+UCLIBC_TZ_FILE_PATH="/etc/TZ"
+UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y
+
+#
+# Advanced Library Settings
+#
+UCLIBC_PWD_BUFFER_SIZE=256
+UCLIBC_GRP_BUFFER_SIZE=256
+
+#
+# Support various families of functions
+#
+UCLIBC_LINUX_SPECIFIC=y
+UCLIBC_HAS_GNU_ERROR=y
+UCLIBC_BSD_SPECIFIC=y
+UCLIBC_HAS_BSD_ERR=y
+UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
+# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
+# UCLIBC_NTP_LEGACY is not set
+UCLIBC_SV4_DEPRECATED=y
+UCLIBC_HAS_REALTIME=y
+UCLIBC_HAS_ADVANCED_REALTIME=y
+UCLIBC_HAS_EPOLL=y
+UCLIBC_HAS_XATTR=y
+# UCLIBC_HAS_PROFILING is not set
+UCLIBC_HAS_CRYPT_IMPL=y
+UCLIBC_HAS_SHA256_CRYPT_IMPL=y
+UCLIBC_HAS_SHA512_CRYPT_IMPL=y
+UCLIBC_HAS_CRYPT=y
+UCLIBC_HAS_NETWORK_SUPPORT=y
+UCLIBC_HAS_SOCKET=y
+UCLIBC_HAS_IPV4=y
+UCLIBC_HAS_IPV6=y
+UCLIBC_USE_NETLINK=y
+UCLIBC_SUPPORT_AI_ADDRCONFIG=y
+UCLIBC_HAS_BSD_RES_CLOSE=y
+UCLIBC_HAS_COMPAT_RES_STATE=y
+# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
+UCLIBC_HAS_RESOLVER_SUPPORT=y
+
+#
+# String and Stdio Support
+#
+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
+UCLIBC_HAS_CTYPE_CHECKED=y
+# UCLIBC_HAS_CTYPE_ENFORCED is not set
+UCLIBC_HAS_WCHAR=y
+# UCLIBC_HAS_LIBICONV is not set
+# UCLIBC_HAS_LIBINTL is not set
+# UCLIBC_HAS_LOCALE is not set
+UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
+# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
+UCLIBC_HAS_STDIO_BUFSIZ_4096=y
+# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
+UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
+# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
+UCLIBC_HAS_STDIO_GETC_MACRO=y
+UCLIBC_HAS_STDIO_PUTC_MACRO=y
+UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
+# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
+UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
+UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE=y
+UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
+UCLIBC_HAS_PRINTF_M_SPEC=y
+UCLIBC_HAS_ERRNO_MESSAGES=y
+# UCLIBC_HAS_SYS_ERRLIST is not set
+UCLIBC_HAS_SIGNUM_MESSAGES=y
+# UCLIBC_HAS_SYS_SIGLIST is not set
+UCLIBC_HAS_GNU_GETOPT=y
+UCLIBC_HAS_GETOPT_LONG=y
+UCLIBC_HAS_GNU_GETSUBOPT=y
+UCLIBC_HAS_ARGP=y
+
+#
+# Big and Tall
+#
+UCLIBC_HAS_REGEX=y
+UCLIBC_HAS_FNMATCH=y
+UCLIBC_HAS_WORDEXP=y
+UCLIBC_HAS_NFTW=y
+UCLIBC_HAS_FTW=y
+UCLIBC_HAS_FTS=y
+UCLIBC_HAS_GLOB=y
+UCLIBC_HAS_GNU_GLOB=y
+
+#
+# Library Installation Options
+#
+RUNTIME_PREFIX="/"
+DEVEL_PREFIX="/usr/"
+MULTILIB_DIR="lib"
+HARDWIRED_ABSPATH=y
+
+#
+# Security options
+#
+# UCLIBC_HAS_ARC4RANDOM is not set
+# UCLIBC_HAS_SSP is not set
+# UCLIBC_BUILD_RELRO is not set
+# UCLIBC_BUILD_NOW is not set
+UCLIBC_BUILD_NOEXECSTACK=y
+
+#
+# Development/debugging options
+#
+CROSS_COMPILER_PREFIX=""
+UCLIBC_EXTRA_CFLAGS=""
+# DODEBUG is not set
+# DOSTRIP is not set
+# DOASSERTS is not set
+# SUPPORT_LD_DEBUG is not set
+# SUPPORT_LD_DEBUG_EARLY is not set
+# UCLIBC_MALLOC_DEBUGGING is not set
+# UCLIBC_HAS_BACKTRACE is not set
+WARNINGS="-Wall"
+# EXTRA_WARNINGS is not set

+ 7 - 0
toolchain/binutils/Makefile.inc

@@ -30,6 +30,13 @@ PKG_RELEASE:=		1
 PKG_SITES:=		https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb.git
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif
+ifeq ($(ADK_TOOLCHAIN_BINUTILS_CSKY),y)
+PKG_VERSION:=		binutils-2_27-branch-csky
+PKG_GIT:=		branch
+PKG_RELEASE:=		1
+PKG_SITES:=		https://github.com/c-sky/binutils-gdb.git
+DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
+endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_NDS32),y)
 PKG_VERSION:=		2.24-nds32
 PKG_RELEASE:=		1

+ 4 - 0
toolchain/gcc/Makefile

@@ -118,6 +118,10 @@ ifeq ($(ADK_TARGET_ARCH_BFIN),y)
 GCC_CONFOPTS+=		--disable-symvers
 endif
 
+ifeq ($(ADK_TARGET_ARCH_CSKY),y)
+GCC_CONFOPTS+=		--with-cskyabi=abiv1
+endif
+
 ifeq ($(ADK_TARGET_ARCH_METAG),y)
 GCC_CONFOPTS+=		--with-cpu=2.1 --enable-meta-default --disable-symvers
 endif

+ 7 - 0
toolchain/gcc/Makefile.inc

@@ -33,6 +33,13 @@ PKG_SITES:=		https://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git
 PKG_RELEASE:=		1
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif
+ifeq ($(ADK_TOOLCHAIN_GCC_CSKY),y)
+PKG_VERSION:=		gcc-6-branch-csky
+PKG_GIT:=		branch
+PKG_SITES:=		https://github.com/c-sky/gcc.git
+PKG_RELEASE:=		1
+DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
+endif
 ifeq ($(ADK_TOOLCHAIN_GCC_OR1K),y)
 PKG_VERSION:=		musl-5.4.0
 PKG_GIT:=		branch