From e0c1a232a942177fe01a8ffc9ffe1606d886bbd5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 13 Jun 2015 14:30:59 -0500 Subject: update kernel to 4.0.5 --- mk/kernel-ver.mk | 6 +- target/config/Config.in.kernelversion.choice | 6 +- target/config/Config.in.kernelversion.default | 2 +- target/linux/patches/4.0.4/cris-header.patch | 12 --- .../patches/4.0.4/initramfs-nosizelimit.patch | 57 ---------- target/linux/patches/4.0.4/startup.patch | 37 ------- target/linux/patches/4.0.5/cris-header.patch | 12 +++ .../patches/4.0.5/initramfs-nosizelimit.patch | 57 ++++++++++ target/linux/patches/4.0.5/startup.patch | 37 +++++++ .../patches/4.0.4/m68k-coldfire-fec.patch | 118 --------------------- .../qemu-m68k/patches/4.0.4/qemu-coldfire.patch | 24 ----- .../patches/4.0.5/m68k-coldfire-fec.patch | 118 +++++++++++++++++++++ .../qemu-m68k/patches/4.0.5/qemu-coldfire.patch | 24 +++++ 13 files changed, 255 insertions(+), 255 deletions(-) delete mode 100644 target/linux/patches/4.0.4/cris-header.patch delete mode 100644 target/linux/patches/4.0.4/initramfs-nosizelimit.patch delete mode 100644 target/linux/patches/4.0.4/startup.patch create mode 100644 target/linux/patches/4.0.5/cris-header.patch create mode 100644 target/linux/patches/4.0.5/initramfs-nosizelimit.patch create mode 100644 target/linux/patches/4.0.5/startup.patch delete mode 100644 target/m68k/qemu-m68k/patches/4.0.4/m68k-coldfire-fec.patch delete mode 100644 target/m68k/qemu-m68k/patches/4.0.4/qemu-coldfire.patch create mode 100644 target/m68k/qemu-m68k/patches/4.0.5/m68k-coldfire-fec.patch create mode 100644 target/m68k/qemu-m68k/patches/4.0.5/qemu-coldfire.patch diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index fc6bc4be7..2ee71d4f5 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -4,11 +4,11 @@ KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 KERNEL_HASH:= 7b233f20653f9a283d4ecc9c3aecb349d65f1edce8c84f25f53874748b2f1c4f endif -ifeq ($(ADK_KERNEL_VERSION_4_0_4),y) -KERNEL_VERSION:= 4.0.4 +ifeq ($(ADK_KERNEL_VERSION_4_0_5),y) +KERNEL_VERSION:= 4.0.5 KERNEL_MOD_VERSION:= $(KERNEL_VERSION) KERNEL_RELEASE:= 1 -KERNEL_HASH:= 30651ccd2cdf01ea2215cd39a94d9b684c1b3a681120f33e6605b467fe41b4c8 +KERNEL_HASH:= e24b3d8d6bb203752a2ad8e7cdd408e589d0eda858c4eb330728d9a658ec33d1 endif ifeq ($(ADK_KERNEL_VERSION_3_18_14),y) KERNEL_VERSION:= 3.18.14 diff --git a/target/config/Config.in.kernelversion.choice b/target/config/Config.in.kernelversion.choice index 5332381b0..a83d2c0f4 100644 --- a/target/config/Config.in.kernelversion.choice +++ b/target/config/Config.in.kernelversion.choice @@ -4,7 +4,7 @@ choice prompt "Kernel Version" depends on ADK_TARGET_KERNEL_CUSTOMISING -default ADK_KERNEL_VERSION_4_0_4 +default ADK_KERNEL_VERSION_4_0_5 config ADK_KERNEL_VERSION_GIT bool "linux-git" @@ -13,8 +13,8 @@ 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 - bool "4.0.4" +config ADK_KERNEL_VERSION_4_0_5 + bool "4.0.5" select ADK_KERNEL_VERSION_4_0 config ADK_KERNEL_VERSION_3_18_14 diff --git a/target/config/Config.in.kernelversion.default b/target/config/Config.in.kernelversion.default index 3a81347d2..7782bce3d 100644 --- a/target/config/Config.in.kernelversion.default +++ b/target/config/Config.in.kernelversion.default @@ -31,7 +31,7 @@ config ADK_KERNEL_VERSION_2_6_32 config ADK_KERNEL_VERSION 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.5" if ADK_KERNEL_VERSION_4_0 default "3.18.14" if ADK_KERNEL_VERSION_3_18_14 default "3.14.43" if ADK_KERNEL_VERSION_3_14_43 default "3.12.40" if ADK_KERNEL_VERSION_3_12_40 diff --git a/target/linux/patches/4.0.4/cris-header.patch b/target/linux/patches/4.0.4/cris-header.patch deleted file mode 100644 index 2b5a88461..000000000 --- a/target/linux/patches/4.0.4/cris-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/target/linux/patches/4.0.4/initramfs-nosizelimit.patch b/target/linux/patches/4.0.4/initramfs-nosizelimit.patch deleted file mode 100644 index 40d2f6bd8..000000000 --- a/target/linux/patches/4.0.4/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.0.4/startup.patch b/target/linux/patches/4.0.4/startup.patch deleted file mode 100644 index d396b75e4..000000000 --- a/target/linux/patches/4.0.4/startup.patch +++ /dev/null @@ -1,37 +0,0 @@ -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; diff --git a/target/linux/patches/4.0.5/cris-header.patch b/target/linux/patches/4.0.5/cris-header.patch new file mode 100644 index 000000000..2b5a88461 --- /dev/null +++ b/target/linux/patches/4.0.5/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 diff --git a/target/linux/patches/4.0.5/initramfs-nosizelimit.patch b/target/linux/patches/4.0.5/initramfs-nosizelimit.patch new file mode 100644 index 000000000..40d2f6bd8 --- /dev/null +++ b/target/linux/patches/4.0.5/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.0.5/startup.patch b/target/linux/patches/4.0.5/startup.patch new file mode 100644 index 000000000..d396b75e4 --- /dev/null +++ b/target/linux/patches/4.0.5/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; diff --git a/target/m68k/qemu-m68k/patches/4.0.4/m68k-coldfire-fec.patch b/target/m68k/qemu-m68k/patches/4.0.4/m68k-coldfire-fec.patch deleted file mode 100644 index ceaa21ce6..000000000 --- a/target/m68k/qemu-m68k/patches/4.0.4/m68k-coldfire-fec.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -Nur linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c ---- linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c 2015-01-08 12:30:41.000000000 -0600 -+++ linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c 2015-01-11 20:34:04.690309863 -0600 -@@ -136,7 +136,7 @@ - module_param_array(macaddr, byte, NULL, 0); - MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); - --#if defined(CONFIG_M5272) -+#if defined(CONFIG_COLDFIRE) - /* - * Some hardware gets it MAC address out of local flash memory. - * if this is non-zero then assume it is the address to get MAC from. -@@ -154,7 +154,7 @@ - #else - #define FEC_FLASHMAC 0 - #endif --#endif /* CONFIG_M5272 */ -+#endif /* CONFIG_COLDFIRE */ - - /* The FEC stores dest/src/type/vlan, data, and checksum for receive packets. - */ -@@ -978,7 +978,7 @@ - /* Set MII speed */ - writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); - --#if !defined(CONFIG_M5272) -+#if !defined(CONFIG_COLDFIRE) - /* set RX checksum */ - val = readl(fep->hwp + FEC_RACC); - if (fep->csum_flags & FLAG_RX_CSUM_ENABLED) -@@ -1039,7 +1039,7 @@ - #endif - } - --#if !defined(CONFIG_M5272) -+#if !defined(CONFIG_COLDFIRE) - /* enable pause frame*/ - if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) || - ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) && -@@ -1057,13 +1057,13 @@ - } else { - rcntl &= ~FEC_ENET_FCE; - } --#endif /* !defined(CONFIG_M5272) */ -+#endif /* !defined(CONFIG_COLDFIRE) */ - - writel(rcntl, fep->hwp + FEC_R_CNTRL); - - /* Setup multicast filter. */ - set_multicast_list(ndev); --#ifndef CONFIG_M5272 -+#ifndef CONFIG_COLDFIRE - writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); - writel(0, fep->hwp + FEC_HASH_TABLE_LOW); - #endif -@@ -1078,7 +1078,7 @@ - if (fep->bufdesc_ex) - ecntl |= (1 << 4); - --#ifndef CONFIG_M5272 -+#ifndef CONFIG_COLDFIRE - /* Enable the MIB statistic event counters */ - writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT); - #endif -@@ -1656,7 +1656,7 @@ - * 3) from flash or fuse (via platform data) - */ - if (!is_valid_ether_addr(iap)) { --#ifdef CONFIG_M5272 -+#ifdef CONFIG_COLDFIRE - if (FEC_FLASHMAC) - iap = (unsigned char *)FEC_FLASHMAC; - #else -@@ -1930,7 +1930,7 @@ - if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) { - phy_dev->supported &= PHY_GBIT_FEATURES; - phy_dev->supported &= ~SUPPORTED_1000baseT_Half; --#if !defined(CONFIG_M5272) -+#if !defined(CONFIG_COLDFIRE) - phy_dev->supported |= SUPPORTED_Pause; - #endif - } -@@ -2125,7 +2125,7 @@ - } - } - --#if !defined(CONFIG_M5272) -+#if !defined(CONFIG_COLDFIRE) - - static void fec_enet_get_pauseparam(struct net_device *ndev, - struct ethtool_pauseparam *pause) -@@ -2280,7 +2280,7 @@ - return -EOPNOTSUPP; - } - } --#endif /* !defined(CONFIG_M5272) */ -+#endif /* !defined(CONFIG_COLDFIRE) */ - - static int fec_enet_nway_reset(struct net_device *dev) - { -@@ -2466,7 +2466,7 @@ - .get_link = ethtool_op_get_link, - .get_coalesce = fec_enet_get_coalesce, - .set_coalesce = fec_enet_set_coalesce, --#ifndef CONFIG_M5272 -+#ifndef CONFIG_COLDFIRE - .get_pauseparam = fec_enet_get_pauseparam, - .set_pauseparam = fec_enet_set_pauseparam, - .get_strings = fec_enet_get_strings, -@@ -3164,7 +3164,7 @@ - fep->num_rx_queues = num_rx_qs; - fep->num_tx_queues = num_tx_qs; - --#if !defined(CONFIG_M5272) -+#if !defined(CONFIG_COLDFIRE) - /* default enable pause frame auto negotiation */ - if (pdev->id_entry && - (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT)) diff --git a/target/m68k/qemu-m68k/patches/4.0.4/qemu-coldfire.patch b/target/m68k/qemu-m68k/patches/4.0.4/qemu-coldfire.patch deleted file mode 100644 index 14d2f610b..000000000 --- a/target/m68k/qemu-m68k/patches/4.0.4/qemu-coldfire.patch +++ /dev/null @@ -1,24 +0,0 @@ -m68k: enabled software emulation of separate supervisor/user stack - -Recent Coldfires have separate supervisor and user stack pointers, but -since older Coldfires didn't have that, the Linux kernel has a kind of -emulation mechanism for those pointers. - -Apparently, according to the Kconfig.cpu file, the 5208 is supposed to -support such separate pointers, but Qemu doesn't implement it. So we -cheat a bit here and force the usage of emulated separate stack -pointers. - -Signed-off-by: Thomas Petazzoni - -diff -Nur linux-3.17.7.orig/arch/m68k/Kconfig.cpu linux-3.17.7/arch/m68k/Kconfig.cpu ---- linux-3.17.7.orig/arch/m68k/Kconfig.cpu 2014-12-16 11:37:26.000000000 -0600 -+++ linux-3.17.7/arch/m68k/Kconfig.cpu 2014-12-27 14:12:19.291459730 -0600 -@@ -146,6 +146,7 @@ - depends on !MMU - select GENERIC_CLOCKEVENTS - select HAVE_CACHE_SPLIT -+ select COLDFIRE_SW_A7 - help - Freescale Coldfire 5207/5208 processor support. - diff --git a/target/m68k/qemu-m68k/patches/4.0.5/m68k-coldfire-fec.patch b/target/m68k/qemu-m68k/patches/4.0.5/m68k-coldfire-fec.patch new file mode 100644 index 000000000..ceaa21ce6 --- /dev/null +++ b/target/m68k/qemu-m68k/patches/4.0.5/m68k-coldfire-fec.patch @@ -0,0 +1,118 @@ +diff -Nur linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c +--- linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c 2015-01-08 12:30:41.000000000 -0600 ++++ linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c 2015-01-11 20:34:04.690309863 -0600 +@@ -136,7 +136,7 @@ + module_param_array(macaddr, byte, NULL, 0); + MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); + +-#if defined(CONFIG_M5272) ++#if defined(CONFIG_COLDFIRE) + /* + * Some hardware gets it MAC address out of local flash memory. + * if this is non-zero then assume it is the address to get MAC from. +@@ -154,7 +154,7 @@ + #else + #define FEC_FLASHMAC 0 + #endif +-#endif /* CONFIG_M5272 */ ++#endif /* CONFIG_COLDFIRE */ + + /* The FEC stores dest/src/type/vlan, data, and checksum for receive packets. + */ +@@ -978,7 +978,7 @@ + /* Set MII speed */ + writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); + +-#if !defined(CONFIG_M5272) ++#if !defined(CONFIG_COLDFIRE) + /* set RX checksum */ + val = readl(fep->hwp + FEC_RACC); + if (fep->csum_flags & FLAG_RX_CSUM_ENABLED) +@@ -1039,7 +1039,7 @@ + #endif + } + +-#if !defined(CONFIG_M5272) ++#if !defined(CONFIG_COLDFIRE) + /* enable pause frame*/ + if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) || + ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) && +@@ -1057,13 +1057,13 @@ + } else { + rcntl &= ~FEC_ENET_FCE; + } +-#endif /* !defined(CONFIG_M5272) */ ++#endif /* !defined(CONFIG_COLDFIRE) */ + + writel(rcntl, fep->hwp + FEC_R_CNTRL); + + /* Setup multicast filter. */ + set_multicast_list(ndev); +-#ifndef CONFIG_M5272 ++#ifndef CONFIG_COLDFIRE + writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); + writel(0, fep->hwp + FEC_HASH_TABLE_LOW); + #endif +@@ -1078,7 +1078,7 @@ + if (fep->bufdesc_ex) + ecntl |= (1 << 4); + +-#ifndef CONFIG_M5272 ++#ifndef CONFIG_COLDFIRE + /* Enable the MIB statistic event counters */ + writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT); + #endif +@@ -1656,7 +1656,7 @@ + * 3) from flash or fuse (via platform data) + */ + if (!is_valid_ether_addr(iap)) { +-#ifdef CONFIG_M5272 ++#ifdef CONFIG_COLDFIRE + if (FEC_FLASHMAC) + iap = (unsigned char *)FEC_FLASHMAC; + #else +@@ -1930,7 +1930,7 @@ + if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) { + phy_dev->supported &= PHY_GBIT_FEATURES; + phy_dev->supported &= ~SUPPORTED_1000baseT_Half; +-#if !defined(CONFIG_M5272) ++#if !defined(CONFIG_COLDFIRE) + phy_dev->supported |= SUPPORTED_Pause; + #endif + } +@@ -2125,7 +2125,7 @@ + } + } + +-#if !defined(CONFIG_M5272) ++#if !defined(CONFIG_COLDFIRE) + + static void fec_enet_get_pauseparam(struct net_device *ndev, + struct ethtool_pauseparam *pause) +@@ -2280,7 +2280,7 @@ + return -EOPNOTSUPP; + } + } +-#endif /* !defined(CONFIG_M5272) */ ++#endif /* !defined(CONFIG_COLDFIRE) */ + + static int fec_enet_nway_reset(struct net_device *dev) + { +@@ -2466,7 +2466,7 @@ + .get_link = ethtool_op_get_link, + .get_coalesce = fec_enet_get_coalesce, + .set_coalesce = fec_enet_set_coalesce, +-#ifndef CONFIG_M5272 ++#ifndef CONFIG_COLDFIRE + .get_pauseparam = fec_enet_get_pauseparam, + .set_pauseparam = fec_enet_set_pauseparam, + .get_strings = fec_enet_get_strings, +@@ -3164,7 +3164,7 @@ + fep->num_rx_queues = num_rx_qs; + fep->num_tx_queues = num_tx_qs; + +-#if !defined(CONFIG_M5272) ++#if !defined(CONFIG_COLDFIRE) + /* default enable pause frame auto negotiation */ + if (pdev->id_entry && + (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT)) diff --git a/target/m68k/qemu-m68k/patches/4.0.5/qemu-coldfire.patch b/target/m68k/qemu-m68k/patches/4.0.5/qemu-coldfire.patch new file mode 100644 index 000000000..14d2f610b --- /dev/null +++ b/target/m68k/qemu-m68k/patches/4.0.5/qemu-coldfire.patch @@ -0,0 +1,24 @@ +m68k: enabled software emulation of separate supervisor/user stack + +Recent Coldfires have separate supervisor and user stack pointers, but +since older Coldfires didn't have that, the Linux kernel has a kind of +emulation mechanism for those pointers. + +Apparently, according to the Kconfig.cpu file, the 5208 is supposed to +support such separate pointers, but Qemu doesn't implement it. So we +cheat a bit here and force the usage of emulated separate stack +pointers. + +Signed-off-by: Thomas Petazzoni + +diff -Nur linux-3.17.7.orig/arch/m68k/Kconfig.cpu linux-3.17.7/arch/m68k/Kconfig.cpu +--- linux-3.17.7.orig/arch/m68k/Kconfig.cpu 2014-12-16 11:37:26.000000000 -0600 ++++ linux-3.17.7/arch/m68k/Kconfig.cpu 2014-12-27 14:12:19.291459730 -0600 +@@ -146,6 +146,7 @@ + depends on !MMU + select GENERIC_CLOCKEVENTS + select HAVE_CACHE_SPLIT ++ select COLDFIRE_SW_A7 + help + Freescale Coldfire 5207/5208 processor support. + -- cgit v1.2.3