developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 1 | require ccsp_common_filogic.inc |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 2 | |
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
| 4 | |
| 5 | LDFLAGS += " \ |
| 6 | -lutopiautil \ |
| 7 | " |
developer | c5cba86 | 2022-10-05 15:46:01 +0800 | [diff] [blame] | 8 | CFLAGS_append = " -Wno-error -DWIFI_HAL_VERSION_3 -DCONFIG_DFS" |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 9 | |
| 10 | #work around for wifi restart_flag=false, for meshagent synchroniztaion |
| 11 | do_configure_prepend() { |
| 12 | sed -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 | |
| 15 | DEPENDS_append_dunfell = " avro-c" |
| 16 | |
| 17 | SRC_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 \ |
developer | 8be3e6f | 2022-09-26 19:13:24 +0800 | [diff] [blame] | 24 | file://fix_guardInterval_set_issue.patch;apply=no \ |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 25 | " |
| 26 | |
| 27 | # we need to patch to code for ccsp-wifi-agent |
developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 28 | do_filogic_ccspwifiagent_patches() { |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 29 | 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" |
developer | 8be3e6f | 2022-09-26 19:13:24 +0800 | [diff] [blame] | 34 | patch -p1 < ${WORKDIR}/fix_guardInterval_set_issue.patch ${S}/source/TR-181/sbapi/cosa_wifi_apis.c |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 35 | touch patch_applied |
| 36 | fi |
| 37 | } |
developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 38 | addtask filogic_ccspwifiagent_patches after do_unpack before do_configure |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 39 | |
| 40 | EXTRA_OECONF_append = " --with-ccsp-arch=arm" |
| 41 | |
| 42 | do_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 | |
| 51 | FILES_${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 | |
| 60 | LDFLAGS_append_dunfell = " -lpthread" |