aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image
diff options
context:
space:
mode:
authorINAGAKI Hiroshi <musashino.open@gmail.com>2018-09-10 09:30:28 +0200
committerJohn Crispin <john@phrozen.org>2018-09-10 09:30:28 +0200
commit7768f115349da48f44478f0c5b79f89ffa54c3f4 (patch)
tree9983eeb7e230b01622068ec484494257ee72639d /target/linux/ath79/image
parent7a67b437e7f72f765fb5affe686f308cb42a09e7 (diff)
downloadupstream-7768f115349da48f44478f0c5b79f89ffa54c3f4.tar.gz
upstream-7768f115349da48f44478f0c5b79f89ffa54c3f4.tar.bz2
upstream-7768f115349da48f44478f0c5b79f89ffa54c3f4.zip
ath79: add support for ELECOM WRC-300GHBK2-I
ELECOM WRC-300GHBK2-I is a 2.4 GHz wireless router, based on Qualcomm Atheros QCA9563. Specification: - Qualcomm Atheros QCA9563 - 64 MB of RAM (DDR2) - 8 MB of Flash (SPI-NOR) - 2T2R 2.4 GHz wifi - SoC internal - 5x 10/100/1000 Mbps Ethernet - 3x LEDs, 4x keys(connected to GPIO: 3x) - UART header on PCB - TX, GND, RX, Vcc from ethernet port side - 115200n8 Flash instruction using factory image: 1. Boot the WRC-300GHBK2-I normaly and connect the computer to its LAN port 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新 手動更新(アップデート)") 3. Select the OpenWrt factory image and click apply ("適用") button to perform firmware update 4. On the (initramfs) factory image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with squashfs-sysupgrade image for WRC-300GHBK2-I 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Diffstat (limited to 'target/linux/ath79/image')
-rw-r--r--target/linux/ath79/image/generic.mk35
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 60dc512f06..fc38c09958 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -17,6 +17,31 @@ define Build/addpattern
-mv "$@.new" "$@"
endef
+define Build/elecom-header
+ $(eval fw_size=$(word 1,$(1)))
+ $(eval edimax_model=$(word 2,$(1)))
+ $(eval product=$(word 3,$(1)))
+ $(eval factory_bin=$(word 4,$(1)))
+ if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
+ $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
+ $(STAGING_DIR_HOST)/bin/mkedimaximg \
+ -b -s CSYS -m $(edimax_model) \
+ -f 0x70000 -S 0x01100000 \
+ -i $(factory_bin) -o $(factory_bin).new; \
+ mv $(factory_bin).new $(factory_bin); \
+ ( \
+ echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
+ echo -n "0.00" | dd bs=16 count=1 conv=sync; \
+ dd if=$(factory_bin); \
+ ) > $(factory_bin).new; \
+ mv $(factory_bin).new $(factory_bin); \
+ $(CP) $(factory_bin) $(BIN_DIR)/; \
+ else \
+ echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
+ fi
+
+endef
+
define Device/avm_fritz300e
ATH_SOC := ar7242
DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
@@ -62,6 +87,16 @@ define Device/dlink_dir-825-b1
endef
TARGET_DEVICES += dlink_dir-825-b1
+define Device/elecom_wrc-300ghbk2-i
+ ATH_SOC := qca9563
+ DEVICE_TITLE := ELECOM WRC-300GHBK2-I
+ IMAGE_SIZE := 7616k
+ KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
+ elecom-header 7798706 RN51 WRC-300GHBK2-I \
+ $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
+endef
+TARGET_DEVICES += elecom_wrc-300ghbk2-i
+
define Device/embeddedwireless_dorin
ATH_SOC := ar9331
DEVICE_TITLE := Embedded Wireless Dorin