Plain OpenWRT on GL-X2000

you need to set up a new case for the x2000 in 11-ath11k-caldata. Your oem partition naming sceme uses upper case ...
target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
ipq5018


	glinet,gl-b3000)
		caldata_extract "0:art" 0x1000 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 3) 0
		ath11k_set_macflag
		;;
    glinet,gl-x2000)
        caldata_extract "0:ART" 0x1000 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 3) 0
		ath11k_set_macflag

same for the 6122

	glinet,gl-b3000)
		caldata_extract "0:art" 0x26800 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 4) 0
		ath11k_set_macflag
		;;

     glinet,gl-x2000)
       caldata_extract "0:ART" 0x26800 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 3) 0
		ath11k_set_macflag

same goes for uboot-envtools

/package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq50xx.


glinet,gl-x2000)
	ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x40000" "0x20000"

see https://github.com/boecko/openwrt/commit/2f40d17f75d4ea4d992cbd9bc5d4aaa7172474d8

BTW:

[   15.189453] ath11k c000000.wifi: Multipd architecture - userpd: 1
[   15.190129] ath11k c000000.wifi: ipq5018 hw1.0
[   15.194652] ath11k c000000.wifi: FW memory mode: 2
[   15.323095] remoteproc remoteproc1: powering up pd-1
[   15.323389] remoteproc remoteproc1: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   15.327167] remoteproc remoteproc0: powering up cd00000.remoteproc
[   15.335644] remoteproc remoteproc0: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   15.472559] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[   15.495124] remoteproc remoteproc1: remote processor pd-1 is now up
[   15.499689] ath11k b00a040.wifi: Multipd architecture - userpd: 3
[   15.502574] ath11k b00a040.wifi: qcn6122 hw1.0
[   15.506467] ath11k b00a040.wifi: FW memory mode: 2
[   15.518058] ath11k c000000.wifi: qmi fail to get qcom,m3-dump-addr, ignore m3 dump mem req
[   15.525654] ath11k c000000.wifi: chip_id 0x0 chip_family 0x4 board_id 0xff soc_id 0xffffffff
[   15.525741] ath11k c000000.wifi: fw_version 0x270206d0 fw_build_timestamp 2022-08-04 13:28 fw_build_id WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   15.573262] remoteproc remoteproc3: powering up pd-3
[   15.573627] remoteproc remoteproc3: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   15.588010] remoteproc remoteproc3: remote processor pd-3 is now up
[   15.599774] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.684087] ath11k b00a040.wifi: qmi ignore invalid mem req type 10
[   15.691482] ath11k b00a040.wifi: chip_id 0x0 chip_family 0x4 board_id 0xff soc_id 0xffffffff
[   15.691558] ath11k b00a040.wifi: fw_version 0x270206d0 fw_build_timestamp 2022-08-04 13:28 fw_build_id WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   26.078689] platform pwm-fan: deferred probe pending: pwm-fan: Could not get PWM
root@OpenWrt:~# iw phy0 info
Wiphy phy0
	wiphy index: 0
	max # scan SSIDs: 16
	max scan IEs length: 408 bytes
	max # sched scan SSIDs: 0
	max # match sets: 0
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports AP-side u-APSD.
	Available Antennas: TX 0x3 RX 0x3
	Configured Antennas: TX 0x3 RX 0x3
	Supported interface modes:
		 * managed
		 * AP
		 * mesh point
	Band 1:
		Capabilities: 0x11ef
			RX LDPC
			HT20/HT40
			SM Power Save disabled
			RX HT20 SGI
			RX HT40 SGI
			TX STBC
			RX STBC 1-stream
			Max AMSDU length: 3839 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: No restriction (0x00)
		HT TX/RX MCS rate indexes supported: 0-15
		HE Iftypes: managed
			HE MAC Capabilities (0x000b9a080040):
				+HTC HE Supported
				TWT Requester
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 3
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
			HE PHY Capabilities: (0x02600c891dc1838c110c00):
				HE40/2.4GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				DCM Max Constellation: 1
				DCM Max Constellation Rx: 1
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Ng = 16 SU Feedback
				Ng = 16 MU Feedback
				Codebook Size SU Feedback
				Codebook Size MU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				STBC Rx > 80MHz
				HE ER SU PPDU 4x HE-LTF 0.8us GI
				HE ER SU PPDU 1x HE-LTF 0.8us GI
				TX 1024-QAM
				RX 1024-QAM
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x19 0x1c 0xc7 0x71 
		HE Iftypes: AP
			HE MAC Capabilities (0x000d9a080040):
				+HTC HE Supported
				TWT Responder
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 3
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
			HE PHY Capabilities: (0x02600c881dc1838c110c00):
				HE40/2.4GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				DCM Max Constellation Rx: 1
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Ng = 16 SU Feedback
				Ng = 16 MU Feedback
				Codebook Size SU Feedback
				Codebook Size MU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				STBC Rx > 80MHz
				HE ER SU PPDU 4x HE-LTF 0.8us GI
				HE ER SU PPDU 1x HE-LTF 0.8us GI
				TX 1024-QAM
				RX 1024-QAM
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x19 0x1c 0xc7 0x71 
		HE Iftypes: mesh point
			HE MAC Capabilities (0x00098a080040):
				+HTC HE Supported
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 1
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
			HE PHY Capabilities: (0x02600c801d41810c100000):
				HE40/2.4GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Ng = 16 SU Feedback
				Codebook Size SU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				HE ER SU PPDU 1x HE-LTF 0.8us GI
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x19 0x1c 0xc7 0x71 
		Frequencies:
			* 2412.0 MHz [1] (30.0 dBm)
			* 2417.0 MHz [2] (30.0 dBm)
			* 2422.0 MHz [3] (30.0 dBm)
			* 2427.0 MHz [4] (30.0 dBm)
			* 2432.0 MHz [5] (30.0 dBm)
			* 2437.0 MHz [6] (30.0 dBm)
			* 2442.0 MHz [7] (30.0 dBm)
			* 2447.0 MHz [8] (30.0 dBm)
			* 2452.0 MHz [9] (30.0 dBm)
			* 2457.0 MHz [10] (30.0 dBm)
			* 2462.0 MHz [11] (30.0 dBm)
			* 2467.0 MHz [12] (disabled)
			* 2472.0 MHz [13] (disabled)
			* 2484.0 MHz [14] (disabled)
	valid interface combinations:
		 * #{ managed } <= 1, #{ AP, mesh point } <= 16,
		   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }

	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
		 * max A-MPDU length exponent
		 * min MPDU start spacing
	max # scan plans: 1
	max scan plan interval: -1
	max scan plan iterations: 0
	Maximum associated stations in AP mode: 128
	Supported extended features:
		* [ RRM ]: RRM
		* [ SET_SCAN_DWELL ]: scan dwell setting
		* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
		* [ ACK_SIGNAL_SUPPORT ]: ack signal level support
		* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
		* [ ENABLE_FTM_RESPONDER ]: enable FTM (Fine Time Measurement) responder
		* [ STA_TX_PWR ]: TX power control per station
		* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
		* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
		* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
		* [ BSS_COLOR ]: BSS coloring support
		* [ POWERED_ADDR_CHANGE ]: can change MAC address while up
root@OpenWrt:~# iw phy1 info
Wiphy phy1
	wiphy index: 1
	max # scan SSIDs: 16
	max scan IEs length: 398 bytes
	max # sched scan SSIDs: 0
	max # match sets: 0
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports AP-side u-APSD.
	Available Antennas: TX 0x3 RX 0x3
	Configured Antennas: TX 0x3 RX 0x3
	Supported interface modes:
		 * managed
		 * AP
		 * monitor
		 * mesh point
	Band 2:
		Capabilities: 0x19ef
			RX LDPC
			HT20/HT40
			SM Power Save disabled
			RX HT20 SGI
			RX HT40 SGI
			TX STBC
			RX STBC 1-stream
			Max AMSDU length: 7935 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: No restriction (0x00)
		HT TX/RX MCS rate indexes supported: 0-15
		VHT Capabilities (0x3381f9fa):
			Max MPDU length: 11454
			Supported Channel Width: 160 MHz, 80+80 MHz
			RX LDPC
			short GI (80 MHz)
			short GI (160/80+80 MHz)
			TX STBC
			SU Beamformer
			SU Beamformee
			RX antenna pattern consistency
			TX antenna pattern consistency
		VHT RX MCS set:
			1 streams: MCS 0-9
			2 streams: MCS 0-9
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT RX highest supported: 0 Mbps
		VHT TX MCS set:
			1 streams: MCS 0-9
			2 streams: MCS 0-9
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT TX highest supported: 0 Mbps
		VHT extended NSS: supported
		HE Iftypes: managed
			HE MAC Capabilities (0x000b9a081040):
				+HTC HE Supported
				TWT Requester
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 3
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
				OM Control UL MU Data Disable RX
			HE PHY Capabilities: (0x1c604c89fdc9838c110c00):
				HE40/HE80/5GHz
				HE160/5GHz
				HE160/HE80+80/5GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				Full Bandwidth UL MU-MIMO
				DCM Max Constellation: 1
				DCM Max Constellation Rx: 1
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Beamformee STS > 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Sounding Dimensions > 80MHz: 1
				Ng = 16 SU Feedback
				Ng = 16 MU Feedback
				Codebook Size SU Feedback
				Codebook Size MU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				STBC Rx > 80MHz
				HE ER SU PPDU 4x HE-LTF 0.8us GI
				HE ER SU PPDU 1x HE-LTF 0.8us GI
				TX 1024-QAM
				RX 1024-QAM
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x79 0x1c 0xc7 0x71 0x1c 0xc7 0x71 
		HE Iftypes: AP
			HE MAC Capabilities (0x000d9a081040):
				+HTC HE Supported
				TWT Responder
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 3
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
				OM Control UL MU Data Disable RX
			HE PHY Capabilities: (0x1c604c88fdc9838c110c00):
				HE40/HE80/5GHz
				HE160/5GHz
				HE160/HE80+80/5GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				Full Bandwidth UL MU-MIMO
				DCM Max Constellation Rx: 1
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Beamformee STS > 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Sounding Dimensions > 80MHz: 1
				Ng = 16 SU Feedback
				Ng = 16 MU Feedback
				Codebook Size SU Feedback
				Codebook Size MU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				STBC Rx > 80MHz
				HE ER SU PPDU 4x HE-LTF 0.8us GI
				HE ER SU PPDU 1x HE-LTF 0.8us GI
				TX 1024-QAM
				RX 1024-QAM
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x79 0x1c 0xc7 0x71 0x1c 0xc7 0x71 
		HE Iftypes: mesh point
			HE MAC Capabilities (0x00098a081040):
				+HTC HE Supported
				Dynamic BA Fragementation Level: 1
				BSR
				OM Control
				Maximum A-MPDU Length Exponent: 1
				RX Control Frame to MultiBSS
				A-MSDU in A-MPDU
				OM Control UL MU Data Disable RX
			HE PHY Capabilities: (0x1c600c80fd49810c100000):
				HE40/HE80/5GHz
				HE160/5GHz
				HE160/HE80+80/5GHz
				LDPC Coding in Payload
				HE SU PPDU with 1x HE-LTF and 0.8us GI
				STBC Tx <= 80MHz
				STBC Rx <= 80MHz
				SU Beamformer
				SU Beamformee
				Beamformee STS <= 80MHz: 7
				Beamformee STS > 80MHz: 7
				Sounding Dimensions <= 80MHz: 1
				Sounding Dimensions > 80MHz: 1
				Ng = 16 SU Feedback
				Codebook Size SU Feedback
				PPE Threshold Present
				HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
				Max NC: 1
				HE ER SU PPDU 1x HE-LTF 0.8us GI
			HE RX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set <= 80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 160 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE RX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			HE TX MCS and NSS set 80+80 MHz
				1 streams: MCS 0-11
				2 streams: MCS 0-11
				3 streams: not supported
				4 streams: not supported
				5 streams: not supported
				6 streams: not supported
				7 streams: not supported
				8 streams: not supported
			PPE Threshold 0x79 0x1c 0xc7 0x71 0x1c 0xc7 0x71 
		Frequencies:
			* 5180.0 MHz [36] (30.0 dBm)
			* 5200.0 MHz [40] (30.0 dBm)
			* 5220.0 MHz [44] (30.0 dBm)
			* 5240.0 MHz [48] (30.0 dBm)
			* 5260.0 MHz [52] (24.0 dBm) (radar detection)
			* 5280.0 MHz [56] (24.0 dBm) (radar detection)
			* 5300.0 MHz [60] (24.0 dBm) (radar detection)
			* 5320.0 MHz [64] (24.0 dBm) (radar detection)
			* 5500.0 MHz [100] (24.0 dBm) (radar detection)
			* 5520.0 MHz [104] (24.0 dBm) (radar detection)
			* 5540.0 MHz [108] (24.0 dBm) (radar detection)
			* 5560.0 MHz [112] (24.0 dBm) (radar detection)
			* 5580.0 MHz [116] (24.0 dBm) (radar detection)
			* 5600.0 MHz [120] (24.0 dBm) (radar detection)
			* 5620.0 MHz [124] (24.0 dBm) (radar detection)
			* 5640.0 MHz [128] (24.0 dBm) (radar detection)
			* 5660.0 MHz [132] (24.0 dBm) (radar detection)
			* 5680.0 MHz [136] (24.0 dBm) (radar detection)
			* 5700.0 MHz [140] (24.0 dBm) (radar detection)
			* 5720.0 MHz [144] (24.0 dBm) (radar detection)
			* 5745.0 MHz [149] (30.0 dBm)
			* 5765.0 MHz [153] (30.0 dBm)
			* 5785.0 MHz [157] (30.0 dBm)
			* 5805.0 MHz [161] (30.0 dBm)
			* 5825.0 MHz [165] (30.0 dBm)
			* 5845.0 MHz [169] (30.0 dBm)
			* 5865.0 MHz [173] (30.0 dBm)
			* 5885.0 MHz [177] (30.0 dBm)
	valid interface combinations:
		 * #{ managed } <= 1, #{ AP, mesh point } <= 16,
		   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }

	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
		 * max A-MPDU length exponent
		 * min MPDU start spacing
	max # scan plans: 1
	max scan plan interval: -1
	max scan plan iterations: 0
	Maximum associated stations in AP mode: 128
	Supported extended features:
		* [ RRM ]: RRM
		* [ SET_SCAN_DWELL ]: scan dwell setting
		* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
		* [ ACK_SIGNAL_SUPPORT ]: ack signal level support
		* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
		* [ ENABLE_FTM_RESPONDER ]: enable FTM (Fine Time Measurement) responder
		* [ STA_TX_PWR ]: TX power control per station
		* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
		* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
		* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
		* [ BSS_COLOR ]: BSS coloring support
		* [ POWERED_ADDR_CHANGE ]: can change MAC address while up
1 Like

did you add the kmod-hwmon-pwmfan driver to the build/makefile ?

	DEVICE_PACKAGES := \
	ath11k-firmware-qcn6122 \
	ipq-wifi-glinet_gl-x2000 \
	kmod-bluetooth \
	ipq5018-maple-bt-firmware\
    kmod-hwmon-pwmfan

yes, they're in ipq5018-qcn6122.dtsi now

1 Like

It's in my config ...

can you look at the dts ... i remember you mentioning the dac entry .. turned out it was not present in the b3000, but is in the x20000

I recall you mentioning that there is something unique about it, but can't recall what exactly. You also said you'd help me configure it once the pr for the b3000 was merged :stuck_out_tongue:

I need to set lan mac to wan +1 ultimately.

can you try and set it manually ... we may need to write a script for it later.

try something like

echo '125' > /sys/class/hwmon/hwmon<x>/<device_name> 

you may want to look it up, not sure this is the correct format.

ok so i think to set the macs in the dts, we can do this ..@george83 correct me if i am wrong..

// MAC0 -> GE Phy
&dp1 {
	/*
	 * ===============================================================
	 *     _______________________         _______________________
	 *    |        IPQ5018        |       |        QCA8337        |
	 *    | +------+   +--------+ |       | +--------+   +------+ |
	 *    | | MAC0 |---| GE Phy |-+--UTP--+-|  Phy4  |---| MAC5 | |
	 *    | +------+   +--------+ |       | +--------+   +------+ |
	 *    | +------+   +--------+ |       | +--------+   +------+ |
	 *    | | MAC1 |---| Uniphy |-+-SGMII-+-| SerDes |---| MAC0 | |
	 *    | +------+   +--------+ |       | +--------+   +------+ |
	 *    |_______________________|       |_______________________|
	 *
	 * ===============================================================
	 *
	 * Current drivers don't support such topology. So dp1 and ge_phy
	 * are useless. But they can't be disabled due to qca-ssdk use
	 * ge_phy to detect IPQ5018 dummy switch.
	 */
	
	status = "okay";
    nvmem-cells = <&macaddr_dp2 0>;
	nvmem-cell-names = "mac-address";
};

// MAC1 ---SGMII---> QCA8337 SerDes
&dp2 {
	status = "okay";

	phy-mode = "sgmii";
	nvmem-cells = <&macaddr_dp2 1>;
	nvmem-cell-names = "mac-address";
	
	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

leave dp1 and leave it in the alias as well. This should align eth0 and eth1 with oem.

for wifi mac just adjust the offset in 11-ath11k-caldata, accoring to my notes, the offsets should be wifi0 =labelmac+2 and wifi1= lablemac+3

glinet,gl-x2000)
		caldata_extract "0:ART" 0x1000 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 2) 0
		ath11k_set_macflag
		;;

  glinet,gl-x2000))
		caldata_extract "0:ART" 0x26800 0x20000
		ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 3) 0
		ath11k_set_macflag
		;;

Can you dump the bootscript from oem aswell

to get the boot.bin do the following ...

  1. upload an oem image from oem webui but don't install it
  2. from terminal cd to tmp
  3. ls --> there should be a file named boot.bin
  4. scp boot.bin to safety and post the contents,
  5. Afterwards cancel the upgrade.

I am 99% certain its exact same as the b3000. If it is, building and flashing images will be a breeze :slight_smile:

Unfortunately not.
There is no boot.bin after upload .. just firmware.img

$ dumpimage -l firmware.img                                                        
Image contains unit addresses @, this will break signing
FIT description: Flashing nand 800 20000
Created:         Mon Sep 29 10:25:30 2025
 Image 0 (script)
  Description:  flash.scr
  Created:      Mon Sep 29 10:25:30 2025
  Type:         Script
  Compression:  uncompressed
  Data Size:    2403 Bytes = 2.35 KiB = 0.00 MiB
  Hash algo:    crc32
  Hash value:   dd6c4e37
 Image 1 (ubi)
  Description:  gl-x2000-root.img
  Created:      Mon Sep 29 10:25:30 2025
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    78643200 Bytes = 76800.00 KiB = 75.00 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   41c9d6c8
 Image 2 (wifi_fw_ipq5018_qcn6122cs)
  Description:  wifi_fw_ipq5018_qcn6122cs_squashfs.img
  Created:      Mon Sep 29 10:25:30 2025
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    4102144 Bytes = 4006.00 KiB = 3.91 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   3eb69312

Edit: the extracted flash.scr

if test "x$verbose" = "x"; then
    failedmsg='[failed]'
else
    failedmsg='######################################## Failed'
fi

if test -n $soc_hw_version; then
    if test "$soc_hw_version" = "20180100" || test "$soc_hw_version" = "20180101" ; then
        echo 'soc_hw_version : Validation success'
    else
        echo 'soc_hw_version : did not match, aborting upgrade'
        exit 1
    fi
else
    echo 'soc_hw_version : unknown, skipping validation'
fi

if test "$machid" = "8040004" ; then
    echo 'machid : Validation success'
else
    echo 'machid : unknown, aborting upgrade'
    exit 1
fi

if test "x$verbose" = "x"; then
    echo \\c'Flashing ubi:                                          '
    setenv stdout nulldev
else
    echo '######################################## Flashing ubi: Started'
fi

failreason='error: failed on image extraction'
imxtract $imgaddr ubi || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition erase'
nand device 0 && nand erase 0x00a00000 0x07600000 || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition write'
nand write $fileaddr 0x00a00000 0x4b00000 || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
if test "x$verbose" = "x"; then
    setenv stdout serial
    echo '[ done ]'
    setenv stdout nulldev
    setenv stdout serial
else
    echo '######################################## Flashing ubi: Done'
fi

if test "$machid" = "8040004"; then

    if test "x$verbose" = "x"; then
        echo \\c'Flashing wifi_fw_ipq5018_qcn6122cs:                    '
        setenv stdout nulldev
    else
        echo '######################################## Flashing wifi_fw_ipq5018_qcn6122cs: Started'
    fi

    failreason='error: failed on image extraction'
    imxtract $imgaddr wifi_fw_ipq5018_qcn6122cs || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
    setenv mtdids nand0=nand0
    setenv mtdparts mtdparts=nand0:0x7600000@0xa00000(rootfs)
    ubi part rootfs
    ubi write $fileaddr wifi_fw 3e9800
    if test "x$verbose" = "x"; then
        setenv stdout serial
        echo '[ done ]'
        setenv stdout nulldev
        setenv stdout serial
    else
        echo '######################################## Flashing wifi_fw_ipq5018_qcn6122cs: Done'
    fi
fi

exit 0

b3000

nand device 0 && nand erase 0x00800000 0x07800000 || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition write'
nand write $fileaddr 0x00800000 rootfs_size || setenv stdout serial && echo "$failedmsg" && echo 

we'll need a to create a separate bootscript

/target/linux/qualcommax/image/glinet_gl-x2000.bootscript

if test "x$verbose" = "x"; then
    failedmsg='[failed]'
else
    failedmsg='######################################## Failed'
fi

if test -n $soc_hw_version; then
    if test "$soc_hw_version" = "20180100" || test "$soc_hw_version" = "20180101" ; then
        echo 'soc_hw_version : Validation success'
    else
        echo 'soc_hw_version : did not match, aborting upgrade'
        exit 1
    fi
else
    echo 'soc_hw_version : unknown, skipping validation'
fi

if test "$machid" = "8040004" ; then
    echo 'machid : Validation success'
else
    echo 'machid : unknown, aborting upgrade'
    exit 1
fi

if test "x$verbose" = "x"; then
    echo \\c'Flashing ubi:                                          '
    setenv stdout nulldev
else
    echo '######################################## Flashing ubi: Started'
fi

failreason='error: failed on image extraction'
imxtract $imgaddr ubi || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition erase'
nand device 0 && nand erase 0x00a00000 0x07600000 || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition write'
nand write $fileaddr 0x00a00000 rootfs_size || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
if test "x$verbose" = "x"; then
    setenv stdout serial
    echo '[ done ]'
    setenv stdout nulldev
    setenv stdout serial
else
    echo '######################################## Flashing ubi: Done'
fi

exit 0

I will rework the makerecipe to select the correct script and update rootfs_size before adding to it to the image

OK .. so they just hardcoded the second macaddress and attached that to the first one, if i read the oem bootlog correctly

...
U-Boot 2016.01 (24.09.20 - 01:05:06 +0000)
...
eth0 MAC Address from ART is not valid 
...
MAC0 addr:0:11:22:33:44:55
PHY ID1: 0x4d
PHY ID2: 0xd0c0
MAC1 addr:94:83:c4:ab:32:f5
PHY ID1: 0x4d
PHY ID2: 0xd074
board_update_caldata: Unable to find slot-Id, Default CapIn/CapOut values used
eth0, eth1

yes gl uses this method for the macs. Then then create the cfg partition and copy the mac and the other values used in the gl-hw node of the oem dts, to this partition. Then a handful of scripts parse the info needed from cfg partition... We simply just set it in dts and use mac increment in 11-ath11k-caldata for wifi

forgot to ask, do both ports (wan/lan) detect cable connect/reconnects ?

Yes

[  112.954034] nss-dp 39c00000.dp1 eth0: PHY Link is down
[  115.833924] nss-dp 39d00000.dp2 eth1: PHY Link up speed: 1000
[  119.993751] nss-dp 39d00000.dp2 eth1: PHY Link is down
[  122.553908] nss-dp 39c00000.dp1 eth0: PHY Link up speed: 1000

Edit: here from openwrt-snapshot

[   72.725297] nss-dp 39d00000.dp2 eth1: PHY Link up speed: 1000                                                                                                                                             
[   80.154047] nss-dp 39c00000.dp1 eth0: PHY Link up speed: 1000                                                                                                                                             
[   88.473778] nss-dp 39c00000.dp1 eth0: PHY Link is down                                                                                                                                                    
[  187.274156] nss-dp 39c00000.dp1 eth0: PHY Link up speed: 1000   
1 Like

you could have a look at the gl-fan driver and see if you spot anything important we may need to get the fan working properly.

start by checking in ow from cl if the paths exists, i haven't looked at the pwmfan driver yet and i don't have a physical unit so i have no comparison

EDIT really only this one, the rest are just default paths. It may be named slightly different
FAN_SPEED_FILE "/sys/class/fan/fan_speed"

seems i did it right the first time ..

just need to add the bootscript from a couple post above /target/linux/qualcommax/image/glinet_gl-x2000.bootscript and the make recipe would be...

define Device/glinet_gl-x2000
	$(call Device/FitImage)
	DEVICE_VENDOR := GL.iNET
	DEVICE_MODEL := GL-X2000
	NAND_SIZE := 256m
	BLOCKSIZE := 128k
	PAGESIZE := 2048
	SOC := ipq5018
	KERNEL_IN_UBI := 1
	DEVICE_DTS_CONFIG:=config@mp03.5-c1
	SUPPORTED_DEVICES +=x2000
	BOOT_SCRIPT:= glinet_gl-x2000.bootscript
	IMAGES := factory.img sysupgrade.bin
	IMAGE/factory.img := append-ubi | gl-qsdk-factory | append-metadata
	DEVICE_PACKAGES := \
	ath11k-firmware-qcn6122 \
	ipq-wifi-glinet_gl-x2000 \
	kmod-bluetooth \
	ipq5018-maple-bt-firmware \
	kmod-hwmon-pwmfan \
	dumpimage
endef
TARGET_DEVICES += glinet_gl-x2000

then add a case for the device to the 03_set_oem_name script,

#!/bin/sh

. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh

ipq50xx_set_oem_name()
{
	local board="$1"
	case $board in
	glinet,gl-b3000|\
    glinet,gl-x2000)
		oem_name=${board#*-}
		echo "$oem_name"  > "$oem_file"
		;;
	esac
}

oem_file=/tmp/sysinfo/oem_name
board=$(board_name)
ipq50xx_set_oem_name $board

exit 0

this recipe will produce the .img file and the sysupgrade.bin. and after you add the device to set oem name you should be able to flash oem images straight from luci and openwrt images from the oem webui. This makes it nice for flipping back and forth. This recipe also enables uboot recovery using the openwrt image, so you can recover via uboot web recovery, straight to openwrt, without having to revert to oem first, and then upgrade back to openwrt.

You'll need to build the .img and test this functionality. If it checks out then, its just the fan and what ever you decide for the usb to finish before you start a openwrt pr and get the device added. I will help you through it when its time.

let me know that the recipe works as intended.

1 Like

done

you missed the makefile recipe ...

no .. it’s there :wink:

Edit: OK .. the bootscript .. i forgot the rest

1 Like

its not correct , look closer

This makes no sense..

  • 0:ART should be lowercase. It's lowercase in the dts.