From 13c60d6c3c2989ff18a8964573cf8c5ebc56b57d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 17 Sep 2015 19:45:22 +0200 Subject: add 4.1.x patches for mikrotik-rb4xx, finetune mini.config, drivers should go into target/linux/config --- .../4.1.6/0027-ar71xx-add-zboot-support.patch | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 target/mips/mikrotik-rb4xx/patches/4.1.6/0027-ar71xx-add-zboot-support.patch (limited to 'target/mips/mikrotik-rb4xx/patches/4.1.6/0027-ar71xx-add-zboot-support.patch') diff --git a/target/mips/mikrotik-rb4xx/patches/4.1.6/0027-ar71xx-add-zboot-support.patch b/target/mips/mikrotik-rb4xx/patches/4.1.6/0027-ar71xx-add-zboot-support.patch new file mode 100644 index 000000000..1963931a9 --- /dev/null +++ b/target/mips/mikrotik-rb4xx/patches/4.1.6/0027-ar71xx-add-zboot-support.patch @@ -0,0 +1,64 @@ +From 38af1d72bd5c760623996c7a8978e05e007f0e96 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +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 ++#define PORT(offset) (CKSEG1ADDR(AR71XX_UART_BASE) + (4 * offset)) ++#define IOTYPE unsigned int ++#endif ++ + #ifdef CONFIG_AR7 + #include + #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset)) +-- +1.8.5.3 + -- cgit v1.2.3