Skip to content

Commit

Permalink
Merge pull request #640 from Telecominfraproject/main
Browse files Browse the repository at this point in the history
Merge main for RC1 of 3.0.2 patch release
  • Loading branch information
jaspreetsachdev committed Mar 21, 2024
2 parents 14aa04a + 0412bf0 commit f0035a9
Show file tree
Hide file tree
Showing 1,360 changed files with 176,753 additions and 58,897 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf660a', 'cybertan_eww622-a1', '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', 'edgecore_oap102', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', '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', 'cig_wf660a', 'cybertan_eww622-a1', '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', 'edgecore_oap102', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', '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
Expand Down
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2024, Telecom Infra Project

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions feeds/ipq40xx/ipq40xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ platform_do_upgrade() {
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | cut -d " " -f 1)"
case "$part" in
rootfs1)
fw_setenv active 2 || exit 1
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
;;
rootfs2)
fw_setenv active 1 || exit 1
CI_UBIPART="rootfs1"
CI_FWSETENV="active 1"
;;
*)
# legacy bootloader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
optimcloud,d60|\
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
optimcloud,d50-5g|\
qcom,ipq5018-mp03.1)
caldata_extract "0:ART" 0x1000 0x20000
;;
Expand Down Expand Up @@ -298,7 +298,7 @@ ath11k-macs)
optimcloud,d60|\
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
optimcloud,d50-5g|\
cig,wf188n)
ath11k_generate_macs
;;
Expand Down
3 changes: 2 additions & 1 deletion feeds/ipq807x/ipq807x/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ boot() {
;;
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102)
edgecore,oap102|\
edgecore.eap104)
avail=$(fw_printenv -n upgrade_available)
[ "${avail}" -eq 1 ] || fw_setenv upgrade_available 1
fw_setenv bootcount 0
Expand Down
2 changes: 1 addition & 1 deletion feeds/ipq807x/ipq807x/base-files/lib/upgrade/nand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ nand_do_upgrade_success() {
local conf_tar="/tmp/sysupgrade.tgz"
sync
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
umount -a
reboot -f
Expand Down
19 changes: 15 additions & 4 deletions feeds/ipq807x/ipq807x/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ platform_do_upgrade() {
cig,wf194c4|\
cig,wf196|\
cybertan,eww622-a1|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
glinet,ax1800|\
glinet,axt1800|\
indio,um-310ax-v1|\
Expand Down Expand Up @@ -262,8 +260,8 @@ platform_do_upgrade() {
else
if [ -e /tmp/downgrade ]; then
CI_UBIPART="rootfs1"
fw_setenv active 1 || exit 1
fw_setenv upgrade_available 0 || exit 1
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
CI_FWSETENV="-s /tmp/fw_setenv.txt"
elif grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
Expand All @@ -289,5 +287,18 @@ platform_do_upgrade() {
}
nand_upgrade_tar "$1"
;;
cybertan,eww631-a1|\
cybertan,eww631-b1)
boot_part=$(fw_printenv bootfrom | cut -d = -f2)
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="bootfrom 0"
else
CI_UBIPART="rootfs_1"
CI_FWSETENV="bootfrom 1"
fi
nand_upgrade_tar "$1"
;;
esac
}
60 changes: 19 additions & 41 deletions feeds/ipq807x_v5.4/ath11k-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ ALLWIFIBOARDS:= \
cig-wf660a \
cig-wf194c \
cig-wf194c4 \
cig-wf196-ca \
cig-wf196-us \
cybertan-eww622-a1 \
cybertan-eww631-a1 \
cybertan-eww631-b1 \
edgecore-eap101 \
gl-ax1800 \
gl-axt1800 \
Expand Down Expand Up @@ -89,14 +89,9 @@ $(call Package/ath11k-wifi-default)
TITLE:=board-2.bin for QCOM IPQ6122 eval kits
endef

define Package/ath11k-wifi-cig-wf196_6g-ca
define Package/ath11k-wifi-cig-wf196
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf196 6G bdf CA
endef

define Package/ath11k-wifi-cig-wf196_6g-us
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf196 6G bdf US
TITLE:=cig-wf196 bdf
endef

define Package/ath11k-wifi-gl-ax1800
Expand Down Expand Up @@ -175,14 +170,9 @@ $(call Package/ath11k-wifi-default)
TITLE:=edgecore-oap101e bdf
endef

define Package/ath11k-wifi-cig-wf188n-ca
define Package/ath11k-wifi-cig-wf188n
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf188n bdf CA
endef

define Package/ath11k-wifi-cig-wf188n-us
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf188n bdf US
TITLE:=cig-wf188n bdf
endef

define ath11k-wifi-install-one-to
Expand Down Expand Up @@ -262,16 +252,12 @@ define Package/ath11k-wifi-qcom-qcn9000/install
$(INSTALL_DATA) ./board-2.bin.QCN9000 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin
endef

define Package/ath11k-wifi-cig-wf196_6g-ca/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
$(INSTALL_DATA) ./board-cig-wf196_6g-ca.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
echo -n 'CA' > $(1)/lib/firmware/country
endef

define Package/ath11k-wifi-cig-wf196_6g-us/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
$(INSTALL_DATA) ./board-cig-wf196_6g-us.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
echo -n 'US' > $(1)/lib/firmware/country
define Package/ath11k-wifi-cig-wf196/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/ $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/
$(INSTALL_DATA) ./board-cig-wf196_6g-ca.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin.CA
$(INSTALL_DATA) ./board-cig-wf196_6g-us.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin.US
$(INSTALL_DATA) ./board-cig-wf196-ca.bin.IPQ8074 $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.CA
$(INSTALL_DATA) ./board-cig-wf196-us.bin.IPQ8074 $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.US
endef

define Package/ath11k-wifi-optimcloud-d50/install
Expand Down Expand Up @@ -365,26 +351,20 @@ define Package/ath11k-wifi-edgecore-oap101e/install
$(INSTALL_DATA) ./board-2-edgecore-oap101e.bin.QCN6122 $(1)/lib/firmware/ath11k/qcn6122/hw1.0/board-2.bin
endef

define Package/ath11k-wifi-cig-wf188n-ca/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
echo -n 'CA MY DE' > $(1)/lib/firmware/country
endef

define Package/ath11k-wifi-cig-wf188n-us/install
define Package/ath11k-wifi-cig-wf188n/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
echo -n 'US MY DE' > $(1)/lib/firmware/country
$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.CA
$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.US
endef

$(eval $(call generate-ath11k-wifi-package,cig-wf186w,Cigtech WF186w))
$(eval $(call generate-ath11k-wifi-package,cig-wf186h,Cigtech WF186h))
$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
$(eval $(call generate-ath11k-wifi-package,cig-wf196-ca,Cigtech WF196 CA))
$(eval $(call generate-ath11k-wifi-package,cig-wf196-us,Cigtech WF196 US))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww622-a1,CyberTan EWW622 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-a1,CyberTan EWW631 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-b1,CyberTan EWW631 B1))
$(eval $(call generate-ath11k-wifi-package,sercomm-wallaby,Sercomm Kiwi))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018,Wallys DR6018))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018-v4,Wallys DR6018 V4))
Expand All @@ -410,8 +390,7 @@ $(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6122))
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq8074))
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6018))
$(eval $(call BuildPackage,ath11k-wifi-qcom-qcn9000))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-ca))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196))
$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
$(eval $(call BuildPackage,ath11k-wifi-optimcloud-d50))
$(eval $(call BuildPackage,ath11k-wifi-optimcloud-d60))
Expand All @@ -423,5 +402,4 @@ $(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4x_w))
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_HMR))
$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101))
$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101e))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-ca))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-us))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions feeds/ipq807x_v5.4/ipq50xx/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ qcom_setup_interfaces()
cig,wf186h)
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6@eth0"
;;
cybertan,eww631-a1)
ucidef_set_interface_wan "eth0"
ucidef_set_interface_lan ""
;;
cybertan,eww631-b1)
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6@eth0"
;;
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
Expand Down Expand Up @@ -63,6 +70,18 @@ qcom_setup_macs()
ucidef_set_network_device_mac eth0 $wan_mac
ip link set eth0 address $wan_mac
;;
cybertan,eww631-a1|\
cybertan,eww631-b1)
mtd=$(find_mtd_chardev "0:APPSBLENV")
[ -z "$mtd" ] && return;
mac=$(grep BaseMacAddress= $mtd | cut -d '=' -f2)
[ -z "$mac" ] && return;
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $wan_mac
ip link set eth0 address $wan_mac
ucidef_set_label_macaddr $wan_mac
;;
*)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$wan_mac" 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@ ath11k_generate_macs_ion4x() {
echo -ne \\x${wifimac2//:/\\x} >> /lib/firmware/ath11k-macs
}

ath11k_generate_macs_eww631_a1() {
touch /lib/firmware/ath11k-macs
local dev=$(find_mtd_chardev "0:APPSBLENV")
mac=$(grep BaseMacAddress= $dev | cut -d '=' -f2)
eth=$(macaddr_canonicalize $mac)
mac1=$(macaddr_add $eth 1)
mac2=$(macaddr_add $eth 2)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
}

ath11k_generate_macs_eww631_b1() {
touch /lib/firmware/ath11k-macs
local dev=$(find_mtd_chardev "0:APPSBLENV")
mac=$(grep BaseMacAddress= $dev | cut -d '=' -f2)
eth=$(macaddr_canonicalize $mac)
mac1=$(macaddr_add $eth 2)
mac2=$(macaddr_add $eth 3)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
}

caldata_die() {
echo "caldata: " "$*"
exit 1
Expand All @@ -64,6 +86,8 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
case "$board" in
cig,wf186w|\
cig,wf186h|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
edgecore,eap104|\
edgecore,oap101|\
edgecore,oap101-6e|\
Expand All @@ -84,6 +108,8 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
case "$board" in
cig,wf186w|\
cig,wf186h|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
Expand All @@ -101,6 +127,10 @@ ath11k/qcn6122/hw1.0/caldata_2.bin)
edgecore,oap101e-6e)
caldata_extract "0:ART" 0x4c000 0x20000
;;
cybertan,eww631-a1|\
cybertan,eww631-b1)
caldata_extract "0:ART" 0x26800 0x20000
;;
esac
;;
ath11k/QCN9074/hw1.0/caldata_1.bin)
Expand All @@ -119,6 +149,12 @@ ath11k-macs)
cig,wf186h)
ath11k_generate_macs_wf186w
;;
cybertan,eww631-a1)
ath11k_generate_macs_eww631_a1
;;
cybertan,eww631-b1)
ath11k_generate_macs_eww631_b1
;;
edgecore,eap104|\
optimcloud,d60|\
optimcloud,d60-5g|\
Expand Down
2 changes: 1 addition & 1 deletion feeds/ipq807x_v5.4/ipq50xx/base-files/lib/upgrade/nand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ nand_do_upgrade_success() {
local conf_tar="/tmp/sysupgrade.tgz"
sync
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
umount -a
reboot -f
Expand Down
15 changes: 15 additions & 0 deletions feeds/ipq807x_v5.4/ipq50xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ platform_check_image() {
case $board in
cig,wf186w|\
cig,wf186h|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
edgecore,eap104|\
hfcl,ion4x_w|\
hfcl,ion4xi_w|\
Expand Down Expand Up @@ -130,5 +132,18 @@ platform_do_upgrade() {
}
nand_upgrade_tar "$1"
;;
cybertan,eww631-a1|\
cybertan,eww631-b1)
boot_part=$(fw_printenv bootfrom | cut -d = -f2)
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="bootfrom 0"
else
CI_UBIPART="rootfs_1"
CI_FWSETENV="bootfrom 1"
fi
nand_upgrade_tar "$1"
;;
esac
}
Loading

0 comments on commit f0035a9

Please sign in to comment.