mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 03:17:48 +00:00
ipq60xx: Add support for HFCL ion4x_3
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
This commit is contained in:
2
.github/workflows/build-dev.yml
vendored
2
.github/workflows/build-dev.yml
vendored
@@ -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
29
feeds/hfcl/hfcl/Makefile
Normal 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))
|
||||
43
feeds/hfcl/hfcl/files/etc/ucentral_check.sh
Normal file
43
feeds/hfcl/hfcl/files/etc/ucentral_check.sh
Normal 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
|
||||
18
feeds/hfcl/hfcl/files/etc/uci-defaults/abc-hfcl-ucentral
Normal file
18
feeds/hfcl/hfcl/files/etc/uci-defaults/abc-hfcl-ucentral
Normal 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
|
||||
@@ -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))
|
||||
|
||||
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4x_3.bin.IPQ6018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4x_3.bin.IPQ6018
Normal file
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
@@ -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
16
profiles/hfcl_ion4x_3.yml
Normal 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
|
||||
Reference in New Issue
Block a user