Browse Source

bring coldfire support in shape

Binutils 2.24 is required to get a working kernel.
Ethernet in Qemu is still broken.
Qemu Patch is still rquired in 2.2.0.
Only kernel+initramfs is working.
It seems the signal handler problem is gone with
sash and simpleinit.
Waldemar Brodkorb 9 years ago
parent
commit
0e3585dae5

+ 1 - 0
Config.in

@@ -32,6 +32,7 @@ source "target/config/Config.in.qemuopts"
 source "target/config/Config.in.kernelversion"
 source "target/config/Config.in.libc"
 source "target/config/Config.in.abi"
+source "target/config/Config.in.binfmt"
 source "target/config/Config.in.target"
 
 endmenu

+ 2 - 0
mk/package.mk

@@ -109,11 +109,13 @@ IDIR_$(1)_DBG=	$(WRKDIR)/fake-${ADK_TARGET_CPU_ARCH}/pkg-$(2)-dbg
 ifneq (${ADK_PACKAGE_$(1)}${DEVELOPER},)
 ifneq (,$(filter dev,$(7)))
 ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_BINFMT_FLAT),y)
 ALL_IPKGS+=	$$(IPKG_$(1))
 ALL_IDIRS+=	$${IDIR_$(1)}
 ALL_POSTINST+=	$(2)-install
 $(2)-install:
 endif
+endif
 else
 ALL_IPKGS+=	$$(IPKG_$(1))
 ALL_IDIRS+=	$${IDIR_$(1)}

+ 1 - 1
package/busybox/config/init/Config.in

@@ -74,7 +74,7 @@ config BUSYBOX_TELINIT_PATH
 config BUSYBOX_INIT
 	bool "init"
 	default y
-	depends on !ADK_TARGET_UCLINUX
+	depends on !ADK_PACKAGE_SIMPLEINIT
 	select BUSYBOX_FEATURE_SYSLOG
 	help
 	  init is the first program run when the system boots.

+ 13 - 12
package/simpleinit/Makefile

@@ -1,19 +1,20 @@
 # 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)/rules.mk
 
 PKG_NAME:=		simpleinit
 PKG_VERSION:=		1.0
 PKG_RELEASE:=		1
 PKG_DESCR:=		simple init for systems without mmu
 PKG_SECTION:=		base/apps
+PKG_CFLINE_SIMPLEINIT:=	select BUSYBOX_INIT n
 
 NO_DISTFILES:=		1
 
-include ${ADK_TOPDIR}/mk/package.mk
+include $(ADK_TOPDIR)/mk/package.mk
 
-$(eval $(call PKG_template,SIMPLEINIT,simpleinit,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,SIMPLEINIT,simpleinit,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
 
 CONFIG_STYLE:=		manual
 BUILD_STYLE:=		manual
@@ -22,15 +23,15 @@ INSTALL_STYLE:=		manual
 TARGET_CPPFLAGS+=	-DCONFIG_USER_INIT_CONSOLE_SH
 
 do-build:
-	PATH="${TOOLCHAIN_DIR}/usr/bin:$$PATH" \
-	${TARGET_CC} ${TARGET_CPPFLAGS} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} \
-		-o ${WRKBUILD}/simpleinit ${WRKBUILD}/simpleinit.c
+	PATH='$(HOST_PATH)' \
+	$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-o $(WRKBUILD)/simpleinit $(WRKBUILD)/simpleinit.c
 
 do-install:
-	${INSTALL_DIR} ${IDIR_SIMPLEINIT}/etc
-	${CP} ./files/rc ${IDIR_SIMPLEINIT}/etc
-	${CP} ./files/inittab ${IDIR_SIMPLEINIT}/etc
-	${INSTALL_DIR} ${IDIR_SIMPLEINIT}/sbin
-	${INSTALL_BIN} ${WRKBUILD}/simpleinit ${IDIR_SIMPLEINIT}/sbin/init
+	$(INSTALL_DIR) $(IDIR_SIMPLEINIT)/etc
+	$(CP) ./files/rc $(IDIR_SIMPLEINIT)/etc
+	$(CP) ./files/inittab $(IDIR_SIMPLEINIT)/etc
+	$(INSTALL_DIR) $(IDIR_SIMPLEINIT)/sbin
+	$(INSTALL_BIN) $(WRKBUILD)/simpleinit $(IDIR_SIMPLEINIT)/sbin/init
 
-include ${ADK_TOPDIR}/mk/pkg-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk

+ 0 - 1
package/simpleinit/files/rc

@@ -11,5 +11,4 @@ mkdir -p /var/log
 mkdir -p /var/run
 mkdir -p /var/tmp
 mdev -s
-mount
 ifconfig lo 127.0.0.1 up

+ 1 - 1
package/uclibc-ng/Makefile

@@ -36,7 +36,7 @@ do-install:
 	test -z $(ADK_RUNTIME_TIMEZONE) || \
 	    grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
 	    cut -f 2 > $(IDIR_UCLIBC_NG)/etc/TZ
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_UCLINUX),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),y)
 	$(CP) $(STAGING_TARGET_DIR)/lib/libc.so.* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
 	$(CP) $(STAGING_TARGET_DIR)/lib/libuClibc-$(PKG_VERSION).so \
 		$(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)

+ 0 - 1
target/config/Config.in

@@ -16,7 +16,6 @@ config ADK_TARGET_TOOLCHAIN
 
 config ADK_TARGET_UCLINUX
 	bool
-	select ADK_TARGET_USE_STATIC_LIBS
 	select ADK_PACKAGE_SASH
 	select ADK_PACKAGE_SIMPLEINIT
 

+ 18 - 0
target/config/Config.in.binfmt

@@ -0,0 +1,18 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+choice
+prompt "Binary Format"
+depends on ADK_TARGET_ARCH_M68K || ADK_TARGET_ARCH_BFIN
+
+config ADK_TARGET_BINFMT_ELF
+	bool "ELF"
+
+config ADK_TARGET_BINFMT_FDPIC
+	bool "FDPIC"
+	depends on ADK_TARGET_ARCH_BFIN
+
+config ADK_TARGET_BINFMT_FLAT
+	bool "FLAT"
+
+endchoice

+ 1 - 4
target/config/Config.in.toolchain

@@ -66,8 +66,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_20_1
 config ADK_TOOLCHAIN_BINUTILS_2_22
 	bool "2.22"
 	depends on ADK_TARGET_ARCH_BFIN \
-		|| ADK_TARGET_ARCH_CRIS \
-		|| ADK_TARGET_ARCH_M68K
+		|| ADK_TARGET_ARCH_CRIS
 
 config ADK_TOOLCHAIN_BINUTILS_2_23_ARC
 	bool "2.23-arc"
@@ -79,7 +78,6 @@ config ADK_TOOLCHAIN_BINUTILS_2_24
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_CRIS
-	depends on !ADK_TARGET_ARCH_M68K
 
 config ADK_TOOLCHAIN_BINUTILS_GIT
 	bool "git"
@@ -87,7 +85,6 @@ config ADK_TOOLCHAIN_BINUTILS_GIT
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_CRIS
-	depends on !ADK_TARGET_ARCH_M68K
 
 endchoice
 

+ 50 - 52
target/linux/config/Config.in.kernel

@@ -1,128 +1,128 @@
 config ADK_KERNEL_STAGING
-	boolean
+	bool
 
 config ADK_KERNEL_EXPERIMENTAL
-	boolean
+	bool
 
 config ADK_KERNEL_RESET_CONTROLLER
-        boolean
+        bool
 
 config ADK_KERNEL_BLK_DEV_INITRD
-	boolean
+	bool
 
 config ADK_KERNEL_BLK_DEV_RAM
-	boolean
+	bool
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_NONE
-	boolean
+	bool
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
+	bool
 	select ADK_HOST_NEED_XZ
-	boolean
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_LZ4
+	bool
 	select ADK_HOST_NEED_LZ4
-	boolean
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
+	bool
 	select ADK_HOST_NEED_LZMA
-	boolean
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_LZO
+	bool
 	select ADK_HOST_NEED_LZOP
-	boolean
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2
+	bool
 	select ADK_HOST_NEED_BZIP2
-	boolean
 
 config ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
-	boolean
+	bool
 
 config ADK_KERNEL_RD_GZIP
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_GZIP
-	boolean
+	bool
 
 config ADK_KERNEL_RD_BZIP2
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_BZIP2
-	boolean
+	bool
 
 config ADK_KERNEL_RD_LZ4
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_LZ4
-	boolean
+	bool
 
 config ADK_KERNEL_RD_LZMA
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_LZMA
-	boolean
+	bool
 
 config ADK_KERNEL_RD_LZO
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_LZO
-	boolean
+	bool
 
 config ADK_KERNEL_RD_XZ
-	boolean
+	bool
 
 config ADK_KERNEL_KERNEL_XZ
-	boolean
+	bool
 
 config ADK_KERNEL_INITRAMFS_SOURCE
 	string
 	default ""
 
 config ADK_KERNEL_NETWORK_FILESYSTEMS
-	boolean
+	bool
 
 config ADK_KERNEL_IP_PNP
-	boolean
+	bool
 
 config ADK_KERNEL_IP_PNP_DHCP
-	boolean
+	bool
 
 config ADK_KERNEL_ROOT_NFS
-	boolean
+	bool
 
 config ADK_KERNEL_NFS_COMMON
-	boolean
+	bool
 
 config ADK_KERNEL_64BIT
-	boolean
+	bool
 	default y if ADK_LINUX_64
 
 config ADK_KERNEL_CPU_MIPS64
-	boolean
+	bool
 
 config ADK_KERNEL_CPU_MIPS64_R1
-	boolean
+	bool
 
 config ADK_KERNEL_CPU_MIPS64_R2
-	boolean
+	bool
 
 # ARM specific
 config ADK_KERNEL_AEABI
-	boolean
+	bool
 	default y if ADK_TARGET_ARCH_ARM
 
 config ADK_KERNEL_THUMB2_KERNEL
-	boolean
+	bool
 
 # endianess
 config ADK_KERNEL_CPU_BIG_ENDIAN
+	bool
 	default y if ADK_big
-	boolean
 
 config ADK_KERNEL_CPU_LITTLE_ENDIAN
+	bool
 	default y if ADK_little
-	boolean
 
 choice
 prompt "Kernel Compression"
@@ -180,16 +180,19 @@ endchoice
 
 menu "Kernel options"
 
+config ADK_KERNEL_MMU
+	bool
+	default n if ADK_TARGET_UCLINUX
+	default y
+
 config ADK_KERNEL_SMP
-	prompt "Enable symmetric multi processing"
-	boolean
-	default y if ADK_TARGET_WITH_SMP
+	bool "Enable symmetric multi processing"
 	depends on ADK_TARGET_WITH_SMP
+	default y if ADK_TARGET_WITH_SMP
 	default n
 
 config ADK_KERNEL_HIGHMEM
-	prompt "Enable high memory"
-	boolean
+	bool "Enable high memory"
 	default y if ADK_TARGET_CUBOX_I4PRO
 	default y if ADK_TARGET_CUBOX_I2ULTRA
 	default y if ADK_TARGET_CUBOX_I2EX
@@ -197,13 +200,11 @@ config ADK_KERNEL_HIGHMEM
 	default n
 
 config ADK_KERNEL_PREEMPT
-	prompt "Enable preemptive kernel"
-	boolean
+	bool "Enable preemptive kernel"
 	default n
 
 config ADK_KERNEL_CC_OPTIMIZE_FOR_SIZE
-	prompt "Optimize for size"
-	boolean
+	bool "Optimize for size"
 	# does not boot in qemu
 	depends on !ADK_TARGET_ARCH_MICROBLAZE
 	default y
@@ -215,16 +216,13 @@ default ADK_KERNEL_PAGE_SIZE_16KB if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
 default ADK_KERNEL_PAGE_SIZE_4KB
 
 config ADK_KERNEL_PAGE_SIZE_4KB
-	prompt "4kB"
-	boolean
+	bool "4kB"
 
 config ADK_KERNEL_PAGE_SIZE_16KB
-	prompt "16kB"
-	boolean
+	bool "16kB"
 
 config ADK_KERNEL_PAGE_SIZE_64KB
-	prompt "64kB"
-	boolean
+	bool "64kB"
 
 endchoice
 endmenu

+ 0 - 1
target/linux/kernel.config

@@ -1,7 +1,6 @@
 CONFIG_DEFAULT_HOSTNAME="openadk"
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE=""
-CONFIG_MMU=y
 CONFIG_NO_HZ=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y

+ 2 - 2
target/m68k/kernel/qemu-m68k

@@ -1,16 +1,16 @@
 CONFIG_M68K=y
 CONFIG_COLDFIRE=y
 CONFIG_M520x=y
-# CONFIG_MMU is not set
 CONFIG_CLOCK_SET=y
 CONFIG_CLOCK_FREQ=66666666
 CONFIG_CLOCK_DIV=1
 CONFIG_M5208EVB=y
 CONFIG_FREESCALE=y
 CONFIG_RAMBASE=0x40000000
-CONFIG_RAMSIZE=0x2000000
+CONFIG_RAMSIZE=0x0
 CONFIG_VECTORBASE=0x40000000
 CONFIG_KERNELBASE=0x40020000
+CONFIG_4KSTACKS=y
 CONFIG_RAMKERNEL=y
 CONFIG_BINFMT_FLAT=y
 CONFIG_SERIAL_MCF=y

+ 127 - 0
target/m68k/qemu-m68k/patches/3.14.26/m68k-coldfire-fec.patch

@@ -0,0 +1,127 @@
+diff -Nur linux-3.14.26.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.14.26/drivers/net/ethernet/freescale/fec_main.c
+--- linux-3.14.26.orig/drivers/net/ethernet/freescale/fec_main.c	2014-12-06 17:56:06.000000000 -0600
++++ linux-3.14.26/drivers/net/ethernet/freescale/fec_main.c	2014-12-28 22:15:41.533921249 -0600
+@@ -152,7 +152,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.
+@@ -170,7 +170,7 @@
+ #else
+ #define	FEC_FLASHMAC	0
+ #endif
+-#endif /* CONFIG_M5272 */
++#endif /* CONFIG_COLDFIRE */
+ 
+ #if (((RX_RING_SIZE + TX_RING_SIZE) * 32) > PAGE_SIZE)
+ #error "FEC: descriptor ring size constants too large"
+@@ -565,7 +565,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)
+@@ -626,7 +626,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) &&
+@@ -644,13 +644,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
+@@ -665,7 +665,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
+@@ -1117,7 +1117,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
+@@ -1304,7 +1304,7 @@
+ 	/* mask with MAC supported features */
+ 	if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
+ 		phy_dev->supported &= PHY_GBIT_FEATURES;
+-#if !defined(CONFIG_M5272)
++#if !defined(CONFIG_COLDFIRE)
+ 		phy_dev->supported |= SUPPORTED_Pause;
+ #endif
+ 	}
+@@ -1491,7 +1491,7 @@
+ 	}
+ }
+ 
+-#if !defined(CONFIG_M5272)
++#if !defined(CONFIG_COLDFIRE)
+ 
+ static void fec_enet_get_pauseparam(struct net_device *ndev,
+ 				    struct ethtool_pauseparam *pause)
+@@ -1637,7 +1637,7 @@
+ 		return -EOPNOTSUPP;
+ 	}
+ }
+-#endif /* !defined(CONFIG_M5272) */
++#endif /* !defined(CONFIG_COLDFIRE) */
+ 
+ static int fec_enet_nway_reset(struct net_device *dev)
+ {
+@@ -1651,7 +1651,7 @@
+ }
+ 
+ static const struct ethtool_ops fec_enet_ethtool_ops = {
+-#if !defined(CONFIG_M5272)
++#if !defined(CONFIG_COLDFIRE)
+ 	.get_pauseparam		= fec_enet_get_pauseparam,
+ 	.set_pauseparam		= fec_enet_set_pauseparam,
+ #endif
+@@ -1661,7 +1661,7 @@
+ 	.get_link		= ethtool_op_get_link,
+ 	.get_ts_info		= fec_enet_get_ts_info,
+ 	.nway_reset		= fec_enet_nway_reset,
+-#ifndef CONFIG_M5272
++#ifndef CONFIG_COLDFIRE
+ 	.get_ethtool_stats	= fec_enet_get_ethtool_stats,
+ 	.get_strings		= fec_enet_get_strings,
+ 	.get_sset_count		= fec_enet_get_sset_count,
+@@ -2110,7 +2110,7 @@
+ 	/* setup board info structure */
+ 	fep = netdev_priv(ndev);
+ 
+-#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))

+ 24 - 0
target/m68k/qemu-m68k/patches/3.14.26/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 <thomas.petazzoni at free-electrons.com>
+
+diff -Nur linux-3.14.26.orig/arch/m68k/Kconfig.cpu linux-3.14.26/arch/m68k/Kconfig.cpu
+--- linux-3.14.26.orig/arch/m68k/Kconfig.cpu	2014-12-06 17:56:06.000000000 -0600
++++ linux-3.14.26/arch/m68k/Kconfig.cpu	2014-12-28 03:00:39.279037664 -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.
+ 

+ 118 - 0
target/m68k/qemu-m68k/patches/3.17.7/m68k-coldfire-fec.patch

@@ -0,0 +1,118 @@
+diff -Nur linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c
+--- linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c	2014-12-16 11:37:26.000000000 -0600
++++ linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c	2014-12-28 21:27:24.773847877 -0600
+@@ -155,7 +155,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.
+@@ -173,7 +173,7 @@
+ #else
+ #define	FEC_FLASHMAC	0
+ #endif
+-#endif /* CONFIG_M5272 */
++#endif /* CONFIG_COLDFIRE */
+ 
+ /* Interrupt events/masks. */
+ #define FEC_ENET_HBERR	((uint)0x80000000)	/* Heartbeat error */
+@@ -889,7 +889,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)
+@@ -950,7 +950,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) &&
+@@ -968,13 +968,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
+@@ -989,7 +989,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
+@@ -1436,7 +1436,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
+@@ -1699,7 +1699,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
+ 	}
+@@ -1894,7 +1894,7 @@
+ 	}
+ }
+ 
+-#if !defined(CONFIG_M5272)
++#if !defined(CONFIG_COLDFIRE)
+ 
+ static void fec_enet_get_pauseparam(struct net_device *ndev,
+ 				    struct ethtool_pauseparam *pause)
+@@ -2049,7 +2049,7 @@
+ 		return -EOPNOTSUPP;
+ 	}
+ }
+-#endif /* !defined(CONFIG_M5272) */
++#endif /* !defined(CONFIG_COLDFIRE) */
+ 
+ static int fec_enet_nway_reset(struct net_device *dev)
+ {
+@@ -2068,7 +2068,7 @@
+ 	.get_drvinfo		= fec_enet_get_drvinfo,
+ 	.nway_reset		= fec_enet_nway_reset,
+ 	.get_link		= ethtool_op_get_link,
+-#ifndef CONFIG_M5272
++#ifndef CONFIG_COLDFIRE
+ 	.get_pauseparam		= fec_enet_get_pauseparam,
+ 	.set_pauseparam		= fec_enet_set_pauseparam,
+ 	.get_strings		= fec_enet_get_strings,
+@@ -2571,7 +2571,7 @@
+ 	/* setup board info structure */
+ 	fep = netdev_priv(ndev);
+ 
+-#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))

+ 3 - 3
target/m68k/qemu-m68k/patches/3.17.7/qemu-coldfire.patch

@@ -11,9 +11,9 @@ pointers.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 
-diff -Nur linux-3.16.orig/arch/m68k/Kconfig.cpu linux-3.16/arch/m68k/Kconfig.cpu
---- linux-3.16.orig/arch/m68k/Kconfig.cpu	2014-08-04 00:25:02.000000000 +0200
-+++ linux-3.16/arch/m68k/Kconfig.cpu	2014-08-13 16:58:59.568332805 +0200
+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

+ 1 - 1
toolchain/elf2flt/Makefile

@@ -6,7 +6,7 @@ include Makefile.inc
 include ../rules.mk
 include ${ADK_TOPDIR}/mk/buildhlp.mk
 
-BINUTILS_VERSION:=	2.22
+BINUTILS_VERSION:=	2.24
 
 $(WRKBUILD)/.headers:
 $(WRKBUILD)/.configured: