Bläddra i källkod

make nfsroot working for brcm

Waldemar Brodkorb 14 år sedan
förälder
incheckning
a1188796cf
2 ändrade filer med 93 tillägg och 94 borttagningar
  1. 7 94
      target/brcm/kernel.config
  2. 86 0
      target/brcm/patches/nvram.patch

+ 7 - 94
target/brcm/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.34
-# Sun May 30 15:46:06 2010
+# Tue Jun  1 20:03:59 2010
 #
 CONFIG_MIPS=y
 
@@ -212,7 +212,7 @@ CONFIG_PRINTK=y
 # CONFIG_BUG is not set
 # CONFIG_ELF_CORE is not set
 # CONFIG_PCSPKR_PLATFORM is not set
-CONFIG_BASE_FULL=y
+# CONFIG_BASE_FULL is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
@@ -240,7 +240,7 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
-CONFIG_BASE_SMALL=0
+CONFIG_BASE_SMALL=1
 CONFIG_MODULES=y
 # CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
@@ -407,95 +407,10 @@ CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_FW_LOADER=y
-CONFIG_FIRMWARE_IN_KERNEL=y
-CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_FW_LOADER is not set
 # CONFIG_SYS_HYPERVISOR is not set
 # CONFIG_CONNECTOR is not set
-CONFIG_MTD=y
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_TESTS is not set
-# CONFIG_MTD_CONCAT is not set
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_ROOTFS_ROOT_DEV=y
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-# CONFIG_MTD_AR7_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-# CONFIG_RFD_FTL is not set
-# CONFIG_SSFDC is not set
-# CONFIG_MTD_OOPS is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CFI_UTIL=y
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-CONFIG_MTD_BCM47XX=y
-# CONFIG_MTD_INTEL_VR_NOR is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLOCK2MTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_NAND is not set
-# CONFIG_MTD_ONENAND is not set
-
-#
-# LPDDR flash memory drivers
-#
-# CONFIG_MTD_LPDDR is not set
-
-#
-# UBI - Unsorted block images
-#
-# CONFIG_MTD_UBI is not set
+# CONFIG_MTD is not set
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_DA is not set
@@ -738,7 +653,7 @@ CONFIG_SSB_PCIHOST_POSSIBLE=y
 CONFIG_SSB_PCIHOST=y
 # CONFIG_SSB_B43_PCI_BRIDGE is not set
 # CONFIG_SSB_SILENT is not set
-CONFIG_SSB_DEBUG=y
+# CONFIG_SSB_DEBUG is not set
 CONFIG_SSB_SERIAL=y
 CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
 CONFIG_SSB_DRIVER_PCICORE=y
@@ -873,8 +788,6 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_YAFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_LOGFS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_SQUASHFS is not set
@@ -932,7 +845,7 @@ CONFIG_TRACING_SUPPORT=y
 CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0,115200"
+CONFIG_CMDLINE="panic=5"
 # CONFIG_CMDLINE_OVERRIDE is not set
 
 #

+ 86 - 0
target/brcm/patches/nvram.patch

@@ -0,0 +1,86 @@
+diff --git a/arch/mips/bcm47xx/Makefile b/arch/mips/bcm47xx/Makefile
+index 35294b1..7465e8a 100644
+--- a/arch/mips/bcm47xx/Makefile
++++ b/arch/mips/bcm47xx/Makefile
+@@ -3,4 +3,4 @@
+ # under Linux.
+ #
+ 
+-obj-y := gpio.o irq.o prom.o serial.o setup.o time.o wgt634u.o
++obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o wgt634u.o
+diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
+index d442e11..01e1661 100644
+--- a/arch/mips/bcm47xx/setup.c
++++ b/arch/mips/bcm47xx/setup.c
+@@ -33,6 +33,7 @@
+ #include <asm/time.h>
+ #include <bcm47xx.h>
+ #include <asm/fw/cfe/cfe_api.h>
++#include <asm/mach-bcm47xx/nvram.h>
+ 
+ struct ssb_bus ssb_bcm47xx;
+ EXPORT_SYMBOL(ssb_bcm47xx);
+@@ -77,6 +78,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
+ 				   struct ssb_init_invariants *iv)
+ {
+ 	char buf[100];
++	char *s;
+ 
+ 	/* Fill boardinfo structure */
+ 	memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
+@@ -92,18 +94,47 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
+ 	memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
+ 	iv->sprom.revision = 3;
+ 
+-	if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
++	if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0) {
+ 		str2eaddr(buf, iv->sprom.et0mac);
+-	if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et0macaddr")))
++			str2eaddr(s, iv->sprom.et0mac);
++	}
++
++	if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0) {
+ 		str2eaddr(buf, iv->sprom.et1mac);
+-	if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
+-		iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
+-		iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et1macaddr")))
++			str2eaddr(s, iv->sprom.et1mac);
++	}
++
++	if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) {
++		iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
++	} else {
++		if ((s = nvram_get("et0phyaddr")))
++			iv->sprom.et0phyaddr = simple_strtoul(s, NULL, 0);
++	}
++
++	if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) {
++		iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
++	} else {
++		if ((s = nvram_get("et1phyaddr")))
++			iv->sprom.et1phyaddr = simple_strtoul(s, NULL, 0);
++	}
++
++	if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0) {
+ 		iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et0mdcport")))
++			iv->sprom.et0mdcport = simple_strtoul(s, NULL, 10);
++	}
++
++	if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0) {
+ 		iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
++	} else { 
++		if ((s = nvram_get("et1mdcport")))
++			iv->sprom.et1mdcport = simple_strtoul(s, NULL, 10);
++	}
+ 
+ 	return 0;
+ }