• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 Beken Corporation
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14if (ohos_kernel_type == "liteos_m") {
15  import("//build/lite/config/component/lite_component.gni")
16  import("//build/lite/config/subsystem/lite_subsystem.gni")
17  import("//kernel/liteos_m/config.gni")
18  import("//kernel/liteos_m/liteos.gni")
19
20  module_name = get_path_info(rebase_path("."), "name")
21  module_group(module_name) {
22    modules = [ "liteos_m" ]
23    deps = [
24      ":copy_libs",
25      ":encrypt",
26    ]
27  }
28
29  copy("copy_libs") {
30    sources = [
31      "liteos_m/bk_sdk_armino/components/bk_libs/bk7235_openharmony/libs/libbt.a",
32      "liteos_m/bk_sdk_armino/components/bk_libs/bk7235_openharmony/libs/libwifi.a",
33    ]
34    outputs = [ "$root_build_dir/libs/{{source_file_part}}" ]
35  }
36
37  copy("encrypt") {
38    sources = [ "${device_path}/encrypt" ]
39    outputs = [ "$root_build_dir/encrypt" ]
40  }
41
42  build_ext_component("build_7235_sdk") {
43    exec_path = rebase_path("${root_out_dir}")
44    ENCRYPT_FLAG = "0 0 0 0"
45    command = "rm -rf ${exec_path}/build"
46    command += "&& mkdir -p ${exec_path}/build"
47    command += "&& ${exec_path}/encrypt ${exec_path}/${liteos_name}.bin ${ENCRYPT_FLAG}"
48    command += "&& mv ${exec_path}/${liteos_name}_crc.bin ${exec_path}/build/all_2M.1220.bin"
49    deps = [
50      "${device_path}:bk_sdk",
51      "//kernel/liteos_m:build_kernel_image",
52    ]
53  }
54}
55