diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index f226e554..b2b6d53c 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap111', 'edgecore_ecw5211', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'sercomm_ap72tip', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ] + target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap111', 'edgecore_ecw5211', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'sercomm_ap72tip', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ] steps: - uses: actions/checkout@v3 diff --git a/feeds/hfcl/hfcl/Makefile b/feeds/hfcl/hfcl/Makefile new file mode 100644 index 00000000..0e9b5388 --- /dev/null +++ b/feeds/hfcl/hfcl/Makefile @@ -0,0 +1,29 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=hfcl +PKG_VERSION:=1.0 +PKG_BUILD_DIR:= $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/hfcl + SECTION:=base + CATEGORY:=Utilities + TITLE:=hfcl +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile/Default + +endef + +Build/Compile = $(Build/Compile/Default) + +define Package/hfcl/install + cp -rf ./files/* $(1) +endef + +$(eval $(call BuildPackage,hfcl)) diff --git a/feeds/hfcl/hfcl/files/etc/ucentral_check.sh b/feeds/hfcl/hfcl/files/etc/ucentral_check.sh new file mode 100644 index 00000000..5292716d --- /dev/null +++ b/feeds/hfcl/hfcl/files/etc/ucentral_check.sh @@ -0,0 +1,43 @@ +#!/bin/sh +echo "Start Websocket check/recovery script" + +ucentral_conn=$(netstat -atulpn | grep -i ucentral | awk '{print $6}') +hostname_AP=$(uci get system.@system[0].hostname) +uc_file_check=$(du /etc/config/ucentral | awk '{print $1}' ) +sleep 20 + +curr_date=$(date) + +if [[ "$uc_file_check" = 0 ]] +then + echo "[[$curr_date]] empty ucentral file found, need to factory reset" + ubi_mount=$(mount | grep ubifs | grep noatime | awk '{print $1}') + if [[ "$ubi_mount" != "/dev/ubi0_3" ]] + then + echo "[[$curr_date]] ubifs not mounted, need to reboot before factory reset, mount was $ubi_mount" + /sbin/reboot + else + /sbin/jffs2reset -y -r + fi +elif [[ "$hostname_AP" = "OpenWrt" ]] +then + echo "[[$curr_date]] hostname set to openwrt, doing ucentral and capabilities load" + /usr/share/ucentral/capabilities.uc + rlink=$(readlink -f /etc/ucentral/ucentral.active) + /usr/share/ucentral/ucentral.uc /etc/ucentral/ucentral.active + rm -rf /etc/ucentral/ucentral.active + ln -s $rlink /etc/ucentral/ucentral.active + sleep 60 + ucentral_check=$(netstat -atulpn | grep -i ucentral | awk '{print $6}') + if [[ "$ucentral_check" != "ESTABLIHED" ]] + then + echo "[[$curr_date]] loading didn't work, need to factory reset" + /sbin/jffs2reset -y -r + fi +elif [[ "$ucentral_conn" != "ESTABLISHED" ]] +then + echo "[[$curr_date]] Ucentral either crashed or stopped, restarting the same" + /etc/init.d/ucentral restart +else + echo "[[$curr_date]] Ucentral working all fine, nothing to do" +fi diff --git a/feeds/hfcl/hfcl/files/etc/uci-defaults/abc-hfcl-ucentral b/feeds/hfcl/hfcl/files/etc/uci-defaults/abc-hfcl-ucentral new file mode 100644 index 00000000..346cb2a2 --- /dev/null +++ b/feeds/hfcl/hfcl/files/etc/uci-defaults/abc-hfcl-ucentral @@ -0,0 +1,18 @@ +#!/bin/sh + +#rm -f /etc/rc.local +#cp -f /etc/loop.local /etc/rc.local + +crontab -r + +/etc/init.d/cron enable + +/etc/init.d/cron start + +sleep 60 + +crontab -l | { cat; echo "*/3 * * * * /bin/sh /etc/ucentral_check.sh >> /tmp/ucentral_check";} | crontab - + +crontab -l | { cat; echo "* */4 * * * rm -rf /tmp/ucentral_check";} | crontab - + +/etc/init.d/cron restart diff --git a/feeds/ipq807x_v5.4/ath11k-wifi/Makefile b/feeds/ipq807x_v5.4/ath11k-wifi/Makefile index 77c42b70..f0a6f947 100644 --- a/feeds/ipq807x_v5.4/ath11k-wifi/Makefile +++ b/feeds/ipq807x_v5.4/ath11k-wifi/Makefile @@ -134,6 +134,11 @@ $(call Package/ath11k-wifi-default) TITLE:=hfcl-ion4xe bdf endef +define Package/ath11k-wifi-hfcl-ion4x_3 +$(call Package/ath11k-wifi-default) + TITLE:=hfcl-ion4x_3 bdf +endef + define Package/ath11k-wifi-hfcl-ion4xi_w $(call Package/ath11k-wifi-default) TITLE:=hfcl-ion4xi_w bdf @@ -311,6 +316,11 @@ define Package/ath11k-wifi-hfcl-ion4xe/install $(INSTALL_DATA) ./board-hfcl-ion4xe.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin endef +define Package/ath11k-wifi-hfcl-ion4x_3/install + $(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/ + $(INSTALL_DATA) ./board-hfcl-ion4x_3.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin +endef + define Package/ath11k-wifi-hfcl-ion4xi_wp/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/ $(INSTALL_DATA) ./board-hfcl-ion4xi_wp.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin @@ -396,6 +406,7 @@ $(eval $(call BuildPackage,ath11k-wifi-optimcloud-d50)) $(eval $(call BuildPackage,ath11k-wifi-optimcloud-d60)) $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi)) $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xe)) +$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4x_3)) $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_wp)) $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_w)) $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4x_w)) diff --git a/feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4x_3.bin.IPQ6018 b/feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4x_3.bin.IPQ6018 new file mode 100644 index 00000000..800c8643 Binary files /dev/null and b/feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4x_3.bin.IPQ6018 differ diff --git a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/01_leds b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/01_leds index 3bdc5ddb..58c6bc7a 100755 --- a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/01_leds +++ b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/01_leds @@ -24,6 +24,7 @@ edgecore,eap101) hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ +hfcl,ion4x_3|\ hfcl,ion4xe) ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt" ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt" diff --git a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/02_network b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/02_network index 718c42d7..a8ab7646 100755 --- a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/02_network +++ b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/board.d/02_network @@ -15,6 +15,7 @@ qcom_setup_interfaces() hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ + hfcl,ion4x_3|\ hfcl,ion4xe) ucidef_set_interface_wan "eth0 eth1" ucidef_set_interface_lan "" diff --git a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/hotplug.d/firmware/10-ath11k-caldata index f7c4a1a6..901a6338 100755 --- a/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/hotplug.d/firmware/10-ath11k-caldata +++ b/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/hotplug.d/firmware/10-ath11k-caldata @@ -64,6 +64,7 @@ case "$FIRMWARE" in hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ + hfcl,ion4x_3|\ hfcl,ion4xe|\ wallys,dr6018|\ wallys,dr6018-v4|\ @@ -86,6 +87,7 @@ ath11k-macs) hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ + hfcl,ion4x_3|\ hfcl,ion4xe) ath11k_generate_macs_ion4x ;; diff --git a/feeds/ipq807x_v5.4/ipq60xx/base-files/lib/upgrade/platform.sh b/feeds/ipq807x_v5.4/ipq60xx/base-files/lib/upgrade/platform.sh index ecf141df..a7ba920e 100755 --- a/feeds/ipq807x_v5.4/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/feeds/ipq807x_v5.4/ipq60xx/base-files/lib/upgrade/platform.sh @@ -78,6 +78,7 @@ platform_check_image() { hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ + hfcl,ion4x_3|\ hfcl,ion4xe|\ yuncore,ax840|\ yuncore,fap650) @@ -106,6 +107,7 @@ platform_do_upgrade() { hfcl,ion4xi|\ hfcl,ion4x|\ hfcl,ion4x_2|\ + hfcl,ion4x_3|\ hfcl,ion4xe) if grep -q rootfs_1 /proc/cmdline; then CI_UBIPART="rootfs" diff --git a/feeds/ipq807x_v5.4/ipq60xx/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4x_3.dts b/feeds/ipq807x_v5.4/ipq60xx/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4x_3.dts new file mode 100644 index 00000000..5a8b9864 --- /dev/null +++ b/feeds/ipq807x_v5.4/ipq60xx/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4x_3.dts @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * IPQ6018 CP01 board device tree source + * + * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. + */ +#include "qcom-ipq6018-hfcl-ion4x.dtsi" + +/ { + model = "HFCL ION4X_3"; + compatible = "hfcl,ion4x_3", "qcom,ipq6018-ap-cp01", "qcom,ipq6018"; +}; + +&tlmm { + leds_pins: leds_pins { + led_5g { + pins = "gpio60"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + + led_2g { + pins = "gpio61"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + }; +}; + +&leds { + led@60 { + label = "blue:wifi5"; + gpios = <&tlmm 60 GPIO_ACTIVE_LOW>; + linux,default-trigger = "led_5g"; + default-state = "off"; + }; + led@61 { + label = "blue:wifi2"; + gpios = <&tlmm 61 GPIO_ACTIVE_LOW>; + linux,default-trigger = "led_2g"; + default-state = "off"; + }; +}; diff --git a/feeds/ipq807x_v5.4/ipq60xx/image/ipq60xx.mk b/feeds/ipq807x_v5.4/ipq60xx/image/ipq60xx.mk index a8a29cca..bd49c703 100644 --- a/feeds/ipq807x_v5.4/ipq60xx/image/ipq60xx.mk +++ b/feeds/ipq807x_v5.4/ipq60xx/image/ipq60xx.mk @@ -38,6 +38,15 @@ define Device/hfcl_ion4x_2 endef TARGET_DEVICES += hfcl_ion4x_2 +define Device/hfcl_ion4x_3 + DEVICE_TITLE := HFCL ION4X_3 + DEVICE_DTS := qcom-ipq6018-hfcl-ion4x_3 + DEVICE_DTS_CONFIG := config@cp01-c1 + SUPPORTED_DEVICES := hfcl,ion4x_3 + DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4x_3 uboot-envtools kmod-hwmon-lm75 +endef +TARGET_DEVICES += hfcl_ion4x_3 + define Device/hfcl_ion4xi DEVICE_TITLE := HFCL ION4Xi DEVICE_DTS := qcom-ipq6018-hfcl-ion4xi diff --git a/profiles/hfcl_ion4x_3.yml b/profiles/hfcl_ion4x_3.yml new file mode 100644 index 00000000..0c55ab7b --- /dev/null +++ b/profiles/hfcl_ion4x_3.yml @@ -0,0 +1,16 @@ +--- +profile: hfcl_ion4x_3 +target: ipq60xx +subtarget: generic +description: Build image for the HFCL ION 4X_3 +image: bin/targets/ipq60xx/generic/openwrt-ipq60xx-hfcl_ion4x_3-squashfs-sysupgrade.tar +feeds: + - name: ipq807x + path: ../../feeds/ipq807x_v5.4 + - name: hfcl + path: ../../feeds/hfcl +packages: + - ipq60xx + - hfcl +include: + - ucentral-ap