Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

323 lines (301 sloc) 11.058 kb
Index: target/linux/brcm47xx/image/lzma-loader/src/decompress.c
===================================================================
--- target/linux/brcm47xx/image/lzma-loader/src/decompress.c (revisión: 36240)
+++ target/linux/brcm47xx/image/lzma-loader/src/decompress.c (copia de trabajo)
@@ -78,6 +78,7 @@
}
#define TRX_MAGIC 0x30524448 /* "HDR0" */
+#define TRX_MAGIC_F7D4401 0x00018517 /* "HDR0" */
struct trx_header {
unsigned int magic; /* "HDR0" */
@@ -139,6 +140,7 @@
/* look for trx header, 32-bit data access */
for (data = ((unsigned char *) KSEG1ADDR(BCM4710_FLASH));
((struct trx_header *)data)->magic != TRX_MAGIC &&
+ ((struct trx_header *)data)->magic != TRX_MAGIC_F7D4401 &&
((struct trx_header *)data)->magic != EDIMAX_PS_HEADER_MAGIC;
data += 65536);
Index: target/linux/brcm47xx/image/Makefile
===================================================================
--- target/linux/brcm47xx/image/Makefile (revisión: 36240)
+++ target/linux/brcm47xx/image/Makefile (copia de trabajo)
@@ -121,6 +121,7 @@
define Image/Build/Initramfs
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
+ $(STAGING_DIR_HOST)/bin/trx -t belkin -o $(BIN_DIR)/$(IMG_PREFIX)-F7D4401-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
endef
define Image/Build/Chk
@@ -131,6 +132,9 @@
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1))
+ $(STAGING_DIR_HOST)/bin/trx -t belkin -o $(BIN_DIR)/$(IMG_PREFIX)-F7D4401-$(1).trx \
+ -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
+ $(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))
$(call Image/Build/Motorola,$(1),wr850g,1,$(1))
$(call Image/Build/USR,$(1),usr5461,$(1))
Index: target/linux/brcm47xx/profiles/226-Broadcom-bgmac-brcmsmac.mk
===================================================================
--- target/linux/brcm47xx/profiles/226-Broadcom-bgmac-brcmsmac.mk (revisión: 0)
+++ target/linux/brcm47xx/profiles/226-Broadcom-bgmac-brcmsmac.mk (revisión: 0)
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2006-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Broadcom-bgmac-brcmsmac
+ NAME:=Broadcom SoC, bgmac Ethernet, brcmsmac (F7D4401)
+ PACKAGES:=kmod-brcmsmac wpad-mini kmod-bgmac -kmod-brcm-wl -wlc -nas
+endef
+
+define Profile/Broadcom-bgmac-none/Description
+ Package set compatible with hardware newer Broadcom BCM47xx or BCM535x
+ SoC with dual 4716 and 43224 Wifi cards and bgmac Ethernet driver.
+endef
+$(eval $(call Profile,Broadcom-bgmac-brcmsmac))
+
Index: target/linux/brcm47xx/base-files/etc/init.d/netconfig
===================================================================
--- target/linux/brcm47xx/base-files/etc/init.d/netconfig (revisión: 36240)
+++ target/linux/brcm47xx/base-files/etc/init.d/netconfig (copia de trabajo)
@@ -152,6 +152,10 @@
c["vlan1ports"] = "0 1 2 3 5t"
c["vlan2ports"] = "4 5t"
}
+ if (model == "Belkin F7D4401") {
+ c["vlan0ports"] = "0 1 2 3 8*"
+ c["vlan1ports"] = "4 8"
+ }
if ((nvram["boardtype"] == "0x042f") || (nvram["boardtype"] == "0x0472")) {
if (nvram["boardnum"] == "45") {
# WL-500gP
@@ -248,7 +252,7 @@
p("ifname", "lan_ifname")
p("macaddr", "lan_macaddr")
print " option proto static"
- print " option ipaddr 192.168.1.1"
+ print " option ipaddr 192.168.2.1"
print " option netmask 255.255.255.0"
print ""
print ""
Index: target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
===================================================================
--- target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch (revisión: 36244)
+++ target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch (copia de trabajo)
@@ -8,7 +8,7 @@
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- /dev/null
+++ b/arch/mips/bcm47xx/board.c
-@@ -0,0 +1,222 @@
+@@ -0,0 +1,223 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -46,6 +46,7 @@
+ {{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-",},
+ {{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-",},
+ {{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301",},
++ {{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401",},
+ { {0}, 0},
+};
+
@@ -233,7 +234,7 @@
+EXPORT_SYMBOL(bcm47xx_board_get_name);
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -0,0 +1,90 @@
+@@ -0,0 +1,91 @@
+#ifndef __BCM47XX_BOARD_H
+#define __BCM47XX_BOARD_H
+
@@ -258,6 +259,7 @@
+ BCM47XX_BOARD_ASUS_WL700GE,
+
+ BCM47XX_BOARD_BELKIN_F7D4301,
++ BCM47XX_BOARD_BELKIN_F7D4401,
+
+ BCM47XX_BOARD_BUFFALO_WBR2_G54,
+ BCM47XX_BOARD_BUFFALO_WHR2_A54G54,
@@ -324,3 +326,4 @@
+extern const char *bcm47xx_board_get_name(void);
+
+#endif /* __BCM47XX_BOARD_H */
+
Index: target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch
===================================================================
--- target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch (revisión: 36244)
+++ target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch (copia de trabajo)
@@ -26,7 +26,7 @@
obj-$(CONFIG_MTD_CHAR) += mtdchar.o
--- /dev/null
+++ b/drivers/mtd/bcm47xxpart.c
-@@ -0,0 +1,504 @@
+@@ -0,0 +1,519 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -88,6 +88,7 @@
+#define TRX_NO_HEADER 1 /* Do not write TRX header */
+#define TRX_GZ_FILES 0x2 /* Contains up to TRX_MAX_OFFSET individual gzip files */
+#define TRX_MAX_OFFSET 3
++#define TRX_MAGIC_F7D4401 0x00018517 /* F7D4401 */
+
+struct trx_header {
+ u32 magic; /* "HDR0" */
@@ -145,6 +146,10 @@
+ /* found a TRX header */
+ if (le32_to_cpu(trx->magic) == TRX_MAGIC)
+ goto found;
++ if (le32_to_cpu(trx->magic) == TRX_MAGIC_F7D4401) {
++ pr_notice("Found Belkin_F7D4401 header:cfe\n");
++ goto found;
++ }
+ }
+
+ pr_notice("%s: Couldn't find bootloader size\n", mtd->name);
@@ -307,6 +312,16 @@
+
+ goto found;
+ }
++ if (le32_to_cpu(trx.magic) == TRX_MAGIC_F7D4401) {
++ part->offset = le32_to_cpu(trx.offsets[2]) ? :
++ le32_to_cpu(trx.offsets[1]);
++ part->size = le32_to_cpu(trx.len);
++
++ part->size -= part->offset;
++ part->offset += off;
++ pr_notice("Found Belkin_F7D4401 header:root\n");
++ goto found;
++ }
+ }
+
+ pr_warn("%s: Couldn't find root filesystem\n",
@@ -531,3 +546,4 @@
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Parsing code for flash partitions on bcm47xx SoCs");
+
Index: package/broadcom-diag/src/diag.c
===================================================================
--- package/broadcom-diag/src/diag.c (revisión: 36240)
+++ package/broadcom-diag/src/diag.c (copia de trabajo)
@@ -117,6 +117,7 @@
/* Belkin */
BELKIN_UNKNOWN,
BELKIN_F7D4301,
+ BELKIN_F7D4401,
/* Netgear */
WGT634U,
@@ -879,6 +880,21 @@
{ .name = "led1", .gpio = 1 << 15, .polarity = REVERSE },
},
},
+ [BELKIN_F7D4401] = {
+ .name = "Belkin PlayMax F7D4401",
+ .buttons = {
+ { .name = "reset", .gpio = 1 << 6 },
+ { .name = "wps", .gpio = 1 << 8 },
+ },
+ .leds = {
+ { .name = "power", .gpio = 1 << 10, .polarity = REVERSE },
+ { .name = "diag", .gpio = 1 << 11, .polarity = REVERSE },
+ { .name = "wlan", .gpio = 1 << 12, .polarity = REVERSE },
+ { .name = "wlan_red", .gpio = 1 << 13, .polarity = REVERSE },
+ { .name = "led_usb0", .gpio = 1 << 14, .polarity = REVERSE },
+ { .name = "led_usb1", .gpio = 1 << 15, .polarity = REVERSE },
+ },
+ },
/* Netgear */
[WGT634U] = {
.name = "Netgear WGT634U",
@@ -1080,6 +1096,7 @@
/* no easy model number, attempt to guess */
boardnum = getvar("boardnum");
boardtype = getvar("boardtype");
+ printk("manoj: boardnum= %s : boardtype : %s\n", boardnum, boardtype);
if (!strcmp(boardnum, "20070615")) { /* Linksys WRT600N v1/V1.1 */
if (!strcmp(boardtype, "0x478") && !strcmp(getvar("cardbus"), "0") && !strcmp(getvar("switch_type"),"BCM5395"))
@@ -1308,6 +1325,8 @@
return &platforms[WR850GV2V3];
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
return &platforms[WNDR3400V1];
+ case BCM47XX_BOARD_BELKIN_F7D4401:
+ return &platforms[BELKIN_F7D4401];
case BCM47XX_BOARD_UNKNOWN:
case BCM47XX_BOARD_NON:
printk(MODULE_NAME ": unknown board found, try legacy detect\n");
@@ -1473,6 +1492,7 @@
return;
for(; l->name; l++) {
+ printk(MODULE_NAME ": led:%s\n",l->name);
if (l->gpio & gpiomask)
continue;
Index: package/base-files/files/etc/preinit
===================================================================
--- package/base-files/files/etc/preinit (revisión: 36240)
+++ package/base-files/files/etc/preinit (copia de trabajo)
@@ -7,13 +7,13 @@
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
pi_ifname=
-pi_ip=192.168.1.1
-pi_broadcast=192.168.1.255
+pi_ip=192.168.2.1
+pi_broadcast=192.168.2.255
pi_netmask=255.255.255.0
fs_failsafe_ifname=
-fs_failsafe_ip=192.168.1.1
-fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_ip=192.168.2.1
+fs_failsafe_broadcast=192.168.2.255
fs_failsafe_netmask=255.255.255.0
fs_failsafe_wait_timeout=2
Index: tools/firmware-utils/src/trx.c
===================================================================
--- tools/firmware-utils/src/trx.c (revisión: 36240)
+++ tools/firmware-utils/src/trx.c (copia de trabajo)
@@ -66,6 +66,7 @@
/**********************************************************************/
/* from trxhdr.h */
+#define TRX_MAGIC_F7D4401 0x00018517
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define TRX_MAX_LEN 0x720000
#define TRX_NO_HEADER 1 /* Do not write TRX header */
@@ -105,6 +106,7 @@
struct trx_header *p;
char trx_version = 1;
unsigned char binheader[32];
+ unsigned long trx_magic_c=TRX_MAGIC;
fprintf(stderr, "mjn3's trx replacement - v0.81.1\n");
@@ -115,13 +117,13 @@
p = (struct trx_header *) buf;
- p->magic = STORE32_LE(TRX_MAGIC);
+ //p->magic = STORE32_LE(TRX_MAGIC);
cur_len = sizeof(struct trx_header) - 4; /* assume v1 header */
in = NULL;
i = 0;
- while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:")) != -1) {
+ while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:t:")) != -1) {
switch (c) {
case '2':
/* take care that nothing was written to buf so far */
@@ -164,6 +166,9 @@
append = 0;
break;
+ case 't':
+ trx_magic_c = TRX_MAGIC_F7D4401;
+ break;
case 'o':
ofn = optarg;
if (ofn && !(out = fopen(ofn, "w"))) {
@@ -247,6 +252,8 @@
usage();
}
}
+ fprintf(stderr, "INFO: trxMagic=0x%8x\n",trx_magic_c);
+ p->magic = STORE32_LE(trx_magic_c);
p->flag_version = STORE32_LE((trx_version << 16));
if (!in) {
Jump to Line
Something went wrong with that request. Please try again.