Browse Source

arc: add support for free nSIM simulator, thx to Alexey for hints to get it running

Waldemar Brodkorb 8 years ago
parent
commit
f6de4889c7

+ 6 - 0
mk/kernel-ver.mk

@@ -15,6 +15,12 @@ KERNEL_FILE_VER:=	$(ADK_TARGET_KERNEL_HASH)
 KERNEL_RELEASE:=	1
 KERNEL_VERSION:=	$(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
 endif
+ifeq ($(ADK_TARGET_KERNEL_VERSION_4_2_4),y)
+KERNEL_FILE_VER:=	4.2.4
+KERNEL_RELEASE:=	1
+KERNEL_VERSION:=	$(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
+KERNEL_HASH:=		167a58414805918d01eee9265f56408f6a03113e78ff78f9f6fa8476b4c82ff2
+endif
 ifeq ($(ADK_TARGET_KERNEL_VERSION_4_1_10),y)
 KERNEL_FILE_VER:=	4.1.10
 KERNEL_RELEASE:=	1

+ 11 - 0
scripts/nsim.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+arch=$1
+kernel=$2
+
+if [ "$arch" = "arcv1" ]; then
+  nsimdrv -prop=nsim_isa_family=a700 -prop=nsim_isa_atomic_option=1 -prop=nsim_mmu=3 -prop=icache=32768,64,2,0 -prop=dcache=32768,64,4,0 -prop=nsim_isa_dpfp=none -prop=nsim_isa_shift_option=2 -prop=nsim_isa_swap_option=1 -prop=nsim_isa_bitscan_option=1 -prop=nsim_isa_sat=1 -prop=nsim_isa_mpy32=1 -prop=nsim_isa_enable_timer_0=1 -prop=nsim_isa_enable_timer_1=1 -prop=nsim_mem-dev=uart0 $kernel
+fi
+if [ "$arch" = "arcv2" ]; then
+  nsimdrv -prop=nsim_isa_family=av2hs -prop=nsim_isa_core=1 -prop=chipid=0xffff -prop=nsim_isa_atomic_option=1 -prop=nsim_isa_ll64_option=1 -prop=nsim_mmu=4 -prop=mmu_pagesize=8192 -prop=mmu_super_pagesize=2097152 -prop=mmu_stlb_entries=16 -prop=mmu_ntlb_ways=4 -prop=mmu_ntlb_sets=128 -prop=icache=32768,64,4,0 -prop=dcache=16384,64,2,0 -prop=nsim_isa_shift_option=2 -prop=nsim_isa_swap_option=1 -prop=nsim_isa_bitscan_option=1 -prop=nsim_isa_sat=1 -prop=nsim_isa_div_rem_option=1 -prop=nsim_isa_mpy_option=9 -prop=nsim_isa_enable_timer_0=1 -prop=nsim_isa_enable_timer_1=1 -prop=nsim_isa_number_of_interrupts=32 -prop=nsim_isa_number_of_external_interrupts=32 -prop=isa_counters=1 -prop=nsim_isa_pct_counters=8 -prop=nsim_isa_pct_size=48 -prop=nsim_isa_pct_interrupt=0 -prop=nsim_mem-dev=uart0,base=0xc0fc1000,irq=24 -prop=nsim_isa_aps_feature=1 -prop=nsim_isa_num_actionpoints=4 $kernel
+fi

+ 55 - 0
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

+ 5 - 0
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"

+ 4 - 0
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"

+ 7 - 0
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.
+

+ 7 - 0
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.
+

+ 9 - 21
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

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

@@ -18,4 +18,6 @@ config ADK_TARGET_KERNEL_DEFCONFIG
 	default "bcmrpi_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI
 	default "twr-k70f120m_defconfig" if ADK_TARGET_SYSTEM_KINETIS_K70
 	default "imx_v7_cbi_hb_defconfig" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
+	default "nsim_700_defconfig" if ADK_TARGET_SYSTEM_NSIM_ARCV1
+	default "nsim_hs_defconfig" if ADK_TARGET_SYSTEM_NSIM_ARCV2
 

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

@@ -8,15 +8,21 @@ default ADK_TARGET_KERNEL_VERSION_4_1_10
 
 config ADK_TARGET_KERNEL_VERSION_GIT
 	bool "linux-git"
+
+config ADK_TARGET_KERNEL_VERSION_4_2_4
+	bool "4.2.4"
+	select ADK_TARGET_KERNEL_VERSION_4_2
 	
 config ADK_TARGET_KERNEL_VERSION_4_1_10
 	bool "4.1.10"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_SYSTEM_KINETIS_K70
 	select ADK_TARGET_KERNEL_VERSION_4_1
 
 config ADK_TARGET_KERNEL_VERSION_3_18_22
 	bool "3.18.22"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB4XX
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
@@ -30,6 +36,7 @@ config ADK_TARGET_KERNEL_VERSION_3_18_22
 
 config ADK_TARGET_KERNEL_VERSION_3_14_54
 	bool "3.14.54"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_NIOS2
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
@@ -40,6 +47,7 @@ config ADK_TARGET_KERNEL_VERSION_3_14_54
 
 config ADK_TARGET_KERNEL_VERSION_3_12_48
 	bool "3.12.48"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
 	depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB4XX
 	depends on !ADK_TARGET_ARCH_NIOS2
@@ -53,6 +61,7 @@ config ADK_TARGET_KERNEL_VERSION_3_12_48
 
 config ADK_TARGET_KERNEL_VERSION_3_10_90
 	bool "3.10.90"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
 	depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB4XX
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
@@ -66,6 +75,7 @@ config ADK_TARGET_KERNEL_VERSION_3_10_90
 
 config ADK_TARGET_KERNEL_VERSION_3_4_109
 	bool "3.4.109"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
 	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -79,6 +89,7 @@ config ADK_TARGET_KERNEL_VERSION_3_4_109
 
 config ADK_TARGET_KERNEL_VERSION_3_2_71
 	bool "3.2.71"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
 	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -92,6 +103,7 @@ config ADK_TARGET_KERNEL_VERSION_3_2_71
 
 config ADK_TARGET_KERNEL_VERSION_2_6_32_68
 	bool "2.6.32.68"
+	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
 	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
 	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -118,6 +130,9 @@ config ADK_TARGET_KERNEL_HASH
 	help
 	  GIT hash to use.
 
+config ADK_TARGET_KERNEL_VERSION_4_2
+	bool
+
 config ADK_TARGET_KERNEL_VERSION_4_1
 	bool
 

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

@@ -232,6 +232,8 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
 		|| ADK_TARGET_SIM
 	default "hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64
 	default "ttyUL0" if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800
+	default "ttyARC0" if ADK_TARGET_SYSTEM_NSIM_ARCV1 \
+				|| ADK_TARGET_SYSTEM_NSIM_ARCV2
 	default "ttyAMA0" if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB \
 				|| ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9 \
 				|| ADK_TARGET_SYSTEM_ARM_FM \

+ 1 - 0
target/config/Config.in.target

@@ -39,6 +39,7 @@ config ADK_TARGET_ROOTFS_INITRAMFSPIGGYBACK
 		ADK_TARGET_SIM || \
 		ADK_TARGET_SYSTEM_OR1K_SIM || \
 		ADK_TARGET_ARCH_AARCH64 || \
+		ADK_TARGET_ARCH_ARC || \
 		ADK_TARGET_ARCH_ARM || \
 		ADK_TARGET_ARCH_M68K || \
 		ADK_TARGET_ARCH_MICROBLAZE || \

+ 7 - 0
target/linux/config/Config.in.ethernet

@@ -5,9 +5,13 @@ menu "Ethernet network devices support"
 depends on ADK_TARGET_WITH_NET
 
 # vendor stuff
+
 config ADK_KERNEL_NET_CADENCE
 	bool
 
+config ADK_KERNEL_NET_VENDOR_ARC
+	bool
+
 config ADK_KERNEL_NET_VENDOR_AMD
 	bool
 
@@ -77,6 +81,9 @@ config ADK_KERNEL_VIA_RHINE_MMIO
 config ADK_KERNEL_STMMAC_PLATFORM
 	bool
 
+config ADK_KERNEL_LXT_PHY
+	bool
+
 config ADK_KERNEL_AT803X_PHY
 	tristate
 	select ADK_KERNEL_PHYLIB

+ 14 - 0
target/linux/config/Config.in.serial

@@ -10,6 +10,9 @@ config ADK_KERNEL_SERIAL_8250_CONSOLE
 config ADK_KERNEL_SERIAL_8250_PNP
 	bool
 
+config ADK_KERNEL_SERIAL_ARC_CONSOLE
+	bool
+
 config ADK_KERNEL_SERIAL_IMX_CONSOLE
 	bool
 
@@ -81,6 +84,17 @@ config ADK_KERNEL_SERIAL_ETRAXFS
 	help
 	  Serial driver for ETRAXFS CRISv32 Qemu Emulation.
 
+config ADK_KERNEL_SERIAL_ARC
+	bool "ARC serial driver"
+	select ADK_KERNEL_SERIAL_ARC_CONSOLE
+	depends on ADK_TARGET_SYSTEM_NSIM_ARCV1 \
+		|| ADK_TARGET_SYSTEM_NSIM_ARCV2
+	default y if ADK_TARGET_SYSTEM_NSIM_ARCV1
+	default y if ADK_TARGET_SYSTEM_NSIM_ARCV2
+	default n
+	help
+	  Serial driver for nSIM ARC simulator.
+
 config ADK_KERNEL_SERIAL_IMX
 	bool "IMX serial driver"
 	select ADK_KERNEL_SERIAL_IMX_CONSOLE

+ 12 - 0
target/linux/patches/4.2.4/cris-header.patch

@@ -0,0 +1,12 @@
+diff -Nur linux-3.16.2.orig/arch/cris/include/arch-v10/arch/Kbuild linux-3.16.2/arch/cris/include/arch-v10/arch/Kbuild
+--- linux-3.16.2.orig/arch/cris/include/arch-v10/arch/Kbuild	2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/arch/cris/include/arch-v10/arch/Kbuild	2014-09-26 19:24:50.000000000 +0200
+@@ -1 +1,2 @@
+ # CRISv10 arch
++header-y += ptrace.h
+diff -Nur linux-3.16.2.orig/arch/cris/include/arch-v32/arch/Kbuild linux-3.16.2/arch/cris/include/arch-v32/arch/Kbuild
+--- linux-3.16.2.orig/arch/cris/include/arch-v32/arch/Kbuild	2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/arch/cris/include/arch-v32/arch/Kbuild	2014-09-26 19:24:31.000000000 +0200
+@@ -1 +1,2 @@
+ # CRISv32 arch
++header-y += ptrace.h

+ 57 - 0
target/linux/patches/4.2.4/initramfs-nosizelimit.patch

@@ -0,0 +1,57 @@
+From 9a18df7a71bfa620b1278777d64783a359d7eb4e Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.org>
+Date: Sun, 4 May 2014 01:37:54 +0200
+Subject: [PATCH] mount tmpfs-as-rootfs (initramfs) with -o
+ nr_blocks=0,nr_inodes=0
+
+I would have preferred to write this patch to be able to pass
+rootflags=nr_blocks=0,nr_inodes=0 on the kernel command line,
+and then hand these rootflags over to the initramfs (tmpfs)
+mount in the same way the kernel hands them over to the block
+device rootfs mount. But at least the Debian/m68k initrd also
+parses $rootflags from the environment and adds it to the call
+to the user-space mount for the eventual root device, which
+would make the kernel command line rootflags option be used in
+both places (tmpfs and e.g. ext4) which is guaranteed to error
+out in at least one of them.
+
+This change is intended to aid people in a setup where the
+initrd is the final root filesystem, i.e. not mounted over.
+This is especially useful in automated tests running on qemu
+for boards with constrained memory (e.g. 64 MiB on sh4).
+
+Considering that the initramfs is normally emptied out then
+overmounted, this change is probably safe for setups where
+initramfs just hosts early userspace, too, since the tmpfs
+backing it is not accessible any more later on, AFAICT.
+
+Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
+---
+ init/do_mounts.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/init/do_mounts.c b/init/do_mounts.c
+index 82f2288..55a4cfe 100644
+--- a/init/do_mounts.c
++++ b/init/do_mounts.c
+@@ -594,6 +594,7 @@ out:
+ }
+ 
+ static bool is_tmpfs;
++static char tmpfs_rootflags[] = "nr_blocks=0,nr_inodes=0";
+ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
+ 	int flags, const char *dev_name, void *data)
+ {
+@@ -606,6 +607,9 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
+ 	if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)
+ 		fill = shmem_fill_super;
+ 
++	if (is_tmpfs)
++		data = tmpfs_rootflags;
++
+ 	return mount_nodev(fs_type, flags, data, fill);
+ }
+ 
+-- 
+2.0.0.rc0
+

+ 17 - 0
target/linux/patches/4.2.4/regmap-default-on.patch

@@ -0,0 +1,17 @@
+diff -Nur linux-4.1.6.orig/drivers/base/regmap/Kconfig linux-4.1.6/drivers/base/regmap/Kconfig
+--- linux-4.1.6.orig/drivers/base/regmap/Kconfig	2015-08-17 05:52:51.000000000 +0200
++++ linux-4.1.6/drivers/base/regmap/Kconfig	2015-08-29 22:18:50.329683337 +0200
+@@ -3,7 +3,7 @@
+ # subsystems should select the appropriate symbols.
+ 
+ config REGMAP
+-	default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
++	default y
+ 	select LZO_COMPRESS
+ 	select LZO_DECOMPRESS
+ 	select IRQ_DOMAIN if REGMAP_IRQ
+@@ -29,3 +29,4 @@
+ 
+ config REGMAP_IRQ
+ 	bool
++	default y

+ 37 - 0
target/linux/patches/4.2.4/startup.patch

@@ -0,0 +1,37 @@
+diff -Nur linux-3.13.3.orig/init/main.c linux-3.13.3/init/main.c
+--- linux-3.13.3.orig/init/main.c	2014-02-13 23:00:14.000000000 +0100
++++ linux-3.13.3/init/main.c	2014-02-17 11:35:14.000000000 +0100
+@@ -916,6 +917,8 @@
+ 	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
+ 		pr_err("Warning: unable to open an initial console.\n");
+ 
++	printk(KERN_WARNING "Starting Linux (built with OpenADK).\n");
++
+ 	(void) sys_dup(0);
+ 	(void) sys_dup(0);
+ 	/*
+diff -Nur linux-3.13.6.orig/init/initramfs.c linux-3.13.6/init/initramfs.c
+--- linux-3.13.6.orig/init/initramfs.c	2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/init/initramfs.c	2014-03-15 12:11:31.882731916 +0100
+@@ -622,6 +622,9 @@
+ 		 */
+ 		load_default_modules();
+ 	}
++#ifdef CONFIG_DEVTMPFS_MOUNT
++	devtmpfs_mount("dev");
++#endif
+ 	return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.13.6.orig/init/main.c linux-3.13.6/init/main.c
+--- linux-3.13.6.orig/init/main.c	2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/init/main.c	2014-03-15 12:13:16.459024452 +0100
+@@ -924,7 +924,7 @@
+ 	 */
+ 
+ 	if (!ramdisk_execute_command)
+-		ramdisk_execute_command = "/init";
++		ramdisk_execute_command = "/sbin/init";
+ 
+ 	if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) {
+ 		ramdisk_execute_command = NULL;

+ 1 - 1
toolchain/binutils/Makefile.inc

@@ -17,7 +17,7 @@ PKG_SITES:=		${MASTER_SITE_GNU:=binutils/}
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
 endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_23_ARC),y)
-PKG_VERSION:=		a6014a956a4f2263c28240bb9191bee8f924b5db
+PKG_VERSION:=		07548f412246c68cd098b7b8fe3b7f86f43e4180
 PKG_RELEASE:=		1
 PKG_SITES:=		https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb.git
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz

+ 2 - 2
toolchain/uclibc-ng/Makefile

@@ -166,11 +166,11 @@ endif
 
 # arc
 ifeq ($(ADK_TARGET_ARCH_ARC),y)
-ifeq ($(ADK_TARGET_CPU_ARC_ARC700),y)
+ifeq ($(ADK_CPU_ARC700),y)
 	$(SED) 's/.*\(CONFIG_ARC_CPU_HS\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_ARC_CPU_700\).*/\1=y/' ${WRKBUILD}/.config
 endif
-ifeq ($(ADK_TARGET_CPU_ARC_ARC_HS),y)
+ifeq ($(ADK_CPU_ARC_HS),y)
 	$(SED) 's/.*\(CONFIG_ARC_CPU_700\).*/# \1 is not set/' ${WRKBUILD}/.config
 	$(SED) 's/.*\(CONFIG_ARC_CPU_HS\).*/\1=y/' ${WRKBUILD}/.config
 endif