ipq60xx: Add support for HFCL ion4x_3

Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
This commit is contained in:
esha
2024-05-28 11:50:29 +05:30
committed by John Crispin
parent 5ee55fa1f9
commit ebb2d4df69
13 changed files with 178 additions and 1 deletions

View File

@@ -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

29
feeds/hfcl/hfcl/Makefile Normal file
View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -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))

View File

@@ -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"

View File

@@ -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 ""

View File

@@ -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
;;

View File

@@ -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"

View File

@@ -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";
};
};

View File

@@ -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

16
profiles/hfcl_ion4x_3.yml Normal file
View File

@@ -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