[PATCH] This patch adds supports for GL-B2200-EMMC.

Li Zhang li.zhang at gl-inet.com
Fri Jul 2 01:25:18 PDT 2021


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).
---
 package/firmware/ipq-wifi/Makefile                 |   2 +
 .../ipq-wifi/board-glinet_gl-b2200-emmc.qca4019    | Bin 0 -> 24316 bytes
 .../ipq-wifi/board-glinet_gl-b2200-emmc.qca9888    | Bin 0 -> 12168 bytes
 target/linux/ipq40xx/Makefile                      |   2 +-
 .../ipq40xx/base-files/etc/board.d/02_network      |   5 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |   3 +
 .../arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts    | 366 +++++++++++++++++++++
 .../arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts    |   7 -
 target/linux/ipq40xx/image/generic.mk              |  27 ++
 .../patches-5.4/901-arm-boot-add-dts-files.patch   |   3 +-
 10 files changed, 406 insertions(+), 9 deletions(-)
 create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca4019
 create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888
 create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index e63e3b3..3d02048 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-emmc \
 	glinet_gl-s1300 \
 	linksys_ea8300 \
 	linksys_mr8300-v0 \
@@ -125,6 +126,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-emmc,GL.iNet GL-B2200-EMMC))
 $(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-emmc.qca4019 b/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca4019
new file mode 100644
index 0000000000000000000000000000000000000000..c4721328e1bbaad8722b3b5f74c88af6c8c5214d
GIT binary patch
literal 24316
zcmeHPdr(tX8b1jj>SE!BfCzXAAv{7MK%g2V@)iR`u&79YB2YzgYm|rKVdz3TJ}5*)
zpcV`fv<%9lDI(+Ii&(6!ol&NL>>oS(N88y)cV^wS9qmp#v%9$G-sD0Ei6#PD9`_69
zobR0bedm1VcTbXgbAH at 66XJs7c8kJ7Q-kBv<1!L~OeO<R4u#-308ua%%FDMF6c+{+
z%A~<>7fVZmrTe#r61Bo31!ep3DnB%+qM%G#aQNuf?c(5gK0h=xc-xL02{Ib=X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AqRhL54R3aDdW>6
z!JDVs>Ur~kmIyiffsvfjmG-_~4)eu1 at wSi?pVfZl{z7o#7aAjTTzj(p*W}ydV^f at a
qVz28}Gm3Nns>o4(ixvS(_KeN(><!x&?F8o-7{$3?=x at yz_y0fSzd?Qg

literal 0
HcmV?d00001

diff --git a/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888 b/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888
new file mode 100644
index 0000000000000000000000000000000000000000..f5a05d4cbc760fc44326fad52ae4f86ad231b7d3
GIT binary patch
literal 12168
zcmeHNTTl~M7(R(OqC#bt0CI8VCRq?dSgfvG1OiG*maBmh1m&iNl}i+)V7zv!CeD(i
zAc{&9BQR7UWf-PIZ9CRstT>}iANt at -U;5BzAFSi}Qqr at D%T3XwNb6<)&Drz+|M|cF
zob&AlcKOLqPm4)Y%HyPp7+G#wK?bO+s{>GKW7#tRiLg~3Y)sZv)kIg;)x=b(Ycw%6
z)yY!3RoPH+pqe$~HbysB9H^<NZ%WRjVq^p%mBwt%&Q7lrKzuOF6&(BLF9HF&p{T`#
zvUz>}076g>z`-wstO>jT5XQ5LaOo1Zn=4gSfK3HJe0==VCr<<lkq5BZY$;q at BASbE
z+WviRq{%*$fX#24J2t<)%04uH-vjQ&ad5Hh8d=?cCFf!Ll%+zu2n2#9oB%LvpYhF`
z8JSwy3VTv^-ryI<%vo4{cD9t+=G<UsY>`L=*v5&kuP<O5CobBaP&nxO-m~}2wEX+s
zv_f$S%>$gFi)U$3SaK#QAHy at iGr%+8Dg%8+0dN-xgl_Ke0~KfRRCzUH`t`R*Z0sW&
z`%HDyCW4JUIDC^$W_xHWx2*u9pa&kDtbos8=U^*>vHiC8sd$sAxkRa?wvoWg%l(NX
znv7f*78<%18lq*-o=;BtK+WM}oohUn3EkZOhQ4L+;T7V`9e7Vq;S2npJtajBUqFDj
zw<G7<JZlCuhC!H6bIdTvHa2(k42g=uBQT70ynEWKct9`&NyE~RI4lm)96W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`5~SGo`H9qfu+lquk>7nc>DPI2hM&kb65*q{;;l`
z^qM%5M_}vLg~Lx+Xh?8aNJwZ%5pZWKqrte8OqJ&qm#Z}`$91Nzo`K=9pC=|JxV0>F
zerNE0gdegN%_K6BTyzt$2}wcSIROQg?Us at 8nP=|R-?jebIhJ$s*5+_#uY3&80L#F$
zXV0EKefrl7nZt`yf3Jp^w;eZU86TTTm8zN12LQmnh3Of6Ft^8{L_~y#hlcVR&%u9x
zAAD at zM}EK44A_P}L~g=rP~0_eM*#o*?L3sLP`HROC=2m%c^0duis28}p3!^r_2P(i
z;s0lIRPG$LI!ASm%2O7XmRGA8)7h@>p5B4M;nA_5Zr{20!1aL{bv)OeT;H2$V6THx
zsE(_I+H0VcOvhD0?e$NJ&~X(|*GZfg@!_-k-rNQs)<T`B8Rr!3++#R*x!?NTt-JH-
z9~LXqyAe%_kRU8b5=4nW#$*OUVU&cTGQft(4M-A}BuSz+ytVi1=~-RTd<kC!L$?vz
ZkQ{U)u at TvVmRw|ymvb!E at 4dy$`ws~Q%FO@(

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..ae286c1 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-emmc)
+		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..8fc1d6a 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
@@ -40,6 +40,7 @@ case "$FIRMWARE" in
 	plasmacloud,pa2200)
 		caldata_extract "0:ART" 0x9000 0x2f20
 		;;
+	glinet,gl-b2200-emmc |\
 	linksys,ea8300 |\
 	linksys,mr8300)
 		caldata_extract "ART" 0x9000 0x2f20
@@ -57,6 +58,7 @@ case "$FIRMWARE" in
 	ezviz,cs-w3-wd1200g-eup |\
 	glinet,gl-ap1300 |\
 	glinet,gl-b1300 |\
+	glinet,gl-b2200-emmc |\
 	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-emmc |\
 	glinet,gl-s1300 |\
 	linksys,ea6350v3 |\
 	mobipromo,cm520-79f |\
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts
new file mode 100644
index 0000000..8c8bfda
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts
@@ -0,0 +1,366 @@
+// 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-EMMC";
+	compatible = "glinet,gl-b2200-emmc";
+
+	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";
+		
+		blue_power {
+			label = "blue:power";
+			gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+		blue_internet {
+			label = "blue:internet";
+			gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
+		};
+		white_power {
+			label = "white:power";
+			gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+		white_internet {
+			label = "white:internet";
+			gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
+};
+
+&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-EMMC";
+		};
+	};
+};
+
+&wifi0 {
+	status = "okay";
+	qcom,ath10k-calibration-variant = "GL-B2200-EMMC";
+};
+
+&wifi1 {
+	status = "okay";
+	qcom,ath10k-calibration-variant = "GL-B2200-EMMC";
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
index fa859b7..66a6a01 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
@@ -9,13 +9,6 @@
 	model = "GL.iNet GL-S1300";
 	compatible = "glinet,gl-s1300";
 
-	aliases {
-		led-boot = &led_power;
-		led-failsafe = &led_power;
-		led-running = &led_power;
-		led-upgrade = &led_power;
-	};
-
 	memory {
 		device_type = "memory";
 		reg = <0x80000000 0x10000000>;
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 68e5655..141fa94 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) \
@@ -516,6 +527,22 @@ define Device/glinet_gl-s1300
 endef
 TARGET_DEVICES += glinet_gl-s1300
 
+define Device/glinet_gl-b2200-emmc
+	$(call Device/FitImage)
+	DEVICE_VENDOR := GL.iNet
+	DEVICE_MODEL := GL-B2200-EMMC
+	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-emmc kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
+endef
+TARGET_DEVICES += glinet_gl-b2200-emmc
+
 define Device/linksys_ea6350v3
 	# The Linksys EA6350v3 has a uboot bootloader that does not
 	# support either booting lzma kernel images nor booting UBI
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..0685fb0 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 \
@@ -52,6 +52,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4019-fritzbox-7530.dtb \
 +	qcom-ipq4019-fritzrepeater-1200.dtb \
 +	qcom-ipq4019-fritzrepeater-3000.dtb \
++   qcom-ipq4019-gl-b2200-emmc.dtb \
 +	qcom-ipq4019-map-ac2200.dtb \
 +	qcom-ipq4019-mr8300.dtb \
 +	qcom-ipq4019-e2600ac-c1.dtb \
-- 
2.7.4






More information about the openwrt-devel mailing list