[PATCH] ipq40xx: add support for GL.iNet GL-B2200

Enrico Mioso mrkiko.rs at gmail.com
Mon Sep 13 23:30:23 PDT 2021


Hello!
Out of curiosity - why isn't it possible to upgrade from vendor FW to openwrt via sysupgrade -n ?
Thanks!

Enrico


On Mon, 13 Sep 2021, Li Zhang wrote:

> Date: Mon, 13 Sep 2021 10:02:00
> From: Li Zhang <li.zhang at gl-inet.com>
> To: openwrt-devel at lists.openwrt.org
> Cc: Li Zhang <li.zhang at gl-inet.com>
> Subject: [PATCH] ipq40xx: add support for GL.iNet GL-B2200
> 
> This patch adds supports for GL-B2200.
>
> Specifications:
> 	- SOC: Qualcomm IPQ4019 ARM Quad-Core
> 	- RAM: 512 MiB
> 	- Flash: 16 MiB NOR - SPI0
> 	- EMMC: 8GB EMMC
> 	- ETH: Qualcomm QCA8075
> 	- WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11b/g/n 2x2
> 	- WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11n/ac W2 2x2
> 	- WLAN3: Qualcomm Atheros QCA9886 5GHz 802.11n/ac W2 2x2
> 	- INPUT: Reset, WPS
> 	- LED: Power, Internet
> 	- UART1: On board pin header near to LED (3.3V, TX, RX, GND), 3.3V without pin - 115200 8N1
> 	- UART2: On board with BLE module
> 	- SPI1: On board socket for Zigbee module
>
> Update firmware instructions
> ============================
> Pleae update firmware on uboot web(default 192.168.1.1).
>
> Signed-off-by: Li Zhang <li.zhang at gl-inet.com>
> ---
> package/firmware/ipq-wifi/Makefile                 |   2 +
> .../ipq-wifi/board-glinet_gl-b2200.qca4019         | Bin 0 -> 24308 bytes
> .../ipq-wifi/board-glinet_gl-b2200.qca9888         | Bin 0 -> 12200 bytes
> target/linux/ipq40xx/Makefile                      |   2 +-
> .../ipq40xx/base-files/etc/board.d/02_network      |   5 +
> .../etc/hotplug.d/firmware/11-ath10k-caldata       |   3 +
> .../arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts    | 364 +++++++++++++++++++++
> target/linux/ipq40xx/image/generic.mk              |  27 ++
> .../patches-5.4/901-arm-boot-add-dts-files.patch   |   3 +-
> 9 files changed, 404 insertions(+), 2 deletions(-)
> create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200.qca4019
> create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200.qca9888
> create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
>
> diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
> index e3b25bb..c7a388e 100644
> --- a/package/firmware/ipq-wifi/Makefile
> +++ b/package/firmware/ipq-wifi/Makefile
> @@ -39,6 +39,7 @@ ALLWIFIBOARDS:= \
> 	engenius_emr3500 \
> 	ezviz_cs-w3-wd1200g-eup \
> 	glinet_gl-ap1300 \
> +	glinet_gl-b2200 \
> 	glinet_gl-s1300 \
> 	linksys_ea8300 \
> 	linksys_mr8300-v0 \
> @@ -124,6 +125,7 @@ $(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
> $(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
> $(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
> $(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
> +$(eval $(call generate-ipq-wifi-package,glinet_gl-b2200,GL.iNet GL-B2200))
> $(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
> $(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
> $(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))
> diff --git a/package/firmware/ipq-wifi/board-glinet_gl-b2200.qca4019 b/package/firmware/ipq-wifi/board-glinet_gl-b2200.qca4019
> new file mode 100644
> index 0000000000000000000000000000000000000000..ac1850160aead29cee0fb96664272b8a620a4e6a
> GIT binary patch
> literal 24308
> zcmeHPdr(t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2OlX<z^Fp`N5x&T(c@$H0*b
> zF^zsz%!13E(uQbx;34PKzAH!1N1gB~W9FUjFX)VG at -AoOwf9NS3+sK#opVn&?|U}_
> zW9KkpM+VBf(oP3dx*c4#3x}FGg}@3xV7^b^fX~315fgX}H{=VPh^KG(`f}hOeDVg%
> z$J?9joe7rA(>LaF;Yqsv+6CLIpF0Lgw_mqlW0-)SYN8M at iNGAX{WBvoOUWJ!ZD$n5
> zYOB7CZ%;g92LFwkO=%Pc|NnJB^6dQ}i>4P+hd2%}K^9Cb<lnFF<<{XTWn!izIP-K{
> zJ!c-!5+PqdFp^Wc+TPbIVZJyY-WKxVvpTNaUkpC{Vq;{EXHT~Ol3aUyY>IDB>~+0r
> mM)B=m6*<ap$s%CMp0PQOy<z*3o!~qJqxklV{jK at p{{IJ at zCWk{
>
> literal 0
> HcmV?d00001
>
> diff --git a/package/firmware/ipq-wifi/board-glinet_gl-b2200.qca9888 b/package/firmware/ipq-wifi/board-glinet_gl-b2200.qca9888
> new file mode 100644
> index 0000000000000000000000000000000000000000..4f0a521f35935d4be1fb01b66dd9954a48eade52
> GIT binary patch
> literal 12200
> zcmeHNT~HHO6uyZ%qC#Pp0P^Dsh-5(sVex0>pJ+8D3jzj85S3pID+VNxf)UhC)x=qn
> z6hu*pVibldri{aMtZm0Sj1_0p=|dl!=}RB_?1Ob2UrKs6Vfj-usnGhfXLI+Sd+zzp
> zx%b-*>~hH8log+)lqX6R at v?1M1)IVC{rdqFCV at QzPzqZ`lQylsvL;Sft*NSONK0H#
> zR>oCT>uM^i)1=aM>*KUd71|bUWA*;{aSth!Db@*JXw{WB)Rb!))3#FaGJ=pw1u%X%
> z%oU#S=Pv>Qy0)m<g0gu7{s2Ny20+snLUsuJ01zgzig3{awwo!Hm4FQeKvGiDv!_o5
> z3XwN(I2;*VTOgW=aC`jwOizn5lYouym^nB5*w;BV^1vJJ#dUDL>>61;co}D5`;0|G
> zrw9as1)Kmd<jnZy&D at w+*-~dvHgEX&F*OUTP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NnO}3KgBJZ#{AjQ
> z at M@9rl8rv4I1!}@+Sz56>k{^cDSeWM&K+WswNVuTd0iJuPG%emt3<b->`|FAj;>UT
> zRQ+9A;|5LSu0U$Uw$m727q%P8869e|=9&^(eU&}ERpyj7aXqTM*R3^B%@I2S6sOLq
> z3~2|U-?owKx$O!1P&Ha|-d5h3d^q|5qC8~EZ(FrHFvlnT?D;AtQ@=(NQ270gmdgpp
> zutvWM>xF7dYO7d-<}t>dEqG~Aw(rIhUB$=ACcMT!?}x!JtkPDj7Ts~DztWt3B&Go^
> zywYCRCM{o)i=+&n)fsd3L at m12+_le`bug9=R=tK=eu`&+XW$)YVA0|w%Y1wh|A3(2
> z(CP1GuF=~rf5=cq`i-{c5!mY0QSh at WG9r9cL_}mn5%6Lwqv5!e%#`O9m#OQUj~Fc7
> zy#qrxe;yqj<<|1H`Q5<>5kbgGbStqH*@kW)HXs?O7bl>gqQiD$Wa^oF_4llQImZ%C
> z<}8Ohd*yw223Q83KY#x0*|Wc<$P8ZG`g=9R%(dT)WqfQys#MJkKLh~w%}np`!<jt}
> zB|17PDl(GScn<#i``}~yKJxpWWWX`xEm|n70>#|}cLng at -_Ag}1cmds3FU2UT%7sp
> zsbcuUwRiabY`r*ob=3daT$MXlt<F`Qqw<u+rDauW#&W8=r}xUh;Lz~RpYGhf|IqV^
> zDRn&0o?PD>Z{VzhQmBEeggR at Wl+3_YL7nwaiZE~$P|r!674hM-``+9JAJ#(MsTt=M
> z?b>5HeWBm}-R*m`=^qv=le-a(iI6ZXOcF+kz~-^d2!&A+irNg;j;%#fu~bPawRX<l
> muP3v5q6HFx2!?JUwjjCadSX42j+UHbkC$W2*YCagjQbD3Sk|Nf
>
> literal 0
> HcmV?d00001
>
> diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile
> index 4006123..6bb5ded 100644
> --- a/target/linux/ipq40xx/Makefile
> +++ b/target/linux/ipq40xx/Makefile
> @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
> ARCH:=arm
> BOARD:=ipq40xx
> BOARDNAME:=Qualcomm Atheros IPQ40XX
> -FEATURES:=squashfs fpu ramdisk nand
> +FEATURES:=squashfs fpu ramdisk nand boot-part rootfs-part
> CPU_TYPE:=cortex-a7
> CPU_SUBTYPE:=neon-vfpv4
> SUBTARGETS:=generic mikrotik
> diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> index a675acc..c9ca20e 100644
> --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> @@ -101,6 +101,11 @@ ipq40xx_setup_interfaces()
> 		ucidef_add_switch "switch0" \
> 			"0u at eth0" "3:lan" "4:lan"
> 		;;
> +	glinet,gl-b2200)
> +		ucidef_set_interfaces_lan_wan "eth0" "eth1"
> +		ucidef_add_switch "switch0" \
> +			"0u at eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u at eth1" "4:wan"
> +		;;
> 	mobipromo,cm520-79f)
> 		ucidef_add_switch "switch0" \
> 			"0u at eth0" "3:lan:2" "4:lan:1"
> diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 87876ad..36a199c 100644
> --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -35,6 +35,7 @@ case "$FIRMWARE" in
> 		caldata_extract "ART" 0x9000 0x2f20
> 		ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x32)
> 		;;
> +	glinet,gl-b2200 |\
> 	engenius,eap2200 |\
> 	openmesh,a62 |\
> 	plasmacloud,pa2200)
> @@ -57,6 +58,7 @@ case "$FIRMWARE" in
> 	ezviz,cs-w3-wd1200g-eup |\
> 	glinet,gl-ap1300 |\
> 	glinet,gl-b1300 |\
> +	glinet,gl-b2200 |\
> 	glinet,gl-s1300 |\
> 	linksys,ea6350v3 |\
> 	mobipromo,cm520-79f |\
> @@ -170,6 +172,7 @@ case "$FIRMWARE" in
> 	ezviz,cs-w3-wd1200g-eup |\
> 	glinet,gl-ap1300 |\
> 	glinet,gl-b1300 |\
> +	glinet,gl-b2200 |\
> 	glinet,gl-s1300 |\
> 	linksys,ea6350v3 |\
> 	mobipromo,cm520-79f |\
> diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
> new file mode 100644
> index 0000000..f258e35
> --- /dev/null
> +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
> @@ -0,0 +1,364 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +
> +#include "qcom-ipq4019.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/soc/qcom,tcsr.h>
> +
> +/ {
> +	model = "GL.iNet GL-B2200";
> +	compatible = "glinet,gl-b2200";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +
> +	chosen {
> +		bootargs-append = " root=/dev/mmcblk0p2 rw rootwait clk_ignore_unused";
> +	};
> +
> +	soc {
> +		rng at 22000 {
> +			status = "okay";
> +		};
> +
> +		mdio at 90000 {
> +			status = "okay";
> +		};
> +
> +		ess-psgmii at 98000 {
> +			status = "okay";
> +		};
> +
> +		tcsr at 1949000 {
> +			compatible = "qcom,tcsr";
> +			reg = <0x1949000 0x100>;
> +			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
> +		};
> +
> +		tcsr at 194b000 {
> +			/* select hostmode */
> +			compatible = "qcom,tcsr";
> +			reg = <0x194b000 0x100>;
> +			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
> +			status = "okay";
> +		};
> +
> +		ess_tcsr at 1953000 {
> +			compatible = "qcom,tcsr";
> +			reg = <0x1953000 0x1000>;
> +			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
> +		};
> +
> +		tcsr at 1957000 {
> +			compatible = "qcom,tcsr";
> +			reg = <0x1957000 0x100>;
> +			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
> +		};
> +
> +		crypto at 8e3a000 {
> +			status = "okay";
> +		};
> +
> +		ess-switch at c000000 {
> +			status = "okay";
> +			switch_lan_bmp = <0x2e>;
> +			switch_wan_bmp = <0x10>;
> +		};
> +
> +		edma at c080000 {
> +			status = "okay";
> +		};
> +	};
> +
> +	keys {
> +		compatible = "gpio-keys";
> +
> +		wps {
> +			label = "wps";
> +			gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_WPS_BUTTON>;
> +			linux,input-type = <1>;
> +		};
> +
> +		reset {
> +			label = "reset";
> +			gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_RESTART>;
> +			linux,input-type = <1>;
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		power_blue {
> +			label = "power:blue";
> +			gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +		};
> +		internet_blue {
> +			label = "internet:blue";
> +			gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
> +		};
> +		power_white {
> +			label = "power:white";
> +			gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
> +		};
> +		internet_white {
> +			label = "internet:white";
> +			gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
> +		};
> +	};
> +};
> +
> +&gmac1 {
> +	qcom,phy_mdio_addr = <3>;
> +	qcom,poll_required = <1>;
> +	qcom,forced_speed = <1000>;
> +	qcom,forced_duplex = <1>;
> +	vlan_tag = <2 0x10>;
> +};
> +
> +&gmac0 {
> +	vlan_tag = <1 0x2e>;
> +};
> +
> +&vqmmc {
> +	status = "okay";
> +};
> +
> +&sdhci {
> +	status = "okay";
> +	pinctrl-0 = <&sd_pins>;
> +	pinctrl-names = "default";
> +	cd-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
> +	vqmmc-supply = <&vqmmc>;
> +};
> +
> +&blsp_dma {
> +	status = "okay";
> +};
> +
> +&cryptobam {
> +	status = "okay";
> +};
> +
> +&blsp1_spi1 {
> +	pinctrl-0 = <&spi_0_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
> +
> +	flash at 0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <24000000>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "SBL1";
> +				reg = <0x0 0x40000>;
> +				read-only;
> +			};
> +
> +			partition at 40000 {
> +				label = "MIBIB";
> +				reg = <0x40000 0x20000>;
> +				read-only;
> +			};
> +
> +			partition at 60000 {
> +				label = "QSEE";
> +				reg = <0x60000 0x60000>;
> +				read-only;
> +			};
> +
> +			partition at c0000 {
> +				label = "CDT";
> +				reg = <0xc0000 0x10000>;
> +				read-only;
> +			};
> +
> +			partition at d0000 {
> +				label = "DDRPARAMS";
> +				reg = <0xd0000 0x10000>;
> +				read-only;
> +			};
> +
> +			partition at e0000 {
> +				label = "APPSBLENV";
> +				reg = <0xe0000 0x10000>;
> +				read-only;
> +			};
> +
> +			partition at f0000 {
> +				label = "APPSBL";
> +				reg = <0xf0000 0x80000>;
> +				read-only;
> +			};
> +
> +			partition at 170000 {
> +				label = "ART";
> +				reg = <0x170000 0x10000>;
> +				read-only;
> +			};
> +		};
> +	};
> +};
> +
> +&blsp1_spi2 {
> +	pinctrl-0 = <&spi_1_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
> +	spidev1: spi at 0 {
> +		compatible = "siliconlabs,si3210";
> +		reg = <0>;
> +		spi-max-frequency = <24000000>;
> +	};
> +};
> +
> +&blsp1_uart1 {
> +	pinctrl-0 = <&serial_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&blsp1_uart2 {
> +	pinctrl-0 = <&serial_1_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&tlmm {
> +	serial_pins: serial_pinmux {
> +		mux {
> +			pins = "gpio16", "gpio17";
> +			function = "blsp_uart0";
> +			bias-disable;
> +		};
> +	};
> +
> +	serial_1_pins: serial1_pinmux {
> +		mux {
> +			pins = "gpio8", "gpio9",
> +				"gpio10", "gpio11";
> +			function = "blsp_uart1";
> +			bias-disable;
> +		};
> +	};
> +
> +	spi_0_pins: spi_0_pinmux {
> +		pinmux {
> +			function = "blsp_spi0";
> +			pins = "gpio13", "gpio14", "gpio15";
> +		};
> +		pinmux_cs {
> +			function = "gpio";
> +			pins = "gpio12";
> +		};
> +		pinconf {
> +			pins = "gpio13", "gpio14", "gpio15";
> +			drive-strength = <12>;
> +			bias-disable;
> +		};
> +		pinconf_cs {
> +			pins = "gpio12";
> +			drive-strength = <2>;
> +			bias-disable;
> +			output-high;
> +		};
> +	};
> +
> +	spi_1_pins: spi_1_pinmux {
> +		mux {
> +			pins = "gpio44", "gpio46", "gpio47";
> +			function = "blsp_spi1";
> +			bias-disable;
> +		};
> +		cs {
> +			pins = "gpio45";
> +			function = "gpio";
> +			bias-pull-up;
> +		};
> +		reset {
> +			pins = "gpio43";
> +			function = "gpio";
> +			output-high;
> +		};
> +		mux_2 {
> +			pins = "gpio35";
> +			function = "gpio";
> +			output-high;
> +		};
> +		host_int {
> +			pins = "gpio2";
> +			function = "gpio";
> +			input;
> +		};
> +		wake {
> +			pins = "gpio48";
> +			function = "gpio";
> +			output-high;
> +		};
> +	};
> +
> +	sd_pins: sd_pins {
> +		pinmux {
> +			function = "sdio";
> +			pins = "gpio23", "gpio24", "gpio25", "gpio26",
> +				"gpio29", "gpio30", "gpio31", "gpio32";
> +			drive-strength = <10>;
> +		};
> +
> +		pinmux_sd_clk {
> +			function = "sdio";
> +			pins = "gpio27";
> +			drive-strength = <16>;
> +		};
> +
> +		pinmux_sd7 {
> +			function = "sdio";
> +			pins = "gpio28";
> +			drive-strength = <10>;
> +			bias-disable;
> +		};
> +	};
> +
> +};
> +
> +&pcie0 {
> +	status = "okay";
> +	perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
> +	wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
> +
> +	bridge at 0,0 {
> +		reg = <0x00000000 0 0 0 0>;
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		wifi2: wifi at 1,0 {
> +			status = "okay";
> +			compatible = "qcom,ath10k";
> +			reg = <0x00010000 0 0 0 0>;
> +			qcom,ath10k-calibration-variant = "GL-B2200";
> +		};
> +	};
> +};
> +
> +&wifi0 {
> +	status = "okay";
> +	qcom,ath10k-calibration-variant = "GL-B2200";
> +};
> +
> +&wifi1 {
> +	status = "okay";
> +	qcom,ath10k-calibration-variant = "GL-B2200";
> +};
> diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
> index 18f5d23..b0d6cf5 100644
> --- a/target/linux/ipq40xx/image/generic.mk
> +++ b/target/linux/ipq40xx/image/generic.mk
> @@ -81,6 +81,17 @@ define Build/qsdk-ipq-factory-nand-askey
> 	@mv $@.new $@
> endef
>
> +define Build/qsdk-ipq-app-gpt
> +	cp $@ $@.tmp 2>/dev/null || true
> +	ptgen -g -o $@.tmp -a 1 -l 1024 \
> +			-t 0x2e -N 0:HLOS -r -p 32M \
> +			-t 0x83 -N rootfs -r -p 128M \
> +				-N rootfs_data -p 512M \
> +				-N user_data -p 6766M
> +	cat $@.tmp >> $@
> +	rm $@.tmp
> +endef
> +
> define Build/SenaoFW
> 	-$(STAGING_DIR_HOST)/bin/mksenaofw \
> 		-n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \
> @@ -506,6 +517,22 @@ define Device/glinet_gl-b1300
> endef
> TARGET_DEVICES += glinet_gl-b1300
>
> +define Device/glinet_gl-b2200
> +	$(call Device/FitImage)
> +	DEVICE_VENDOR := GL.iNet
> +	DEVICE_MODEL := GL-B2200
> +	SOC := qcom-ipq4019
> +	DEVICE_DTS_CONFIG := config at ap.dk04.1-c3
> +	KERNEL_INITRAMFS_SUFFIX := -recovery.itb
> +	IMAGES := sdcard.img.gz
> +	IMAGE/sdcard.img.gz := qsdk-ipq-app-gpt |\
> +				pad-to 1024k | append-kernel |\
> +				pad-to 33792k | append-rootfs |\
> +				append-metadata | gzip
> +	DEVICE_PACKAGES := ipq-wifi-glinet_gl-b2200 kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
> +endef
> +TARGET_DEVICES += glinet_gl-b2200
> +
> define Device/glinet_gl-s1300
> 	$(call Device/FitImage)
> 	DEVICE_VENDOR := GL.iNet
> diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
> index 0447fb6..9af5055 100644
> --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
> +++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
> @@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
>
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> -@@ -837,11 +837,61 @@ dtb-$(CONFIG_ARCH_QCOM) += \
> +@@ -837,11 +837,62 @@ dtb-$(CONFIG_ARCH_QCOM) += \
>  	qcom-apq8074-dragonboard.dtb \
>  	qcom-apq8084-ifc6540.dtb \
>  	qcom-apq8084-mtp.dtb \
> @@ -67,6 +67,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
> +	qcom-ipq4029-ap-303h.dtb \
> +	qcom-ipq4029-ap-365.dtb \
> +	qcom-ipq4029-gl-b1300.dtb \
> ++	qcom-ipq4019-gl-b2200.dtb \
> +	qcom-ipq4029-gl-s1300.dtb \
> +	qcom-ipq4029-mr33.dtb \
>  	qcom-ipq8064-ap148.dtb \
> -- 
> 2.7.4
>
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>



More information about the openwrt-devel mailing list