summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/image
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-09-16 21:09:10 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-09-16 21:09:10 +0000
commitd78a74343c28645deba705fc7cc2faa5f6cdeab7 (patch)
tree4bc4846986603fc6055798586e63e28e29772b66 /target/linux/brcm47xx/image
parent5547052ffa204a9f206afccb536876647e0a5ac9 (diff)
brcm47xx: Add support for Huawei E970
This patch adds support for Huawei E970 wireless gateway devices. It has been tested on an E970 labelled as T-Mobile web'n'walk Box IV. E960/B970 should work too, from what I know it's basically the same hardware. The device has a Broadcom BCM5354 SoC and a built-in 3G USB modem. It uses a hardware watchdog which needs GPIO-7 to be toggled at least every 1-2 seconds. This patch uses gpio_wdt module (see my previous patch today) to take care of this. Tested and works: 3G wan, wlan+LED, VLAN config, failsafe using reset button, image to be used for upgrade from OEM firmware's web interface Link to the wiki page I've created: <http://wiki.openwrt.org/toh/huawei/e970> Issue: * lzma-loader crashes, so gzipped kernel is used. Presumably due to watchdog reset during kernel decompress. Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38011 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/image')
-rw-r--r--target/linux/brcm47xx/image/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 9a477a6fda..eca09a8c5b 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -13,6 +13,7 @@ endef
define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
endif
@@ -59,6 +60,12 @@ define Image/Build/Edi
$(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
endef
+define Image/Build/Huawei
+ dd if=/dev/zero of=$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin bs=92 count=1
+ echo -ne 'HDR0\x08\x00\x00\x00' >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+ cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
define trxalign/jffs2-128k
-a 0x20000 -f $(KDIR)/root.$(1)
endef
@@ -134,9 +141,13 @@ define Image/Build
$(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 -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+ -f $(KDIR)/vmlinux.gz \
+ $(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))
$(call Image/Build/Motorola,$(1),wr850g,1,$(1))
$(call Image/Build/USR,$(1),usr5461,$(1))
+ $(call Image/Build/Huawei,$(1),e970,$(1))
$(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
# $(call Image/Build/Chk,$(1),wgr614_v9,U12H094T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/Chk,$(1),wndr3300_v1,U12H093T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))