blob: b4c70cf11d9e5d1deed51b14e8d1e952f671aeb6 [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 "
8#CFLAGS_append = " -Wno-error -DWIFI_HAL_VERSION_3"
9CFLAGS_append = " -Wno-error"
10
11#work around for wifi restart_flag=false, for meshagent synchroniztaion
12do_configure_prepend() {
13sed -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
14}
15
16DEPENDS_append_dunfell = " avro-c"
17
18SRC_URI_append = " \
19 file://wifiTelemetrySetup.sh \
20 file://checkwifi.sh \
21 file://radio_param_def.cfg \
22 file://synclease.sh \
23 file://handle_mesh-rename-opensync.patch;apply=no \
24 file://avoid_gssidcount_error.patch;apply=no \
25"
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"
34 touch patch_applied
35 fi
36}
developercc441a02022-05-09 19:04:26 +080037addtask filogic_ccspwifiagent_patches after do_unpack before do_configure
developer15a43312022-04-12 11:23:23 +080038
39EXTRA_OECONF_append = " --with-ccsp-arch=arm"
40
41do_install_append(){
42 install -m 777 ${D}/usr/bin/CcspWifiSsp -t ${D}/usr/ccsp/wifi/
43 install -m 755 ${S}/scripts/cosa_start_wifiagent.sh ${D}/usr/ccsp/wifi
44 install -m 777 ${WORKDIR}/wifiTelemetrySetup.sh ${D}/usr/ccsp/wifi/
45 install -m 777 ${WORKDIR}/checkwifi.sh ${D}/usr/ccsp/wifi/
46 install -m 777 ${WORKDIR}/radio_param_def.cfg ${D}/usr/ccsp/wifi/
47 install -m 777 ${WORKDIR}/synclease.sh ${D}/usr/ccsp/wifi/
48}
49
50FILES_${PN} += " \
51 ${prefix}/ccsp/wifi/CcspWifiSsp \
52 ${prefix}/ccsp/wifi/cosa_start_wifiagent.sh \
53 ${prefix}/ccsp/wifi/wifiTelemetrySetup.sh \
54 ${prefix}/ccsp/wifi/checkwifi.sh \
55 ${prefix}/ccsp/wifi/radio_param_def.cfg \
56 ${prefix}/ccsp/wifi/synclease.sh \
57"
58
59LDFLAGS_append_dunfell = " -lpthread"