Browse Source

enable LZMA/BZIP2/LZO support for brcm, enable other flash types which allows booting on Asus WL500gp with LZMA kernel (size 1.8 mb incl. base image)

Waldemar Brodkorb 12 years ago
parent
commit
1affe542d6
2 changed files with 26 additions and 11 deletions
  1. 10 0
      target/linux/config/Config.in.flash
  2. 16 11
      target/linux/patches/2.6.39.4/brcm.patch

+ 10 - 0
target/linux/config/Config.in.flash

@@ -59,6 +59,16 @@ config ADK_KERNEL_MTD_CFI_INTELEXT
 	default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
 	default n
 
+config ADK_KERNEL_MTD_CFI_AMDSTD
+	boolean
+	default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
+	default n
+
+config ADK_KERNEL_MTD_CFI_STAA
+	boolean
+	default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
+	default n
+
 config ADK_KERNEL_MTD_AR2315
 	boolean
 	select ADK_KERNEL_MTD_REDBOOT_PARTS

+ 16 - 11
target/linux/patches/2.6.39.4/brcm.patch

@@ -1,17 +1,22 @@
 diff -Nur linux-2.6.39.4.orig/arch/mips/Kconfig linux-2.6.39.4/arch/mips/Kconfig
 --- linux-2.6.39.4.orig/arch/mips/Kconfig	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/arch/mips/Kconfig	2012-01-17 13:14:33.000000000 +0100
-@@ -103,6 +103,7 @@
++++ linux-2.6.39.4/arch/mips/Kconfig	2012-01-17 20:37:12.000000000 +0100
+@@ -103,6 +103,12 @@
  	select GENERIC_GPIO
  	select SYS_HAS_EARLY_PRINTK
  	select CFE
 +	select SYS_SUPPORTS_ZBOOT_UART16550
++	select HAVE_KERNEL_GZIP
++        select HAVE_KERNEL_BZIP2
++        select HAVE_KERNEL_LZMA
++        select HAVE_KERNEL_XZ
++        select HAVE_KERNEL_LZO
  	help
  	 Support for BCM47XX based boards
  
 diff -Nur linux-2.6.39.4.orig/arch/mips/Makefile linux-2.6.39.4/arch/mips/Makefile
 --- linux-2.6.39.4.orig/arch/mips/Makefile	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/arch/mips/Makefile	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/Makefile	2012-01-17 20:35:09.000000000 +0100
 @@ -76,6 +76,7 @@
  all-$(CONFIG_BOOT_ELF32)	:= $(vmlinux-32)
  all-$(CONFIG_BOOT_ELF64)	:= $(vmlinux-64)
@@ -39,7 +44,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/Makefile linux-2.6.39.4/arch/mips/Makefi
  endef
 diff -Nur linux-2.6.39.4.orig/arch/mips/bcm47xx/Makefile linux-2.6.39.4/arch/mips/bcm47xx/Makefile
 --- linux-2.6.39.4.orig/arch/mips/bcm47xx/Makefile	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/arch/mips/bcm47xx/Makefile	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/bcm47xx/Makefile	2012-01-17 20:35:09.000000000 +0100
 @@ -3,4 +3,4 @@
  # under Linux.
  #
@@ -48,7 +53,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/bcm47xx/Makefile linux-2.6.39.4/arch/mip
 +obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o platform.o
 diff -Nur linux-2.6.39.4.orig/arch/mips/bcm47xx/platform.c linux-2.6.39.4/arch/mips/bcm47xx/platform.c
 --- linux-2.6.39.4.orig/arch/mips/bcm47xx/platform.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39.4/arch/mips/bcm47xx/platform.c	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/bcm47xx/platform.c	2012-01-17 20:35:09.000000000 +0100
 @@ -0,0 +1,146 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -198,7 +203,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/bcm47xx/platform.c linux-2.6.39.4/arch/m
 +device_initcall(bcm47xx_register_devices);
 diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/Makefile linux-2.6.39.4/arch/mips/boot/compressed/Makefile
 --- linux-2.6.39.4.orig/arch/mips/boot/compressed/Makefile	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/arch/mips/boot/compressed/Makefile	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/boot/compressed/Makefile	2012-01-17 20:35:09.000000000 +0100
 @@ -58,8 +58,13 @@
  # Calculate the load address of the compressed kernel image
  hostprogs-y := calc_vmlinuz_load_addr
@@ -229,7 +234,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/Makefile linux-2.6.39.4/
 +clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec,elf} $(objtree)/arch/mips/boot/compressed/selfreloc.{o,lds}
 diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.S linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.S
 --- linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.S	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.S	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.S	2012-01-17 20:35:09.000000000 +0100
 @@ -0,0 +1,54 @@
 +/*-
 + * written 2011 by Thorsten Glaser <tg@freewrt.org> based on
@@ -287,7 +292,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.S linux-2.6.39
 +imgend:
 diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.lds.S linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.lds.S
 --- linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.lds.S	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.lds.S	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/boot/compressed/selfreloc.lds.S	2012-01-17 20:35:09.000000000 +0100
 @@ -0,0 +1,39 @@
 +/*-
 + * written 2010 by Thorsten Glaser <tg@debian.org> based on
@@ -330,7 +335,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/selfreloc.lds.S linux-2.
 +}
 diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/uart-16550.c linux-2.6.39.4/arch/mips/boot/compressed/uart-16550.c
 --- linux-2.6.39.4.orig/arch/mips/boot/compressed/uart-16550.c	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/arch/mips/boot/compressed/uart-16550.c	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/arch/mips/boot/compressed/uart-16550.c	2012-01-17 20:35:09.000000000 +0100
 @@ -18,6 +18,11 @@
  #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
  #endif
@@ -345,7 +350,7 @@ diff -Nur linux-2.6.39.4.orig/arch/mips/boot/compressed/uart-16550.c linux-2.6.3
  #endif
 diff -Nur linux-2.6.39.4.orig/drivers/ssb/driver_mipscore.c linux-2.6.39.4/drivers/ssb/driver_mipscore.c
 --- linux-2.6.39.4.orig/drivers/ssb/driver_mipscore.c	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/drivers/ssb/driver_mipscore.c	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/drivers/ssb/driver_mipscore.c	2012-01-17 20:35:09.000000000 +0100
 @@ -190,10 +190,11 @@
  {
  	struct ssb_bus *bus = mcore->dev->bus;
@@ -361,7 +366,7 @@ diff -Nur linux-2.6.39.4.orig/drivers/ssb/driver_mipscore.c linux-2.6.39.4/drive
  			mcore->flash_buswidth = 1;
 diff -Nur linux-2.6.39.4.orig/init/Kconfig linux-2.6.39.4/init/Kconfig
 --- linux-2.6.39.4.orig/init/Kconfig	2011-08-03 21:43:28.000000000 +0200
-+++ linux-2.6.39.4/init/Kconfig	2012-01-17 13:14:33.000000000 +0100
++++ linux-2.6.39.4/init/Kconfig	2012-01-17 20:35:09.000000000 +0100
 @@ -156,6 +156,7 @@
  config KERNEL_GZIP
  	bool "Gzip"