diff --git a/recipes-openharmony/openharmony/files/wifi_hal.service b/recipes-openharmony/openharmony/files/wifi_hal.service new file mode 100644 index 0000000000000000000000000000000000000000..c6b5178187a07b5a6ff6c8146fb8c2a0990983a8 --- /dev/null +++ b/recipes-openharmony/openharmony/files/wifi_hal.service @@ -0,0 +1,15 @@ +[Unit] +Description=OpenHarmony Wi-Fi HAL service + +[Service] +Type=exec +User=root +Group=root +SupplementaryGroups=shell +ExecStart=/usr/bin/wifi_hal_service +Restart=on-failure +StartLimitInterval=300 +StartLimitBurst=5 + +[Install] +WantedBy=multi-user.target diff --git a/recipes-openharmony/openharmony/files/wifi_hal.service.license b/recipes-openharmony/openharmony/files/wifi_hal.service.license new file mode 100644 index 0000000000000000000000000000000000000000..98a0b3f4a5b8db268215a128c7d06e0a10897e73 --- /dev/null +++ b/recipes-openharmony/openharmony/files/wifi_hal.service.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 diff --git a/recipes-openharmony/openharmony/files/wifi_standard.service b/recipes-openharmony/openharmony/files/wifi_standard.service new file mode 100644 index 0000000000000000000000000000000000000000..31a9d2f6839618f96edb46eb2da3e3f403bbc022 --- /dev/null +++ b/recipes-openharmony/openharmony/files/wifi_standard.service @@ -0,0 +1,18 @@ +[Unit] +Description=OpenHarmony Wi-Fi manager service (SA: 1125 1126 1127 1128) +Requires=samgr.service +After=samgr.service + +[Service] +Type=notify +ExecStartPre=!install -o root -g root -m 0755 -d /data/dhcp +User=root +Group=root +SupplementaryGroups=shell +ExecStart=/usr/bin/sa_main /system/profile/wifi_manager_service.xml +Restart=on-failure +StartLimitInterval=300 +StartLimitBurst=5 + +[Install] +WantedBy=multi-user.target diff --git a/recipes-openharmony/openharmony/files/wifi_standard.service.license b/recipes-openharmony/openharmony/files/wifi_standard.service.license new file mode 100644 index 0000000000000000000000000000000000000000..98a0b3f4a5b8db268215a128c7d06e0a10897e73 --- /dev/null +++ b/recipes-openharmony/openharmony/files/wifi_standard.service.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index f65fc844282aacfd724df225313f2686cc9ae26d..53728c1756136d90dc4e7547f03568d898ce2975 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -361,6 +361,8 @@ OPENHARMONY_PARTS += "common:common" OPENHARMONY_PARTS += "communication:dsoftbus_standard" OPENHARMONY_PARTS += "communication:ipc" OPENHARMONY_PARTS += "communication:ipc_js" +OPENHARMONY_PARTS += "communication:wifi_standard" +OPENHARMONY_PARTS += "communication:wifi_native_js" OPENHARMONY_PARTS += "developtools:bytrace_standard" OPENHARMONY_PARTS += "developtools:hdc_standard" OPENHARMONY_PARTS += "distributeddatamgr:appdatamgr_jskits" @@ -812,6 +814,40 @@ RDEPENDS:${PN}-dsoftbus-ptest += "musl libcxx" RDEPENDS:${PN}-dsoftbus-ptest += "${PN}-dsoftbus ${PN}-hilog" RDEPENDS:${PN}-ptest += "${PN}-dsoftbus-ptest" +# //foundation/communication/wifi +PACKAGES =+ "${PN}-wifi" +SYSTEMD_PACKAGES += "${PN}-wifi" +SYSTEMD_SERVICE:${PN}-wifi = "wifi_standard.service wifi_hal.service" +SRC_URI += "file://wifi_standard.service file://wifi_hal.service" +do_install:append() { + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/wifi_standard.service ${D}${systemd_unitdir}/system/ + install -m 644 ${WORKDIR}/wifi_hal.service ${D}${systemd_unitdir}/system/ + rm -f ${D}${sysconfdir}/openharmony/init/wifi_standard.cfg + rm -f ${D}${sysconfdir}/openharmony/init/wifi_hal_service.cfg +} +FILES:${PN}-wifi = " \ + ${libdir}/libwifi*${SOLIBS} \ + ${libdir}/libdhcp_manager_service*${SOLIBS} \ + ${bindir}/dhcp_server \ + ${bindir}/dhcp_client_service \ + ${libdir}/openharmony/profile/wifi_manager_service.xml \ + ${bindir}/wifi_hal_service \ +" +RDEPENDS:${PN} += "${PN}-wifi" +RDEPENDS:${PN}-wifi += "musl libcxx" +RDEPENDS:${PN}-wifi += "${PN}-samgr ${PN}-hilog ${PN}-libutils ${PN}-ipc ${PN}-safwk ${PN}-aafwk ${PN}-notification-ces ${PN}-appexecfwk" +RDEPENDS:${PN}-wifi += "${PN}-thirdparty-wpa-supplicant" + +# //foundation/communication/wifi_native_js +PACKAGES =+ "${PN}-wifi-native-js" +FILES:${PN}-wifi-native-js = " \ + ${libdir}/module/libwifi_native_js*${SOLIBS} \ +" +RDEPENDS:${PN} += "${PN}-wifi-native-js" +RDEPENDS:${PN}-wifi-native-js += "musl libcxx ${PN}-wifi" +RDEPENDS:${PN}-wifi-native-js += "${PN}-samgr ${PN}-hilog ${PN}-libutils ${PN}-ipc ${PN}-safwk ${PN}-aafwk ${PN}-notification-ces ${PN}-appexecfwk ${PN}-ace-napi" + # //foundation/distributedschedule/samgr PACKAGES =+ "${PN}-samgr" FILES:${PN}-samgr = " \