blob: da13fede46d8d8e06fbcacbed7e9faf2af5ba74b [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 "
developerc5cba862022-10-05 15:46:01 +08008CFLAGS_append = " -Wno-error -DWIFI_HAL_VERSION_3 -DCONFIG_DFS"
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 \
developer8be3e6f2022-09-26 19:13:24 +080024 file://fix_guardInterval_set_issue.patch;apply=no \
developer15a43312022-04-12 11:23:23 +080025"
26
27# we need to patch to code for ccsp-wifi-agent
developercc441a02022-05-09 19:04:26 +080028do_filogic_ccspwifiagent_patches() {
developer15a43312022-04-12 11:23:23 +080029 cd ${S}
30 if [ ! -e patch_applied ]; then
31 bbnote "Patching handle_mesh-rename-opensync.patch"
32 patch -p1 < ${WORKDIR}/handle_mesh-rename-opensync.patch ${S}/scripts/handle_mesh
33 patch -p1 < ${WORKDIR}/avoid_gssidcount_error.patch || echo "ERROR or Patch already applied"
developer8be3e6f2022-09-26 19:13:24 +080034 patch -p1 < ${WORKDIR}/fix_guardInterval_set_issue.patch ${S}/source/TR-181/sbapi/cosa_wifi_apis.c
developer15a43312022-04-12 11:23:23 +080035 touch patch_applied
36 fi
37}
developercc441a02022-05-09 19:04:26 +080038addtask filogic_ccspwifiagent_patches after do_unpack before do_configure
developer15a43312022-04-12 11:23:23 +080039
40EXTRA_OECONF_append = " --with-ccsp-arch=arm"
41
42do_install_append(){
43 install -m 777 ${D}/usr/bin/CcspWifiSsp -t ${D}/usr/ccsp/wifi/
44 install -m 755 ${S}/scripts/cosa_start_wifiagent.sh ${D}/usr/ccsp/wifi
45 install -m 777 ${WORKDIR}/wifiTelemetrySetup.sh ${D}/usr/ccsp/wifi/
46 install -m 777 ${WORKDIR}/checkwifi.sh ${D}/usr/ccsp/wifi/
47 install -m 777 ${WORKDIR}/radio_param_def.cfg ${D}/usr/ccsp/wifi/
48 install -m 777 ${WORKDIR}/synclease.sh ${D}/usr/ccsp/wifi/
49}
50
51FILES_${PN} += " \
52 ${prefix}/ccsp/wifi/CcspWifiSsp \
53 ${prefix}/ccsp/wifi/cosa_start_wifiagent.sh \
54 ${prefix}/ccsp/wifi/wifiTelemetrySetup.sh \
55 ${prefix}/ccsp/wifi/checkwifi.sh \
56 ${prefix}/ccsp/wifi/radio_param_def.cfg \
57 ${prefix}/ccsp/wifi/synclease.sh \
58"
59
60LDFLAGS_append_dunfell = " -lpthread"