Преглед на файлове

add 4.1rc5 for cris testing

Waldemar Brodkorb преди 9 години
родител
ревизия
812b2dc764

+ 6 - 0
mk/kernel-ver.mk

@@ -1,3 +1,9 @@
+ifeq ($(ADK_KERNEL_VERSION_4_1_0_RC5),y)
+KERNEL_VERSION:=	4.1-rc5
+KERNEL_MOD_VERSION:=	$(KERNEL_VERSION)
+KERNEL_RELEASE:=	1
+KERNEL_HASH:=		7b233f20653f9a283d4ecc9c3aecb349d65f1edce8c84f25f53874748b2f1c4f
+endif
 ifeq ($(ADK_KERNEL_VERSION_4_0_4),y)
 ifeq ($(ADK_KERNEL_VERSION_4_0_4),y)
 KERNEL_VERSION:=	4.0.4
 KERNEL_VERSION:=	4.0.4
 KERNEL_MOD_VERSION:=	$(KERNEL_VERSION)
 KERNEL_MOD_VERSION:=	$(KERNEL_VERSION)

+ 1 - 0
mk/linux.mk

@@ -8,5 +8,6 @@ PKG_HASH:=	$(KERNEL_HASH)
 PKG_SITES:=  	${MASTER_SITE_KERNEL:=kernel/v4.x/} \
 PKG_SITES:=  	${MASTER_SITE_KERNEL:=kernel/v4.x/} \
 		${MASTER_SITE_KERNEL:=kernel/v3.x/} \
 		${MASTER_SITE_KERNEL:=kernel/v3.x/} \
 		${MASTER_SITE_KERNEL:=kernel/v3.0/testing/} \
 		${MASTER_SITE_KERNEL:=kernel/v3.0/testing/} \
+		${MASTER_SITE_KERNEL:=kernel/v4.x/testing/} \
 		${MASTER_SITE_KERNEL:=kernel/v2.6/longterm/v2.6.32/}
 		${MASTER_SITE_KERNEL:=kernel/v2.6/longterm/v2.6.32/}
 DISTFILES=	$(PKG_NAME)-$(PKG_VERSION).tar.xz
 DISTFILES=	$(PKG_NAME)-$(PKG_VERSION).tar.xz

+ 4 - 0
target/config/Config.in.kernelversion.choice

@@ -6,6 +6,10 @@ prompt "Kernel Version"
 depends on ADK_TARGET_KERNEL_CUSTOMISING
 depends on ADK_TARGET_KERNEL_CUSTOMISING
 default ADK_KERNEL_VERSION_4_0_4
 default ADK_KERNEL_VERSION_4_0_4
 
 
+config ADK_KERNEL_VERSION_4_1_0_RC5
+	bool "4.1.0rc5"
+	select ADK_KERNEL_VERSION_4_1
+
 config ADK_KERNEL_VERSION_4_0_4
 config ADK_KERNEL_VERSION_4_0_4
 	bool "4.0.4"
 	bool "4.0.4"
 	select ADK_KERNEL_VERSION_4_0
 	select ADK_KERNEL_VERSION_4_0

+ 4 - 0
target/config/Config.in.kernelversion.default

@@ -1,6 +1,9 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 # material, please see the LICENCE file in the top-level directory.
 
 
+config ADK_KERNEL_VERSION_4_1
+	bool
+
 config ADK_KERNEL_VERSION_4_0
 config ADK_KERNEL_VERSION_4_0
 	bool
 	bool
 
 
@@ -27,6 +30,7 @@ config ADK_KERNEL_VERSION_2_6_32
 
 
 config ADK_KERNEL_VERSION
 config ADK_KERNEL_VERSION
 	string
 	string
+	default "4.1.0rc5" if ADK_KERNEL_VERSION_4_1_0_RC5
 	default "4.0.4" if ADK_KERNEL_VERSION_4_0
 	default "4.0.4" if ADK_KERNEL_VERSION_4_0
 	default "3.18.12" if ADK_KERNEL_VERSION_3_18_12
 	default "3.18.12" if ADK_KERNEL_VERSION_3_18_12
 	default "3.14.43" if ADK_KERNEL_VERSION_3_14_43
 	default "3.14.43" if ADK_KERNEL_VERSION_3_14_43

+ 1 - 1
target/cris/Makefile

@@ -9,7 +9,7 @@ include $(ADK_TOPDIR)/mk/image.mk
 
 
 KERNEL:=$(LINUX_DIR)/vmlinux
 KERNEL:=$(LINUX_DIR)/vmlinux
 ZKERNEL:=$(LINUX_DIR)/arch/cris/boot/Image
 ZKERNEL:=$(LINUX_DIR)/arch/cris/boot/Image
-QEMU_ARGS:=-M axis-dev88 -nographic
+QEMU_ARGS:=-M axis-dev88 -nographic -monitor none
 
 
 ifeq ($(ADK_TARGET_FS),initramfs)
 ifeq ($(ADK_TARGET_FS),initramfs)
 targethelp:
 targethelp:

+ 42 - 4
target/cris/kernel/qemu-cris

@@ -1,6 +1,44 @@
-CONFIG_CRIS=y
+CONFIG_BUILTIN_DTB="dev88"
+CONFIG_ETRAX_FAST_TIMER=y
+CONFIG_ETRAX_KMALLOCED_MODULES=y
 CONFIG_ETRAXFS=y
 CONFIG_ETRAXFS=y
-CONFIG_ETRAX_ARCH_V32=y
-CONFIG_ETRAXFS_SERIAL=y
-CONFIG_ETRAX_SERIAL_PORTS=4
+CONFIG_ETRAX_DRAM_SIZE=32
+CONFIG_ETRAX_MEM_GRP1_CONFIG=0x40688
+CONFIG_ETRAX_MEM_GRP2_CONFIG=0x0
+CONFIG_ETRAX_MEM_GRP3_CONFIG=0x06000002
+CONFIG_ETRAX_MEM_GRP4_CONFIG=0x0
+CONFIG_ETRAX_SDRAM_GRP0_CONFIG=0x114b
+CONFIG_ETRAX_SDRAM_GRP1_CONFIG=0x0
+CONFIG_ETRAX_SDRAM_TIMING=0x424a
+CONFIG_ETRAX_SDRAM_COMMAND=0x0
+CONFIG_ETRAX_DEF_GIO_PA_OE=0x7c
+CONFIG_ETRAX_DEF_GIO_PA_OUT=0x00
+CONFIG_ETRAX_DEF_GIO_PB_OE=0x3f111
+CONFIG_ETRAX_DEF_GIO_PB_OUT=0x03000
+CONFIG_ETRAX_DEF_GIO_PC_OE=0x03330
+CONFIG_ETRAX_DEF_GIO_PC_OUT=0x00000
+CONFIG_ETRAX_DEF_GIO_PD_OE=0x0015a
+CONFIG_ETRAX_DEF_GIO_PD_OUT=0x00100
+CONFIG_ETRAX_DEF_GIO_PE_OE=0x00000
+CONFIG_ETRAX_DEF_GIO_PE_OUT=0x00000
+CONFIG_ETRAX_LED_G_NET0="PA2"
+CONFIG_ETRAX_LED_R_NET0="PA2"
+CONFIG_ETRAX_V32_LED2G="PA3"
+CONFIG_ETRAX_V32_LED2R="PA3"
+CONFIG_ETRAX_V32_LED3G="PA3"
+CONFIG_ETRAX_V32_LED3R="PA3"
+CONFIG_ETRAX_ETHERNET=y
 CONFIG_ETRAX_SERIAL_PORT0=y
 CONFIG_ETRAX_SERIAL_PORT0=y
+CONFIG_ETRAX_SERIAL_PORT1=y
+CONFIG_ETRAX_SERIAL_PORT2=y
+CONFIG_ETRAX_SERIAL_PORT3=y
+CONFIG_ETRAX_PTABLE_SECTOR=262144
+CONFIG_ETRAX_PB_CHANGEABLE_BITS=0x3f000
+CONFIG_ETRAX_PD_CHANGEABLE_DIR=0x00010
+CONFIG_ETRAX_PD_CHANGEABLE_BITS=0x0011a
+CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK=y
+CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_OUT=y
+CONFIG_ETRAX_SERIAL_PORT1_DMA5_IN=y
+CONFIG_ETRAX_SERIAL_PORT1_DMA4_OUT=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y

+ 5 - 1
target/linux/config/Config.in.serial

@@ -1,8 +1,12 @@
 menu "Serial devices support"
 menu "Serial devices support"
 depends on ADK_TARGET_WITH_SERIAL || ADK_TARGET_QEMU || ADK_TARGET_VBOX
 depends on ADK_TARGET_WITH_SERIAL || ADK_TARGET_QEMU || ADK_TARGET_VBOX
 
 
-config ADK_KERNEL_ETRAXFS_SERIAL
+config ADK_KERNEL_SERIAL_ETRAXFS_CONSOLE
+	bool
+
+config ADK_KERNEL_SERIAL_ETRAXFS
 	bool "ETRAXFS serial driver"
 	bool "ETRAXFS serial driver"
+	select ADK_KERNEL_SERIAL_ETRAXFS_CONSOLE
 	default y if ADK_TARGET_SYSTEM_QEMU_CRIS
 	default y if ADK_TARGET_SYSTEM_QEMU_CRIS
 	default n
 	default n
 	help
 	help

+ 12 - 0
target/linux/patches/4.1-rc5/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.1-rc5/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
+

+ 37 - 0
target/linux/patches/4.1-rc5/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;