11bd4fe43Sopenharmony_ci# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
21bd4fe43Sopenharmony_ci#
31bd4fe43Sopenharmony_ci# This program is free software; you can redistribute it and/or
41bd4fe43Sopenharmony_ci# modify it under the terms of the GNU General Public License
51bd4fe43Sopenharmony_ci# as published by the Free Software Foundation; either version 2
61bd4fe43Sopenharmony_ci# of the License, or (at your option) any later version.
71bd4fe43Sopenharmony_ci#
81bd4fe43Sopenharmony_ci# This program is distributed in the hope that it will be useful,
91bd4fe43Sopenharmony_ci# but WITHOUT ANY WARRANTY; without even the implied warranty of
101bd4fe43Sopenharmony_ci# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
111bd4fe43Sopenharmony_ci# GNU General Public License for more details.
121bd4fe43Sopenharmony_ci#
131bd4fe43Sopenharmony_ci# You should have received a copy of the GNU General Public License
141bd4fe43Sopenharmony_ci# along with this program; if not, write to the Free Software
151bd4fe43Sopenharmony_ci# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
161bd4fe43Sopenharmony_ci
171bd4fe43Sopenharmony_ciif (defined(ohos_lite)) {
181bd4fe43Sopenharmony_ci  import("//build/lite/config/component/lite_component.gni")
191bd4fe43Sopenharmony_ci} else {
201bd4fe43Sopenharmony_ci  import("//build/ohos.gni")
211bd4fe43Sopenharmony_ci}
221bd4fe43Sopenharmony_ci
231bd4fe43Sopenharmony_ciif (defined(ohos_lite)) {
241bd4fe43Sopenharmony_ci  copy("wifi_firmware") {
251bd4fe43Sopenharmony_ci    sources = [ "../firmware" ]
261bd4fe43Sopenharmony_ci    outputs = [ "$root_out_dir/vendor/firmware/hi3881" ]
271bd4fe43Sopenharmony_ci  }
281bd4fe43Sopenharmony_ci} else {
291bd4fe43Sopenharmony_ci  ohos_prebuilt_etc("wifi_cfg") {
301bd4fe43Sopenharmony_ci    source = "wifi_cfg"
311bd4fe43Sopenharmony_ci    module_install_dir = "firmware/hi3881"
321bd4fe43Sopenharmony_ci    install_images = [ chipset_base_dir ]
331bd4fe43Sopenharmony_ci    part_name = "hisilicon_products"
341bd4fe43Sopenharmony_ci  }
351bd4fe43Sopenharmony_ci  ohos_prebuilt_etc("wifi_fw_bin") {
361bd4fe43Sopenharmony_ci    source = "hi3881_fw.bin"
371bd4fe43Sopenharmony_ci    module_install_dir = "firmware/hi3881"
381bd4fe43Sopenharmony_ci    install_images = [ chipset_base_dir ]
391bd4fe43Sopenharmony_ci    part_name = "hisilicon_products"
401bd4fe43Sopenharmony_ci  }
411bd4fe43Sopenharmony_ci  group("wifi_firmware") {
421bd4fe43Sopenharmony_ci    deps = [
431bd4fe43Sopenharmony_ci      ":wifi_cfg",
441bd4fe43Sopenharmony_ci      ":wifi_fw_bin",
451bd4fe43Sopenharmony_ci    ]
461bd4fe43Sopenharmony_ci  }
471bd4fe43Sopenharmony_ci}
48