aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-kirkwood/patches
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/boot/uboot-kirkwood/patches
downloadtrunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip
trunk-47381HEADmaster
Diffstat (limited to 'package/boot/uboot-kirkwood/patches')
-rw-r--r--package/boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch96
-rw-r--r--package/boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch32
-rw-r--r--package/boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch45
-rw-r--r--package/boot/uboot-kirkwood/patches/0004-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch27
-rw-r--r--package/boot/uboot-kirkwood/patches/0005-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch23
-rw-r--r--package/boot/uboot-kirkwood/patches/0006-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch23
-rw-r--r--package/boot/uboot-kirkwood/patches/0007-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch23
-rw-r--r--package/boot/uboot-kirkwood/patches/0008-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch23
-rw-r--r--package/boot/uboot-kirkwood/patches/0009-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch23
-rw-r--r--package/boot/uboot-kirkwood/patches/110-dockstar.patch129
-rw-r--r--package/boot/uboot-kirkwood/patches/120-iconnect.patch47
-rw-r--r--package/boot/uboot-kirkwood/patches/130-ib62x0.patch21
-rw-r--r--package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch48
-rw-r--r--package/boot/uboot-kirkwood/patches/200-openwrt-config.patch110
14 files changed, 670 insertions, 0 deletions
diff --git 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
new file mode 100644
index 0000000..5abdad9
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0001-cosmetic-kirkwood-style-fixes-in-kwbimage.cfg-files.patch
@@ -0,0 +1,96 @@
+From 76a9fed9e5580945827a82963ac7315186fd0ebe Mon Sep 17 00:00:00 2001
+From: Luka Perkov <luka@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@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 --git 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
new file mode 100644
index 0000000..5b3c328
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0002-kirkwood-define-empty-CONFIG_MVGBE_PORTS-by-default.patch
@@ -0,0 +1,32 @@
+From 292d4cf9257921912e8ea352687c977208e7553d Mon Sep 17 00:00:00 2001
+From: Luka Perkov <luka@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@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 --git 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
new file mode 100644
index 0000000..f92e520
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0003-ARM-kirkwood-fix-cpu-info-for-6282-device-id.patch
@@ -0,0 +1,45 @@
+From fa0ece2cc571ba1ccb9d1e0a8d337417c032576e Mon Sep 17 00:00:00 2001
+From: Luka Perkov <luka@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@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 --git 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
new file mode 100644
index 0000000..65ae63f
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0004-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git 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
new file mode 100644
index 0000000..6ec6052
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0005-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git 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
new file mode 100644
index 0000000..ac0bc0d
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0006-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git 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
new file mode 100644
index 0000000..ab23481
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0007-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git 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
new file mode 100644
index 0000000..40918d4
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0008-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git 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
new file mode 100644
index 0000000..d976bbc
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/0009-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@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@openwrt.org>
+CC: Prafulla Wadaskar <prafulla@marvell.com>
+CC: Stefan Roese <sr@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 --git a/package/boot/uboot-kirkwood/patches/110-dockstar.patch b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
new file mode 100644
index 0000000..4c9ccdf
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
@@ -0,0 +1,129 @@
+--- 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
++
++/*
+ * 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_MVFS
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_ENV
+@@ -38,55 +43,58 @@
+ #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
+ */
+ #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
+
+ /*
+ * Default environment variables
+ */
+ #define CONFIG_BOOTCOMMAND \
+ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
+- "ubi part root; " \
+- "ubifsmount ubi:root; " \
+- "ubifsload 0x800000 ${kernel}; " \
+- "ubifsload 0x1100000 ${initrd}; " \
+- "bootm 0x800000 0x1100000"
+-
+-#define CONFIG_MTDPARTS "mtdparts=orion_nand:1m(uboot),-(root)\0"
++ "ubi part root; " \
++ "ubifsmount ubi:rootfs; " \
++ "ubifsload 0x800000 ${kernel}; " \
++ "ubifsload 0x700000 ${fdt}; " \
++ "ubifsumount; " \
++ "fdt addr 0x700000; fdt resize; fdt chosen; " \
++ "bootz 0x800000 - 0x700000"
++
++#define CONFIG_MTDPARTS \
++ "mtdparts=orion_nand:" \
++ "0xe0000@0x0(uboot)," \
++ "0x20000@0xe0000(uboot_env)," \
++ "0x100000@0x100000(second_stage_uboot)," \
++ "-@0x200000(root)\0"
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+- "console=console=ttyS0,115200\0" \
+- "mtdids=nand0=orion_nand\0" \
+- "mtdparts="CONFIG_MTDPARTS \
+- "kernel=/boot/uImage\0" \
+- "initrd=/boot/uInitrd\0" \
+- "bootargs_root=ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro\0"
++ "console=console=ttyS0,115200\0" \
++ "mtdids=nand0=orion_nand\0" \
++ "mtdparts="CONFIG_MTDPARTS \
++ "kernel=/boot/zImage\0" \
++ "fdt=/boot/dockstar.dtb\0" \
++ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\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
diff --git a/package/boot/uboot-kirkwood/patches/120-iconnect.patch b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
new file mode 100644
index 0000000..e525ca0
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
@@ -0,0 +1,47 @@
+--- a/include/configs/iconnect.h
++++ b/include/configs/iconnect.h
+@@ -66,30 +66,35 @@
+ #define CONFIG_ENV_IS_NOWHERE
+ #endif
+ #define CONFIG_ENV_SIZE 0x20000
+-#define CONFIG_ENV_OFFSET 0x80000
++#define CONFIG_ENV_OFFSET 0xe0000
+
+ /*
+ * Default environment variables
+ */
+ #define CONFIG_BOOTCOMMAND \
+ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
+- "ubi part rootfs; " \
++ "ubi part root; " \
+ "ubifsmount ubi:rootfs; " \
+ "ubifsload 0x800000 ${kernel}; " \
+- "bootm 0x800000"
++ "ubifsload 0x700000 ${fdt}; " \
++ "ubifsumount; " \
++ "fdt addr 0x700000; fdt resize; fdt chosen; " \
++ "bootz 0x800000 - 0x700000"
+
+ #define CONFIG_MTDPARTS \
+- "mtdparts=orion_nand:" \
+- "0x80000@0x0(uboot)," \
+- "0x20000@0x80000(uboot_env)," \
+- "-@0xa0000(rootfs)\0"
++ "mtdparts=orion_nand:" \
++ "0xe0000@0x0(uboot)," \
++ "0x20000@0xe0000(uboot_env)," \
++ "0x100000@0x100000(second_stage_uboot)," \
++ "-@0x200000(root)\0"
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+ "console=console=ttyS0,115200\0" \
+ "mtdids=nand0=orion_nand\0" \
+ "mtdparts="CONFIG_MTDPARTS \
+- "kernel=/boot/uImage\0" \
+- "bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
++ "kernel=/boot/zImage\0" \
++ "fdt=/boot/iconnect.dtb\0" \
++ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
+
+ /*
+ * Ethernet driver configuration
diff --git a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch
new file mode 100644
index 0000000..f46970c
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch
@@ -0,0 +1,21 @@
+--- a/include/configs/ib62x0.h
++++ b/include/configs/ib62x0.h
+@@ -92,7 +92,8 @@
+ "mtdparts=orion_nand:" \
+ "0xe0000@0x0(uboot)," \
+ "0x20000@0xe0000(uboot_env)," \
+- "-@0x100000(root)\0"
++ "0x100000@0x100000(second_stage_uboot)," \
++ "-@0x200000(root)\0"
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+ "console=console=ttyS0,115200\0" \
+@@ -100,7 +101,7 @@
+ "mtdparts="CONFIG_MTDPARTS \
+ "kernel=/boot/zImage\0" \
+ "fdt=/boot/ib62x0.dtb\0" \
+- "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
++ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
+
+ /*
+ * Ethernet driver configuration
diff --git a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch
new file mode 100644
index 0000000..40e659f
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch
@@ -0,0 +1,48 @@
+--- a/include/configs/pogo_e02.h
++++ b/include/configs/pogo_e02.h
+@@ -63,23 +63,35 @@
+ #endif
+
+ #define CONFIG_ENV_SIZE 0x20000 /* 128k */
+-#define CONFIG_ENV_OFFSET 0x60000 /* env starts here */
++#define CONFIG_ENV_OFFSET 0xe0000 /* env starts here */
+
+ /*
+ * Default environment variables
+ */
+ #define CONFIG_BOOTCOMMAND \
+- "setenv bootargs $(bootargs_console); " \
+- "run bootcmd_usb; " \
+- "bootm 0x00800000 0x01100000"
++ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
++ "ubi part root; " \
++ "ubifsmount ubi:rootfs; " \
++ "ubifsload 0x800000 ${kernel}; " \
++ "ubifsload 0x700000 ${fdt}; " \
++ "ubifsumount; " \
++ "fdt addr 0x700000; fdt resize; fdt chosen; " \
++ "bootz 0x800000 - 0x700000"
++
++#define CONFIG_MTDPARTS \
++ "mtdparts=orion_nand:" \
++ "0xe0000@0x0(uboot)," \
++ "0x20000@0xe0000(uboot_env)," \
++ "0x100000@0x100000(second_stage_uboot)," \
++ "-@0x200000(root)\0"
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+- "mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)," \
+- "32M(rootfs),-(data)\0"\
+- "mtdids=nand0=orion_nand\0"\
+- "bootargs_console=console=ttyS0,115200\0" \
+- "bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; " \
+- "ext2load usb 0:1 0x01100000 /uInitrd\0"
++ "console=console=ttyS0,115200\0" \
++ "mtdids=nand0=orion_nand\0" \
++ "mtdparts="CONFIG_MTDPARTS \
++ "kernel=/boot/zImage\0" \
++ "fdt=/boot/pogo_e02.dtb\0" \
++ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
+
+ /*
+ * Ethernet Driver configuration
diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
new file mode 100644
index 0000000..0e0dd02
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
@@ -0,0 +1,110 @@
+--- a/arch/arm/cpu/arm926ejs/kirkwood/Kconfig
++++ b/arch/arm/cpu/arm926ejs/kirkwood/Kconfig
+@@ -84,4 +84,7 @@
+ 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@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 */