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/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch index 056b353038beb21fa784ddfe3c05084d2e697faa..29a9f3cab2fa56f4c6ec71f7449b28901f864d1d 100644 --- a/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch @@ -11,7 +11,7 @@ diff --git a/uhdf2/ohos.build b/uhdf2/ohos.build index f56e333..38db541 100644 --- a/uhdf2/ohos.build +++ b/uhdf2/ohos.build -@@ -6,43 +6,17 @@ +@@ -6,43 +6,25 @@ "//drivers/adapter/uhdf2/osal:libhdf_utils", "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", "//drivers/adapter/uhdf2/hdi:libhdi", @@ -61,6 +61,14 @@ index f56e333..38db541 100644 + "module_list": [ + "//drivers/peripheral/display/hal:hdi_display", + "//device/hihope/hardware/display:display_gralloc" ++ ] ++ }, ++ "wlan_device_driver": { ++ "module_list": [ ++ "//drivers/peripheral/wlan/client:wifi_driver_client", ++ "//drivers/peripheral/wlan/hal:wifi_hal", ++ "//drivers/peripheral/wlan/hdi_service:wifi_hdi_device", ++ "//drivers/peripheral/wlan/hdi_service:wifi_hdi_c_device" ] } } diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 129d7711e0bc150a4afb3b7742f25cea30347b5e..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" @@ -376,6 +378,7 @@ OPENHARMONY_PARTS += "global:resmgr_standard" OPENHARMONY_PARTS += "graphic:graphic_standard" OPENHARMONY_PARTS += "hdf:hdf" OPENHARMONY_PARTS += "hdf:display_device_driver" +OPENHARMONY_PARTS += "hdf:wlan_device_driver" OPENHARMONY_PARTS += "hiviewdfx:faultloggerd" OPENHARMONY_PARTS += "hiviewdfx:hilog" OPENHARMONY_PARTS += "hiviewdfx:hilog_native" @@ -409,6 +412,7 @@ OPENHARMONY_PARTS += "startup:startup_l2" OPENHARMONY_PARTS += "telephony:core_service" OPENHARMONY_PARTS += "telephony:ril_adapter" OPENHARMONY_PARTS += "utils:utils_base" +OPENHARMONY_PARTS += "wpa_supplicant-2.9:wpa_supplicant-2.9" OPENHARMONY_PARTS += "${@bb.utils.contains('DISTRO_FEATURES', 'acts', 'xts:phone_tests', '', d)}" export XTS_SUITENAME = "${@bb.utils.contains('DISTRO_FEATURES', 'acts', 'acts', '', d)}" @@ -810,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 = " \ @@ -1187,6 +1225,24 @@ RDEPENDS:${PN}-peripheral-input += "musl libcxx" RDEPENDS:${PN}-peripheral-input += "${PN}-hilog ${PN}-libutils ${PN}-uhdf2" RDEPENDS:${PN} += "${PN}-peripheral-input" +# //drivers/peripheral/wlan +PACKAGES =+ "${PN}-peripheral-wlan" +do_install:append() { + install -m 644 ${B}/hdf/hdf/libwifi_driver_client.z.so ${D}${libdir}/ + install -m 644 ${B}/hdf/hdf/libwifi_hal.z.so ${D}${libdir}/ + install -m 644 ${B}/hdf/hdf/libwifi_hdi_c_device.z.so ${D}${libdir}/ + install -m 644 ${B}/hdf/hdf/libwifi_hdi_device.z.so ${D}${libdir}/ +} +FILES:${PN}-peripheral-wlan = " \ + ${libdir}/libwifi_driver_client*${SOLIBS} \ + ${libdir}/libwifi_hal*${SOLIBS} \ + ${libdir}/libwifi_hdi_c_device*${SOLIBS} \ + ${libdir}/libwifi_hdi_device*${SOLIBS} \ +" +RDEPENDS:${PN}-peripheral-wlan += "musl libcxx" +RDEPENDS:${PN}-peripheral-wlan += "${PN}-hilog ${PN}-libutils ${PN}-uhdf2 ${PN}-ipc" +RDEPENDS:${PN} += "${PN}-peripheral-wlan" + # //base/miscservices/time PACKAGES =+ "${PN}-timeservice" SYSTEMD_PACKAGES += "${PN}-timeservice" @@ -2042,6 +2098,17 @@ RDEPENDS:${PN}-thirdparty-weston += "${PN}-hilog ${PN}-libutils ${PN}-thirdparty RDEPENDS:${PN}-thirdparty-weston += "${PN}-thirdparty-libinput ${PN}-thirdparty-libevdev ${PN}-thirdparty-eudev ${PN}-thirdparty-pixman ${PN}-display-gralloc" RDEPENDS:${PN} += "${PN}-thirdparty-weston" +PACKAGES =+ "${PN}-thirdparty-wpa-supplicant" +FILES:${PN}-thirdparty-wpa-supplicant = " \ + ${bindir}/hostapd \ + ${bindir}/wpa_cli \ + ${bindir}/wpa_supplicant \ + ${libdir}/libwpa*${SOLIBS} \ +" +RDEPENDS:${PN}-thirdparty-wpa-supplicant += "musl libcxx" +RDEPENDS:${PN}-thirdparty-wpa-supplicant += "${PN}-peripheral-wlan" +RDEPENDS:${PN} += "${PN}-thirdparty-wpa-supplicant" + # Disable all ptest suites that are know to not work for now. When the x-bit is # not set, the ptest is visible (using `ptest-runner -l`), but no test cases # will be run when executing it.