Skip to content

Commit be7aa5b

Browse files
Shine-hauke
authored andcommitted
mpc85xx: add support for Watchguard Firebox T10-W, T15(-W)
This commit adds support for the Watchguard Firebox models T10-W, T15 and T15-W. CPU: Freescale P1010 RAM: 512MB (T10) / 1024MB (T15) Flash: 1MB SPI-NOR, 512MB NAND (T10) / 1024MB NAND (T15) WiFi: 802.11abgn 2T2R AR9582 based Mini-PCIe card (-W models only) Ethernet: 3x GBE (via AR8033 PHY) LEDs: 7x hard-wired (6x LAN, 1x Power) 4x GPIO single-colored (Attn/Status/Mode/Failover) 1x GPIO dual-colored (2.4/5G WiFi, -W models only) Serial: RJ45, Cisco pinout, 115200/8N1 Other: Battery backed RTC Atmel TPM 1.2 chip (unsupported) Based on 35f6d79, which introduced Watchguard Firebox T10 support. The T10 and T15 are identical hardware, with the exception of the T15 having twice the flash and RAM size. The T10-W and T15-W models have their Mini-PCIe slot populated with an ath9 (AR9582) based WiFi card. The slot is either unpopulated or empty for non-WiFi models. All required drivers are present by default on the mpc85xx target, so T10/T10-W resp. T15/T15-W can use the same OpenWrt image. This commit also introduces the zImage loader from 7d768a9 to boot the kernel. This is required, since the U-Boot version used in these devices appears to have a hard limit of 16MB for the kernel size it can handle. The current kernel size is around 17MB, though, due to kernel page alignment required for memory protection. Installation (replaces previous instructions for T10): 1. If the U-Boot password is known, proceed with step 2. If the U-Boot password is unknown, dump the NOR flash using a SPI programmer and patch the unknown password to a known one. You can use blocktrron's Python script: https://github.com/blocktrron/t10-uboot-patcher/ This script will patch the password to '1234' (without quotes). Alternatively, you can search for the hashed password in the NOR dump yourself and overwrite it with a known one. The SHA1 hash is: E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA Write the patched NOR dump back to the device. 2. Connect the device via serial cable, power it on and interrupt the boot process by pressing Ctrl+C. Enter the U-Boot password to access the CLI. 3. (Optional) Populate the uboot-env partition by entering: saveenv This will allow you to use uboot-envtools from within OpenWrt later, e.g. to increase the loadable kernel size. The default loadable kernel size is 5MB, the compressed kernel size at the time of this commit is 3.1MB. 4. Serve the initramfs OpenWrt image from a TFTP server at 10.0.1.13/24, connected to eth0 (WAN) of the device. File name must be 'uImage'. Boot with: tftpboot; bootm; Make sure to use the correct image for your device (T10 resp. T15)! 5. After booting, connect to OpenWrt on eth1 (LAN) via SSH. Verify that the UBI partiton is mtd7, format it and install the sysupgrade image. $ cat /proc/mtd $ ubiformat /dev/mtd7 -y $ sysupgrade -n <path to sysupgrade.bin> 6. The device should now boot OpenWrt from NAND flash. Enjoy. Back to stock: Use the vendor recovery procedure. Stock recovery might also be necessary in case you have accidentally used the fw_setenv command from within OpenWrt without using saveenv in U-Boot first. In order to use the vendor firmware recovery procedure, the NAND partitions mtd3 to mtd6 must remain intact. Make sure not to overwrite them, or keep dumps of them for later recovery. Signed-off-by: Shine <[email protected]> Link: openwrt/openwrt#16776 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 15ef024 commit be7aa5b

File tree

13 files changed

+189
-24
lines changed

13 files changed

+189
-24
lines changed

package/boot/uboot-tools/uboot-envtools/files/mpc85xx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ ocedo,panda)
2020
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
2121
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
2222
;;
23-
watchguard,firebox-t10)
23+
watchguard,firebox-t10|\
24+
watchguard,firebox-t15)
2425
ubootenv_add_uci_config "$(find_mtd_part 'u-boot-env')" "0x0" "0x2000" "0x10000"
2526
;;
2627
aerohive,hiveap-330)

target/linux/mpc85xx/base-files/etc/board.d/02_network

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ ocedo,panda)
2929
tplink,tl-wdr4900-v1)
3030
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
3131
;;
32-
watchguard,firebox-t10)
32+
watchguard,firebox-t10|\
33+
watchguard,firebox-t15)
3334
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
3435
;;
3536
*)

target/linux/mpc85xx/base-files/lib/upgrade/platform.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ platform_do_upgrade() {
1616
hpe,msm460|\
1717
ocedo,panda|\
1818
sophos,red-15w-rev1|\
19-
watchguard,firebox-t10)
19+
watchguard,firebox-t10|\
20+
watchguard,firebox-t15)
2021
nand_do_upgrade "$1"
2122
;;
2223
*)

target/linux/mpc85xx/config-6.12

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ CONFIG_EDAC_LEGACY_SYSFS=y
7171
CONFIG_EDAC_MPC85XX=y
7272
CONFIG_EDAC_SUPPORT=y
7373
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
74-
# CONFIG_FIREBOX_T10 is not set
74+
# CONFIG_FIREBOX_T1X is not set
7575
CONFIG_FIXED_PHY=y
7676
CONFIG_FORCE_NR_CPUS=y
7777
CONFIG_FSL_EMB_PERFMON=y
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later or MIT
2+
3+
/include/ "fsl/p1010si-pre.dtsi"
4+
#include "firebox-t1x.dtsi"
5+
6+
/ {
7+
model = "Watchguard Firebox T15";
8+
compatible = "watchguard,firebox-t15";
9+
10+
ifc: ifc@ffe1e000 {
11+
reg = <0x0 0xffe1e000 0 0x2000>;
12+
13+
/* NOR, NAND Flashes and CPLD on board */
14+
ranges = <0x0 0x0 0x0 0xee000000 0x02000000
15+
0x1 0x0 0x0 0xff800000 0x00010000
16+
0x3 0x0 0x0 0xffb00000 0x00000020>;
17+
18+
nand@100000000 {
19+
compatible = "fsl,ifc-nand";
20+
reg = <0x1 0x0 0x10000>;
21+
22+
partitions {
23+
compatible = "fixed-partitions";
24+
#address-cells = <1>;
25+
#size-cells = <1>;
26+
27+
/*
28+
* Original partition layout:
29+
* 0x000000000000-0x000000020000 : "NAND (RW) WG DTB Image"
30+
* 0x000000020000-0x000000520000 : "NAND (RW) WG SYSA Kernel"
31+
* 0x000000520000-0x00000f720000 : "NAND (RW) WG SYSA_CODE"
32+
* 0x00000f720000-0x00000fc20000 : "NAND (RW) WG SYSB Kernel"
33+
* 0x00000fc20000-0x000011420000 : "NAND (RW) WG SYSB_CODE"
34+
* 0x000011420000-0x000011920000 : "NAND (RW) WG SYSA2 Kernel"
35+
* 0x000011920000-0x000019220000 : "NAND (RW) WG SYSA_CODE2"
36+
* 0x000019220000-0x000040000000 : "NAND (RW) WG SYSA_DATA"
37+
*/
38+
39+
partition@0 {
40+
reg = <0x0 0x20000>;
41+
label = "wg-dtb";
42+
read-only;
43+
};
44+
45+
partition@20000 {
46+
reg = <0x20000 0x500000>;
47+
label = "kernel";
48+
};
49+
50+
partition@520000 {
51+
reg = <0x520000 0xf200000>;
52+
label = "wg-sysa-rootfs";
53+
read-only;
54+
};
55+
56+
partition@f720000 {
57+
reg = <0xf720000 0x500000>;
58+
label = "wg-sysb-kernel";
59+
read-only;
60+
};
61+
62+
partition@fc20000 {
63+
reg = <0xfc20000 0x1800000>;
64+
label = "wg-sysb-rootfs";
65+
read-only;
66+
};
67+
68+
partition@11420000 {
69+
reg = <0x11420000 0x500000>;
70+
label = "wg-sysa2-kernel";
71+
read-only;
72+
};
73+
74+
partition@11920000 {
75+
reg = <0x11920000 0x7900000>;
76+
label = "wg-sysa2-rootfs";
77+
read-only;
78+
};
79+
80+
partition@19220000 {
81+
reg = <0x19220000 0x26de0000>;
82+
label = "ubi";
83+
};
84+
};
85+
};
86+
};
87+
};
88+
89+
/include/ "fsl/p1010si-post.dtsi"

target/linux/mpc85xx/files/arch/powerpc/boot/dts/firebox-t1x.dtsi

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@
4848
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
4949
label = "green:failover";
5050
};
51+
52+
led_wap_orange: wap_orange {
53+
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
54+
function = LED_FUNCTION_WLAN_2GHZ;
55+
color = <LED_COLOR_ID_ORANGE>;
56+
label = "orange:wap";
57+
};
58+
59+
led_wap_green: wap_green {
60+
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
61+
function = LED_FUNCTION_WLAN_5GHZ;
62+
color = <LED_COLOR_ID_GREEN>;
63+
label = "green:wap";
64+
linux,default-trigger = "phy0tpt";
65+
};
5166
};
5267

5368
buttons {
@@ -221,6 +236,26 @@
221236
};
222237

223238
pci1: pcie@ffe0a000 {
224-
status = "disabled";
239+
reg = <0 0xffe0a000 0 0x1000>;
240+
ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
241+
0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
242+
pcie@0 {
243+
ranges = <0x2000000 0x0 0x80000000
244+
0x2000000 0x0 0x80000000
245+
0x0 0x20000000
246+
247+
0x1000000 0x0 0x0
248+
0x1000000 0x0 0x0
249+
0x0 0x100000>;
250+
251+
ath9k: wifi@0,0 {
252+
compatible = "pci168c,0033";
253+
reg = <0x0000 0 0 0 0>;
254+
#gpio-cells = <2>;
255+
gpio-controller;
256+
nvmem-cells = <&macaddr_device_id_186c 0>;
257+
nvmem-cell-names = "mac-address";
258+
};
259+
};
225260
};
226261
};

target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c renamed to target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t1x.c

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#include "mpc85xx.h"
3636

37-
static void __init firebox_t10_pic_init(void)
37+
static void __init firebox_t1x_pic_init(void)
3838
{
3939
struct mpic *mpic;
4040

@@ -49,26 +49,40 @@ static void __init firebox_t10_pic_init(void)
4949
/*
5050
* Setup the architecture
5151
*/
52-
static void __init firebox_t10_setup_arch(void)
52+
static void __init firebox_t1x_setup_arch(void)
5353
{
5454
if (ppc_md.progress)
55-
ppc_md.progress("firebox_t10_setup_arch()", 0);
55+
ppc_md.progress("firebox_t1x_setup_arch()", 0);
5656

5757
fsl_pci_assign_primary();
5858

59-
pr_info("Firebox T10 from Watchguard\n");
59+
pr_info("Firebox T10/T15 from Watchguard\n");
6060
}
6161

6262
machine_arch_initcall(firebox_t10, mpc85xx_common_publish_devices);
63+
machine_arch_initcall(firebox_t15, mpc85xx_common_publish_devices);
6364

6465
define_machine(firebox_t10) {
6566
.name = "P1010 RDB",
6667
.compatible = "watchguard,firebox-t10",
67-
.setup_arch = firebox_t10_setup_arch,
68-
.init_IRQ = firebox_t10_pic_init,
68+
.setup_arch = firebox_t1x_setup_arch,
69+
.init_IRQ = firebox_t1x_pic_init,
6970
#ifdef CONFIG_PCI
7071
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
71-
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
72+
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
73+
#endif
74+
.get_irq = mpic_get_irq,
75+
.progress = udbg_progress,
76+
};
77+
78+
define_machine(firebox_t15) {
79+
.name = "P1010 RDB",
80+
.compatible = "watchguard,firebox-t15",
81+
.setup_arch = firebox_t1x_setup_arch,
82+
.init_IRQ = firebox_t1x_pic_init,
83+
#ifdef CONFIG_PCI
84+
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
85+
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
7286
#endif
7387
.get_irq = mpic_get_irq,
7488
.progress = udbg_progress,

target/linux/mpc85xx/image/p1010.mk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,37 @@ TARGET_DEVICES += tplink_tl-wdr4900-v1
7777
define Device/watchguard_firebox-t10
7878
DEVICE_VENDOR := Watchguard
7979
DEVICE_MODEL := Firebox T10
80+
DEVICE_ALT0_VENDOR := Watchguard
81+
DEVICE_ALT0_MODEL := Firebox T10-W
8082
DEVICE_PACKAGES := kmod-rtc-s35390a kmod-eeprom-at24
83+
# This boot loader doesn't reliably boot an uncompressed image,
84+
# therefore resort to gzipping the already compressed zImage
8185
KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
86+
KERNEL_NAME := zImage.la3000000
87+
KERNEL_ENTRY := 0x3000000
88+
KERNEL_LOADADDR := 0x3000000
8289
IMAGES := sysupgrade.bin
8390
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
8491
endef
8592
TARGET_DEVICES += watchguard_firebox-t10
8693

94+
define Device/watchguard_firebox-t15
95+
DEVICE_VENDOR := Watchguard
96+
DEVICE_MODEL := Firebox T15
97+
DEVICE_ALT0_VENDOR := Watchguard
98+
DEVICE_ALT0_MODEL := Firebox T15-W
99+
DEVICE_PACKAGES := kmod-rtc-s35390a kmod-eeprom-at24
100+
# This boot loader doesn't reliably boot an uncompressed image,
101+
# therefore resort to gzipping the already compressed zImage
102+
KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
103+
KERNEL_NAME := zImage.la3000000
104+
KERNEL_ENTRY := 0x3000000
105+
KERNEL_LOADADDR := 0x3000000
106+
IMAGES := sysupgrade.bin
107+
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
108+
endef
109+
TARGET_DEVICES += watchguard_firebox-t15
110+
87111
define Device/sophos_red-15w-rev1
88112
DEVICE_VENDOR := Sophos
89113
DEVICE_MODEL := RED 15w

target/linux/mpc85xx/p1010/config-default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CONFIG_CRYPTO_HASH_INFO=y
66
CONFIG_CRYPTO_LZO=y
77
CONFIG_CRYPTO_ZSTD=y
88
CONFIG_DEFAULT_UIMAGE=y
9-
CONFIG_FIREBOX_T10=y
9+
CONFIG_FIREBOX_T1X=y
1010
# CONFIG_FSL_CORENET_CF is not set
1111
CONFIG_FSL_IFC=y
1212
CONFIG_GPIO_74X164=y

target/linux/mpc85xx/p1010/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BOARDNAME:=P1010
2-
KERNEL_IMAGES:=simpleImage.br200-wp simpleImage.tl-wdr4900-v1 simpleImage.ws-ap3715i
2+
KERNEL_IMAGES:=simpleImage.br200-wp simpleImage.tl-wdr4900-v1 simpleImage.ws-ap3715i zImage.la3000000
33

44
define Target/Description
55
Build firmware images for P1010 based boards.

0 commit comments

Comments
 (0)