[LEDE-DEV] [PATCH] package/boot/uboot-kirkwood: bump to upstream 2016.09.01
John Crispin
john at phrozen.org
Wed Oct 26 00:45:16 PDT 2016
On 25/10/2016 09:51, p.wassi at gmx.at wrote:
> From: Paul Wassi <p.wassi at gmx.at>
>
> Bump U-Boot for Kirkwood to upstream 2016.09.01. Local patches
> cleaned up and reworked. Rename OpenWrt/LEDE occurrences.
please drop this part while the remerge discussion is underway. i dont
want to have to patch back to the originally eventually
John
>
> Signed-off-by: Paul Wassi <p.wassi at gmx.at>
> ---
> This patch bumps uboot-kirkwood to 2016.09.01, some of the local patches
> can be dropped then (since already integrated upstream). Other patches
> are reworked, a few occurrences of OpenWrt have been renamed to LEDE.
> Patch for gcc5 quirks not needed anymore - it compiled fine on gcc 5.4.
> Bootloader tested on Seagate Dockstar:
> https://pwassi.privatedns.org/lede/dockstar/#log_uboot
>
> boot/uboot-kirkwood/Makefile | 12 -
> boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch | 96 --------
> boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch | 27 ++
> boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch | 32 --
> boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 +
> boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch | 45 ---
> boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 +
> boot/uboot-kirkwood/patches/0004-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch | 27 --
> boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 +
> boot/uboot-kirkwood/patches/0005-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 -
> boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 +
> boot/uboot-kirkwood/patches/0006-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 -
> boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 +
> boot/uboot-kirkwood/patches/0007-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 -
> boot/uboot-kirkwood/patches/0008-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 -
> boot/uboot-kirkwood/patches/0009-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 -
> boot/uboot-kirkwood/patches/110-dockstar.patch | 95 +------
> boot/uboot-kirkwood/patches/120-iconnect.patch | 12 -
> boot/uboot-kirkwood/patches/130-ib62x0.patch | 4
> boot/uboot-kirkwood/patches/140-pogoplug_e02.patch | 2
> boot/uboot-kirkwood/patches/150-goflexhome.patch | 12 -
> boot/uboot-kirkwood/patches/200-lede-config.patch | 107 ++++++++
> boot/uboot-kirkwood/patches/200-openwrt-config.patch | 119 ----------
> boot/uboot-kirkwood/patches/400-gcc-5-compiler.patch | 87 -------
> 24 files changed, 287 insertions(+), 620 deletions(-)
> system/mtd/src/mtd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -rupN a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile
> --- a/package/boot/uboot-kirkwood/Makefile
> +++ b/package/boot/uboot-kirkwood/Makefile
> @@ -8,7 +8,7 @@
> include $(TOPDIR)/rules.mk
>
> PKG_NAME:=u-boot
> -PKG_VERSION:=2014.10
> +PKG_VERSION:=2016.09.01
> PKG_RELEASE:=1
>
> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
> @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).t
> PKG_SOURCE_URL:=\
> http://mirror2.openwrt.org/sources \
> ftp://ftp.denx.de/pub/u-boot
> -PKG_MD5SUM:=3ddcaee2f05b7c464778112ec83664b5
> +PKG_MD5SUM:=61c628f8034477c946e173ed174efeb4
> PKG_TARGETS:=bin
>
> PKG_LICENSE:=GPL-2.0 GPL-2.0+
> @@ -112,18 +112,18 @@ define Build/Compile
> CROSS_COMPILE=$(TARGET_CROSS)
> mkimage -A $(ARCH) -O linux -T kernel -C none \
> -a 0x600000 -e 0x600000 \
> - -n 'OpenWrt Das U-Boot uImage' \
> + -n 'LEDE Das U-Boot uImage' \
> -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
> endef
>
> define Package/uboot/install/default
> $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
> $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
> - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
> + $(BIN_DIR)/uboot-$(BOARD)-$(1)/lede-$(BOARD)-$(1)-u-boot.bin
> $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
> - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
> + $(BIN_DIR)/uboot-$(BOARD)-$(1)/lede-$(BOARD)-$(1)-u-boot.kwb
> $(CP) $(PKG_BUILD_DIR)/u-boot.img \
> - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img
> + $(BIN_DIR)/uboot-$(BOARD)-$(1)/lede-$(BOARD)-$(1)-u-boot.img
> $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
> $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
> $(BIN_DIR)/u-boot-kwboot/
> diff -rupN a/package/boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch b/package/boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch
> --- a/package/boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch
> +++ /dev/null
> @@ -1,96 +0,0 @@
> -From 76a9fed9e5580945827a82963ac7315186fd0ebe Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Mon, 11 Nov 2013 06:45:44 +0100
> -Subject: [PATCH 1/9] cosmetic: kirkwood: style fixes in kwbimage.cfg files
> -
> -When diffing through the changes only the relevant changes
> -should be displayed.
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> ----
> - board/iomega/iconnect/kwbimage.cfg | 4 ++--
> - board/raidsonic/ib62x0/kwbimage.cfg | 22 +++++++++++-----------
> - 2 files changed, 13 insertions(+), 13 deletions(-)
> -
> ---- a/board/iomega/iconnect/kwbimage.cfg
> -+++ b/board/iomega/iconnect/kwbimage.cfg
> -@@ -20,7 +20,7 @@ NAND_PAGE_SIZE 0x0800
> - # Configure RGMII-0 interface pad voltage to 1.8V
> - DATA 0xffd100e0 0x1b1b1b9b
> -
> --#Dram initalization for SINGLE x16 CL=5 @ 400MHz
> -+# Dram initalization for SINGLE x16 CL=5 @ 400MHz
> - DATA 0xffd01400 0x43000c30 # DDR Configuration register
> - # bit13-0: 0xc30, (3120 DDR2 clks refresh rate)
> - # bit23-14: 0x0,
> -@@ -87,7 +87,7 @@ DATA 0xffd0141c 0x00000c52 # DDR Mode
> - # bit6-4: 0x4, CL=5
> - # bit7: 0x0, TestMode=0 normal
> - # bit8: 0x0, DLL reset=0 normal
> --# bit11-9: 0x6, auto-precharge write recovery ????????????
> -+# bit11-9: 0x6, auto-precharge write recovery
> - # bit12: 0x0, PD must be zero
> - # bit31-13: 0x0, required
> -
> ---- a/board/raidsonic/ib62x0/kwbimage.cfg
> -+++ b/board/raidsonic/ib62x0/kwbimage.cfg
> -@@ -11,7 +11,7 @@
> - #
> -
> - # Boot Media configurations
> --BOOT_FROM nand # change from nand to uart if building UART image
> -+BOOT_FROM nand
> - NAND_ECC_MODE default
> - NAND_PAGE_SIZE 0x0800
> -
> -@@ -21,12 +21,12 @@ NAND_PAGE_SIZE 0x0800
> - # Configure RGMII-0 interface pad voltage to 1.8V
> - DATA 0xffd100e0 0x1b1b1b9b
> -
> --#Dram initalization for SINGLE x16 CL=5 @ 400MHz
> -+# Dram initalization for SINGLE x16 CL=5 @ 400MHz
> - DATA 0xffd01400 0x43000c30 # DDR Configuration register
> - # bit13-0: 0xc30, (3120 DDR2 clks refresh rate)
> - # bit23-14: 0x0,
> --# bit24: 0x1, enable exit self refresh mode on DDR access
> --# bit25: 0x1, required
> -+# bit24: 0x1, enable exit self refresh mode on DDR access
> -+# bit25: 0x1, required
> - # bit29-26: 0x0,
> - # bit31-30: 0x1,
> -
> -@@ -64,10 +64,10 @@ DATA 0xffd01410 0x0000000c # DDR Address
> - # bit3-2: 11, Cs0size (1Gb)
> - # bit5-4: 00, Cs1width (x8)
> - # bit7-6: 11, Cs1size (1Gb)
> --# bit9-8: 00, Cs2width (nonexistent
> --# bit11-10: 00, Cs2size (nonexistent
> --# bit13-12: 00, Cs3width (nonexistent
> --# bit15-14: 00, Cs3size (nonexistent
> -+# bit9-8: 00, Cs2width (nonexistent)
> -+# bit11-10: 00, Cs2size (nonexistent)
> -+# bit13-12: 00, Cs3width (nonexistent)
> -+# bit15-14: 00, Cs3size (nonexistent)
> - # bit16: 0, Cs0AddrSel
> - # bit17: 0, Cs1AddrSel
> - # bit18: 0, Cs2AddrSel
> -@@ -88,7 +88,7 @@ DATA 0xffd0141c 0x00000c52 # DDR Mode
> - # bit6-4: 0x4, CL=5
> - # bit7: 0x0, TestMode=0 normal
> - # bit8: 0x0, DLL reset=0 normal
> --# bit11-9: 0x6, auto-precharge write recovery ????????????
> -+# bit11-9: 0x6, auto-precharge write recovery
> - # bit12: 0x0, PD must be zero
> - # bit31-13: 0x0, required
> -
> -@@ -148,8 +148,8 @@ DATA 0xffd0149c 0x0000e803 # CPU ODT Con
> - DATA 0xffd01480 0x00000001 # DDR Initialization Control
> - # bit0: 0x1, enable DDR init upon this register write
> -
> --DATA 0xFFD20134 0x66666666 # L2 RAM Timing 0 Register
> --DATA 0xFFD20138 0x66666666 # L2 RAM Timing 1 Register
> -+DATA 0xffd20134 0x66666666 # L2 RAM Timing 0 Register
> -+DATA 0xffd20138 0x66666666 # L2 RAM Timing 1 Register
> -
> - # End of Header extension
> - DATA 0x0 0x0
> diff -rupN a/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch b/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch
> @@ -0,0 +1,27 @@
> +From 280b03ba28b4287de677d4c4b097918364395b5e Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Wed, 2 Jul 2014 01:47:23 +0200
> +Subject: [PATCH 4/9] kirkwood: ib62x0: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> +This is patch was sent already in July:
> +
> +http://lists.denx.de/pipermail/u-boot/2014-July/182900.html
> +---
> + include/configs/ib62x0.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/ib62x0.h
> ++++ b/include/configs/ib62x0.h
> +@@ -9,6 +9,8 @@
> + #ifndef _CONFIG_IB62x0_H
> + #define _CONFIG_IB62x0_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Version number information
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch b/package/boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch
> --- a/package/boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -From 292d4cf9257921912e8ea352687c977208e7553d Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Mon, 11 Nov 2013 07:27:53 +0100
> -Subject: [PATCH 2/9] kirkwood: define empty CONFIG_MVGBE_PORTS by default
> -
> -Each board with defines it's own set of values. If we do not define
> -CONFIG_MVGBE_PORTS we will hit following error:
> -
> -mvgbe.c: In function 'mvgbe_initialize':
> -mvgbe.c:700:34: error: 'CONFIG_MVGBE_PORTS' undeclared (first use in this function)
> - u8 used_ports[MAX_MVGBE_DEVS] = CONFIG_MVGBE_PORTS;
> -
> -This patch fixes above described problem.
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> ----
> - drivers/net/mvgbe.c | 4 ++++
> - 1 file changed, 4 insertions(+)
> -
> ---- a/drivers/net/mvgbe.c
> -+++ b/drivers/net/mvgbe.c
> -@@ -35,6 +35,10 @@
> -
> - DECLARE_GLOBAL_DATA_PTR;
> -
> -+#ifndef CONFIG_MVGBE_PORTS
> -+# define CONFIG_MVGBE_PORTS {0, 0}
> -+#endif
> -+
> - #define MV_PHY_ADR_REQUEST 0xee
> - #define MVGBE_SMI_REG (((struct mvgbe_registers *)MVGBE0_BASE)->smi)
> -
> diff -rupN a/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> @@ -0,0 +1,23 @@
> +From 5f9e6f640098e6963ff9b470cd5d2ab9f6a3579e Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Sun, 30 Nov 2014 02:40:37 +0100
> +Subject: [PATCH 5/9] kirkwood: dockstar: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> + include/configs/dockstar.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/dockstar.h
> ++++ b/include/configs/dockstar.h
> +@@ -12,6 +12,8 @@
> + #ifndef _CONFIG_DOCKSTAR_H
> + #define _CONFIG_DOCKSTAR_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Version number information
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch b/package/boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch
> --- a/package/boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -From fa0ece2cc571ba1ccb9d1e0a8d337417c032576e Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Mon, 23 Dec 2013 01:23:07 +0100
> -Subject: [PATCH 3/9] ARM: kirkwood: fix cpu info for 6282 device id
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> ----
> - arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 11 ++++++++---
> - 1 file changed, 8 insertions(+), 3 deletions(-)
> -
> ---- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
> -+++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
> -@@ -253,7 +253,7 @@ static void kw_sysrst_check(void)
> - #if defined(CONFIG_DISPLAY_CPUINFO)
> - int print_cpuinfo(void)
> - {
> -- char *rev;
> -+ char *rev = "??";
> - u16 devid = (readl(KW_REG_PCIE_DEVID) >> 16) & 0xffff;
> - u8 revid = readl(KW_REG_PCIE_REVID) & 0xff;
> -
> -@@ -264,7 +264,13 @@ int print_cpuinfo(void)
> -
> - switch (revid) {
> - case 0:
> -- rev = "Z0";
> -+ if (devid == 0x6281)
> -+ rev = "Z0";
> -+ else if (devid == 0x6282)
> -+ rev = "A0";
> -+ break;
> -+ case 1:
> -+ rev = "A1";
> - break;
> - case 2:
> - rev = "A0";
> -@@ -273,7 +279,6 @@ int print_cpuinfo(void)
> - rev = "A1";
> - break;
> - default:
> -- rev = "??";
> - break;
> - }
> -
> diff -rupN a/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> @@ -0,0 +1,23 @@
> +From 0d0a6606396f0cc1a4f2966d167ef9e85d533650 Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Sun, 30 Nov 2014 02:40:51 +0100
> +Subject: [PATCH 6/9] kirkwood: goflexhome: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> + include/configs/goflexhome.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/goflexhome.h
> ++++ b/include/configs/goflexhome.h
> +@@ -15,6 +15,8 @@
> + #ifndef _CONFIG_GOFLEXHOME_H
> + #define _CONFIG_GOFLEXHOME_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Version number information
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0004-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch b/package/boot/uboot-kirkwood/patches/0004-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch
> --- a/package/boot/uboot-kirkwood/patches/0004-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -From 280b03ba28b4287de677d4c4b097918364395b5e Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Wed, 2 Jul 2014 01:47:23 +0200
> -Subject: [PATCH 4/9] kirkwood: ib62x0: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> -This is patch was sent already in July:
> -
> -http://lists.denx.de/pipermail/u-boot/2014-July/182900.html
> ----
> - include/configs/ib62x0.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/ib62x0.h
> -+++ b/include/configs/ib62x0.h
> -@@ -9,6 +9,8 @@
> - #ifndef _CONFIG_IB62x0_H
> - #define _CONFIG_IB62x0_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Version number information
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> @@ -0,0 +1,23 @@
> +From 45ba20427135e526cfa528773de0cfe215f4dc40 Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Sun, 30 Nov 2014 02:41:04 +0100
> +Subject: [PATCH 7/9] kirkwood: iconnect: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> + include/configs/iconnect.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/iconnect.h
> ++++ b/include/configs/iconnect.h
> +@@ -9,6 +9,8 @@
> + #ifndef _CONFIG_ICONNECT_H
> + #define _CONFIG_ICONNECT_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Version number information
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0005-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0005-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- a/package/boot/uboot-kirkwood/patches/0005-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 5f9e6f640098e6963ff9b470cd5d2ab9f6a3579e Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Sun, 30 Nov 2014 02:40:37 +0100
> -Subject: [PATCH 5/9] kirkwood: dockstar: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> - include/configs/dockstar.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/dockstar.h
> -+++ b/include/configs/dockstar.h
> -@@ -12,6 +12,8 @@
> - #ifndef _CONFIG_DOCKSTAR_H
> - #define _CONFIG_DOCKSTAR_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Version number information
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> @@ -0,0 +1,23 @@
> +From bd862f4e7a559e38763a5280e35bf7ff14b535f1 Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Sun, 30 Nov 2014 02:41:19 +0100
> +Subject: [PATCH 8/9] kirkwood: pogo_e02: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> + include/configs/pogo_e02.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/pogo_e02.h
> ++++ b/include/configs/pogo_e02.h
> +@@ -13,6 +13,8 @@
> + #ifndef _CONFIG_POGO_E02_H
> + #define _CONFIG_POGO_E02_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Machine type definition and ID
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0006-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0006-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> --- a/package/boot/uboot-kirkwood/patches/0006-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 0d0a6606396f0cc1a4f2966d167ef9e85d533650 Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Sun, 30 Nov 2014 02:40:51 +0100
> -Subject: [PATCH 6/9] kirkwood: goflexhome: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> - include/configs/goflexhome.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/goflexhome.h
> -+++ b/include/configs/goflexhome.h
> -@@ -15,6 +15,8 @@
> - #ifndef _CONFIG_GOFLEXHOME_H
> - #define _CONFIG_GOFLEXHOME_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Version number information
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> @@ -0,0 +1,23 @@
> +From 787e23179708ddad7ecd9dcd6c841546689864b0 Mon Sep 17 00:00:00 2001
> +From: Luka Perkov <luka at openwrt.org>
> +Date: Sun, 30 Nov 2014 02:41:49 +0100
> +Subject: [PATCH 9/9] kirkwood: sheevaplug: add CONFIG_SYS_GENERIC_BOARD define
> +
> +Signed-off-by: Luka Perkov <luka at openwrt.org>
> +CC: Prafulla Wadaskar <prafulla at marvell.com>
> +CC: Stefan Roese <sr at denx.de>
> +---
> + include/configs/sheevaplug.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/include/configs/sheevaplug.h
> ++++ b/include/configs/sheevaplug.h
> +@@ -10,6 +10,8 @@
> + #ifndef _CONFIG_SHEEVAPLUG_H
> + #define _CONFIG_SHEEVAPLUG_H
> +
> ++#define CONFIG_SYS_GENERIC_BOARD
> ++
> + /*
> + * Version number information
> + */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0007-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0007-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- a/package/boot/uboot-kirkwood/patches/0007-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 45ba20427135e526cfa528773de0cfe215f4dc40 Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Sun, 30 Nov 2014 02:41:04 +0100
> -Subject: [PATCH 7/9] kirkwood: iconnect: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> - include/configs/iconnect.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/iconnect.h
> -+++ b/include/configs/iconnect.h
> -@@ -9,6 +9,8 @@
> - #ifndef _CONFIG_ICONNECT_H
> - #define _CONFIG_ICONNECT_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Version number information
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0008-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0008-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> --- a/package/boot/uboot-kirkwood/patches/0008-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From bd862f4e7a559e38763a5280e35bf7ff14b535f1 Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Sun, 30 Nov 2014 02:41:19 +0100
> -Subject: [PATCH 8/9] kirkwood: pogo_e02: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> - include/configs/pogo_e02.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/pogo_e02.h
> -+++ b/include/configs/pogo_e02.h
> -@@ -13,6 +13,8 @@
> - #ifndef _CONFIG_POGO_E02_H
> - #define _CONFIG_POGO_E02_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Machine type definition and ID
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/0009-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0009-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> --- a/package/boot/uboot-kirkwood/patches/0009-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 787e23179708ddad7ecd9dcd6c841546689864b0 Mon Sep 17 00:00:00 2001
> -From: Luka Perkov <luka at openwrt.org>
> -Date: Sun, 30 Nov 2014 02:41:49 +0100
> -Subject: [PATCH 9/9] kirkwood: sheevaplug: add CONFIG_SYS_GENERIC_BOARD define
> -
> -Signed-off-by: Luka Perkov <luka at openwrt.org>
> -CC: Prafulla Wadaskar <prafulla at marvell.com>
> -CC: Stefan Roese <sr at denx.de>
> ----
> - include/configs/sheevaplug.h | 2 ++
> - 1 file changed, 2 insertions(+)
> -
> ---- a/include/configs/sheevaplug.h
> -+++ b/include/configs/sheevaplug.h
> -@@ -10,6 +10,8 @@
> - #ifndef _CONFIG_SHEEVAPLUG_H
> - #define _CONFIG_SHEEVAPLUG_H
> -
> -+#define CONFIG_SYS_GENERIC_BOARD
> -+
> - /*
> - * Version number information
> - */
> diff -rupN a/package/boot/uboot-kirkwood/patches/110-dockstar.patch b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
> --- a/package/boot/uboot-kirkwood/patches/110-dockstar.patch
> +++ b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
> @@ -1,75 +1,20 @@
> --- a/include/configs/dockstar.h
> +++ b/include/configs/dockstar.h
> -@@ -17,20 +17,25 @@
> - /*
> - * Version number information
> - */
> --#define CONFIG_IDENT_STRING "\nSeagate FreeAgent DockStar"
> -+#define CONFIG_IDENT_STRING "Seagate FreeAgent DockStar"
> -
> - /*
> -- * High Level Configuration Options (easy to change)
> -+ * High Level Configuration Options
> - */
> --#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
> --#define CONFIG_KW88F6281 1 /* SOC Name */
> --#define CONFIG_MACH_DOCKSTAR /* Machine type */
> -+#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
> -+#define CONFIG_KW88F6281 /* SOC Name */
> - #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
> -
> - /*
> -+ * Machine type
> -+ */
> -+#define CONFIG_MACH_DOCKSTAR
> -+
> -+/*
> +@@ -31,6 +31,7 @@
> * Commands configuration
> */
> --#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
> -+#define CONFIG_SYS_NO_FLASH /* declare no flash (NOR/SPI) */
> + #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
> +#define CONFIG_SYS_MVFS
> - #include <config_cmd_default.h>
> - #define CONFIG_CMD_DHCP
> #define CONFIG_CMD_ENV
> -@@ -38,55 +43,52 @@
> #define CONFIG_CMD_NAND
> - #define CONFIG_CMD_PING
> - #define CONFIG_CMD_USB
> -+
> /*
> - * mv-common.h should be defined after CMD configs since it used them
> - * to enable certain macros
> +@@ -53,29 +54,29 @@
> + * it has to be rounded to sector size
> */
> - #include "mv-common.h"
> -
> --#undef CONFIG_SYS_PROMPT /* previously defined in mv-common.h */
> --#define CONFIG_SYS_PROMPT "DockStar> " /* Command Prompt */
> -+#undef CONFIG_SYS_PROMPT
> -+#define CONFIG_SYS_PROMPT "dockstar => "
> -
> - /*
> -- * Environment variables configurations
> -+ * Environment variables configuration
> - */
> - #ifdef CONFIG_CMD_NAND
> --#define CONFIG_ENV_IS_IN_NAND 1
> --#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
> -+#define CONFIG_ENV_IS_IN_NAND
> -+#define CONFIG_ENV_SECT_SIZE 0x20000
> - #else
> --#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
> -+#define CONFIG_ENV_IS_NOWHERE
> - #endif
> --/*
> -- * max 4k env size is enough, but in case of nand
> -- * it has to be rounded to sector size
> -- */
> --#define CONFIG_ENV_SIZE 0x20000 /* 128k */
> --#define CONFIG_ENV_ADDR 0x60000
> --#define CONFIG_ENV_OFFSET 0x60000 /* env starts here */
> -+#define CONFIG_ENV_SIZE 0x20000
> -+#define CONFIG_ENV_OFFSET 0xe0000
> + #define CONFIG_ENV_SIZE 0x20000 /* 128k */
> +-#define CONFIG_ENV_ADDR 0x80000
> +-#define CONFIG_ENV_OFFSET 0x80000 /* env starts here */
> ++#define CONFIG_ENV_OFFSET 0xe0000 /* env starts here */
>
> /*
> * Default environment variables
> @@ -81,12 +26,11 @@
> - "ubifsload 0x800000 ${kernel}; " \
> - "ubifsload 0x1100000 ${initrd}; " \
> - "bootm 0x800000 0x1100000"
> --
> --#define CONFIG_MTDPARTS "mtdparts=orion_nand:1m(uboot),-(root)\0"
> -+ "ubi part ubi; " \
> -+ "ubi read 0x800000 kernel; " \
> ++ "ubi part ubi; " \
> ++ "ubi read 0x800000 kernel; " \
> + "bootz 0x800000"
> -+
> +
> +-#define CONFIG_MTDPARTS "mtdparts=orion_nand:1m(uboot),-(root)\0"
> +#define CONFIG_MTDPARTS \
> + "mtdparts=orion_nand:" \
> + "0xe0000 at 0x0(uboot)," \
> @@ -107,17 +51,4 @@
> + "bootargs_root=\0"
>
> /*
> -- * Ethernet Driver configuration
> -+ * Ethernet driver configuration
> - */
> - #ifdef CONFIG_CMD_NET
> - #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
> -@@ -102,7 +110,7 @@
> - #define CONFIG_CMD_UBI
> - #define CONFIG_CMD_UBIFS
> - #define CONFIG_RBTREE
> --#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
> -+#define CONFIG_MTD_DEVICE
> - #define CONFIG_MTD_PARTITIONS
> - #define CONFIG_CMD_MTDPARTS
> - #define CONFIG_LZO
> + * Ethernet Driver configuration
> diff -rupN a/package/boot/uboot-kirkwood/patches/120-iconnect.patch b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
> --- a/package/boot/uboot-kirkwood/patches/120-iconnect.patch
> +++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
> @@ -1,6 +1,6 @@
> --- a/include/configs/iconnect.h
> +++ b/include/configs/iconnect.h
> -@@ -66,30 +66,35 @@
> +@@ -59,30 +59,35 @@
> #define CONFIG_ENV_IS_NOWHERE
> #endif
> #define CONFIG_ENV_SIZE 0x20000
> @@ -45,3 +45,13 @@
>
> /*
> * Ethernet driver configuration
> +--- a/configs/iconnect_defconfig
> ++++ b/configs/iconnect_defconfig
> +@@ -7,6 +7,7 @@ CONFIG_SYS_PROMPT="iconnect => "
> + # CONFIG_CMD_FLASH is not set
> + CONFIG_CMD_USB=y
> + # CONFIG_CMD_SETEXPR is not set
> ++CONFIG_CMD_DHCP=y
> + CONFIG_CMD_MII=y
> + CONFIG_CMD_PING=y
> + CONFIG_CMD_EXT2=y
> diff -rupN a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch
> --- a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch
> +++ b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch
> @@ -1,6 +1,6 @@
> --- a/include/configs/ib62x0.h
> +++ b/include/configs/ib62x0.h
> -@@ -92,7 +92,8 @@
> +@@ -74,7 +74,8 @@
> "mtdparts=orion_nand:" \
> "0xe0000 at 0x0(uboot)," \
> "0x20000 at 0xe0000(uboot_env)," \
> @@ -10,7 +10,7 @@
>
> #define CONFIG_EXTRA_ENV_SETTINGS \
> "console=console=ttyS0,115200\0" \
> -@@ -100,7 +101,7 @@
> +@@ -82,7 +83,7 @@
> "mtdparts="CONFIG_MTDPARTS \
> "kernel=/boot/zImage\0" \
> "fdt=/boot/ib62x0.dtb\0" \
> diff -rupN a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch
> --- a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch
> +++ b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch
> @@ -1,6 +1,6 @@
> --- a/include/configs/pogo_e02.h
> +++ b/include/configs/pogo_e02.h
> -@@ -63,23 +63,35 @@
> +@@ -54,23 +54,35 @@
> #endif
>
> #define CONFIG_ENV_SIZE 0x20000 /* 128k */
> diff -rupN a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch
> --- a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch
> +++ b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch
> @@ -1,8 +1,6 @@
> -Index: u-boot-2014.10/include/configs/goflexhome.h
> -===================================================================
> ---- u-boot-2014.10.orig/include/configs/goflexhome.h
> -+++ u-boot-2014.10/include/configs/goflexhome.h
> -@@ -96,20 +96,18 @@
> +--- a/include/configs/goflexhome.h
> ++++ b/include/configs/goflexhome.h
> +@@ -87,20 +87,18 @@
> */
> #define CONFIG_BOOTCOMMAND \
> "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
> @@ -10,8 +8,8 @@ Index: u-boot-2014.10/include/configs/go
> - "ubifsmount ubi:root; " \
> - "ubifsload 0x800000 ${kernel}; " \
> - "bootm 0x800000"
> -+ "ubi part ubi; " \
> -+ "ubi read 0x800000 kernel; " \
> ++ "ubi part ubi; " \
> ++ "ubi read 0x800000 kernel; " \
> + "bootz 0x800000"
>
> #define CONFIG_MTDPARTS \
> diff -rupN a/package/boot/uboot-kirkwood/patches/200-lede-config.patch b/package/boot/uboot-kirkwood/patches/200-lede-config.patch
> --- /dev/null
> +++ b/package/boot/uboot-kirkwood/patches/200-lede-config.patch
> @@ -0,0 +1,107 @@
> +--- a/arch/arm/mach-kirkwood/Kconfig
> ++++ b/arch/arm/mach-kirkwood/Kconfig
> +@@ -74,4 +74,7 @@ source "board/Seagate/goflexhome/Kconfig
> + source "board/Seagate/nas220/Kconfig"
> + source "board/zyxel/nsa310s/Kconfig"
> +
> ++config SECOND_STAGE
> ++ bool "LEDE second stage hack"
> ++
> + endif
> +--- a/include/configs/dockstar.h
> ++++ b/include/configs/dockstar.h
> +@@ -98,4 +98,6 @@
> + #define CONFIG_CMD_MTDPARTS
> + #define CONFIG_LZO
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_DOCKSTAR_H */
> +--- a/include/configs/ib62x0.h
> ++++ b/include/configs/ib62x0.h
> +@@ -114,4 +114,6 @@
> + #define CONFIG_RTC_MV
> + #endif /* CONFIG_CMD_DATE */
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_IB62x0_H */
> +--- a/include/configs/iconnect.h
> ++++ b/include/configs/iconnect.h
> +@@ -109,4 +109,6 @@
> + #define CONFIG_MTD_PARTITIONS
> + #define CONFIG_CMD_MTDPARTS
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_ICONNECT_H */
> +--- /dev/null
> ++++ b/include/configs/lede-kirkwood-common.h
> +@@ -0,0 +1,40 @@
> ++/*
> ++ * Copyright (C) 2013 Luka Perkov <luka at openwrt.org>
> ++ *
> ++ * SPDX-License-Identifier: GPL-2.0+
> ++ */
> ++
> ++#ifndef __LEDE_KIRKWOOD_COMMON_H
> ++#define __LEDE_KIRKWOOD_COMMON_H
> ++
> ++/* Commands */
> ++#define CONFIG_CMD_BOOTZ
> ++
> ++/* Ethernet */
> ++#if defined(CONFIG_CMD_NET)
> ++#define CONFIG_SERVERIP 192.168.1.2
> ++#define CONFIG_IPADDR 192.168.1.1
> ++#endif
> ++
> ++/* second stage loader */
> ++#if defined(CONFIG_SECOND_STAGE)
> ++#undef CONFIG_ENV_IS_IN_NAND
> ++#undef CONFIG_ENV_SECT_SIZE
> ++#define CONFIG_ENV_IS_NOWHERE
> ++#endif
> ++
> ++/* Flattened uImage Tree */
> ++#define CONFIG_FIT 1
> ++#define CONFIG_FIT_VERBOSE 1
> ++
> ++/* Various */
> ++#define CONFIG_BZIP2
> ++#define CONFIG_LZMA
> ++#define CONFIG_LZO
> ++
> ++/* Unnecessary */
> ++#undef CONFIG_BOOTM_NETBSD
> ++#undef CONFIG_BOOTM_PLAN9
> ++#undef CONFIG_BOOTM_RTEMS
> ++
> ++#endif /* __LEDE_KIRKWOOD_COMMON_H */
> +--- a/include/configs/pogo_e02.h
> ++++ b/include/configs/pogo_e02.h
> +@@ -104,4 +104,6 @@
> + #define CONFIG_CMD_MTDPARTS
> + #define CONFIG_LZO
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_POGO_E02_H */
> +--- a/include/configs/sheevaplug.h
> ++++ b/include/configs/sheevaplug.h
> +@@ -109,4 +109,6 @@
> + #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
> + #endif /* CONFIG_CMD_IDE */
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_SHEEVAPLUG_H */
> +--- a/include/configs/goflexhome.h
> ++++ b/include/configs/goflexhome.h
> +@@ -122,4 +122,6 @@
> + #define CONFIG_RTC_MV
> + #endif /* CONFIG_CMD_DATE */
> +
> ++#include "lede-kirkwood-common.h"
> ++
> + #endif /* _CONFIG_GOFLEXHOME_H */
> diff -rupN a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
> --- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
> +++ /dev/null
> @@ -1,119 +0,0 @@
> ---- a/arch/arm/cpu/arm926ejs/kirkwood/Kconfig
> -+++ b/arch/arm/cpu/arm926ejs/kirkwood/Kconfig
> -@@ -84,4 +84,7 @@ source "board/raidsonic/ib62x0/Kconfig"
> - source "board/Seagate/dockstar/Kconfig"
> - source "board/Seagate/goflexhome/Kconfig"
> -
> -+config SECOND_STAGE
> -+ bool "OpenWrt second stage hack"
> -+
> - endif
> ---- a/include/configs/dockstar.h
> -+++ b/include/configs/dockstar.h
> -@@ -115,4 +115,6 @@
> - #define CONFIG_CMD_MTDPARTS
> - #define CONFIG_LZO
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_DOCKSTAR_H */
> ---- a/include/configs/ib62x0.h
> -+++ b/include/configs/ib62x0.h
> -@@ -145,4 +145,6 @@
> - #define CONFIG_MTD_PARTITIONS
> - #define CONFIG_CMD_MTDPARTS
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_IB62x0_H */
> ---- a/include/configs/iconnect.h
> -+++ b/include/configs/iconnect.h
> -@@ -118,4 +118,6 @@
> - #define CONFIG_MTD_PARTITIONS
> - #define CONFIG_CMD_MTDPARTS
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_ICONNECT_H */
> ---- /dev/null
> -+++ b/include/configs/openwrt-kirkwood-common.h
> -@@ -0,0 +1,52 @@
> -+/*
> -+ * Copyright (C) 2013 Luka Perkov <luka at openwrt.org>
> -+ *
> -+ * SPDX-License-Identifier: GPL-2.0+
> -+ */
> -+
> -+#ifndef __OPENWRT_KIRKWOOD_COMMON_H
> -+#define __OPENWRT_KIRKWOOD_COMMON_H
> -+
> -+/* Commands */
> -+#define CONFIG_CMD_BOOTZ
> -+
> -+#if defined(CONFIG_CMD_NET)
> -+#define CONFIG_CMD_DHCP
> -+#define CONFIG_CMD_PING
> -+#endif
> -+
> -+/* Auto boot */
> -+#undef CONFIG_BOOTDELAY
> -+#define CONFIG_BOOTDELAY 3
> -+
> -+/* Ethernet */
> -+#if defined(CONFIG_CMD_NET)
> -+#define CONFIG_SERVERIP 192.168.1.2
> -+#define CONFIG_IPADDR 192.168.1.1
> -+#endif
> -+
> -+/* second stage loader */
> -+#if defined(CONFIG_SECOND_STAGE)
> -+#undef CONFIG_ENV_IS_IN_NAND
> -+#undef CONFIG_ENV_SECT_SIZE
> -+#define CONFIG_ENV_IS_NOWHERE
> -+#endif
> -+
> -+/* Flattened Device Tree */
> -+#define CONFIG_OF_LIBFDT
> -+
> -+/* Flattened uImage Tree */
> -+#define CONFIG_FIT
> -+#define CONFIG_FIT_VERBOSE
> -+
> -+/* Various */
> -+#define CONFIG_BZIP2
> -+#define CONFIG_LZMA
> -+#define CONFIG_LZO
> -+
> -+/* Unnecessary */
> -+#undef CONFIG_BOOTM_NETBSD
> -+#undef CONFIG_BOOTM_PLAN9
> -+#undef CONFIG_BOOTM_RTEMS
> -+
> -+#endif /* __OPENWRT_KIRKWOOD_COMMON_H */
> ---- a/include/configs/pogo_e02.h
> -+++ b/include/configs/pogo_e02.h
> -@@ -115,4 +115,6 @@
> - #define CONFIG_CMD_MTDPARTS
> - #define CONFIG_LZO
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_POGO_E02_H */
> ---- a/include/configs/sheevaplug.h
> -+++ b/include/configs/sheevaplug.h
> -@@ -143,4 +143,6 @@
> - #define CONFIG_CMD_MTDPARTS
> - #define CONFIG_LZO
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_SHEEVAPLUG_H */
> ---- a/include/configs/goflexhome.h
> -+++ b/include/configs/goflexhome.h
> -@@ -133,4 +133,6 @@
> - #define CONFIG_RTC_MV
> - #endif /* CONFIG_CMD_DATE */
> -
> -+#include "openwrt-kirkwood-common.h"
> -+
> - #endif /* _CONFIG_GOFLEXHOME_H */
> diff -rupN a/package/boot/uboot-kirkwood/patches/400-gcc-5-compiler.patch b/package/boot/uboot-kirkwood/patches/400-gcc-5-compiler.patch
> --- a/package/boot/uboot-kirkwood/patches/400-gcc-5-compiler.patch
> +++ /dev/null
> @@ -1,87 +0,0 @@
> -From: Hans de Goede <hdegoede at redhat.com>
> -Date: Sat, 7 Feb 2015 21:52:40 +0000 (+0100)
> -Subject: Add linux/compiler-gcc5.h to fix builds with gcc5
> -X-Git-Tag: v2015.04-rc2~31
> -X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=478b02f1a7043b673565075ea5016376f3293b23
> -
> -Add linux/compiler-gcc5.h to fix builds with gcc5
> -
> -Add linux/compiler-gcc5/h from the kernel sources at:
> -
> -commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
> -Author: Steven Noonan <steven at uplinklabs.net>
> -Date: Sat Oct 25 15:09:42 2014 -0700
> -
> - compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
> -
> -Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ----
> -
> ---- /dev/null
> -+++ b/include/linux/compiler-gcc5.h
> -@@ -0,0 +1,65 @@
> -+#ifndef __LINUX_COMPILER_H
> -+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
> -+#endif
> -+
> -+#define __used __attribute__((__used__))
> -+#define __must_check __attribute__((warn_unused_result))
> -+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
> -+
> -+/* Mark functions as cold. gcc will assume any path leading to a call
> -+ to them will be unlikely. This means a lot of manual unlikely()s
> -+ are unnecessary now for any paths leading to the usual suspects
> -+ like BUG(), printk(), panic() etc. [but let's keep them for now for
> -+ older compilers]
> -+
> -+ Early snapshots of gcc 4.3 don't support this and we can't detect this
> -+ in the preprocessor, but we can live with this because they're unreleased.
> -+ Maketime probing would be overkill here.
> -+
> -+ gcc also has a __attribute__((__hot__)) to move hot functions into
> -+ a special section, but I don't see any sense in this right now in
> -+ the kernel context */
> -+#define __cold __attribute__((__cold__))
> -+
> -+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
> -+
> -+#ifndef __CHECKER__
> -+# define __compiletime_warning(message) __attribute__((warning(message)))
> -+# define __compiletime_error(message) __attribute__((error(message)))
> -+#endif /* __CHECKER__ */
> -+
> -+/*
> -+ * Mark a position in code as unreachable. This can be used to
> -+ * suppress control flow warnings after asm blocks that transfer
> -+ * control elsewhere.
> -+ *
> -+ * Early snapshots of gcc 4.5 don't support this and we can't detect
> -+ * this in the preprocessor, but we can live with this because they're
> -+ * unreleased. Really, we need to have autoconf for the kernel.
> -+ */
> -+#define unreachable() __builtin_unreachable()
> -+
> -+/* Mark a function definition as prohibited from being cloned. */
> -+#define __noclone __attribute__((__noclone__))
> -+
> -+/*
> -+ * Tell the optimizer that something else uses this function or variable.
> -+ */
> -+#define __visible __attribute__((externally_visible))
> -+
> -+/*
> -+ * GCC 'asm goto' miscompiles certain code sequences:
> -+ *
> -+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
> -+ *
> -+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
> -+ *
> -+ * (asm goto is automatically volatile - the naming reflects this.)
> -+ */
> -+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
> -+
> -+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
> -+#define __HAVE_BUILTIN_BSWAP32__
> -+#define __HAVE_BUILTIN_BSWAP64__
> -+#define __HAVE_BUILTIN_BSWAP16__
> -+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
>
More information about the Lede-dev
mailing list