1# Copyright (C) 2022 Unionman Technology Co., Ltd. 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 14import("//build/ohos.gni") 15 16# ISP 17ohos_prebuilt_executable("iv009_isp") { 18 if (target_cpu == "arm") { 19 source = "bin/iv009_isp" 20 } else { 21 source = "bin64/iv009_isp" 22 } 23 install_images = [ chipset_base_dir ] 24 part_name = "device_unionpi_tiger" 25 install_enable = true 26} 27 28ohos_prebuilt_etc("libisp_c.so.6") { 29 if (target_cpu == "arm") { 30 source = "lib/libisp_c.so.6" 31 module_install_dir = "lib/glibc" 32 } else { 33 source = "lib64/libisp_c.so.6" 34 module_install_dir = "lib64/glibc" 35 } 36 install_images = [ chipset_base_dir ] 37 38 part_name = "device_unionpi_tiger" 39 install_enable = true 40} 41 42ohos_prebuilt_etc("libdl.so.2") { 43 if (target_cpu == "arm") { 44 source = "lib/libdl.so.2" 45 module_install_dir = "lib/glibc" 46 } else { 47 source = "lib64/libdl.so.2" 48 module_install_dir = "lib64/glibc" 49 } 50 install_images = [ chipset_base_dir ] 51 52 part_name = "device_unionpi_tiger" 53 install_enable = true 54} 55 56ohos_prebuilt_etc("libisp_pthread.so.0") { 57 if (target_cpu == "arm") { 58 source = "lib/libisp_pthread.so.0" 59 module_install_dir = "lib/glibc" 60 } else { 61 source = "lib64/libisp_pthread.so.0" 62 module_install_dir = "lib64/glibc" 63 } 64 install_images = [ chipset_base_dir ] 65 66 part_name = "device_unionpi_tiger" 67 install_enable = true 68} 69 70ohos_prebuilt_executable("ld-linux.so") { 71 if (target_cpu == "arm") { 72 source = "lib/ld-linux-armhf.so.3" 73 } else { 74 source = "lib64/ld-linux-aarch64.so.1" 75 } 76 module_install_dir = "bin" 77 install_images = [ chipset_base_dir ] 78 79 part_name = "device_unionpi_tiger" 80 install_enable = true 81} 82 83if (target_cpu == "arm64") { 84 ohos_prebuilt_executable("libstdc") { 85 source = "lib64/libstdc++.so.6.0" 86 module_install_dir = "lib64/glibc" 87 install_images = [ chipset_base_dir ] 88 symlink_target_name = [ "libstdc++.so.6" ] 89 90 part_name = "device_unionpi_tiger" 91 install_enable = true 92 } 93 94 ohos_prebuilt_executable("libgcc_s") { 95 source = "lib64/libgcc_s.so.1" 96 module_install_dir = "lib64/glibc" 97 install_images = [ chipset_base_dir ] 98 99 part_name = "device_unionpi_tiger" 100 install_enable = true 101 } 102 103 ohos_prebuilt_executable("librt") { 104 source = "lib64/librt.so.6" 105 module_install_dir = "lib64/glibc" 106 install_images = [ chipset_base_dir ] 107 symlink_target_name = [ "librt.so.1" ] 108 109 part_name = "device_unionpi_tiger" 110 install_enable = true 111 } 112 113 ohos_prebuilt_executable("libm") { 114 source = "lib64/libm.so.6" 115 module_install_dir = "lib64/glibc" 116 install_images = [ chipset_base_dir ] 117 118 part_name = "device_unionpi_tiger" 119 install_enable = true 120 } 121} 122 123ohos_prebuilt_etc("iv009_isp.ko") { 124 source = "modules/iv009_isp.ko" 125 module_install_dir = "modules" 126 install_images = [ chipset_base_dir ] 127 128 part_name = "device_unionpi_tiger" 129} 130 131ohos_prebuilt_etc("iv009_isp_iq.ko") { 132 source = "modules/iv009_isp_iq.ko" 133 module_install_dir = "modules" 134 install_images = [ chipset_base_dir ] 135 136 part_name = "device_unionpi_tiger" 137} 138 139ohos_prebuilt_etc("iv009_isp_lens.ko") { 140 source = "modules/iv009_isp_lens.ko" 141 module_install_dir = "modules" 142 install_images = [ chipset_base_dir ] 143 144 part_name = "device_unionpi_tiger" 145} 146 147ohos_prebuilt_etc("iv009_isp_sensor.ko") { 148 source = "modules/iv009_isp_sensor.ko" 149 module_install_dir = "modules" 150 install_images = [ chipset_base_dir ] 151 152 part_name = "device_unionpi_tiger" 153} 154 155group("isp") { 156 deps = [ 157 ":iv009_isp", 158 ":iv009_isp.ko", 159 ":iv009_isp_iq.ko", 160 ":iv009_isp_lens.ko", 161 ":iv009_isp_sensor.ko", 162 ":ld-linux.so", 163 ":libdl.so.2", 164 ":libisp_c.so.6", 165 ":libisp_pthread.so.0", 166 ] 167 168 if (target_cpu == "arm64") { 169 deps += [ 170 ":libgcc_s", 171 ":libm", 172 ":librt", 173 ":libstdc", 174 ] 175 } 176} 177