aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files/lib/preinit
diff options
context:
space:
mode:
authorTom Brouwer <tombrouwer@outlook.com>2020-01-12 13:13:30 +0100
committerChristian Lamparter <chunkeey@gmail.com>2020-01-12 15:57:58 +0100
commit2090b8af0a2a796343523e686797c6dd861ed4bf (patch)
tree7e52d2fcf0b11f840424f64cf61922b3796d6c95 /target/linux/ipq40xx/base-files/lib/preinit
parenta0c0ad728c11751a30bb2c56e9cf54f8d2fe5fd1 (diff)
downloadupstream-2090b8af0a2a796343523e686797c6dd861ed4bf.tar.gz
upstream-2090b8af0a2a796343523e686797c6dd861ed4bf.tar.bz2
upstream-2090b8af0a2a796343523e686797c6dd861ed4bf.zip
ipq40xx: add support for EZVIZ CS-W3-WD1200G EUP
Hardware: SOC: Qualcomm IPQ4018 RAM: 128 MB Nanya NT5CC64M16GP-DI FLASH: 16 MB Macronix MX25L12805D ETH: Qualcomm QCA8075 (4 Gigabit ports, 3xLAN, 1xWAN) WLAN: Qualcomm IPQ4018 (2.4 & 5 Ghz) BUTTON: Shared WPS/Reset button LED: RGB Status/Power LED SERIAL: Header J8 (UART, Left side of board). Numbered from top to bottom: (1) GND, (2) TX, (3) RX, (4) VCC (White triangle next to it). 3.3v, 115200, 8N1 Tested/Working: * Ethernet * WiFi (2.4 and 5GHz) * Status LED * Reset Button (See note below) Implementation notes: * The shared WPS/Reset button is implemented as a Reset button * I could not find a original firmware image to reverse engineer, meaning currently it's not possible to flash OpenWrt through the Web GUI. Installation (Through Serial console & TFTP): 1. Set your PC to fixed IP 192.168.1.12, Netmask 255.255.255.0, and connect to one of the LAN ports 2. Rename the initramfs image to 'C0A8010B.img' and enable a TFTP server on your pc, to serve the image 2. Connect to the router through serial (See connection properties above) 3. Hit a key during startup, to pause startup 4. type `setenv serverip 192.168.1.12`, to set the tftp server address 5. type `tftpboot`, to load the image from the laptop through tftp 6. type `bootm` to run the loaded image from memory 6. (If you want to return to stock firmware later, create an full MTD backup, e.g. using instructions here https://openwrt.org/docs/guide-user/installation/generic.backup#create_full_mtd_backup) 7. Transfer the 'sysupgrade' OpenWrt firmware image from PC to router, e.g.: `scp xxx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/upgrade.bin` 8. Run sysupgrade to permanently install OpenWrt to flash: `sysupgrade -n /tmp/upgrade.bin` Revert to stock: To revert to stock, you need the MTD backup from step 6 above: 1. Unpack the MTD backup archive 2. Transfer the 'firmware' partition image to the router (e.g. mtd8_firmware.backup) 3. On the router, do `mtd write mtd8_firmware.backup firmware` Signed-off-by: Tom Brouwer <tombrouwer@outlook.com> [removed BOARD_NAME, OpenWRT->OpenWrt, changed LED device name to board name] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib/preinit')
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh4
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh1
2 files changed, 5 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index 192488f377..1bca152a38 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -9,6 +9,10 @@ preinit_set_mac_address() {
ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
;;
+ ezviz,cs-w3-wd1200g-eup)
+ ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6)
+ ip link set dev eth1 address $(mtd_get_mac_binary "ART" 0x0)
+ ;;
linksys,ea8300)
base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ip link set dev eth0 address "${base_mac}"
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
index a0dec1042a..42667d2dfb 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
@@ -7,6 +7,7 @@ set_preinit_iface() {
aruba,ap-303| \
asus,rt-ac58u| \
avm,fritzbox-4040| \
+ ezviz,cs-w3-wd1200g-eup| \
glinet,gl-b1300| \
linksys,ea8300| \
meraki,mr33| \