Skip to content

Commit c70d17a

Browse files
authored
Merge branch 'develop' into 1056_6g_dml_mapping
2 parents 0700f11 + c9c6160 commit c70d17a

File tree

4 files changed

+112
-9
lines changed

4 files changed

+112
-9
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
include ccsp_common_bananapi.inc
2+
SRC_URI:remove = "file://filogic-factoryReset.patch"
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
SOURCE:RDKM
2+
--- ./hostapd-init-EHT.sh 2025-10-22 11:15:20.021034563 +0100
3+
+++ ./hostapd-init-EHT.sh 2025-10-22 13:30:43.085766313 +0100
4+
@@ -157,7 +157,11 @@
5+
iw wlan$phyidx del > /dev/null
6+
elif [ -e /sys/class/net/wifi$phyidx ]; then
7+
for((i=0;i<$vap_per_radio;i++)); do
8+
- ifidx=$(($phyidx+$i*$radio_num))
9+
+ if [ $phyidx -lt 2 ]; then
10+
+ ifidx=$(($phyidx+($i*2)))
11+
+ elif [ $phyidx -eq 2 ]; then
12+
+ ifidx=$(($i+16))
13+
+ fi
14+
ifname="$(cat /nvram/hostapd"$ifidx".conf | grep ^interface= | cut -d '=' -f2 | tr -d '\n')"
15+
if [ -n $ifname ]; then
16+
hostapd_cli -i global raw REMOVE wifi$ifidx > /dev/null
17+
@@ -173,14 +177,24 @@
18+
continue
19+
fi
20+
21+
- if [ ! -f /nvram/hostapd"$devidx".conf ]; then
22+
- touch /nvram/hostapd"$devidx".conf
23+
+ if [ $devidx -eq 2 ]; then
24+
+ real_idx=16
25+
+ else
26+
+ real_idx=$devidx
27+
+ fi
28+
+
29+
+ if [ ! -f /nvram/hostapd"$real_idx".conf ]; then
30+
+ touch /nvram/hostapd"$real_idx".conf
31+
else
32+
for((i=0;i<$vap_per_radio;i++)); do
33+
- ifidx=$(($phyidx+$i*$radio_num))
34+
+ if [ $phyidx -lt 2 ]; then
35+
+ ifidx=$(($phyidx+($i*2)))
36+
+ elif [ $phyidx -eq 2 ]; then
37+
+ ifidx=$(($i+16))
38+
+ fi
39+
ifname="$(cat /nvram/hostapd"$ifidx".conf | grep ^interface= | cut -d '=' -f2 | tr -d '\n')"
40+
- vapstat="$(cat /nvram/vap-status | grep wifi"$ifidx"= | cut -d'=' -f2)"
41+
- if [ -n $ifname ] && [[ $vapstat -eq "1" ]]; then
42+
+ vapstat="$(cat /nvram/vap-status | grep wifi"$ifidx"= | cut -d'=' -f2 | head -n 1)"
43+
+ if [ -n "$ifname" ] && [ "$vapstat" == "1" ]; then
44+
if [ $i = 0 ]; then
45+
## first interface in this phy
46+
iw phy phy0 interface add $ifname type __ap radios $radio_idx > /dev/null
47+
@@ -188,9 +202,7 @@
48+
touch /nvram/hostapd-acl$ifidx
49+
touch /nvram/hostapd$ifidx.psk
50+
touch /nvram/hostapd-deny$ifidx
51+
- if [ $phyidx = $ifidx ]; then
52+
- touch /tmp/phy0-wifi$ifidx
53+
- fi
54+
+ touch /tmp/phy0-wifi$ifidx
55+
hostapd_cli -i global raw ADD bss_config=phy0.$radio_idx:/nvram/hostapd"$ifidx".conf
56+
fi
57+
done
58+
@@ -213,28 +213,28 @@
59+
60+
61+
if [ "$band" == "2g" ]; then
62+
- cp -f /etc/hostapd-2G.conf /nvram/hostapd"$devidx".conf
63+
+ cp -f /etc/hostapd-2G.conf /nvram/hostapd"$real_idx".conf
64+
fi
65+
66+
if [ "$band" == "5g" ]; then
67+
gen_vht_cap
68+
- cp -f /etc/hostapd-5G.conf /nvram/hostapd"$devidx".conf
69+
+ cp -f /etc/hostapd-5G.conf /nvram/hostapd"$real_idx".conf
70+
fi
71+
72+
if [ "$band" == "6g" ]; then
73+
gen_he_6ghz_reg_pwr_type /etc/hostapd-6G.conf
74+
- cp -f /etc/hostapd-6G.conf /nvram/hostapd"$devidx".conf
75+
+ cp -f /etc/hostapd-6G.conf /nvram/hostapd"$real_idx".conf
76+
fi
77+
78+
- sed -i "/^interface=.*/c\interface=wifi$devidx" /nvram/hostapd"$devidx".conf
79+
- sed -i "/^bssid=/c\bssid=$MAC" /nvram/hostapd"$devidx".conf
80+
- echo "wpa_psk_file=/nvram/hostapd$devidx.psk" >> /nvram/hostapd"$devidx".conf
81+
- iw phy phy0 interface add wifi$devidx type __ap radios $radio_idx > /dev/null
82+
- touch /nvram/hostapd-acl$devidx
83+
- touch /nvram/hostapd$devidx.psk
84+
- touch /nvram/hostapd-deny$devidx
85+
- touch /tmp/phy0-wifi$devidx
86+
- hostapd_cli -i global raw ADD bss_config=phy0.$radio_idx:/nvram/hostapd"$devidx".conf && echo -e "wifi"$devidx"=1" >> /nvram/vap-status
87+
+ sed -i "/^interface=.*/c\interface=wifi$real_idx" /nvram/hostapd"$real_idx".conf
88+
+ sed -i "/^bssid=/c\bssid=$MAC" /nvram/hostapd"$real_idx".conf
89+
+ echo "wpa_psk_file=/nvram/hostapd$real_idx.psk" >> /nvram/hostapd"$real_idx".conf
90+
+ iw phy phy0 interface add wifi$real_idx type __ap radios $radio_idx > /dev/null
91+
+ touch /nvram/hostapd-acl$real_idx
92+
+ touch /nvram/hostapd$real_idx.psk
93+
+ touch /nvram/hostapd-deny$real_idx
94+
+ touch /tmp/phy0-wifi$real_idx
95+
+ hostapd_cli -i global raw ADD bss_config=phy0.$radio_idx:/nvram/hostapd"$real_idx".conf && echo -e "wifi"$real_idx"=1" >> /nvram/vap-status
96+
devidx=$(($devidx + 1))
97+
phyidx=$(($phyidx + 1))
98+

meta-rdk-mtk-bpir4/recipes-wifi/hostapd/hostapd_2.11.bbappend

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ SRC_URI += " \
44
file://hostapd-2G.conf \
55
file://hostapd-5G.conf \
66
file://hostapd-6G.conf \
7+
file://hostapd-init-EHT.patch;apply=no \
78
"
89

10+
do_bpi_hostapd_patch(){
11+
if [ ! -f ${S}/hostapd-init-EHT.sh ]; then
12+
cp ${WORKDIR}/hostapd-init-EHT.sh ${S}
13+
cp ${WORKDIR}/hostapd-init-EHT.patch ${S}
14+
patch -p1 ${S}/hostapd-init-EHT.sh < ${S}/hostapd-init-EHT.patch
15+
fi
16+
}
17+
addtask bpi_hostapd_patch after do_patch before do_compile
18+
919
do_install_append() {
1020
install -m 755 ${WORKDIR}/hostapd-2G.conf ${D}${sysconfdir}/hostapd-2G.conf
1121
install -m 755 ${WORKDIR}/hostapd-5G.conf ${D}${sysconfdir}/hostapd-5G.conf
1222
install -m 755 ${WORKDIR}/hostapd-6G.conf ${D}${sysconfdir}/hostapd-6G.conf
23+
install -m 755 ${S}/hostapd-init-EHT.sh ${D}${base_libdir}/rdk/hostapd-init.sh
1324
}

setup-environment-refboard-rdkb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,8 @@ else # SD card image is default
123123
echo "Both bl2 and fip binaries are present in local workspace."
124124
else
125125
echo "**********************************************************************"
126-
echo "> CAUTION: YOU ARE TRYING TO BUILD SD CARD IMAGE WITHOUT BL2 AND FIP BINARIES."
127-
if [ "X$KERNEL_TYPE" == "Xkernel6-6" ]; then
128-
echo "> Please download the binaries from https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2025.01/bpi-r4_sdmmc_bl2.img and https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2025.01/bpi-r4_sdmmc_fip.bin"
129-
else
130-
echo "> Please download the binaries from https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_bl2.img and https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_fip.bin"
131-
fi
132-
echo "> If you don't have access to above resources, please follow instruction in https://wiki.rdkcentral.com/pages/viewpage.action?pageId=354648448#SDMonoliticimagebuildandflashingstepsforBPIR4.-Buildingbl2.imgandfip.binincaseofnothavingaccesstoartifactoryrepository to build bl2 and fip binaries yourselves."
133-
echo "> Place those binaries under ${_TOPDIR}/downloads/"
134-
echo "> EXITING NOW."
126+
echo "> Missing files are preventing the build from starting:"
127+
echo "> The BL2 and FIP binaries aren't in the downloads directory. Copy these binaries into the directory and then restart the build. You can find instructions for creating the necessary binaries on the RDK-B Code Releases page: (https://wiki.rdkcentral.com/display/CMF/RDK-B+Code+Releases)"
135128
echo "**********************************************************************"
136129
return 1
137130
fi

0 commit comments

Comments
 (0)