diff --git a/common/bundle.json b/common/bundle.json index 5785e17bafaeb0325d48356cf44a18fe19587a19..a415170ff65d0406a98607e91706482f193b28f3 100644 --- a/common/bundle.json +++ b/common/bundle.json @@ -64,7 +64,8 @@ "//device/soc/spreadtrum/common/modem:modem", "//device/soc/spreadtrum/common/telephony/etc:modem.para", "//device/soc/spreadtrum/common/alsa-lib:alsa_lib", - "//device/soc/spreadtrum/common/startup/reboot_loader:rebootloader" + "//device/soc/spreadtrum/common/startup/reboot_loader:rebootloader", + "//device/soc/spreadtrum/common/wpa_supplicant:wpa_supplicant" ], "inner_api": [ ], diff --git a/common/wpa_supplicant/BUILD.gn b/common/wpa_supplicant/BUILD.gn index 419f608f3b1d551aae6121d0166b9a5f7d09d5ac..ff224336ed54af842e582a39dc61e7e156d62c5b 100644 --- a/common/wpa_supplicant/BUILD.gn +++ b/common/wpa_supplicant/BUILD.gn @@ -13,22 +13,20 @@ import("//build/ohos.gni") wpa_supplicant_path="third_party/wpa_supplicant" -action("copy_wpa_supplicant") { - script = "/usr/bin/env" -print("==================================================") - outputs = [ "$target_out_dir/tmp_wpa_supplicant" ] # not use, just for gn complains - - args = [ - "cp", - "-rf", - ] - args += [ rebase_path("wpa_supplicant-2.9_standard/", root_build_dir) ] - args += [ "../../$wpa_supplicant_path" ] -} group("wpa_supplicant") { - deps = [ - ":copy_wpa_supplicant", - ] -} + deps = [ +# ":copy_wpa_supplicant", + ] + print("======================1111111111111111111111111============================") + print(rebase_path("wpa_supplicant-2.9_standard/", root_build_dir)) + + exec_script( + "cp_wpa.sh", + [ + rebase_path("wpa_supplicant-2.9_standard/", root_build_dir), + "../../$wpa_supplicant_path", + + ]) +} \ No newline at end of file diff --git a/common/wpa_supplicant/cp_wpa.sh b/common/wpa_supplicant/cp_wpa.sh new file mode 100644 index 0000000000000000000000000000000000000000..307ce46bc3413ebb67378b202a535964ed025fa9 --- /dev/null +++ b/common/wpa_supplicant/cp_wpa.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Copyright (C) 2023 HiHope Open Source Organization. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e +cp -rf ${1} ${2} + + + +if [ $? -ne 0 ]; then + echo "上一条命令执行失败,即将异常退出脚本" + exit 1 # 使用 exit 命令并传入一个非零值(通常用1表示错误)来异常退出脚本 +fi + +echo "1111111111111111111111aaaaaaaaaaaaaaaaaaaaaa" + diff --git a/patches/build/build_allowlist_wifi.patch b/patches/build/build_allowlist_wifi.patch new file mode 100644 index 0000000000000000000000000000000000000000..8c24345e5a7ddb297c9af523003140dd1b09b4ad --- /dev/null +++ b/patches/build/build_allowlist_wifi.patch @@ -0,0 +1,12 @@ +diff --git a/core/gn/ohos_exec_script_allowlist.gni b/core/gn/ohos_exec_script_allowlist.gni +index 63072b7f..b0fc37ff 100644 +--- a/core/gn/ohos_exec_script_allowlist.gni ++++ b/core/gn/ohos_exec_script_allowlist.gni +@@ -63,6 +63,7 @@ ohos_exec_script_config = { + "//device/board/hihope/dayu210/camera/vdi_impl/v4l2/BUILD.gn", + "//device/board/hihope/rk3568/camera/vdi_impl/v4l2/BUILD.gn", + "//device/board/hardmony/oriole/camera/vdi_impl/v4l2/BUILD.gn", ++ "//device/soc/spreadtrum/common/wpa_supplicant/BUILD.gn", + "//device/board/hisilicon/hispark_aries/liteos_a/BUILD.gn", + "//device/board/hisilicon/hispark_taurus/camera/BUILD.gn", + "//device/board/hisilicon/hispark_taurus/liteos_a/BUILD.gn", diff --git a/patches/third_party/wpa_supplicant/wpa_build_gn.patch b/patches/third_party/wpa_supplicant/wpa_build_gn.patch new file mode 100644 index 0000000000000000000000000000000000000000..e85019d478fb6656748f27e2ec3a36bd04c408ea --- /dev/null +++ b/patches/third_party/wpa_supplicant/wpa_build_gn.patch @@ -0,0 +1,42 @@ +diff --git a/bundle.json b/bundle.json +index 0767b36..5784ab5 100644 +--- a/bundle.json ++++ b/bundle.json +@@ -19,6 +19,7 @@ + "syscap": [], + "features": [ + "wpa_supplicant_vendor_ext", ++ "wpa_supplicant_driver_nl80211_sprd", + "wpa_supplicant_driver_nl80211_hisi", + "wpa_supplicant_driver_nl80211", + "wpa_supplicant_wapi", +diff --git a/wpa_supplicant-2.9_standard/BUILD.gn b/wpa_supplicant-2.9_standard/BUILD.gn +index b574101..d00f5d4 100644 +--- a/wpa_supplicant-2.9_standard/BUILD.gn ++++ b/wpa_supplicant-2.9_standard/BUILD.gn +@@ -24,6 +24,7 @@ import( + declare_args() { + wpa_supplicant_driver_nl80211_hisi = false + wpa_supplicant_driver_nl80211 = false ++ wpa_supplicant_driver_nl80211_sprd = false + wpa_supplicant_ohos_certmgr = true + wpa_supplicant_ohos_eapauth = true + wpa_supplicant_config_hilog = true +@@ -617,6 +618,17 @@ ohos_shared_library("wpa_sys") { + cflags += [ "-DCONFIG_DRIVER_NL80211_HISI_TRUNK" ] + } + } ++ if (wpa_supplicant_driver_nl80211_sprd) { ++ sources += [ "$WPA_ROOT_DIR/wpa_supplicant_lib/driver_nl80211_sprd.c" ] ++ cflags += [ ++ "-DCONFIG_DRIVER_NL80211_SPRD", ++ "-DCONFIG_P2P_160M", ++ ] ++ if (use_musl) { ++ cflags += [ "-DCONFIG_DRIVER_NL80211_SPRD_TRUNK" ] ++ } ++ } ++ + cflags += ext_cflags + + if (wpa_supplicant_ohos_certmgr) {