blob: 04a368fdb840672e8a126c1c49e981ccf9cacef3 [file] [log] [blame]
developercc441a02022-05-09 19:04:26 +08001require ccsp_common_filogic.inc
developer15a43312022-04-12 11:23:23 +08002
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4
5LDFLAGS += " \
6 -lutopiautil \
7 "
developer5baab622022-08-26 10:38:38 +08008CFLAGS_append = " -Wno-error -DWIFI_HAL_VERSION_3"
developer15a43312022-04-12 11:23:23 +08009
10#work around for wifi restart_flag=false, for meshagent synchroniztaion
11do_configure_prepend() {
12sed -i '/wlanRestart == TRUE/!{p;d;};n;a #if defined(ENABLE_FEATURE_MESHWIFI)\n if ((sWiFiDmlSsidStoredCfg[wlanIndex].SSID, sWiFiDmlSsidRunningCfg[wlanIndex].SSID) != 0)\n {\n char arg[256] = {0};\n snprintf(arg, sizeof(arg), "RDK|%d|%s",wlanIndex,sWiFiDmlSsidStoredCfg[wlanIndex].SSID);\n char * const cmd[] = {"/usr/bin/sysevent", "set", "wifi_SSIDName", arg, NULL};\n execvp_wrapper(cmd);\n }\n #endif\n' ${S}/source/TR-181/sbapi/cosa_wifi_apis.c
13}
14
15DEPENDS_append_dunfell = " avro-c"
16
17SRC_URI_append = " \
18 file://wifiTelemetrySetup.sh \
19 file://checkwifi.sh \
20 file://radio_param_def.cfg \
21 file://synclease.sh \
22 file://handle_mesh-rename-opensync.patch;apply=no \
23 file://avoid_gssidcount_error.patch;apply=no \
24"
25
26# we need to patch to code for ccsp-wifi-agent
developercc441a02022-05-09 19:04:26 +080027do_filogic_ccspwifiagent_patches() {
developer15a43312022-04-12 11:23:23 +080028 cd ${S}
29 if [ ! -e patch_applied ]; then
30 bbnote "Patching handle_mesh-rename-opensync.patch"
31 patch -p1 < ${WORKDIR}/handle_mesh-rename-opensync.patch ${S}/scripts/handle_mesh
32 patch -p1 < ${WORKDIR}/avoid_gssidcount_error.patch || echo "ERROR or Patch already applied"
33 touch patch_applied
34 fi
35}
developercc441a02022-05-09 19:04:26 +080036addtask filogic_ccspwifiagent_patches after do_unpack before do_configure
developer15a43312022-04-12 11:23:23 +080037
38EXTRA_OECONF_append = " --with-ccsp-arch=arm"
39
40do_install_append(){
41 install -m 777 ${D}/usr/bin/CcspWifiSsp -t ${D}/usr/ccsp/wifi/
42 install -m 755 ${S}/scripts/cosa_start_wifiagent.sh ${D}/usr/ccsp/wifi
43 install -m 777 ${WORKDIR}/wifiTelemetrySetup.sh ${D}/usr/ccsp/wifi/
44 install -m 777 ${WORKDIR}/checkwifi.sh ${D}/usr/ccsp/wifi/
45 install -m 777 ${WORKDIR}/radio_param_def.cfg ${D}/usr/ccsp/wifi/
46 install -m 777 ${WORKDIR}/synclease.sh ${D}/usr/ccsp/wifi/
47}
48
49FILES_${PN} += " \
50 ${prefix}/ccsp/wifi/CcspWifiSsp \
51 ${prefix}/ccsp/wifi/cosa_start_wifiagent.sh \
52 ${prefix}/ccsp/wifi/wifiTelemetrySetup.sh \
53 ${prefix}/ccsp/wifi/checkwifi.sh \
54 ${prefix}/ccsp/wifi/radio_param_def.cfg \
55 ${prefix}/ccsp/wifi/synclease.sh \
56"
57
58LDFLAGS_append_dunfell = " -lpthread"