immortalwrt/target/linux
Michael Pratt e085812a7d ath79: add support for Fortinet FAP-221-B
FCC ID: U2M-CAP4100AG

Fortinet FAP-221-B is an indoor access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+

Hardware and board design from Senao

**Specification:**

 - AR9344 SOC		2G 2x2, 5G 2x2, 25 MHz CLK
 - AR9382 WLAN		2G 2x2 PCIe, 40 MHz CLK
 - AR8035-A PHY		RGMII, PoE+ IN, 25 MHz CLK
 - 16 MB FLASH		MX25L12845EMI-10G
 - 2x 32 MB RAM		W9725G6JB-25
 - UART at J11		populated, 9600 baud
 - 6 LEDs, 1 button	power, ethernet, wlan, reset

  Note:	ethernet LEDs are not enabled
	because a new netifd hotplug is required
	in order to operate like OEM.
	Board has 1 amber and 1 green
	for each of the 3 case viewports.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case
OEM firmware sets offsets 1 and 8 for wlan

  eth0 *:1e	uboot 0x3ff80
  phy0 *:1f	uboot 0x3ff80 +1
  phy1 *:26	uboot 0x3ff80 +8

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.
TFTP is not reliable due to bugged bootloader,
set MTU to 600 and try many times.
If your TFTP server supports setting block size,
higher block size is better.
Splitting the file into 1 MB parts may be necessary

example:

$ tftpboot 0x80100000 image1.bin
$ tftpboot 0x80200000 image2.bin
$ tftpboot 0x80300000 image3.bin
$ tftpboot 0x80400000 image4.bin
$ tftpboot 0x80500000 image5.bin
$ tftpboot 0x80600000 image6.bin
$ bootm 0x80100000

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

**OEM firmware image format:**

Images from Fortinet for this device
ending with the suffix .out
are actually a .gz file

The gzip metadata stores the original filename
before compression, which is a special string
used to verify the image during OEM upgrade.

After gzip decompression, the resulting file
is an exact copy of the MTD partitions
"rootfs" and "uimage" combined in the same order and size
that they appear in /proc/mtd and as they are on flash.

OEM upgrade is performed by a customized busybox
with the command "upgrade".
Another binary, "restore"
is a wrapper for busybox's "tftp" and "upgrade".

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2023-01-06 15:34:07 +01:00
..
airoha airoha: disable swconfig 2022-11-27 13:18:29 +01:00
apm821xx kernel: bump 5.10 to 5.10.161 2022-12-24 15:24:18 +01:00
archs38 kernel: remove target specific CONFIG_IKCONFIG lines 2022-10-14 13:15:47 +02:00
armvirt kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
at91 at91: Remove CONFIG_PINCTRL_MCP23S08 configuration option 2022-10-31 00:46:15 +01:00
ath25 ath25: add generic subtarget 2022-12-23 19:44:14 +01:00
ath79 ath79: add support for Fortinet FAP-221-B 2023-01-06 15:34:07 +01:00
bcm27xx kernel: bump 5.15 to 5.15.86 2023-01-03 23:55:45 +01:00
bcm47xx bcm47xx: replace "Devices-database-update-patch" with upstream patches 2022-12-30 20:03:59 +01:00
bcm53xx kernel: 5.10: update nvmem subsystem to the 5.15 state 2023-01-06 14:34:37 +01:00
bcm63xx kernel: bump 5.15 to 5.15.86 2023-01-03 23:55:45 +01:00
bcm4908 treewide: uniform vendor name for ASUS 2022-11-16 23:30:11 +01:00
bmips kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
gemini gemini: add generic subtarget 2022-12-23 19:44:20 +01:00
generic kernel: 5.10: update nvmem subsystem to the 5.15 state 2023-01-06 14:34:37 +01:00
imx cypress-nvram: consolidate NVRAM packages 2022-11-16 20:14:13 +01:00
ipq40xx ipq40xx: fix wlan mac address for Aruba AP-303H 2023-01-04 19:17:56 +01:00
ipq806x kernel: bump 5.15 to 5.15.86 2023-01-03 23:55:45 +01:00
kirkwood kirkwood: add generic subtarget 2022-12-23 19:44:20 +01:00
lantiq lantiq-xrx200: fix wan LED on o2 box 6431 2023-01-04 23:50:48 +01:00
layerscape tfa-layerscape: Use trusted-firmware-a.mk 2022-12-31 20:02:09 +01:00
malta kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
mediatek mediatek: drop redmi-ax6000 variant with modified env 2022-12-30 16:11:59 +08:00
mpc85xx mpc85xx: change CPU_TYPE from 8540 to 8548 2022-12-29 16:49:09 +01:00
mvebu kernel: bump 5.15 to 5.15.86 2023-01-03 23:55:45 +01:00
mxs mxs: add generic subtarget 2022-12-23 19:44:20 +01:00
octeon kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
octeontx octeontx: add 5.15 testing kernel 2023-01-03 20:56:01 +01:00
omap omap: add generic subtarget 2022-12-23 19:44:22 +01:00
oxnas kernel: bump 5.15 to 5.15.86 2023-01-03 23:55:45 +01:00
pistachio pistachio: add generic subtarget 2022-12-23 19:44:22 +01:00
qoriq qoriq: switch to kernel 5.15 2022-12-14 18:53:39 +02:00
ramips ramips: add Unielec U7621-06 32M build target 2023-01-05 00:10:14 +01:00
realtek realtek: 5.15: Improve error handling in rtl838x_pie_rule_write() 2023-01-05 23:09:23 +01:00
rockchip sunxi: ensure NanoPi R1 has unique MAC address 2022-12-25 02:27:55 +01:00
sunxi sunxi: ensure NanoPi R1 has unique MAC address 2022-12-25 02:27:55 +01:00
tegra tegra: add generic subtarget 2022-12-23 19:44:21 +01:00
uml uml: switch to Kernel 5.15 2022-12-12 09:06:17 +01:00
x86 kernel: Move CONFIG_DRM_XEN_FRONTEND to generic configuration 2022-12-23 00:43:23 +01:00
zynq zynq: add 5.15 testing kernel 2023-01-03 20:56:01 +01:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00