aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-03-25 15:34:59 +0000
committerJonas Gorski <jogo@openwrt.org>2015-03-25 15:34:59 +0000
commit1e7bcd00a970963a1f759fa47ef7dc64c2c6706a (patch)
treed38ee771478d09c23daa070be07d5489e5ae5c55 /target/linux
parented7bef4f55a8a5ec4c37fdaff263541f978888b4 (diff)
downloadupstream-1e7bcd00a970963a1f759fa47ef7dc64c2c6706a.tar.gz
upstream-1e7bcd00a970963a1f759fa47ef7dc64c2c6706a.tar.bz2
upstream-1e7bcd00a970963a1f759fa47ef7dc64c2c6706a.zip
brcm63xx: move kernel load address to 8MiB
Fixes boot when uncompressed kernel is > 4 MiB (#19251). Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44984 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile2
-rw-r--r--target/linux/brcm63xx/patches-3.14/810-BCM63XX-move-kernel-behind-CFE.patch34
-rw-r--r--target/linux/brcm63xx/patches-3.18/810-BCM63XX-move-kernel-behind-CFE.patch34
3 files changed, 69 insertions, 1 deletions
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 47756bf39b..a55fc46d6c 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-LOADADDR = 0x80010000 # RAM start + 64K
+LOADADDR = 0x80800000 # RAM start + 8MB
KERNEL_ENTRY = $(LOADADDR) # Newer kernels add a jmp to the kernel_entry at the start of the binary
RAMSIZE = 0x02000000 # 32MB
LZMA_TEXT_START = 0x81800000 # 32MB - 8MB
diff --git a/target/linux/brcm63xx/patches-3.14/810-BCM63XX-move-kernel-behind-CFE.patch b/target/linux/brcm63xx/patches-3.14/810-BCM63XX-move-kernel-behind-CFE.patch
new file mode 100644
index 0000000000..15970f19e4
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/810-BCM63XX-move-kernel-behind-CFE.patch
@@ -0,0 +1,34 @@
+From b99815f47828214b298178b0d0e2a9f3aae9f24a Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sun, 22 Mar 2015 11:49:16 +0100
+Subject: [PATCH] MIPS: BCM63XX: move kernel behind CFE
+
+CFE will load itself to offset 4 MiB (or 6 MiB) in memory occupying a
+bit over one MiB. Traditionally the kernel will get linked to and loaded
+at offset 64k.
+This will pose a problem if the kernel size reaches 4 MiB - 64 kB, as
+CFE will start overwriting itself. This can easily happen by including a
+ramdisk image in the kernel.
+While for net-booted elf kernels this can be worked around by wrapping
+them in a lzma boot loader, on-flash images require the kernel to be
+lzma compressed. This would cause inefficient double compression.
+
+Luckily we have full control over where the kernel will be extracted to
+and the entry point to be called, so move the kernel to behind CFE.
+---
+ arch/mips/bcm63xx/Platform | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/mips/bcm63xx/Platform b/arch/mips/bcm63xx/Platform
+index 5f86b2f..ee73f8f 100644
+--- a/arch/mips/bcm63xx/Platform
++++ b/arch/mips/bcm63xx/Platform
+@@ -4,4 +4,4 @@
+ platform-$(CONFIG_BCM63XX) += bcm63xx/
+ cflags-$(CONFIG_BCM63XX) += \
+ -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
+-load-$(CONFIG_BCM63XX) := 0xffffffff80010000
++load-$(CONFIG_BCM63XX) := 0xffffffff80800000
+--
+1.7.10.4
+
diff --git a/target/linux/brcm63xx/patches-3.18/810-BCM63XX-move-kernel-behind-CFE.patch b/target/linux/brcm63xx/patches-3.18/810-BCM63XX-move-kernel-behind-CFE.patch
new file mode 100644
index 0000000000..15970f19e4
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/810-BCM63XX-move-kernel-behind-CFE.patch
@@ -0,0 +1,34 @@
+From b99815f47828214b298178b0d0e2a9f3aae9f24a Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sun, 22 Mar 2015 11:49:16 +0100
+Subject: [PATCH] MIPS: BCM63XX: move kernel behind CFE
+
+CFE will load itself to offset 4 MiB (or 6 MiB) in memory occupying a
+bit over one MiB. Traditionally the kernel will get linked to and loaded
+at offset 64k.
+This will pose a problem if the kernel size reaches 4 MiB - 64 kB, as
+CFE will start overwriting itself. This can easily happen by including a
+ramdisk image in the kernel.
+While for net-booted elf kernels this can be worked around by wrapping
+them in a lzma boot loader, on-flash images require the kernel to be
+lzma compressed. This would cause inefficient double compression.
+
+Luckily we have full control over where the kernel will be extracted to
+and the entry point to be called, so move the kernel to behind CFE.
+---
+ arch/mips/bcm63xx/Platform | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/mips/bcm63xx/Platform b/arch/mips/bcm63xx/Platform
+index 5f86b2f..ee73f8f 100644
+--- a/arch/mips/bcm63xx/Platform
++++ b/arch/mips/bcm63xx/Platform
+@@ -4,4 +4,4 @@
+ platform-$(CONFIG_BCM63XX) += bcm63xx/
+ cflags-$(CONFIG_BCM63XX) += \
+ -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
+-load-$(CONFIG_BCM63XX) := 0xffffffff80010000
++load-$(CONFIG_BCM63XX) := 0xffffffff80800000
+--
+1.7.10.4
+