b161edbd72e11c8509e7ed3d7428be7fee45b00e
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 810-BCM63XX-move-kernel-behind-CFE.patch
1 From b99815f47828214b298178b0d0e2a9f3aae9f24a Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sun, 22 Mar 2015 11:49:16 +0100
4 Subject: [PATCH] MIPS: BCM63XX: move kernel behind CFE
5
6 CFE will load itself to offset 4 MiB (or 6 MiB) in memory occupying a
7 bit over one MiB. Traditionally the kernel will get linked to and loaded
8 at offset 64k.
9 This will pose a problem if the kernel size reaches 4 MiB - 64 kB, as
10 CFE will start overwriting itself. This can easily happen by including a
11 ramdisk image in the kernel.
12 While for net-booted elf kernels this can be worked around by wrapping
13 them in a lzma boot loader, on-flash images require the kernel to be
14 lzma compressed. This would cause inefficient double compression.
15
16 Luckily we have full control over where the kernel will be extracted to
17 and the entry point to be called, so move the kernel to behind CFE.
18 ---
19 arch/mips/bcm63xx/Platform | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/arch/mips/bcm63xx/Platform
23 +++ b/arch/mips/bcm63xx/Platform
24 @@ -4,4 +4,4 @@
25 platform-$(CONFIG_BCM63XX) += bcm63xx/
26 cflags-$(CONFIG_BCM63XX) += \
27 -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
28 -load-$(CONFIG_BCM63XX) := 0xffffffff80010000
29 +load-$(CONFIG_BCM63XX) := 0xffffffff80800000