This commit adds support for the 32MB storage/512MB RAM version of the U4019 IPQ4019-based board from Unielec. The board has the following specifications: * Qualcomm IPQ4019 (running at 717MHz) * 512MB DDR3 RAM (optional 256MB/1GB) * 32MB SPI NOR (optional 8/16MB or NAND) * Five gigabit ports (Qualcomm QCA8075) * 1x 2.4 GHz wifi (QCA4019 hw1.0) * 1x 5 Ghz wifi (QCA4019 hw1.0) * 1x mini-PCIe slot (only USB-pins connected) * 1x SIM slot (mini-SIM) * 1x USB2.0 port * 1x button * 1x controllable LED * 1x micro SD-card reader Working: * Ethernet * Wifi * USB-port * mini-PCIe slot + SIM slot * Button * Sysupgrade Not working: * SD card slot (no upstream support) Installation instructions: In order to install OpenWRT on the U4019, you need to go via the initramfs-image. The installation steps are as follows: * Connect to board via serial (header exposed and clearly marked). * Interrupt bootloader by pressing a button. * Copy the initramfs-image to your tftp folder, call the file C0A80079.img. * Give the network interface connected to the U4019 the address 192.168.0.156/24. * Start your tftp-server and run tftpboot on the board. * Run bootm when the file has been transferred, to boot OpenWRT. * Once OpenWRT has booted, copy the sysupgrade-image to the device and run sysupgrade to install OpenWRT on the U4019. Notes: - Since IPQ4019 has been moved to 4.19, I have not added support for kernel 4.14. - There is a bug with hardware encryption on IPQ4019, causing poor performance with TCP and ipsec (see for example FS#2355). In order to improve performance, I have disabled hardware encryption in the DTS. We can enable hw. enc. once/if bug is fixed. - In order for Ethernet to work, the phy has to be reset by setting gpio 47 low/high. Adding support for phy reset via gpio required patching the mdio-driver, and the code added comes from the vendor driver. I do not know if patching the driver is an acceptable approach or not. v1->v2: * Do not use wildcard as identifier in the board.d-scripts (thanks Adrian Schmutzler). Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
105 lines
2.3 KiB
Bash
Executable file
105 lines
2.3 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
#
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
|
|
ipq40xx_setup_interfaces()
|
|
{
|
|
local board="$1"
|
|
|
|
case "$board" in
|
|
8dev,jalapeno|\
|
|
alfa-network,ap120c-ac|\
|
|
engenius,ens620ext)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
;;
|
|
asus,map-ac2200|\
|
|
openmesh,a42|\
|
|
openmesh,a62)
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
;;
|
|
asus,rt-ac58u|\
|
|
zyxel,nbg6617)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
;;
|
|
avm,fritzbox-4040|\
|
|
linksys,ea6350v3|\
|
|
linksys,ea8300)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
;;
|
|
avm,fritzbox-7530)
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
;;
|
|
avm,fritzrepeater-3000|\
|
|
compex,wpj428)
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
;;
|
|
engenius,eap1300|\
|
|
meraki,mr33|\
|
|
netgear,ex6100v2|\
|
|
netgear,ex6150v2|\
|
|
zyxel,wre6606)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
glinet,gl-b1300)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan" "4:lan"
|
|
;;
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
|
;;
|
|
unielec,u4019-32m)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
|
;;
|
|
*)
|
|
echo "Unsupported hardware. Network interfaces not initialized"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
ipq40xx_setup_macs()
|
|
{
|
|
local board="$1"
|
|
|
|
case "$board" in
|
|
asus,rt-ac58u)
|
|
CI_UBIPART=UBI_DEV
|
|
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
|
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
|
;;
|
|
engenius,ens620ext)
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
;;
|
|
linksys,ea6350v3)
|
|
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
;;
|
|
esac
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
|
}
|
|
|
|
board_config_update
|
|
board=$(board_name)
|
|
ipq40xx_setup_interfaces $board
|
|
ipq40xx_setup_macs $board
|
|
board_config_flush
|
|
|
|
exit 0
|