12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- From 38af1d72bd5c760623996c7a8978e05e007f0e96 Mon Sep 17 00:00:00 2001
- From: Phil Sutter <phil@nwl.cc>
- Date: Mon, 23 Jun 2014 02:51:10 +0200
- Subject: [PATCH] ar71xx: add zboot support
- This also contains a workaround for the decompressor overwriting the
- bootloader-passed kernel parameters in memory.
- ---
- arch/mips/Kconfig | 2 ++
- arch/mips/boot/compressed/Makefile | 6 ++++++
- arch/mips/boot/compressed/uart-16550.c | 6 ++++++
- 3 files changed, 14 insertions(+)
- diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
- index 95fa1f1..3bb5324 100644
- --- a/arch/mips/Kconfig
- +++ b/arch/mips/Kconfig
- @@ -106,6 +106,8 @@ config ATH79
- select SYS_HAS_EARLY_PRINTK
- select SYS_SUPPORTS_32BIT_KERNEL
- select SYS_SUPPORTS_BIG_ENDIAN
- + select SYS_SUPPORTS_ZBOOT
- + select SYS_SUPPORTS_ZBOOT_UART16550
- help
- Support for the Atheros AR71XX/AR724X/AR913X SoCs.
-
- diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
- index 61af6b6..5a4491d 100644
- --- a/arch/mips/boot/compressed/Makefile
- +++ b/arch/mips/boot/compressed/Makefile
- @@ -13,7 +13,13 @@
- #
-
- # set the default size of the mallocing area for decompressing
- +ifeq ($(CONFIG_ATH79_MACH_RB4XX),y)
- +# this needs to be smaller, otherwise the routerboot passed
- +# kernel parameters fall into bss area (and are therefore zeroed)
- +BOOT_HEAP_SIZE := 0x100000
- +else
- BOOT_HEAP_SIZE := 0x400000
- +endif
-
- # Disable Function Tracer
- KBUILD_CFLAGS := $(shell echo $(KBUILD_CFLAGS) | sed -e "s/-pg//")
- diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c
- index 237494b..25cb145 100644
- --- a/arch/mips/boot/compressed/uart-16550.c
- +++ b/arch/mips/boot/compressed/uart-16550.c
- @@ -12,6 +12,12 @@
- #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
- #endif
-
- +#ifdef CONFIG_SOC_AR71XX
- +#include <ar71xx_regs.h>
- +#define PORT(offset) (CKSEG1ADDR(AR71XX_UART_BASE) + (4 * offset))
- +#define IOTYPE unsigned int
- +#endif
- +
- #ifdef CONFIG_AR7
- #include <ar7.h>
- #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
- --
- 1.8.5.3
|