Skip to content

Commit

Permalink
ipq807x: add Edgecore EAP102
Browse files Browse the repository at this point in the history
The Edgecore EAP102 is a wall/ceiling mountable AP. The AP can be
powered by either PoE or AC adapter.

Device info:
 - IPQ8071-A SoC
 - 1GiB RAM
 - 256MiB NAND flash
 - 32MiB SPI NOR
 - 2 Ethernet ports
 - 1 Console port
 - 2GHz/5GHz AX WLAN
 - 2 USB 2.0 ports

Install instructions:

Prerequistes - TFTP server, preferrably within 192.168.1.0/24
	       Console cable plugged in (115200 8N1 no flow control)

1. Power on device and interrupt u-boot to obtain u-boot CLI

2. set serverip to IP address of the TFTP server:

	`setenv serverip 192.168.1.250`

3. Download image from TFTP server:

	`tftpboot 0x44000000 openwrt-ipq807x-generic-edgecore_eap102-squashfs-nand-factory.ubi`

4. Flash ubi image to both partitions and reset:

	`sf probe
	 imxtract 0x44000000 ubi
	 nand device 0
	 nand erase 0x0 0x3400000
	 nand erase 0x3c00000 0x3400000
	 nand write $fileaddr 0x0 $filesize
	 nand write $fileaddr 0x3c00000 $filesize
	 reset`

Signed-off-by: Matthew Hagan <[email protected]>
  • Loading branch information
clayface authored and robimarko committed Dec 21, 2022
1 parent dcd03df commit 54ffc01
Show file tree
Hide file tree
Showing 10 changed files with 719 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package/boot/uboot-envtools/files/ipq807x
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ touch /etc/config/ubootenv
board=$(board_name)

case "$board" in
edgecore,eap102)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
;;
edimax,cax1800)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
Expand Down
2 changes: 2 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ endef
ALLWIFIBOARDS:= \
aruba_ap-365 \
devolo_magic-2-wifi-next \
edgecore_eap102 \
edgecore_ecw5410 \
edgecore_oap100 \
edimax_cax1800 \
Expand Down Expand Up @@ -118,6 +119,7 @@ endef

$(eval $(call generate-ipq-wifi-package,aruba_ap-365,Aruba AP-365))
$(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next))
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
Expand Down
Binary file not shown.
3 changes: 3 additions & 0 deletions target/linux/ipq807x/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ board_config_update
board=$(board_name)

case "$board" in
edgecore,eap102)
ucidef_set_led_netdev "wan" "WAN" "green:wanpoe" "eth0"
;;
redmi,ax6|\
xiaomi,ax3600)
ucidef_set_led_netdev "wan" "WAN" "blue:network" "eth0"
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ipq807x/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ipq807x_setup_interfaces()
local board="$1"

case "$board" in
edgecore,eap102)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
edimax,cax1800)
ucidef_set_interfaces_lan_wan "eth0"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin")
case "$board" in
edgecore,eap102|\
edimax,cax1800|\
qnap,301w|\
redmi,ax6|\
Expand Down
5 changes: 5 additions & 0 deletions target/linux/ipq807x/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ START=99

boot() {
case $(board_name) in
edgecore,eap102)
fw_setenv upgrade_available 0
# Unset changed flag after sysupgrade complete
fw_setenv changed
;;
redmi,ax6|\
xiaomi,ax3600|\
xiaomi,ax9000)
Expand Down
12 changes: 12 additions & 0 deletions target/linux/ipq807x/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ platform_check_image() {

platform_do_upgrade() {
case "$(board_name)" in
edgecore,eap102)
active="$(fw_printenv -n active)"
if [ "$active" -eq "1" ]; then
CI_UBIPART="rootfs2"
else
CI_UBIPART="rootfs1"
fi
# force altbootcmd which handles partition change in u-boot
fw_setenv bootcount 3
fw_setenv upgrade_available 1
nand_do_upgrade "$1"
;;
edimax,cax1800)
nand_do_upgrade "$1"
;;
Expand Down
Loading

0 comments on commit 54ffc01

Please sign in to comment.