Browse Source

Merge branch 'master' of git+ssh://openadk.org/git/openadk

Waldemar Brodkorb 14 years ago
parent
commit
be441a7f64

+ 2 - 2
mk/build.mk

@@ -214,7 +214,7 @@ clean:
 	@$(TRACE) clean
 	@$(TRACE) clean
 	$(MAKE) -C $(CONFIG) clean
 	$(MAKE) -C $(CONFIG) clean
 	for d in ${STAGING_PKG_DIR}; do \
 	for d in ${STAGING_PKG_DIR}; do \
-		for f in $$(ls $$d/[a-z]*|grep -v [A-Z] 2>/dev/null); do  \
+		for f in $$(ls $$d/[a-z]* 2>/dev/null |grep -v [A-Z] 2>/dev/null); do  \
 			while read file ; do \
 			while read file ; do \
 				rm ${STAGING_DIR}/$$file 2>/dev/null;\
 				rm ${STAGING_DIR}/$$file 2>/dev/null;\
 			done < $$f ; \
 			done < $$f ; \
@@ -513,7 +513,7 @@ bulk:
 	    ( \
 	    ( \
 		echo === building $$arch $$system $$libc on $$(date); \
 		echo === building $$arch $$system $$libc on $$(date); \
 		$(GMAKE) prereq && \
 		$(GMAKE) prereq && \
-		$(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive defconfig; \
+		$(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=nfsroot defconfig; \
 		$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit;fi; \
 		$(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit;fi; \
 		rm .config; \
 		rm .config; \
             ) 2>&1 | tee $(TOPDIR)/bin/$${system}_$${arch}_$$libc/build.log; \
             ) 2>&1 | tee $(TOPDIR)/bin/$${system}_$${arch}_$$libc/build.log; \

+ 6 - 2
mk/kernel-vars.mk

@@ -8,10 +8,14 @@ KERNEL_MAKE_OPTS+=	CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \
 			HOSTCFLAGS='${CFLAGS_FOR_BUILD}'
 			HOSTCFLAGS='${CFLAGS_FOR_BUILD}'
 endif
 endif
 ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G},y)
 ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G},y)
-ADK_KCPPFLAGS+=		-DBCM47XX_OVERRIDE_FLASHSIZE=0x400000
+ADK_KCPPFLAGS+=		-DBCM47XX_OVERRIDE_FLASHSIZE=0x400000 \
+			-DBCM47XX_OVERRIDE_NVRAMSIZE=0x10000 \
+			-DBCM47XX_OVERRIDE_CFESIZE=0x40000
 endif
 endif
 ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54GS},y)
 ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54GS},y)
-ADK_KCPPFLAGS+=		-DBCM47XX_OVERRIDE_FLASHSIZE=0x800000
+ADK_KCPPFLAGS+=		-DBCM47XX_OVERRIDE_FLASHSIZE=0x800000 \
+			-DBCM47XX_OVERRIDE_NVRAMSIZE=0x20000 \
+			-DBCM47XX_OVERRIDE_CFESIZE=0x40000
 endif
 endif
 
 
 KERNEL_MAKE_ENV+=	KCPPFLAGS='${ADK_KCPPFLAGS}'
 KERNEL_MAKE_ENV+=	KCPPFLAGS='${ADK_KCPPFLAGS}'

+ 12 - 0
target/linux/config/Config.in.netdevice

@@ -343,6 +343,18 @@ config ADK_KERNEL_ATH5K_DEBUG
 config ADK_KPACKAGE_KMOD_B43
 config ADK_KPACKAGE_KMOD_B43
 	prompt "kmod-b43..................... Broadcom B43xx wireless cards"
 	prompt "kmod-b43..................... Broadcom B43xx wireless cards"
 	tristate
 	tristate
+	select ADK_PACKAGE_B43_FIRMWARE
+	select ADK_KPACKAGE_KMOD_FW_LOADER
+	select ADK_KPACKAGE_KMOD_MAC80211
+	depends on ADK_TARGET_WITH_SSB || ADK_TARGET_WITH_MINIPCI
+	default n
+	help
+	  Driver for Broadcom B43xx wireless chips.
+
+config ADK_KPACKAGE_KMOD_B43LEGACY
+	prompt "kmod-b43legacy............... Broadcom B43xx (legacy) wireless cards"
+	tristate
+	select ADK_PACKAGE_B43_FIRMWARE
 	select ADK_KPACKAGE_KMOD_FW_LOADER
 	select ADK_KPACKAGE_KMOD_FW_LOADER
 	select ADK_KPACKAGE_KMOD_MAC80211
 	select ADK_KPACKAGE_KMOD_MAC80211
 	depends on ADK_TARGET_WITH_SSB || ADK_TARGET_WITH_MINIPCI
 	depends on ADK_TARGET_WITH_SSB || ADK_TARGET_WITH_MINIPCI

+ 8 - 9
target/linux/patches/2.6.37/brcm.patch

@@ -9,8 +9,8 @@ diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/Makefile linux-2.6.37/arch/mips/bc
 +obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o platform.o
 +obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o platform.o
 diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/bcm47xx/platform.c
 diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/bcm47xx/platform.c
 --- linux-2.6.37.orig/arch/mips/bcm47xx/platform.c	1970-01-01 01:00:00.000000000 +0100
 --- linux-2.6.37.orig/arch/mips/bcm47xx/platform.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.37/arch/mips/bcm47xx/platform.c	2011-04-26 21:54:17.727672777 +0200
-@@ -0,0 +1,147 @@
++++ linux-2.6.37/arch/mips/bcm47xx/platform.c	2011-04-27 09:51:38.177664121 +0200
+@@ -0,0 +1,146 @@
 +/*
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
 + * License.  See the file "COPYING" in the main directory of this archive
@@ -28,7 +28,6 @@ diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/
 +#include <asm/mach-bcm47xx/bcm47xx.h>
 +#include <asm/mach-bcm47xx/bcm47xx.h>
 +#include <asm/mach-bcm47xx/nvram.h>
 +#include <asm/mach-bcm47xx/nvram.h>
 +
 +
-+#define NVRAM_FLASH_SIZE 0x10000
 +#define CFGFS_FLASH_SIZE (128 * 1024)
 +#define CFGFS_FLASH_SIZE (128 * 1024)
 +
 +
 +static struct mtd_partition bcm47xx_partitions[] = {
 +static struct mtd_partition bcm47xx_partitions[] = {
@@ -36,8 +35,8 @@ diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/
 +	{
 +	{
 +		.name       = "cfe",
 +		.name       = "cfe",
 +		.offset     = 0,
 +		.offset     = 0,
-+		.size       = 0x40000,		/* 256k */
-+		.mask_flags = MTD_WRITEABLE	/* force read-only */
++		.size       = BCM47XX_OVERRIDE_CFESIZE,
++		.mask_flags = MTD_WRITEABLE		/* force read-only */
 +	},
 +	},
 +#define SLOT_LINUX 1
 +#define SLOT_LINUX 1
 +	{
 +	{
@@ -108,7 +107,7 @@ diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/
 +	struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
 +	struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
 +	struct bcm47xx_trx_header *trx_hdr;
 +	struct bcm47xx_trx_header *trx_hdr;
 +
 +
-+	trx_hdr = (void *)KSEG1ADDR(mcore->flash_window + 0x40000);
++	trx_hdr = (void *)KSEG1ADDR(mcore->flash_window + BCM47XX_OVERRIDE_CFESIZE);
 +
 +
 +	/* devices might have 2, 4 or 8 MB flash size */
 +	/* devices might have 2, 4 or 8 MB flash size */
 +#ifdef BCM47XX_OVERRIDE_FLASHSIZE
 +#ifdef BCM47XX_OVERRIDE_FLASHSIZE
@@ -122,11 +121,11 @@ diff -Nur linux-2.6.37.orig/arch/mips/bcm47xx/platform.c linux-2.6.37/arch/mips/
 +	printk(KERN_INFO "FLASH SIZE%s: %x\n", BCM47XX_OVERRODE_FLASHSIZE,
 +	printk(KERN_INFO "FLASH SIZE%s: %x\n", BCM47XX_OVERRODE_FLASHSIZE,
 +		flash_size);
 +		flash_size);
 +
 +
-+	left = flash_size - 0x40000;
++	left = flash_size - BCM47XX_OVERRIDE_CFESIZE;
 +	posn = flash_size;
 +	posn = flash_size;
-+	UPTODOWN(SLOT_NVRAM, NVRAM_FLASH_SIZE);
++	UPTODOWN(SLOT_NVRAM, BCM47XX_OVERRIDE_NVRAMSIZE);
 +	UPTODOWN(SLOT_CFGFS, CFGFS_FLASH_SIZE);
 +	UPTODOWN(SLOT_CFGFS, CFGFS_FLASH_SIZE);
-+	bcm47xx_partitions[SLOT_LINUX].offset = 0x40000;
++	bcm47xx_partitions[SLOT_LINUX].offset = BCM47XX_OVERRIDE_CFESIZE;
 +	bcm47xx_partitions[SLOT_LINUX].size = left;
 +	bcm47xx_partitions[SLOT_LINUX].size = left;
 +
 +
 +	if (trx_hdr->magic == BCM47XX_TRX_MAGIC) {
 +	if (trx_hdr->magic == BCM47XX_TRX_MAGIC) {

+ 8 - 0
target/mips/Makefile

@@ -49,6 +49,14 @@ ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
 kernel-install:
 kernel-install:
 	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
 	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
 endif
 endif
+ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB411),y)
+kernel-install:
+	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(TARGET_DIR)/boot/kernel
+endif
+ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB433),y)
+kernel-install:
+	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(TARGET_DIR)/boot/kernel
+endif
 
 
 ifeq ($(ADK_TARGET_FS),nfsroot)
 ifeq ($(ADK_TARGET_FS),nfsroot)
 imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL)
 imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL)