From 35bd94edb54655bb829e72d416d0645d8d9a5680 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 26 Jun 2016 13:39:41 +0200 Subject: linux: update to 4.6.3 --- mk/kernel-ver.mk | 6 +-- target/config/Config.in.kernelversion | 10 ++-- .../patches/4.6.2/initramfs-nosizelimit.patch | 57 ---------------------- target/linux/patches/4.6.2/ld-or1k.patch | 12 ----- target/linux/patches/4.6.2/startup.patch | 34 ------------- .../patches/4.6.3/initramfs-nosizelimit.patch | 57 ++++++++++++++++++++++ target/linux/patches/4.6.3/ld-or1k.patch | 12 +++++ target/linux/patches/4.6.3/startup.patch | 34 +++++++++++++ 8 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 target/linux/patches/4.6.2/initramfs-nosizelimit.patch delete mode 100644 target/linux/patches/4.6.2/ld-or1k.patch delete mode 100644 target/linux/patches/4.6.2/startup.patch create mode 100644 target/linux/patches/4.6.3/initramfs-nosizelimit.patch create mode 100644 target/linux/patches/4.6.3/ld-or1k.patch create mode 100644 target/linux/patches/4.6.3/startup.patch diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index 9dcee0a1b..ff786bbe9 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -19,11 +19,11 @@ endif KERNEL_RELEASE:= 1 KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE) endif -ifeq ($(ADK_TARGET_KERNEL_VERSION_4_6_2),y) -KERNEL_FILE_VER:= 4.6.2 +ifeq ($(ADK_TARGET_KERNEL_VERSION_4_6_3),y) +KERNEL_FILE_VER:= 4.6.3 KERNEL_RELEASE:= 1 KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE) -KERNEL_HASH:= e158f3c69da87c2ec28d0f194dbe18b05e0d0b9e1142566615cea3390bab1c6a +KERNEL_HASH:= 13188892941ea6c21d5db5a391ee73a27ef20de4cc81f14574aff0a522630967 endif ifeq ($(ADK_TARGET_KERNEL_VERSION_4_5_7),y) KERNEL_FILE_VER:= 4.5.7 diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion index f44d00c83..397f5a887 100644 --- a/target/config/Config.in.kernelversion +++ b/target/config/Config.in.kernelversion @@ -4,16 +4,16 @@ choice prompt "Kernel version" if !ADK_TARGET_CHOOSE_ARCH depends on ADK_TARGET_OS_LINUX -default ADK_TARGET_KERNEL_VERSION_4_6_2 if ADK_TARGET_ARCH_ARC -default ADK_TARGET_KERNEL_VERSION_4_6_2 if ADK_TARGET_ARCH_NIOS2 -default ADK_TARGET_KERNEL_VERSION_4_6_2 if ADK_TARGET_ARCH_XTENSA +default ADK_TARGET_KERNEL_VERSION_4_6_3 if ADK_TARGET_ARCH_ARC +default ADK_TARGET_KERNEL_VERSION_4_6_3 if ADK_TARGET_ARCH_NIOS2 +default ADK_TARGET_KERNEL_VERSION_4_6_3 if ADK_TARGET_ARCH_XTENSA default ADK_TARGET_KERNEL_VERSION_4_4_13 config ADK_TARGET_KERNEL_VERSION_GIT bool "linux-git" -config ADK_TARGET_KERNEL_VERSION_4_6_2 - bool "4.6.2" +config ADK_TARGET_KERNEL_VERSION_4_6_3 + bool "4.6.3" depends on !ADK_TARGET_BOARD_BCM28XX depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 select ADK_TARGET_KERNEL_VERSION_4_6 diff --git a/target/linux/patches/4.6.2/initramfs-nosizelimit.patch b/target/linux/patches/4.6.2/initramfs-nosizelimit.patch deleted file mode 100644 index 40d2f6bd8..000000000 --- a/target/linux/patches/4.6.2/initramfs-nosizelimit.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 9a18df7a71bfa620b1278777d64783a359d7eb4e Mon Sep 17 00:00:00 2001 -From: Thorsten Glaser -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 ---- - 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 - diff --git a/target/linux/patches/4.6.2/ld-or1k.patch b/target/linux/patches/4.6.2/ld-or1k.patch deleted file mode 100644 index 264f9166f..000000000 --- a/target/linux/patches/4.6.2/ld-or1k.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur linux-4.4.5.orig/arch/openrisc/kernel/vmlinux.lds.S linux-4.4.5/arch/openrisc/kernel/vmlinux.lds.S ---- linux-4.4.5.orig/arch/openrisc/kernel/vmlinux.lds.S 2016-03-10 00:35:58.000000000 +0100 -+++ linux-4.4.5/arch/openrisc/kernel/vmlinux.lds.S 2016-03-16 09:21:07.933535532 +0100 -@@ -30,7 +30,7 @@ - #include - #include - --OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32") -+OUTPUT_FORMAT("elf32-or1k", "elf32-or1k", "elf32-or1k") - jiffies = jiffies_64 + 4; - - SECTIONS diff --git a/target/linux/patches/4.6.2/startup.patch b/target/linux/patches/4.6.2/startup.patch deleted file mode 100644 index e54ac19a6..000000000 --- a/target/linux/patches/4.6.2/startup.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -Nur linux-4.4.6.orig/init/initramfs.c linux-4.4.6/init/initramfs.c ---- linux-4.4.6.orig/init/initramfs.c 2016-03-16 16:43:17.000000000 +0100 -+++ linux-4.4.6/init/initramfs.c 2016-03-27 14:15:43.931044532 +0200 -@@ -653,6 +653,9 @@ - */ - load_default_modules(); - } -+#ifdef CONFIG_DEVTMPFS_MOUNT -+ devtmpfs_mount("dev"); -+#endif - return 0; - } - rootfs_initcall(populate_rootfs); -diff -Nur linux-4.4.6.orig/init/main.c linux-4.4.6/init/main.c ---- linux-4.4.6.orig/init/main.c 2016-03-16 16:43:17.000000000 +0100 -+++ linux-4.4.6/init/main.c 2016-03-27 14:15:43.935044783 +0200 -@@ -1011,6 +1011,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); - /* -@@ -1019,7 +1021,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; diff --git a/target/linux/patches/4.6.3/initramfs-nosizelimit.patch b/target/linux/patches/4.6.3/initramfs-nosizelimit.patch new file mode 100644 index 000000000..40d2f6bd8 --- /dev/null +++ b/target/linux/patches/4.6.3/initramfs-nosizelimit.patch @@ -0,0 +1,57 @@ +From 9a18df7a71bfa620b1278777d64783a359d7eb4e Mon Sep 17 00:00:00 2001 +From: Thorsten Glaser +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 +--- + 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 + diff --git a/target/linux/patches/4.6.3/ld-or1k.patch b/target/linux/patches/4.6.3/ld-or1k.patch new file mode 100644 index 000000000..264f9166f --- /dev/null +++ b/target/linux/patches/4.6.3/ld-or1k.patch @@ -0,0 +1,12 @@ +diff -Nur linux-4.4.5.orig/arch/openrisc/kernel/vmlinux.lds.S linux-4.4.5/arch/openrisc/kernel/vmlinux.lds.S +--- linux-4.4.5.orig/arch/openrisc/kernel/vmlinux.lds.S 2016-03-10 00:35:58.000000000 +0100 ++++ linux-4.4.5/arch/openrisc/kernel/vmlinux.lds.S 2016-03-16 09:21:07.933535532 +0100 +@@ -30,7 +30,7 @@ + #include + #include + +-OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32") ++OUTPUT_FORMAT("elf32-or1k", "elf32-or1k", "elf32-or1k") + jiffies = jiffies_64 + 4; + + SECTIONS diff --git a/target/linux/patches/4.6.3/startup.patch b/target/linux/patches/4.6.3/startup.patch new file mode 100644 index 000000000..e54ac19a6 --- /dev/null +++ b/target/linux/patches/4.6.3/startup.patch @@ -0,0 +1,34 @@ +diff -Nur linux-4.4.6.orig/init/initramfs.c linux-4.4.6/init/initramfs.c +--- linux-4.4.6.orig/init/initramfs.c 2016-03-16 16:43:17.000000000 +0100 ++++ linux-4.4.6/init/initramfs.c 2016-03-27 14:15:43.931044532 +0200 +@@ -653,6 +653,9 @@ + */ + load_default_modules(); + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-4.4.6.orig/init/main.c linux-4.4.6/init/main.c +--- linux-4.4.6.orig/init/main.c 2016-03-16 16:43:17.000000000 +0100 ++++ linux-4.4.6/init/main.c 2016-03-27 14:15:43.935044783 +0200 +@@ -1011,6 +1011,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); + /* +@@ -1019,7 +1021,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; -- cgit v1.2.3