diff --git a/laphone/.gitignore b/laphone/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..9bbeafe7937bfcad6a6aa7d46f744e210b8edaed --- /dev/null +++ b/laphone/.gitignore @@ -0,0 +1,7 @@ +pac/ImageFiles/*_nosec_userdebug.pac +pac/ImageFiles/system.img +pac/ImageFiles/userdata.img +pac/ImageFiles/vendor.img +pac/ImageFiles/updater.img +pac/ImageFiles/socko.img +pac/ImageFiles/ramdisk.img diff --git a/laphone/BUILD.gn b/laphone/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..266c2d3f6b5a42bc7da1fd3fd92e59b1e798b3ec --- /dev/null +++ b/laphone/BUILD.gn @@ -0,0 +1,51 @@ +# 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. + +import("//build/ohos.gni") +import("device.gni") + +print("laphonegroup in") +group("laphone_group") { + deps = [ + "cfg:init_configs", + "distributedhardware:distributedhardware", + # "lk:lk", + # "kernel:kernel", + "//vendor/hys/laphone/modules:modules", + "//device/soc/sprd/uis7885/hardware:hardware_group", + "//device/board/hys/laphone/camera/vdi_impl/v4l2:camera_board_vdi_impl", + "updater:updater_files", + "//third_party/alsa-lib:libasound", + "//third_party/alsa-utils:alsa-utils", + ] + if (is_standard_system) { + deps += [ "startup/reboot_loader:rebootloader" ] + } +} + +# build a pac package +action("make_custom_image") { + script = "pac/uis7885_pac.sh" + package_path = "${root_out_dir}/packages/phone/images" + target_path = "always.build" + args = [ rebase_path(package_path) ] + outputs = [ "${package_path}/${target_path}" ] + + # must build after make_images + deps = [ + "//build/ohos/images:make_images", + # also must wait make boot image + # "kernel:make_boot_image", + # "kernel:make_boot_updater_image" + ] +} diff --git a/laphone/bundle.json b/laphone/bundle.json new file mode 100644 index 0000000000000000000000000000000000000000..660d7fa91170b33d3e6e2f8deceae1f603313c74 --- /dev/null +++ b/laphone/bundle.json @@ -0,0 +1,35 @@ +{ + "name": "@ohos/device_laphone", + "description": "device board", + "version": 3.2, + "license": "Apache License 2.0", + "publishAs": "code-segment", + "segment": { + "destPath": "device/board/hys/laphone" + }, + "dirs": {}, + "scripts": {}, + "component": { + "name": "device_laphone", + "subsystem": "device_laphone", + "syscap": [], + "features": [], + "adapted_system_type": [ "standard" ], + "hisysevent_config": [], + "rom": "", + "ram": "", + "deps": { + "components": [ + "init" + ], + "third_party": [] + }, + "build": { + "sub_component": [ + "//device/board/hys/laphone:laphone_group" + ], + "test": [] + } + } + } + \ No newline at end of file diff --git a/laphone/camera/vdi_impl/v4l2/BUILD.gn b/laphone/camera/vdi_impl/v4l2/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..9b3e764ed867b90cea0f09b6e42497cee94b0223 --- /dev/null +++ b/laphone/camera/vdi_impl/v4l2/BUILD.gn @@ -0,0 +1,322 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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. + +import("//build/ohos.gni") +import("//device/board/${product_company}/${device_name}/device.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") +import("//drivers/peripheral/camera/camera.gni") +import("$hdf_framework_path/tools/hc-gen/hc_gen.gni") + +hc_gen("build_camera_host_config") { + sources = [ rebase_path( + "$product_config_path/hdf_config/uhdf/camera/hdi_impl/camera_host_config.hcs") ] +} + +ohos_prebuilt_etc("camera_host_config.hcb") { + deps = [ ":build_camera_host_config" ] + hcs_outputs = get_target_outputs(":build_camera_host_config") + source = hcs_outputs[0] + relative_install_dir = "hdfconfig" + install_images = [ chipset_base_dir ] + install_enable = true + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +hc_gen_c("generate_source") { + sources = [ + "$product_config_path/hdf_config/uhdf/camera/pipeline_core/config.hcs", + "$product_config_path/hdf_config/uhdf/camera/pipeline_core/params.hcs", + ] +} + +action("copy_source") { + script = "/usr/bin/env" + outputs = [ "$target_out_dir/tmp.c" ] # no use, just for gn complains + args = [ + "cp", + "-f", + ] + args += rebase_path(get_target_outputs(":generate_source")) + args += [ rebase_path( + "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/") ] + deps = [ ":generate_source" ] +} + +ohos_prebuilt_etc("config.c") { + deps = [ ":copy_source" ] + source = + "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c" + exec_script( + "/usr/bin/env", + [ + "touch", + rebase_path( + "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c"), + ]) +} + +ohos_prebuilt_etc("params.c") { + deps = [ ":copy_source" ] + source = + "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c" + exec_script( + "/usr/bin/env", + [ + "touch", + rebase_path( + "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c"), + ]) +} + +hc_gen("build_ipp_algo_config") { + sources = [ rebase_path( + "$product_config_path/hdf_config/uhdf/camera/pipeline_core/ipp_algo_config.hcs") ] +} + +ohos_prebuilt_etc("ipp_algo_config.hcb") { + deps = [ ":build_ipp_algo_config" ] + hcs_outputs = get_target_outputs(":build_ipp_algo_config") + source = hcs_outputs[0] + relative_install_dir = "hdfconfig" + install_images = [ chipset_base_dir ] + install_enable = true + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +config("example_config") { + visibility = [ ":*" ] + + cflags = [ + "-Wno-error", + "-Wno-unused-function", + "-Wno-unused-parameter", + ] +} + +group("chipset_build") { + public_deps = [ + ":camera_host_config.hcb", + ":config.c", + ":ipp_algo_config.hcb", + ":params.c", + "$board_camera_path/pipeline_core:camera_ipp_algo_example", + "$board_camera_path/driver_adapter:camera_v4l2_adapter", + # "$board_camera_path/driver_adapter/main_test:v4l2_main", + ] +} + +config("camhdi_impl_config") { + visibility = [ ":*" ] + cflags = [ + "-DGST_DISABLE_DEPRECATED", + "-DHAVE_CONFIG_H", + ] + + ldflags = [ "-Wl" ] + + if (enable_camera_device_utest) { + cflags += [ + "-fprofile-arcs", + "-ftest-coverage", + ] + + ldflags += [ "--coverage" ] + } +} + +host_sources = [ + "$camera_path/../v4l2/src/camera_device/camera_device_vdi_impl.cpp", + "$camera_path/../v4l2/src/camera_dump.cpp", + "$camera_path/../v4l2/src/camera_host/camera_host_config.cpp", + "$camera_path/../v4l2/src/camera_host/camera_host_vdi_impl.cpp", + "$camera_path/../v4l2/src/camera_host/hcs_deal.cpp", + "$camera_path/../v4l2/src/offline_stream_operator/offline_stream.cpp", + "$camera_path/../v4l2/src/offline_stream_operator/offline_stream_operator_vdi_impl.cpp", + "$camera_path/../v4l2/src/stream_operator/capture_message.cpp", + "$camera_path/../v4l2/src/stream_operator/capture_request.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_base.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_operator_vdi_impl.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_post_view.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_preview.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_statistics.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_still_capture.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard/stream_tunnel.cpp", + "$camera_path/../v4l2/src/stream_operator/stream_video.cpp", +] + +host_includes = [ + "$camera_path/../../interfaces/include", + "$camera_path/include", + "$camera_path/metadata_manager/include", + "$camera_path/utils/watchdog", + "$camera_path/../interfaces", + "$camera_path/../v4l2/include", + "$camera_path/../v4l2/include/camera_host", + "$camera_path/../v4l2/include/camera_device", + "$camera_path/../v4l2/include/stream_operator", + "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard", + "$camera_path/../v4l2/include/offline_stream_operator", + "$camera_path/device_manager/include/", + "$camera_path/buffer_manager/src/buffer_adapter/standard", + "$camera_path/utils/event", + "$camera_path/../../display/interfaces/include", + + #producer + "$camera_path/pipeline_core/utils", + "$camera_path/pipeline_core/include", + "$camera_path/pipeline_core/host_stream/include", + "$camera_path/pipeline_core/nodes/include", + "$camera_path/pipeline_core/nodes/src/node_base", + "$camera_path/pipeline_core/nodes/src/dummy_node", + "$camera_path/pipeline_core/pipeline_impl/include", + "$camera_path/pipeline_core/pipeline_impl/src", + "$camera_path/pipeline_core/pipeline_impl/src/builder", + "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", + "$camera_path/pipeline_core/pipeline_impl/src/parser", + "$camera_path/pipeline_core/pipeline_impl/src/strategy", + "$camera_path/pipeline_core/ipp/include", +] + +ohos_shared_library("camera_host_vdi_impl_1.0") { + sources = host_sources + include_dirs = host_includes + + deps = [ + "$board_camera_path/device_manager:camera_device_manager", + "$board_camera_path/metadata_manager:camera_metadata_manager", + "$board_camera_path/pipeline_core:camera_pipeline_core", + "$camera_path/buffer_manager:camera_buffer_manager", + "$camera_path/utils:camera_utils", + ] + + defines = [] + if (enable_camera_device_utest) { + defines += [ "CAMERA_DEVICE_UTEST" ] + } + if (use_hitrace) { + defines += [ "HITRACE_LOG_ENABLED" ] + } + + if (is_standard_system) { + external_deps = [ + "c_utils:utils", + "graphic_chipsetsdk:surface", + "hdf_core:libhdf_host", + "hdf_core:libhdf_ipc_adapter", + "hdf_core:libhdf_utils", + "hdf_core:libhdi", + "hilog:libhilog", + "ipc:ipc_single", + ] + if (use_hitrace) { + external_deps += [ "hitrace:libhitracechain" ] + } + } else { + external_deps = [ "hilog:libhilog" ] + } + external_deps += [ + "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", + "drivers_interface_camera:metadata", + "hitrace:hitrace_meter", + "ipc:ipc_single", + ] + public_configs = [ ":camhdi_impl_config" ] + install_images = [ chipset_base_dir ] + install_enable = true + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_static_library("camera_host_vdi_impl_1.0_static") { + sources = host_sources + include_dirs = host_includes + + deps = [ + "$board_camera_path/device_manager:camera_device_manager", + "$board_camera_path/metadata_manager:camera_metadata_manager", + "$board_camera_path/pipeline_core:camera_pipeline_core", + "$camera_path/buffer_manager:camera_buffer_manager", + "$camera_path/utils:camera_utils", + ] + + defines = [] + if (enable_camera_device_utest) { + defines += [ "CAMERA_DEVICE_UTEST" ] + } + if (use_hitrace) { + defines += [ "HITRACE_LOG_ENABLED" ] + } + + if (is_standard_system) { + external_deps = [ + "c_utils:utils", + "graphic_chipsetsdk:surface", + "hdf_core:libhdf_host", + "hdf_core:libhdf_ipc_adapter", + "hdf_core:libhdf_utils", + "hdf_core:libhdi", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_single", + ] + if (use_hitrace) { + external_deps += [ "hitrace:libhitracechain" ] + } + } else { + external_deps = [ "hilog:libhilog" ] + } + external_deps += [ + "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", + "drivers_interface_camera:metadata", + "hitrace:hitrace_meter", + "ipc:ipc_single", + ] + + public_configs = [ ":camhdi_impl_config" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" + +} + +group("camera_board_vdi_impl") { + deps = [ + ":camera_host_vdi_impl_1.0", + ":chipset_build", + ] +} + +group("camera_board_test") { + if (target_cpu == "x86_64") { + deps = [] + } else { + testonly = true + deps = [ + #device manager test + #"device_manager/test/unittest:camera_board_device_manager_unittest", + + #driver adapter v4l2 test + #"driver_adapter/test/v4l2_test:v4l2_main", + + #driver adapter v4l2 unittest + #"driver_adapter/test/unittest:v4l2_adapter_unittest", + + # pipeline core test + #"pipeline_core/test/unittest:camera_pipeline_core_test_ut", + + # demo test + #"demo:ohos_camera_demo", + ] + } +} \ No newline at end of file diff --git a/laphone/camera/vdi_impl/v4l2/device_manager/BUILD.gn b/laphone/camera/vdi_impl/v4l2/device_manager/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..baa415057c9655a0dbdc21c3658ae9236a868335 --- /dev/null +++ b/laphone/camera/vdi_impl/v4l2/device_manager/BUILD.gn @@ -0,0 +1,53 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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. +import("//build/ohos.gni") +import("//drivers/peripheral/camera/camera.gni") +import("//device/board/${product_company}/${device_name}/device.gni") + +config("device_manager_config") { + visibility = [ ":*" ] + + cflags_cc = [ + "-Wall", + "-Wextra", + "-Werror", + "-Wno-error", + "-DGST_DISABLE_DEPRECATED", + "-DHAVE_CONFIG_H", + "-DCOLORSPACE=\"videoconvert\"", + "-fno-strict-aliasing", + "-Wno-sign-compare", + "-Wno-builtin-requires-header", + "-Wno-unused-variable", + "-Wno-unused-label", + "-Wno-implicit-function-declaration", + "-Wno-format", + "-Wno-int-conversion", + "-Wno-unused-function", + "-Wno-thread-safety-attributes", + "-Wno-inconsistent-missing-override", + "-fno-rtti", + "-fno-exceptions", + "-ffunction-sections", + "-fdata-sections", + ] +} + +ohos_prebuilt_shared_library("camera_device_manager") { + source = "lib/libcamera_device_manager.z.so" +# install_enable = true + public_configs = [ ":device_manager_config" ] + install_images = [ chipset_base_dir ] + subsystem_name = "device_laphone" + part_name = "device_laphone" +} diff --git a/laphone/camera/vdi_impl/v4l2/device_manager/lib/libcamera_device_manager.z.so b/laphone/camera/vdi_impl/v4l2/device_manager/lib/libcamera_device_manager.z.so new file mode 100755 index 0000000000000000000000000000000000000000..f5ad00c65614112089ec4361c943237e3c630cc8 Binary files /dev/null and b/laphone/camera/vdi_impl/v4l2/device_manager/lib/libcamera_device_manager.z.so differ diff --git a/laphone/camera/vdi_impl/v4l2/driver_adapter/BUILD.gn b/laphone/camera/vdi_impl/v4l2/driver_adapter/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..523fc5ce0868e2f7d19f5d1498a9e85a9bedb7d4 --- /dev/null +++ b/laphone/camera/vdi_impl/v4l2/driver_adapter/BUILD.gn @@ -0,0 +1,53 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. +import("//build/ohos.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") +import("//drivers/peripheral/camera/camera.gni") +import("//device/board/hys/${product_name}/device.gni") + +config("v4l2_config") { + visibility = [ ":*" ] + + cflags = [ + "-Wall", + "-Wextra", + "-Werror", + "-Wno-error", + "-DGST_DISABLE_DEPRECATED", + "-DHAVE_CONFIG_H", + "-DCOLORSPACE=\"videoconvert\"", + "-fno-strict-aliasing", + "-Wno-sign-compare", + "-Wno-builtin-requires-header", + "-Wno-unused-variable", + "-Wno-unused-label", + "-Wno-implicit-function-declaration", + "-Wno-format", + "-Wno-int-conversion", + "-Wno-unused-function", + "-Wno-thread-safety-attributes", + "-Wno-inconsistent-missing-override", + "-fno-rtti", + "-fno-exceptions", + "-ffunction-sections", + "-fdata-sections", + ] + + if (enable_camera_device_utest) { + cflags += [ + "-fprofile-arcs", + "-ftest-coverage", + ] + + ldflags = [ "--coverage" ] + } +} + +ohos_prebuilt_shared_library("camera_v4l2_adapter") { + source = "lib/libcamera_v4l2_adapter.z.so" +# install_enable = true + public_configs = [ ":v4l2_config" ] + install_images = [ chipset_base_dir ] + subsystem_name = "device_laphone" + part_name = "device_laphone" +} + diff --git a/laphone/camera/vdi_impl/v4l2/driver_adapter/lib/libcamera_v4l2_adapter.z.so b/laphone/camera/vdi_impl/v4l2/driver_adapter/lib/libcamera_v4l2_adapter.z.so new file mode 100755 index 0000000000000000000000000000000000000000..5ced331e10c0437e5f8db0e17fb48c05a734efdf Binary files /dev/null and b/laphone/camera/vdi_impl/v4l2/driver_adapter/lib/libcamera_v4l2_adapter.z.so differ diff --git a/laphone/camera/vdi_impl/v4l2/metadata_manager/BUILD.gn b/laphone/camera/vdi_impl/v4l2/metadata_manager/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..5d628e6f01daf7318028bdc7478ff5ad897ad072 --- /dev/null +++ b/laphone/camera/vdi_impl/v4l2/metadata_manager/BUILD.gn @@ -0,0 +1,76 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# 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. + +import("//build/ohos.gni") +import("//device/board/${product_company}/${device_name}/device.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") +import("//drivers/peripheral/camera/camera.gni") + +config("camera_metadata_manager_config") { + visibility = [ ":*" ] + cflags = [ + "-DGST_DISABLE_DEPRECATED", + "-DHAVE_CONFIG_H", + ] + + if (enable_camera_device_utest) { + cflags += [ + "-fprofile-arcs", + "-ftest-coverage", + ] + + ldflags += [ "--coverage" ] + } +} + +ohos_shared_library("camera_metadata_manager") { + sources = [ + "$camera_path/metadata_manager/src/metadata_config.cpp", + "$camera_path/metadata_manager/src/metadata_controller.cpp", + ] + include_dirs = [ + "$camera_path/../../interfaces/include", + "$camera_path/include", + "$camera_path/device_manager/include", + "$camera_path/metadata_manager/include", + ] + + deps = [ "$board_camera_path/device_manager:camera_device_manager" ] + + if (is_standard_system) { + external_deps = [ + "graphic_chipsetsdk:surface", + "hdf_core:libhdf_host", + "hdf_core:libhdf_ipc_adapter", + "hdf_core:libhdf_utils", + "hdf_core:libhdi", + "hilog:libhilog", + "ipc:ipc_single", + ] + if (use_hitrace) { + external_deps += [ "hitrace:libhitrace" ] + } + } else { + external_deps = [ "hilog:libhilog" ] + } + external_deps += [ + "drivers_interface_camera:metadata", + "ipc:ipc_single", + ] + + public_configs = [ ":camera_metadata_manager_config" ] + install_images = [ chipset_base_dir ] + install_enable = true + part_name = "device_laphone" + subsystem_name = "device_laphone" +} diff --git a/laphone/camera/vdi_impl/v4l2/pipeline_core/BUILD.gn b/laphone/camera/vdi_impl/v4l2/pipeline_core/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..652c8277149b1a38bd72c4758b90e6523597f4aa --- /dev/null +++ b/laphone/camera/vdi_impl/v4l2/pipeline_core/BUILD.gn @@ -0,0 +1,76 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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. +import("//build/ohos.gni") +import("//device/board/${product_company}/${device_name}/device.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") +import("//drivers/peripheral/camera/camera.gni") + +config("pipe_config") { + visibility = [ ":*" ] + + cflags_cc = [ + "-Wall", + "-Wextra", + "-Werror", + "-Wno-error", + "-DGST_DISABLE_DEPRECATED", + "-DHAVE_CONFIG_H", + "-DCOLORSPACE=\"videoconvert\"", + "-D_VSP_LINUX_", + "-D_VSP_", + "-fno-strict-aliasing", + "-Wno-sign-compare", + "-Wno-builtin-requires-header", + "-Wno-unused-variable", + "-Wno-unused-label", + "-Wno-implicit-function-declaration", + "-Wno-format", + "-Wno-int-conversion", + "-Wno-unused-function", + "-Wno-thread-safety-attributes", + "-Wno-inconsistent-missing-override", + "-fno-rtti", + "-fno-exceptions", + "-ffunction-sections", + "-fdata-sections", + ] +} + +ohos_prebuilt_shared_library("camera_pipeline_core") { + source = "lib/libcamera_pipeline_core.z.so" + public_configs = [ ":pipe_config" ] + install_images = [ chipset_base_dir ] + install_enable = true + subsystem_name = "device_laphone" + part_name = "device_laphone" +} + +config("example_config") { + visibility = [ ":*" ] + + cflags = [ + "-Wno-error", + "-Wno-unused-function", + "-Wno-unused-parameter", + ] +} + +ohos_prebuilt_shared_library("camera_ipp_algo_example") { + source = "lib/libcamera_ipp_algo_example.z.so" + public_configs = [ ":example_config" ] + install_images = [ chipset_base_dir ] + install_enable = true + subsystem_name = "device_laphone" + part_name = "device_laphone" +} + diff --git a/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_ipp_algo_example.z.so b/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_ipp_algo_example.z.so new file mode 100755 index 0000000000000000000000000000000000000000..9b57dca38e6cb78357a221ba73026751b1ffc6cc Binary files /dev/null and b/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_ipp_algo_example.z.so differ diff --git a/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_pipeline_core.z.so b/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_pipeline_core.z.so new file mode 100755 index 0000000000000000000000000000000000000000..c2e01db899cfe529653ec1d624933bdfb17b781a Binary files /dev/null and b/laphone/camera/vdi_impl/v4l2/pipeline_core/lib/libcamera_pipeline_core.z.so differ diff --git a/laphone/cfg/BUILD.gn b/laphone/cfg/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..4c6d0337af8fee795e96bf347bde56079f5af402 --- /dev/null +++ b/laphone/cfg/BUILD.gn @@ -0,0 +1,66 @@ +# 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. + +import("//build/ohos.gni") + +ohos_prebuilt_etc("init.uis7885.cfg") { + source = "init.uis7885.cfg" + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_images = [ chipset_base_dir ] + install_enable = true +} + +ohos_prebuilt_etc("init.uis7885.usb.cfg") { + source = "init.uis7885.usb.cfg" + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_images = [ + chipset_base_dir, + "updater", + ] + install_enable = true +} + +ohos_prebuilt_etc("fstab.uis7885") { + source = "fstab.uis7885" + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_images = [ vendor_base_dir ] + install_enable = true +} + +ohos_prebuilt_etc("init.uis7885.gnss.cfg") { + source = "init.uis7885.gnss.cfg" + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_images = [ vendor_base_dir ] + install_enable = true +} + +ohos_prebuilt_executable("insmod_modules.sh") { + source = "insmod_modules.sh" + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_images = [ chipset_base_dir ] + install_enable = true +} +group("init_configs") { + deps = [ + ":fstab.uis7885", + ":init.uis7885.cfg", + ":init.uis7885.usb.cfg", + ":init.uis7885.gnss.cfg", + ":insmod_modules.sh" + ] +} diff --git a/laphone/cfg/fstab.uis7885 b/laphone/cfg/fstab.uis7885 new file mode 100644 index 0000000000000000000000000000000000000000..199b8fca54ca0e11cfa78c685542025787fdbdd6 --- /dev/null +++ b/laphone/cfg/fstab.uis7885 @@ -0,0 +1,6 @@ +# fstab file. +# +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/system /usr ext4 ro,barrier=1 wait,required +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/vendor /vendor ext4 ro,barrier=1 wait,required +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/userdata /data f2fs discard,noatime,nosuid,nodev wait,check,fileencryption=software,quota +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/misc /misc none none wait,required diff --git a/laphone/cfg/init.uis7885.cfg b/laphone/cfg/init.uis7885.cfg new file mode 100644 index 0000000000000000000000000000000000000000..13d1c61b9e43ee4f441fb177b0e0ef21269efd85 --- /dev/null +++ b/laphone/cfg/init.uis7885.cfg @@ -0,0 +1,128 @@ +{ + "import" : [ + "/vendor/etc/init.${ohos.boot.hardware}.usb.cfg", + "/vendor/etc/init.${ohos.boot.hardware}.gnss.cfg", + "/vendor/etc/init.${ohos.boot.hardware}.minidump.cfg" + ], + "jobs" : [{ + "name" : "pre-init", + "cmds" : [ + "write /proc/sys/vm/min_free_kbytes 10240", + "mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755", + "write /sys/kernel/debug/hisi_inno_phy/role peripheral" + ] + }, { + "name" : "init", + "cmds" : [ + "insmod /vendor/modules/agdsp_pd.ko", + "insmod /vendor/modules/audio_mem.ko", + "insmod /vendor/modules/audio_sipc.ko", + "insmod /vendor/modules/audio-dsp-dump.ko", + "insmod /vendor/modules/sprd_audio_usb_offload.ko", + "insmod /vendor/modules/sprd_apipe.ko", + "insmod /vendor/modules/audio-pipe.ko", + "insmod /vendor/modules/mcdt_hw_r2p0.ko", + "insmod /vendor/modules/sprd_audcp_dvfs.ko", + "insmod /vendor/modules/sprd_audcp_boot.ko", + "insmod /vendor/modules/sprd_pmic_wdt.ko", + "insmod /vendor/modules/sprd_cp_dvfs.ko", + "insmod /vendor/modules/voice_trigger_irq.ko", + "insmod /vendor/modules/snd-soc-sprd-pa-aw87390.ko", + "insmod /vendor/modules/snd-soc-sprd-card.ko", + "insmod /vendor/modules/snd-soc-sprd-codec-ump9620-power.ko", + "insmod /vendor/modules/snd-soc-sprd-codec-ump9620-power-dev.ko", + "insmod /vendor/modules/snd-soc-sprd-codec-ump9620.ko", + "insmod /vendor/modules/snd-soc-unisoc-dp-codec.ko", + "insmod /vendor/modules/snd-soc-sprd-dummy-codec.ko", + "insmod /vendor/modules/snd-soc-sprd-pdm-r2p0.ko", + "insmod /vendor/modules/snd-soc-sprd-tdm.ko", + "insmod /vendor/modules/sprd-platform-pcm-routing.ko", + "insmod /vendor/modules/snd-soc-sprd-vbc-v4.ko", + "insmod /vendor/modules/snd-soc-sprd-vbc-fe.ko", + "insmod /vendor/modules/snd-soc-sprd-dai.ko", + "insmod /vendor/modules/sprd-dmaengine-pcm.ko", + "insmod /vendor/modules/sprd-compr-2stage-dma.ko", + "write /proc/1/oom_score_adj -1000", + "write /proc/sys/kernel/hung_task_timeout_secs 90", + "write /sys/kernel/hungtask/enable on", + "write /sys/kernel/hungtask/monitorlist whitelist,init,appspawn", + "chown system system /sys/kernel/hungtask/userlist", + "symlink /dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name /dev/block/by-name" + ] + }, { + "name" : "post-fs-data", + "cmds" : [ + "exec /bin/sh /vendor/bin/insmod_modules.sh", + "wait /sys/touchscreen/ts_suspend", + "chmod 666 /sys/touchscreen/ts_suspend" + ] + }, { + "name" : "boot", + "cmds" : [ + "insmod /vendor/modules/mali_kbase.ko", + "write /sys/block/zram0/disksize 1024M", + "mkswap /dev/block/zram0", + "swapon /dev/block/zram0", + "chmod 777 /data/bluetooth", + "chmod 777 /dev/ttyAMA2", + "chmod 775 /sys/class/rfkill/rfkill0/state", + "chown blue_host blue_host /sys/class/rfkill/rfkill0/state", + "chown blue_host blue_host /dev/ttyBT0", + "chown blue_host blue_host /proc/bluetooth/sleep/lpm", + "chown blue_host blue_host /proc/bluetooth/sleep/btwrite", + "chown bluetooth bluetooth /dev/uhid", + "chmod 777 /dev/rtkbt_dev", + "chmod 0440 /proc/interrupts", + "chmod 0440 /proc/stat", + "chmod 777 /sys/class/drm/card0-DSI-1/status", + "chmod 0640 /dev/xt_qtaguid", + "mkdir /data/ashmem 0777 disp_gralloc_host disp_gralloc_host", + "chmod 0660 /proc/net/xt_qtaguid/ctrl", + "chmod 0440 /proc/net/xt_qtaguid/stats", + "chmod 666 /dev/mali0", + "chown system graphics /dev/mali0", + "chmod 666 /dev/dri/card1", + "chown system graphics /dev/dri/card1", + "chmod 666 /dev/dri/renderD129", + "chown system graphics /dev/dri/renderD129", + "chown system graphics /dev/graphics/fb0", + "chmod 666 /dev/sprd_dmabuf", + "chmod 666 /dev/dma_heap/system-uncached", + "chmod 666 /dev/dma_heap/system", + "chmod 666 /dev/sched_rtg_ctrl", + "chown system system /dev/sched_rtg_ctrl", + "chown update update /dev/block/mmcblk0p2", + "chmod 666 /dev/v4l-subdev0", + "chown ispserver ispserver /dev/v4l-subdev0", + "chmod 666 /dev/v4l-subdev0", + "chown ispserver ispserver /dev/v4l-subdev1", + "chmod 666 /dev/v4l-subdev0", + "chown ispserver ispserver /dev/v4l-subdev2", + "chmod 666 /dev/v4l-subdev0", + "chown ispserver ispserver /dev/v4l-subdev3", + "chmod 666 /dev/sprd_vsp", + "chown camera_host camera_host /dev/sprd_cpp", + "chown camera_host camera_host /dev/sprd_jpg", + "chown camera_host camera_host /dev/sprd_vsp", + "chown camera_host camera_host /dev/sprd_sensor", + "chown camera_host camera_host /dev/sprd_image", + "chown camera_host camera_host /dev/sprd_video", + "chown camera_host camera_host /dev/vpu_enc0", + "chown camera_host camera_host /dev/vpu_enc1", + "chown system graphics /dev/sprd_dmabuf", + "chown camera_host camera_host /dev/sprd_jpg", + "chown camera_host camera_host /dev/dma_heap/system", + "chmod 666 /dev/sprd_dmabuf ", + "chown camera_host camera_host /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name", + "chmod 666 /dev/media0" + ] + }, { + "name" : "post-fs-data", + "cmds" : [ + "restorecon", + "restorecon /data/updater", + "chown composer_host composer_host /sys/class/backlight/sprd_backlight/brightness" + ] + } + ] +} diff --git a/laphone/cfg/init.uis7885.gnss.cfg b/laphone/cfg/init.uis7885.gnss.cfg new file mode 100644 index 0000000000000000000000000000000000000000..01f42a8ead7fe7c40e79001348a1b3cbf909d95c --- /dev/null +++ b/laphone/cfg/init.uis7885.gnss.cfg @@ -0,0 +1,28 @@ +{ + "jobs" : [{ + "name" : "boot", + "cmds" : [ + "chown location_host location_host /dev/data0_gnss", + "chmod 660 /dev/data0_gnss", + "chown location_host location_host /dev/gnss_pmnotify_ctl", + "chmod 660 /dev/gnss_pmnotify_ctl", + "chown location_host location_host /dev/gnss_dbg", + "chmod 660 /dev/gnss_dbg", + "chown location_host location_host /dev/gnss_common_ctl", + "chmod 660 /dev/gnss_common_ctl", + + "chown location_host location_host /sys/class/misc/gnss_common_ctl/gnss_power_enable", + "chmod 660 /sys/class/misc/gnss_common_ctl/gnss_power_enable", + "chown location_host location_host /sys/class/misc/gnss_common_ctl/gnss_subsys", + "chmod 660 /sys/class/misc/gnss_common_ctl/gnss_subsys", + "chown location_host location_host /sys/class/misc/gnss_common_ctl/gnss_dump", + "chmod 660 /sys/class/misc/gnss_common_ctl/gnss_dump" + ] + }, { + "name" : "boot", + "cmds" : [ + "mkdir /data/vendor/gnss/sprd 0777 location_host location_host" + ] + } + ] +} diff --git a/laphone/cfg/init.uis7885.usb.cfg b/laphone/cfg/init.uis7885.usb.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f642355722b43d1a5b41b606e98ddd0a25adac81 --- /dev/null +++ b/laphone/cfg/init.uis7885.usb.cfg @@ -0,0 +1,51 @@ +{ + "jobs" : [{ + "name" : "boot", + "cmds" : [ + "mkdir /dev/usb-ffs 0770 shell shell", + "mkdir /dev/usb-ffs/hdc 0770 shell shell", + "mount configfs none /config", + "mkdir /config/usb_gadget/g1 0770 shell shell", + "write /config/usb_gadget/g1/idVendor 0x18d1", + "write /config/usb_gadget/g1/idProduct 0x4ee8", + "write /config/usb_gadget/g1/os_desc/use 1", + "write /config/usb_gadget/g1/bcdDevice 0x0404", + "write /config/usb_gadget/g1/bcdUSB 0x0210", + "mkdir /config/usb_gadget/g1/strings/0x409 0770", + "write /config/usb_gadget/g1/strings/0x409/serialnumber ${ohos.boot.sn}", + "write /config/usb_gadget/g1/strings/0x409/manufacturer Unisoc", + "write /config/usb_gadget/g1/strings/0x409/product \"HDC Device\"", + "mkdir /config/usb_gadget/g1/functions/ffs.hdc", + "mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell", + "mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell", + "write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1", + "write /config/usb_gadget/g1/os_desc/qw_sign MSFT100", + "write /config/usb_gadget/g1/configs/b.1/MaxPower 500", + "symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1", + "mount functionfs hdc /dev/usb-ffs/hdc uid=2000,gid=2000", + "setparam sys.usb.configfs 1", + "setparam sys.usb.controller 25100000.dwc3" + ] + }, { + "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", + "condition" : "sys.usb.config=none && sys.usb.configfs=1", + "cmds" : [ + "write /config/usb_gadget/g1/os_desc/use 0", + "setparam sys.usb.ffs.ready 0" + ] + }, { + "name" : "param:init.svc.hdcd=stopped", + "condition" : "init.svc.hdcd=stopped", + "cmds" : [ + "setparam sys.usb.ffs.ready 0" + ] + }, { + "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", + "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", + "cmds" : [ + "write /config/usb_gadget/g1/idProduct 0x5000", + "write /config/usb_gadget/g1/os_desc/use 1" + ] + } + ] +} diff --git a/laphone/cfg/insmod_modules.sh b/laphone/cfg/insmod_modules.sh new file mode 100644 index 0000000000000000000000000000000000000000..5ffec29741e8fd1286c0e4d1bfecc9c60fe3e97f --- /dev/null +++ b/laphone/cfg/insmod_modules.sh @@ -0,0 +1,25 @@ +#/bin/sh +insmod /vendor/modules/chipone_icn9922c_ts.ko +insmod /vendor/modules/sprd_wlan_combo.ko +insmod /vendor/modules/sprdbt_tty.ko +insmod /vendor/modules/vpu.ko +insmod /vendor/modules/sprd_vdsp.ko +insmod /vendor/modules/npu_img_vha.ko +sleep 3 +chmod 775 /sys/class/rfkill/rfkill1/state +chown blue_host:blue_host /sys/class/rfkill/rfkill1/state +chown blue_host:blue_host /dev/ttyBT0 +chown blue_host:blue_host /proc/bluetooth/sleep/lpm +chown blue_host:blue_host /proc/bluetooth/sleep/btwrite +chown blue_host:blue_host /sys/kernel/debug/gpio +chown blue_host:blue_host /sys/devices/70000000.uart/uart_conf +chown bluetooth:bluetooth /dev/uhid +chown codec_host:codec_host /dev/sprd_vsp + +chmod 660 /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs +chown system:system /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs +chmod 660 /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene +chown system:system /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene + +chown camera_host camera_host /dev/vpu_enc0 +chown camera_host camera_host /dev/vpu_enc1 \ No newline at end of file diff --git a/laphone/config.gni b/laphone/config.gni new file mode 100644 index 0000000000000000000000000000000000000000..6745bf88573fc2a1291b731eb3e1f0df8008ebb3 --- /dev/null +++ b/laphone/config.gni @@ -0,0 +1,22 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# # 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. + +# Board arch, e.g. "armv7-a", "rv32imac". +board_arch = "armv8-a" + +# Board CPU type, e.g. "cortex-a7", "riscv32". +board_cpu = "cortex-a76" + +board_toolchain_type = "gcc" + +board_fpu = "neon-fp-armv8" diff --git a/laphone/device.gni b/laphone/device.gni new file mode 100644 index 0000000000000000000000000000000000000000..9acacb7f43767f8cbeae838d6f3c555a6b2bda7a --- /dev/null +++ b/laphone/device.gni @@ -0,0 +1,39 @@ +# 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. + +soc_company = "sprd" +soc_name = "uis7885" + +import("//device/soc/${soc_company}/${soc_name}/soc.gni") + +import("//build/ohos.gni") +if (!defined(defines)) { + defines = [] +} + +declare_args() { + is_support_boot_animation = true +} + +product_config_path = "//vendor/${product_company}/${product_name}" +board_camera_path = + "//device/board/${product_company}/${product_name}/camera/vdi_impl/v4l2" + +is_support_v4l2 = true +if (is_support_v4l2) { + is_support_mpi = false + defines += [ "SUPPORT_V4L2" ] + chipset_build_deps = "$board_camera_path:chipset_build" + camera_pipeline_core_deps = + "$board_camera_path/pipeline_core:camera_pipeline_core" +} diff --git a/laphone/distributedhardware/BUILD.gn b/laphone/distributedhardware/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..d760f9475b0453fbfea43d7f086a6ed739c1dbd3 --- /dev/null +++ b/laphone/distributedhardware/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright (C) 2022 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. +import("//build/ohos.gni") + +ohos_prebuilt_etc("distributed_hardware_components_cfg") { + source = "distributed_hardware_components_cfg.json" + install_enable = true + module_install_dir = "etc/distributedhardware/" + install_images = [ "vendor" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +group("distributedhardware") { + deps = [ ":distributed_hardware_components_cfg" ] +} diff --git a/laphone/distributedhardware/distributed_hardware_components_cfg.json b/laphone/distributedhardware/distributed_hardware_components_cfg.json new file mode 100644 index 0000000000000000000000000000000000000000..ea86fbcbd11d040f0141fb871c4fba23054a8388 --- /dev/null +++ b/laphone/distributedhardware/distributed_hardware_components_cfg.json @@ -0,0 +1,28 @@ +{ + "distributed_components": [ + { + "name": "distributed_camera", + "type": "CAMERA", + "comp_handler_loc": "libdistributed_camera_handler.z.so", + "comp_handler_version": "1.0", + "comp_source_loc": "libdistributed_camera_source_sdk.z.so", + "comp_source_version": "1.0", + "comp_source_sa_id": 4803, + "comp_sink_loc": "libdistributed_camera_sink_sdk.z.so", + "comp_sink_version": "1.0", + "comp_sink_sa_id": 4804 + }, + { + "name": "distributed_screen", + "type": "SCREEN", + "comp_handler_loc": "libdistributed_screen_handler.z.so", + "comp_handler_version": "1.0", + "comp_source_loc": "libdistributed_screen_source_sdk.z.so", + "comp_source_version": "1.0", + "comp_source_sa_id": 4807, + "comp_sink_loc": "libdistributed_screen_sink_sdk.z.so", + "comp_sink_version": "1.0", + "comp_sink_sa_id": 4808 + } + ] +} diff --git a/laphone/ohos.build b/laphone/ohos.build new file mode 100644 index 0000000000000000000000000000000000000000..1454c32dec27b24f46f9e75c0748e0cdf42ce7a6 --- /dev/null +++ b/laphone/ohos.build @@ -0,0 +1,13 @@ +{ + "subsystem": "device_laphone", + "parts": { + "device_laphone": { + "module_list": [ + "//device/board/hys/laphone:laphone_group" + ], + "test_list": [ + "//kernel/linux/build/test:linuxkerneltest" + ] + } + } +} diff --git a/laphone/pac/ImageFiles/EXEC_KERNEL_IMAGE.bin b/laphone/pac/ImageFiles/EXEC_KERNEL_IMAGE.bin new file mode 100755 index 0000000000000000000000000000000000000000..5853017934db0fdb41b2f52651711025151b1360 Binary files /dev/null and b/laphone/pac/ImageFiles/EXEC_KERNEL_IMAGE.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_AUDCP_DSP_lit_dm.bin b/laphone/pac/ImageFiles/QogirN6Pro_AUDCP_DSP_lit_dm.bin new file mode 100755 index 0000000000000000000000000000000000000000..91105fc61a640a859c60168e431016be54e03891 Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_AUDCP_DSP_lit_dm.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_deltanv.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_deltanv.bin new file mode 100755 index 0000000000000000000000000000000000000000..902e96bf8a133c80ecece289238c77e449c85bb7 Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_deltanv.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_nvitem.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_nvitem.bin new file mode 100755 index 0000000000000000000000000000000000000000..9695258388c676963f141853d4ad95accf0327d7 Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_Customer_nvitem.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_deltanv.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_deltanv.bin new file mode 100644 index 0000000000000000000000000000000000000000..5f3ca323ce0f42ff8c9f60922964f2b3d0dc6cf7 Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_deltanv.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_deltanv.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_deltanv.bin new file mode 100755 index 0000000000000000000000000000000000000000..9a21c369f52a75f57a17b780c25af3655a81f46b Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_deltanv.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_nvitem.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_nvitem.bin new file mode 100755 index 0000000000000000000000000000000000000000..1a5bd88b2b04a722ebf13835c050e035064f1f2a Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_lic_pos_7885_nvitem.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_PS_nvitem.bin b/laphone/pac/ImageFiles/QogirN6Pro_PS_nvitem.bin new file mode 100644 index 0000000000000000000000000000000000000000..57a26d47a331126eaac5b2ffcde3ae7361d79abf Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_PS_nvitem.bin differ diff --git a/laphone/pac/ImageFiles/QogirN6Pro_SP.bin b/laphone/pac/ImageFiles/QogirN6Pro_SP.bin new file mode 100755 index 0000000000000000000000000000000000000000..28064d86170493e37b6233c242e125fdd23ff961 Binary files /dev/null and b/laphone/pac/ImageFiles/QogirN6Pro_SP.bin differ diff --git a/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PHY_modem.bin b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PHY_modem.bin new file mode 100755 index 0000000000000000000000000000000000000000..7390d15ec3590323242a2c35479666c5cd851db4 Binary files /dev/null and b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PHY_modem.bin differ diff --git a/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_lic_pos_7885_modem.dat b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_lic_pos_7885_modem.dat new file mode 100755 index 0000000000000000000000000000000000000000..501c08c0877f9f4bc166f4ea98637dde6aa7e0d9 Binary files /dev/null and b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_lic_pos_7885_modem.dat differ diff --git a/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_modem.dat b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_modem.dat new file mode 100755 index 0000000000000000000000000000000000000000..f3c1f4acd7e83fac095b33f92f8e0a6324c64023 Binary files /dev/null and b/laphone/pac/ImageFiles/SC9600_QogirN6Pro_PS_modem.dat differ diff --git a/laphone/pac/ImageFiles/blackbox.img b/laphone/pac/ImageFiles/blackbox.img new file mode 100755 index 0000000000000000000000000000000000000000..74ac27c139e1f6f9eec6d5737549b22c94725c91 Binary files /dev/null and b/laphone/pac/ImageFiles/blackbox.img differ diff --git a/laphone/pac/ImageFiles/boot-updater.img b/laphone/pac/ImageFiles/boot-updater.img new file mode 100644 index 0000000000000000000000000000000000000000..14775d1d664d8799eca349c3d443457e91d84643 Binary files /dev/null and b/laphone/pac/ImageFiles/boot-updater.img differ diff --git a/laphone/pac/ImageFiles/boot.img b/laphone/pac/ImageFiles/boot.img new file mode 100644 index 0000000000000000000000000000000000000000..912eea8925e4708249e1b82979d47ed1bc610a7f Binary files /dev/null and b/laphone/pac/ImageFiles/boot.img differ diff --git a/laphone/pac/ImageFiles/cache.img b/laphone/pac/ImageFiles/cache.img new file mode 100755 index 0000000000000000000000000000000000000000..7114449e11a85b5082ea174d200d15b64fd3114c Binary files /dev/null and b/laphone/pac/ImageFiles/cache.img differ diff --git a/laphone/pac/ImageFiles/chip_prod.img b/laphone/pac/ImageFiles/chip_prod.img new file mode 100644 index 0000000000000000000000000000000000000000..5d0f0dbbde5c4742a942a360145f3581ab1a7267 Binary files /dev/null and b/laphone/pac/ImageFiles/chip_prod.img differ diff --git a/laphone/pac/ImageFiles/dtb.img b/laphone/pac/ImageFiles/dtb.img new file mode 100644 index 0000000000000000000000000000000000000000..c1f4951d72ad446a64f3036b09ca5f83f9337f2b Binary files /dev/null and b/laphone/pac/ImageFiles/dtb.img differ diff --git a/laphone/pac/ImageFiles/dtbo.img b/laphone/pac/ImageFiles/dtbo.img new file mode 100644 index 0000000000000000000000000000000000000000..80028ddc31ea82bf3dc2cb087f626fb022a7f93d Binary files /dev/null and b/laphone/pac/ImageFiles/dtbo.img differ diff --git a/laphone/pac/ImageFiles/eng_system.img b/laphone/pac/ImageFiles/eng_system.img new file mode 100644 index 0000000000000000000000000000000000000000..36da6fb6fc359f0be2050c6eb32500baa6467948 Binary files /dev/null and b/laphone/pac/ImageFiles/eng_system.img differ diff --git a/laphone/pac/ImageFiles/fdl1-sign.bin b/laphone/pac/ImageFiles/fdl1-sign.bin new file mode 100644 index 0000000000000000000000000000000000000000..b4e2d773c203b02d4500e69d4ca83a61a4f42880 Binary files /dev/null and b/laphone/pac/ImageFiles/fdl1-sign.bin differ diff --git a/laphone/pac/ImageFiles/flash.cfg b/laphone/pac/ImageFiles/flash.cfg new file mode 100755 index 0000000000000000000000000000000000000000..8a366897211b24b26228d582734904a18736c2b6 --- /dev/null +++ b/laphone/pac/ImageFiles/flash.cfg @@ -0,0 +1,61 @@ + +[Setting] +PacVer=BP_R1.0.0 +PAC_PRODUCT=uis7885_2h10 +ProductAlias=uis7885_2h10 +ProductVer=MocorDroid13 +Mode=0 +FlashType=1 +NandStrategy=0 +NandPageType=0 +NvBackup=1 +OmaDmProductFlag=0 +OmaDM=1 +IsPreload=1 +PAC_CONFILE=uis7885_2h10.xml + +[FlashParam] + +FDL=1@fdl1-sign.bin +FDL2=1@lk-fdl2-sign.bin +NV_NR=1@QogirN6Pro_PS_nvitem.bin +PhaseCheck=0@ +EraseUBOOTLOG=1@ +EraseUBOOT=1@ +EraseMetadata=1@ +Modem_NR=1@SC9600_QogirN6Pro_PS_modem.dat +Modem_NR_DELTANV=1@QogirN6Pro_PS_deltanv.bin +Modem_NR_PHY=1@SC9600_QogirN6Pro_PHY_modem.bin +DSP_LTE_AG=1@QogirN6Pro_AUDCP_DSP_lit_dm.bin +CH_SYS=1@QogirN6Pro_CH.bin +DFS=1@QogirN6Pro_SP.bin +Modem_GNSS=1@gnssmodem.bin +Modem_WCN=1@EXEC_KERNEL_IMAGE.bin +BOOT=1@boot.img +DTBO=1@dtbo.img +System=1@system.img +Vendor=1@vendor.img +Product=1@product.img +Sys_prod=1@sys_prod.img +UserData=1@userdata.img +BlackBox=1@blackbox.img +BootLogo=1@logo.bin +Fastboot_Logo=1@logo.bin +FLASH_LTE=1@ +EraseMisc=1@ +EraseSysdumpdb=1@ +SML=1@sml-sign.bin +UBOOTLoader=1@lk-sign.bin +UBOOTLoader1=1@lk_autopoweron-sign.bin +Persist=1@persist.img +VENDOR_BOOT=1@vendor.img +FLASH_NR=1@ +Cache=1@cache.img +ProdNV=1@prodnv.img +Teecfg=1@teecfg-sign.bin +Trustos=1@tos-sign.bin +SPLLoaderEMMC=1@u-boot-spl-16k-emmc-sign.bin +SPLLoaderUFS=1@u-boot-spl-16k-ufs-sign.bin +VENDOR_BOOT=1@vendor_boot.img +Updater=1@boot-updater.img +VENDOR_BOOT_UPDATER=1@vendor_boot_updater.img diff --git a/laphone/pac/ImageFiles/gnssmodem.bin b/laphone/pac/ImageFiles/gnssmodem.bin new file mode 100755 index 0000000000000000000000000000000000000000..84da25ba3dc4f220922a112bf6f059916b272c3f Binary files /dev/null and b/laphone/pac/ImageFiles/gnssmodem.bin differ diff --git a/laphone/pac/ImageFiles/lk-fdl2-sign.bin b/laphone/pac/ImageFiles/lk-fdl2-sign.bin new file mode 100644 index 0000000000000000000000000000000000000000..0c4664fac9da1ab7d5eafcdadf996e8680df2896 Binary files /dev/null and b/laphone/pac/ImageFiles/lk-fdl2-sign.bin differ diff --git a/laphone/pac/ImageFiles/lk-sign.bin b/laphone/pac/ImageFiles/lk-sign.bin new file mode 100644 index 0000000000000000000000000000000000000000..0c4664fac9da1ab7d5eafcdadf996e8680df2896 Binary files /dev/null and b/laphone/pac/ImageFiles/lk-sign.bin differ diff --git a/laphone/pac/ImageFiles/lk_autopoweron-sign.bin b/laphone/pac/ImageFiles/lk_autopoweron-sign.bin new file mode 100755 index 0000000000000000000000000000000000000000..ee82ffeed8b87afa6e385d6e171543783f9ddefc Binary files /dev/null and b/laphone/pac/ImageFiles/lk_autopoweron-sign.bin differ diff --git a/laphone/pac/ImageFiles/logo.bin b/laphone/pac/ImageFiles/logo.bin new file mode 100755 index 0000000000000000000000000000000000000000..b44475d5af91d68342381d8ef9ac6b3c340c72ad Binary files /dev/null and b/laphone/pac/ImageFiles/logo.bin differ diff --git a/laphone/pac/ImageFiles/logo.bin(1) b/laphone/pac/ImageFiles/logo.bin(1) new file mode 100755 index 0000000000000000000000000000000000000000..b44475d5af91d68342381d8ef9ac6b3c340c72ad Binary files /dev/null and b/laphone/pac/ImageFiles/logo.bin(1) differ diff --git a/laphone/pac/ImageFiles/persist.img b/laphone/pac/ImageFiles/persist.img new file mode 100755 index 0000000000000000000000000000000000000000..3301331bed0971ef2a52684ad73baa99ed523573 Binary files /dev/null and b/laphone/pac/ImageFiles/persist.img differ diff --git a/laphone/pac/ImageFiles/prodnv.img b/laphone/pac/ImageFiles/prodnv.img new file mode 100755 index 0000000000000000000000000000000000000000..0ddbc85f8352f12759dadf25a941ff2a1f188718 Binary files /dev/null and b/laphone/pac/ImageFiles/prodnv.img differ diff --git a/laphone/pac/ImageFiles/product.img b/laphone/pac/ImageFiles/product.img new file mode 100755 index 0000000000000000000000000000000000000000..f247bcbe3bc49e44da1ca80634f6f6fec60d4408 Binary files /dev/null and b/laphone/pac/ImageFiles/product.img differ diff --git a/laphone/pac/ImageFiles/sys_prod.img b/laphone/pac/ImageFiles/sys_prod.img new file mode 100644 index 0000000000000000000000000000000000000000..e3c5445e3fce1ed9c528644003d68a516f989e01 Binary files /dev/null and b/laphone/pac/ImageFiles/sys_prod.img differ diff --git a/laphone/pac/ImageFiles/teecfg-sign.bin b/laphone/pac/ImageFiles/teecfg-sign.bin new file mode 100755 index 0000000000000000000000000000000000000000..853e1de0bcad8e6b1b42362ad21870354d93765f Binary files /dev/null and b/laphone/pac/ImageFiles/teecfg-sign.bin differ diff --git a/laphone/pac/ImageFiles/tos-sign.bin b/laphone/pac/ImageFiles/tos-sign.bin new file mode 100755 index 0000000000000000000000000000000000000000..c3761968acea04366332f312029862445d099df3 Binary files /dev/null and b/laphone/pac/ImageFiles/tos-sign.bin differ diff --git a/laphone/pac/ImageFiles/u-boot-spl-16k-emmc-sign.bin b/laphone/pac/ImageFiles/u-boot-spl-16k-emmc-sign.bin new file mode 100644 index 0000000000000000000000000000000000000000..d030ff27b12a86df7b920410910e2241625f7643 Binary files /dev/null and b/laphone/pac/ImageFiles/u-boot-spl-16k-emmc-sign.bin differ diff --git a/laphone/pac/ImageFiles/u-boot-spl-16k-ufs-sign.bin b/laphone/pac/ImageFiles/u-boot-spl-16k-ufs-sign.bin new file mode 100644 index 0000000000000000000000000000000000000000..58e8cf38c66b9af95dfa2ae6eade66ba97b5cd41 Binary files /dev/null and b/laphone/pac/ImageFiles/u-boot-spl-16k-ufs-sign.bin differ diff --git a/laphone/pac/ImageFiles/uis7885_2h10.xml b/laphone/pac/ImageFiles/uis7885_2h10.xml new file mode 100755 index 0000000000000000000000000000000000000000..073dcd7a75093d057ea6739303fae424764c599b --- /dev/null +++ b/laphone/pac/ImageFiles/uis7885_2h10.xml @@ -0,0 +1,2895 @@ + + + + + + + + + + + + + + + + uis7885_2h10 + 1 + 0 + 1 + 1 + + + 0x1BE + + + + + + 0x1BF + + + + + + 0xFFFFFFFF + + + + 0x1A3 + + + + + + 0x1A4 + + + + + + 0x1F0 + + + + + + 0x1F1 + + + + + + 0x1F2 + + + + + + 0x1F4 + + + + + + 0x7E4 + + + + + + 0x91B + + + + + + 0x1B59 + + + + + + 0x1B5B + + + + + + 0x1F64 + + + + + + 0x2067 + + + + + + 0x2068 + + + + + + 0x2069 + + + + + + 0x206a + + + + + + 0x1F66 + + + + + + 0x1F67 + + + + + + 0x1F68 + + + + + + 0x1F69 + + + + + + 0x1F6A + + + + + + 0x1F6B + + + + + + 0x1F6C + + + + + + 0x1F6D + + + + + + 0x1F6E + + + + + + 0x1F6F + + + + + + 0x1F70 + + + + + + 0x1F71 + + + + + + 0x1F72 + + + + + + 0x1F73 + + + + + + 0x1F74 + + + + + + 0x1F75 + + + + + + 0x1F76 + + + + + + 0x1F77 + + + + + + 0x1F78 + + + + + + 0x1F79 + + + + + + 0x1CEF + + + + + + 0x1CF0 + + + + + + 0x1CF1 + + + + + + 0x1CF2 + + + + + + 0x1CF3 + + + + + + 0x1CF4 + + + + + + 0x1CF5 + + + + + + 0x1CF6 + + + + + + 0x1CF7 + + + + + + 0x1CF8 + + + + + + 0x1CF9 + + + + + + 0x1CFA + + + + + + 0x1CFB + + + + + + 0x1CFC + + + + + + 0x1CFD + + + + + + 0x1CFE + + + + + + 0x1CFF + + + + + + 0x1D00 + + + + + + 0x1D01 + + + + + + 0x1D02 + + + + + + 0x1F7A + + + + + + 0x20B2 + + + + + + 0x20B3 + + + + + + 0x20B4 + + + + + + 0x20B5 + + + + + + 0x20B6 + + + + + + 0x20B7 + + + + + + 0x20B8 + + + + + + 0x20B9 + + + + + + 0x20BA + + + + + + 0x20BB + + + + + + 0x20BC + + + + + + 0x20BD + + + + + + 0x20BE + + + + + + 0x20BF + + + + + + 0x20C0 + + + + + + 0x20C1 + + + + + + 0x20C2 + + + + + + 0x20C3 + + + + + + 0x20C4 + + + + + + 0x20C5 + + + + + + 0x1F7B + + + + + + 0x1F7D + + + + + + 0x1F7E + + + + + + 0x1F7F + + + + + + 0x1F80 + + + + + + 0x1F81 + + + + + + 0x1F82 + + + + + + 0x1F83 + + + + + + 0x1F84 + + + + + + 0x1F85 + + + + + + 0x1F86 + + + + + + 0x1F87 + + + + + + 0x1F88 + + + + + + 0x1F89 + + + + + + 0x206B + + + + + + 0x206C + + + + + + 0x206D + + + + + + 0x206E + + + + + + 0x206F + + + + + + 0x2070 + + + + + + 0x2071 + + + + + + 0x1F8A + + + + + + 0x1F8B + + + + + + 0x1F8C + + + + + + 0x1F8D + + + + + + 0x1F8E + + + + + + 0x1F8F + + + + + + 0x1F90 + + + + + + 0x1F91 + + + + + + 0x1F92 + + + + + + 0x1F93 + + + + + + 0x1F94 + + + + + + 0x1F95 + + + + + + 0x1F96 + + + + + + 0x2072 + + + + + + 0x2073 + + + + + + 0x2074 + + + + + + 0x2075 + + + + + + 0x2076 + + + + + + 0x2077 + + + + + + 0x2078 + + + + + + 0x1F97 + + + + + + 0x1F98 + + + + + + 0x1F99 + + + + + + 0x1F9A + + + + + + 0x1F9B + + + + + + 0x1FCB + + + + + + 0x1F9C + + + + + + 0x1F9D + + + + + + 0x1F9E + + + + + + 0x1F9F + + + + + + 0x1FA0 + + + + + + 0x1FA1 + + + + + + 0x1FA2 + + + + + + 0x1FA3 + + + + + + 0x2079 + + + + + + 0x207A + + + + + + 0x1FCC + + + + + + 0x1FCD + + + + + + 0x1FCE + + + + + + 0x1FCF + + + + + + 0x1FD0 + + + + + + 0x1FD1 + + + + + + 0x1FD2 + + + + + + 0x1FD3 + + + + + + 0x1FD4 + + + + + + 0x1FD5 + + + + + + 0x1FD6 + + + + + + 0x1FD7 + + + + + + 0x2081 + + + + + + 0x2082 + + + + + + 0x1FA4 + + + + + + 0x1FA5 + + + + + + 0x1FA6 + + + + + + 0x1FA7 + + + + + + 0x1FA8 + + + + + + 0x1FA9 + + + + + + 0x1FAA + + + + + + 0x1FAB + + + + + + 0x1FAC + + + + + + 0x1FAD + + + + + + 0x1FAE + + + + + + 0x1FAF + + + + + + 0x1FB0 + + + + + + 0x207B + + + + + + 0x207C + + + + + + 0x1FD8 + + + + + + 0x1FD9 + + + + + + 0x1FDA + + + + + + 0x1FDB + + + + + + 0x1FDC + + + + + + 0x1FDD + + + + + + 0x1FDE + + + + + + 0x1FDF + + + + + + 0x1FE0 + + + + + + 0x1FE1 + + + + + + 0x1FE2 + + + + + + 0x1FE3 + + + + + + 0x1FE4 + + + + + + 0x2083 + + + + + + 0x2084 + + + + + + 0x1FB1 + + + + + + 0x1FB2 + + + + + + 0x1FB3 + + + + + + 0x1FB4 + + + + + + 0x1FB5 + + + + + + 0x1FB6 + + + + + + 0x1FB7 + + + + + + 0x1FB8 + + + + + + 0x1FB9 + + + + + + 0x1FBA + + + + + + 0x1FBB + + + + + + 0x1FBC + + + + + + 0x1FBD + + + + + + 0x207D + + + + + + 0x207E + + + + + + 0x1FE5 + + + + + + 0x1FE6 + + + + + + 0x1FE7 + + + + + + 0x1FE8 + + + + + + 0x1FE9 + + + + + + 0x1FEA + + + + + + 0x1FEB + + + + + + 0x1FEC + + + + + + 0x1FED + + + + + + 0x1FEE + + + + + + 0x1FEF + + + + + + 0x1FF0 + + + + + + 0x1FF1 + + + + + + 0x2085 + + + + + + 0x2086 + + + + + + 0x1FBE + + + + + + 0x1FBF + + + + + + 0x1FC0 + + + + + + 0x1FC1 + + + + + + 0x1FC2 + + + + + + 0x1FC3 + + + + + + 0x1FC4 + + + + + + 0x1FC5 + + + + + + 0x1FC6 + + + + + + 0x1FC7 + + + + + + 0x1FC8 + + + + + + 0x1FC9 + + + + + + 0x1FCA + + + + + + 0x207F + + + + + + 0x2080 + + + + + + 0x1FF2 + + + + + + 0x1FF3 + + + + + + 0x1FF4 + + + + + + 0x1FF5 + + + + + + 0x1FF6 + + + + + + 0x1FF7 + + + + + + 0x1FF8 + + + + + + 0x1FF9 + + + + + + 0x1FFA + + + + + + 0x1FFB + + + + + + 0x1FFC + + + + + + 0x1FFD + + + + + + 0x1FFE + + + + + + 0x2087 + + + + + + 0x2088 + + + + + + 0x1FFF + + + + + + 0x2000 + + + + + + 0x2001 + + + + + + 0x2002 + + + + + + 0x2003 + + + + + + 0x2004 + + + + + + 0x2005 + + + + + + 0x2006 + + + + + + 0x2007 + + + + + + 0x2008 + + + + + + 0x2009 + + + + + + 0x200A + + + + + + 0x200B + + + + + + 0x2089 + + + + + + 0x208A + + + + + + 0x208B + + + + + + 0x208C + + + + + + 0x208D + + + + + + 0x208E + + + + + + 0x208F + + + + + + 0x2019 + + + + + + 0x201A + + + + + + 0x201B + + + + + + 0x201C + + + + + + 0x201D + + + + + + 0x201E + + + + + + 0x201F + + + + + + 0x2020 + + + + + + 0x2021 + + + + + + 0x2022 + + + + + + 0x2023 + + + + + + 0x2024 + + + + + + 0x2025 + + + + + + 0x2097 + + + + + + 0x2098 + + + + + + 0x2099 + + + + + + 0x209A + + + + + + 0x209B + + + + + + 0x209C + + + + + + 0x209D + + + + + + 0x200C + + + + + + 0x200D + + + + + + 0x200E + + + + + + 0x200F + + + + + + 0x2010 + + + + + + 0x2011 + + + + + + 0x2012 + + + + + + 0x2013 + + + + + + 0x2014 + + + + + + 0x2015 + + + + + + 0x2016 + + + + + + 0x2017 + + + + + + 0x2018 + + + + + + 0x2090 + + + + + + 0x2091 + + + + + + 0x2092 + + + + + + 0x2093 + + + + + + 0x2094 + + + + + + 0x2095 + + + + + + 0x2096 + + + + + + 0x2026 + + + + + + 0x2027 + + + + + + 0x2028 + + + + + + 0x2029 + + + + + + 0x202A + + + + + + 0x202B + + + + + + 0x202C + + + + + + 0x202D + + + + + + 0x202E + + + + + + 0x202F + + + + + + 0x2030 + + + + + + 0x2031 + + + + + + 0x2032 + + + + + + 0x209E + + + + + + 0x209F + + + + + + 0x20A0 + + + + + + 0x20A1 + + + + + + 0x20A2 + + + + + + 0x20A3 + + + + + + 0x20A4 + + + + + + 0x1D03 + + + + + + 0x1D04 + + + + + + 0x1D05 + + + + + + 0x1D06 + + + + + + 0x1D07 + + + + + + 0x1D08 + + + + + + 0x1D09 + + + + + + 0x1D0A + + + + + + 0x1D0B + + + + + + 0x1D0C + + + + + + 0x1D0D + + + + + + 0x1D0E + + + + + + 0x1D0F + + + + + + 0x1D10 + + + + + + 0x1D11 + + + + + + 0x1D12 + + + + + + 0x1D13 + + + + + + 0x1D14 + + + + + + 0x1D15 + + + + + + 0x1D16 + + + + + + 0x1D17 + + + + + + 0x1D18 + + + + + + 0x1D19 + + + + + + 0x1D1A + + + + + + 0x1D1B + + + + + + 0x1D1C + + + + + + 0x1D1D + + + + + + 0x1D1E + + + + + + 0x1D1F + + + + + + 0x1D20 + + + + + + 0x1D21 + + + + + + 0x1D22 + + + + + + 0x1D23 + + + + + + 0x1D24 + + + + + + 0x1D25 + + + + + + 0x1D26 + + + + + + 0x1D27 + + + + + + 0x1D28 + + + + + + 0x1D29 + + + + + + 0x1D2A + + + + + + 0x1D2B + + + + + + 0x1D2C + + + + + + 0x1D2D + + + + + + 0x1D2E + + + + + + 0x1D2F + + + + + + 0x1D30 + + + + + + 0x1D31 + + + + + + 0x1D32 + + + + + + 0x1D33 + + + + + + 0x1D34 + + + + + + 0x1D35 + + + + + + 0x1D36 + + + + + + 0x1D37 + + + + + + 0x1D38 + + + + + + 0x1D39 + + + + + + 0x1D3A + + + + + + 0x1D3B + + + + + + 0x1D3C + + + + + + 0x1D3D + + + + + + 0x1D3E + + + + + + 0x1A6 + + + + + + 0x17C0 + + + + + + 0x8D1 + + + + + + 0x91D + + + + + + 0x17C4 + + + + + + + + + + + + + + + + + + + + + + + + + + + FDL + FDL1 + FDL + + 0x65000800 + 0x0 + + 1 + 1 + First nand flash download image file + + + FDL2 + FDL2 + NAND_FDL + + 0xB4FFFE00 + 0x0 + + 1 + 1 + Second nand flash download image file + + + EraseSPL + EraseSPL + EraseFlash2 + + 0x0 + 0x0 + + 0 + 2 + Erase spl section + + + NV_NR + NV_NR + NV_COMM + + 0x0 + 0xF00000 + + 1 + 2 + nr_fixnv1 image file + + + ProdNV + ProdNV + CODE2 + + 0x0 + 0xA00000 + + 1 + 2 + Download prodnv section operation + + + PhaseCheck + PhaseCheck + CODE2 + + 0x0 + 0x100000 + + 0 + 2 + miscdata(phase check) section + + + EraseUBOOTLOG + EraseUBOOTLOG + EraseFlash2 + + 0x0 + 0x0 + + 0 + 2 + Erase UBootloader log section + + + Modem_NR + Modem_NR + CODE2 + + 0x0 + 0x0 + + 1 + 2 + nr_modem image file + + + Modem_NR_DELTANV + Modem_NR_DELTANV + CODE2 + + 0x0 + 0x0 + + 1 + 2 + nr_deltanv image file + + + Modem_NR_PHY + Modem_NR_PHY + CODE2 + + 0x0 + 0x0 + + 1 + 2 + nr_phy image file + + + DSP_LTE_AG + DSP_LTE_AG + CODE2 + + 0x0 + 0x0 + + 1 + 2 + lte agdsp image file + + + DFS + DFS + CODE2 + + 0x0 + 0x0 + + 1 + 2 + pm_sys image file + + + CH_SYS + CH_SYS + CODE2 + + 0x0 + 0x0 + + 1 + 2 + ch_sys image file + + + BOOT + BOOT + CODE2 + + 0x0 + 0x0 + + 1 + 0 + Kernel image file + + + VENDOR_BOOT + VENDOR_BOOT + CODE2 + + 0x0 + 0x0 + + 1 + 0 + Kernel vendor_boot image file + + + VENDOR_BOOT_UPDATER + VENDOR_BOOT_UPDATER + CODE2 + + 0x0 + 0x0 + + 1 + 0 + Kernel vendor_boot_updater image file + + + DTBO + DTBO + CODE2 + + 0x0 + 0x0 + + 1 + 2 + dtbo image file + + + Updater + Updater + CODE2 + + 0x0 + 0x0 + + 1 + 0 + Updater image file + + + System + System + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 0 + system image file + + + Vendor + Vendor + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 0 + product image file + + + Product + Product + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 0 + product image file + + + Sys_prod + Sys_prod + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 0 + sys_prod image file + + + Cache + Cache + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 2 + Download cache section operation + + + BlackBox + BlackBox + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 2 + Download blackbox section operation + + + UserData + UserData + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 2 + UserData image file + + + BootLogo + BootLogo + CODE2 + + 1 + 0 + BootLoader boot logo + + + Fastboot_Logo + Fastboot_Logo + CODE2 + + 1 + 2 + Fastboot Logo + + + FLASH_NR + EraseRuntimeNV_NR + EraseFlash2 + + 0x0 + 0x0 + + 0 + 2 + Erase nr_runtimenv1 section operation + + + EraseMisc + EraseMisc + EraseFlash2 + + 0x0 + 0x0 + + 0 + 0 + Erase misc section operation + + + EraseSysdumpdb + EraseSysdumpdb + EraseFlash2 + + 0x0 + 0x0 + + 0 + 0 + Erase misc section operation + + + Trustos + Trustos + CODE2 + + 0x0 + 0x0 + + 1 + 2 + Download trustos operation + + + Teecfg + Teecfg + CODE2 + + 0x0 + 0x0 + + 1 + 2 + Download teecfg operation + + + ISE + ISE + CODE2 + + 0x0 + 0x0 + + 0 + 2 + ISE image file + + + ISE_DATA + ISE_DATA + CODE2 + + 0x0 + 0x0 + + 0 + 2 + ise deploy and data file + + + SML + SML + CODE2 + + 0x0 + 0x0 + + 1 + 2 + Download sml operation + + + UBOOTLoader + UBOOT_LOADER + UBOOT_LOADER2 + + 0x0 + 0x0 + + 1 + 0 + UBootloader image file + + + Persist + Persist + YAFFS_IMG2 + + 0x0 + 0x0 + + 1 + 0 + Persist image file + + + EraseMetadata + EraseMetadata + EraseFlash2 + + 0x0 + 0x0 + + 0 + 1 + Erase metadata section operation + + + SPLLoaderEMMC + SPL_LOADER_EMMC + UBOOT_LOADER2 + + 0x80000000 + 0x0 + + 1 + 0 + spl image file + + + SPLLoaderUFS + SPL_LOADER_UFS + UBOOT_LOADER2 + + 0x80000000 + 0x0 + + 1 + 0 + spl image file + + + NV_CALI_NR + NV_CALI_NR + CODE2 + + 0x0 + 0xF00000 + + 1 + 2 + calinv image file + + + diff --git a/laphone/pac/ImageFiles/vendor_boot.img b/laphone/pac/ImageFiles/vendor_boot.img new file mode 100644 index 0000000000000000000000000000000000000000..9be13e755ec919edc03840b0f2469092333d2f26 Binary files /dev/null and b/laphone/pac/ImageFiles/vendor_boot.img differ diff --git a/laphone/pac/ImageFiles/vendor_boot_updater.img b/laphone/pac/ImageFiles/vendor_boot_updater.img new file mode 100644 index 0000000000000000000000000000000000000000..710e97f57798e29b3d30855ee45d90526a402c0b Binary files /dev/null and b/laphone/pac/ImageFiles/vendor_boot_updater.img differ diff --git a/laphone/pac/Script/UpdatedPacCRC_Linux b/laphone/pac/Script/UpdatedPacCRC_Linux new file mode 100755 index 0000000000000000000000000000000000000000..a5c8e0518f4916183d9ff60363a4bba8c6706a1f Binary files /dev/null and b/laphone/pac/Script/UpdatedPacCRC_Linux differ diff --git a/laphone/pac/Script/mkpac.pl b/laphone/pac/Script/mkpac.pl new file mode 100755 index 0000000000000000000000000000000000000000..78701a924019d827a1912fa17dd010e6732e1083 --- /dev/null +++ b/laphone/pac/Script/mkpac.pl @@ -0,0 +1,739 @@ +#!/usr/bin/perl + +#----------------------------------------------# +# Make pac by conf ini file +#----------------------------------------------# + +use File::Basename; +use FindBin qw($Bin); +my $Current_ProcDir = "$Bin"; +my $Current_PacDir = "$Bin"; +print "Current_ProcDir=$Current_ProcDir","\n"; +my $number = scalar @ARGV; +my $i=0; +my $start = time(); +my $use_fast_CRC = 1; +print "\n\n--------------------------------------\n"; +for($i=0;$i<$number;$i++) +{ + print ${ARGV[$i]}."\n"; +} +print "\n--------------------------------------\n\n"; + +if($number ne 3){ + die "\nInvalid parameters, param number must be 3.\n\n"; +} + +my $pac_file = ${ARGV[0]}; +my $conf_file = ${ARGV[1]}; +my $proj_type = ${ARGV[2]}; +print "Loading config file...\n"; +my %ConfigInfo= Parse_config_file($conf_file); +my $pac_prj = $ConfigInfo{'Setting'}{'PAC_PRODUCT'}; +my $config = $ConfigInfo{'Setting'}{'PAC_CONFILE'}; +my $pac_ver = $ConfigInfo{'Setting'}{'ProductVer'}; +$config =~ s/\\/\//g; +if($config && (substr($config,0,1) eq '.') ) +{ + $config = $Current_ProcDir.'/'.$ConfigInfo{'Setting'}{'PAC_CONFILE'}; +} +my $prj_section = $ConfigInfo{$proj_type}; +my @param = ();#ID , file_path , file_flag, check_flag, omit_flag +@param = Fill_pac_para_array($prj_section,$config); + +my $file_count = scalar @param; +print "\nFile count: $file_count\n"; +for($i=0;$i<$file_count;$i++) +{ + print "$param[$i][0],$param[$i][1],$param[$i][2],$param[$i][3],$param[$i][4]\n"; +} +#File validity checking +for($i=0;$i<$file_count;$i++) +{ + my $file_path = $param[$i][1]; + if ($file_path) + { + if(!-f $file_path) + { + die "\nInvalid parameters, file [".$file_path."] don't exist.\n\n"; + } + if(0 == -s $file_path) + { + die "\nInvalid file [".$file_path."] : it's a empty file.\n\n"; + } + } +} + + + +#product name validity checking +if(!open(DEF, "<$config")) +{ + unlink $pac_file; + die "Can not open $config\n"; +} +my $bValidProduct = 0; +while($line = ) +{ + if($line =~s/\s*<\s*Product\s+name\s*=\s*\"([^\"]*)\"\s*>\s*/$1/g ) + { + print $line."\n"; + if($line eq $pac_prj) + { + $bValidProduct = 1; + last; + } + } +} +close DEF; + +if($bValidProduct == 0) +{ + unlink $pac_file; + die "\nInvalid product [".$pac_prj."]\n\n"; +} + +my @crc16_table = ( + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 ); + +if(!CheckParam()) +{ + unlink $pac_file; + die "parameter error"; +} + +my $fhTarget; +if(!open($fhTarget, "+>$pac_file") ) +{ + unlink $pac_file; + die "Can't open $pac_file"; +} + +binmode $fhTarget; + + +#[[ pack file header +my $szVersion; # packet struct version, unicode, total size is 44 bytes +my $dwHiSize; # the whole packet hight size, 4 bytes +my $dwLoSize; # the whole packet low size, 4 bytes +my $szPrdName; # product name, total size is 512 bytes +my $szPrdVersion; # product version, total size is 512 bytes +my $nFileCount; # the number of files that will be downloaded, the file may be an operation, 4 bytes +my $dwFileOffset; # the offset from the packet file header to the array of FILE_T struct buffer, 4 bytes +my $dwMode; # 4 bytes +my $dwFlashType = 1; # 4 bytes +my $dwNandStrategy; # 4 bytes +my $dwIsNvBackup; # 4 bytes +my $dwNandPageType; # 4 bytes +my $szPrdAlias; # 200 bytes +my $dwOmaDmProductFlag; # 4 bytes +my $dwIsOmaDM; # 4 bytes +my $dwIsPreload; # 4 bytes +my $dwReserved; # 800 bytes +my $dwMagic; # 4 bytes +my $wCRC1; # 2 bytes +my $wCRC2; # 2 bytes +#]] total 2124 bytes +$dwFlashType = $ConfigInfo{'Setting'}{'NandFlash'}; +$tmp = MakeUnicode("BP_R1.0.0"); +do{use bytes; $szVersion = $tmp.(pack("C",0) x (44 - length($tmp)));}; + +$dwHiSize = GetDWORD(0); +$dwLoSize = GetDWORD(0); + +$tmp = MakeUnicode($pac_prj); +do{use bytes;$szPrdName = $tmp.(pack("C",0) x (512 - length($tmp)));}; + +$tmp = MakeUnicode($pac_ver); +do{use bytes;$szPrdVersion = $tmp.(pack("C",0) x (512 - length($tmp)));}; + +$nFileCount = GetDWORD($file_count); + +$dwFileOffset= GetDWORD(2124); + +$dwMode = GetDWORD(0); + +$dwFlashType= GetDWORD($dwFlashType); + +$dwNandStrategy= GetDWORD(0); +$dwIsNvBackup= GetDWORD(1); +$dwNandPageType= GetDWORD(0); + +$tmp = MakeUnicode($pac_prj); +do{use bytes;$szPrdAlias = $tmp.(pack("C",0) x (200 - length($tmp)));}; + +$dwOmaDmProductFlag= GetDWORD(0); +$dwIsOmaDM= GetDWORD(1); +$dwIsPreload= GetDWORD(1); +$dwReserved = pack("C",0) x 800; +$dwMagic= GetDWORD(0xFFFAFFFA); +$wCRC1= GetWORD(0); +$wCRC2= GetWORD(0); + +my $offset = 2124; +$offset += ($file_count * 2580); + +my $cur_offset = $offset; + +do{ +use bytes; +print $fhTarget $szVersion; +print $fhTarget $dwHiSize; +print $fhTarget $dwLoSize; +print $fhTarget $szPrdName; +print $fhTarget $szPrdVersion; +print $fhTarget $nFileCount; +print $fhTarget $dwFileOffset; +print $fhTarget $dwMode; +print $fhTarget $dwFlashType; +print $fhTarget $dwNandStrategy; +print $fhTarget $dwIsNvBackup; +print $fhTarget $dwNandPageType; +print $fhTarget $szPrdAlias; +print $fhTarget $dwOmaDmProductFlag; +print $fhTarget $dwIsOmaDM; +print $fhTarget $dwIsPreload; +print $fhTarget $dwReserved; +print $fhTarget $dwMagic; +print $fhTarget $wCRC1; +print $fhTarget $wCRC2; +}; + +for($i=0; $i<$file_count; $i++) +{ + WriteFileInfoHeader($fhTarget,$i); +} + +for($i=0; $i<$file_count; $i++) +{ + WriteDLFile($fhTarget,$i); +} + +if( (($offset>>32) & 0xFFFFFFFF) >0) +{ + seek $fhTarget,0,SEEK_SET; + $tmp = MakeUnicode("BP_R2.0.1"); + do{use bytes; $szVersion2 = $tmp.(pack("C",0) x (44 - length($tmp)));}; + print $fhTarget $szVersion2; +} + +seek $fhTarget,44,SEEK_SET; +$dwHiSize = GetDWORD(($offset>>32) & 0xFFFFFFFF); +$dwLoSize = GetDWORD($offset & 0xFFFFFFFF); +print $fhTarget $dwHiSize; +print $fhTarget $dwLoSize; + +close $fhTarget; +if($use_fast_CRC == 1) +{ + my $szPara; + if ( $^O =~ /MSWin32/ ) + { + print "Windows os\n"; + $szPara = "\"".$Current_PacDir."/UpdatedPacCRC_Win.exe"."\" "."\"".$pac_file."\""; + #die "\ncompute crc failed.\n" if (system("UpdatedPacCRC_Win.exe ".$pac_file)); + } + else + { + print "Linux os\n"; + $szPara = "\"".$Current_PacDir."/UpdatedPacCRC_Linux"."\" "."\"".$pac_file."\""; + #die "\ncompute crc failed.\n" if (system("./UpdatedPacCRC_Linux ".$pac_file)); + } + print "$szPara\n"; + if (system($szPara)) + { + unlink $pac_file; + die "\ncompute crc failed.\n" + } +} +else +{ + if (!CalcCrc()) + { + unlink $pac_file; + die "\ncompute crc failed.\n" + } +} + + +my $end = time(); + +print "\n---------------------------\n"; +print "$pac_file\n"; +print "\ndo packet success\n\n"; +print "total size: $offset, total time: " . ($end-$start) . "s\n"; +print "---------------------------\n\n"; + +exit 0; + +sub MakeUnicode{ + my ($d) = @_; + $d =~ s/(.)/$1\x{00}/g; + return $d; +} + +sub GetDWORD{ + my ($d) = @_; + #use bytes; + $d = pack("V",$d); + return $d; +} + +sub GetWORD{ + my ($d) = @_; + #use bytes; + $d = pack("v",$d); + return $d; +} + + +sub WriteFileInfoHeader +{ + my $fh = shift; + my $index = shift; + my $id = $param[$index][0]; + my $file_path = $param[$index][1]; + my $file_flag = $param[$index][2]; + my $check_flag = $param[$index][3]; + my $omit_flag = $param[$index][4]; + my $addr = $param[$index][5]; + my $addr2 = $param[$index][6]; + + my $data; + my $temp; + + my $dwSize; # size of this struct itself + my $szFileID; # file ID,such as FDL,Fdl2,NV and etc. 512 bytes + my $szFileName; # file name,in the packet bin file,it only stores file name. 512 bytes + # but after unpacketing, it stores the full path of bin file + my $szFileVersion; # Reserved now. 504 bytes + my $dwHiFileSize; # hight file size + my $dwHiDataOffset; # hight data offset + my $dwLoFileSize; # low file size + my $nFileFlag; # if "0", means that it need not a file, and + # it is only an operation or a list of operations, such as file ID is "FLASH" + # if "1", means that it need a file + my $nCheckFlag; # if "1", this file must be downloaded; + # if "0", this file can not be downloaded; + my $dwLoDataOffset; # the offset from the packet file header to this file data + my $dwCanOmitFlag; # if "1", this file can not be downloaded and not check it as "All files" + # in download and spupgrade tool. + my $dwAddrNum; + my $dwAddr; # 4*5 bytes + my $dwReserved; # Reserved for future,not used now. 249x4 bytes + + + $dwSize = GetDWORD(2580); + $data = $data.$dwSize; + + $tmp = MakeUnicode($id); + do{use bytes;$szFileID = $tmp.(pack("C",0) x (512 - length($tmp)));}; + $data = $data.$szFileID; + + $tmp = $file_path; + $tmp =~ s/\\/\//g; + $tmp =~ s/.*\/(.*)$/$1/g; + $tmp = MakeUnicode($tmp); + do{use bytes;$szFileName = $tmp.(pack("C",0) x (512 - length($tmp)));}; + $data = $data.$szFileName; + + $szFileVersion = pack("C",0) x 504; + $data = $data.$szFileVersion; + + my $file_size = 0; + if($file_flag != 0 && ($check_flag != 0 || $file_flag == 2)) + { + $file_size = -s $file_path; + $dwHiFileSize = GetDWORD(($file_size>>32) & 0xFFFFFFFF); + $dwLoFileSize = GetDWORD($file_size & 0xFFFFFFFF); + } + else + { + $dwHiFileSize = GetDWORD(0); + $dwLoFileSize = GetDWORD(0); + } + + $nFileFlag = GetDWORD($file_flag); + $nCheckFlag = GetDWORD($check_flag); + + if($file_flag != 0 && ($check_flag != 0 || $file_flag == 2)) + { + $dwHiDataOffset = GetDWORD(($offset>>32) & 0xFFFFFFFF); + $dwLoDataOffset = GetDWORD($offset & 0xFFFFFFFF); + } + else + { + $dwHiDataOffset = GetDWORD(0); + $dwLoDataOffset = GetDWORD(0); + } + + $data = $data.$dwHiFileSize; + $data = $data.$dwHiDataOffset; + $data = $data.$dwLoFileSize; + $data = $data.$nFileFlag; + $data = $data.$nCheckFlag; + $data = $data.$dwLoDataOffset; + + $dwCanOmitFlag = GetDWORD($omit_flag); + $data = $data.$dwCanOmitFlag; + + if($file_flag != 2) + { + if($addr2 != 0xFFFFFFFF) + { + $dwAddrNum = GetDWORD(2); + $data = $data.$dwAddrNum; + + my $dwAddr=GetDWORD($addr); + $data = $data.$dwAddr; + + my $dwAddr2=GetDWORD($addr2); + $data = $data.$dwAddr2; + + my $dwAddr3 = pack("C",0) x 12; + $data = $data.$dwAddr3; + } + else + { + $dwAddrNum = GetDWORD(1); + $data = $data.$dwAddrNum; + + my $dwAddr=GetDWORD($addr); + $data = $data.$dwAddr; + + my $dwAddr3 = pack("C",0) x 16; + $data = $data.$dwAddr3; + } + } + else + { + my $dwTmp = pack("C",0) x 24; + $data = $data.$dwTmp; + } + + my $dwReserved= pack("C",0) x (249*4); #249x4 bytes + $data = $data.$dwReserved; + + $offset += $file_size; + #$offset = (($offset+3) & 0xFFFFFFFC); + #print "\n--- $offset ----- \n"; + + use bytes; + print $fh $data; +} + +sub WriteDLFile +{ + my $fh = shift; + my $index = shift; + my $file_path = $param[$index][1]; + + my $len; + $len = do{use bytes; length $file_path}; + return 0 if ($len == 0 || !(-e $file_path)) ; + + + if (!open(FILE, "<$file_path")) + { + unlink $pac_file; + die "Can't open $file_path"; + } + binmode FILE; + + my $file_size = -s $file_path; + print " deal with [$file_path]: file size: $file_size ...\n"; + my $max_size = 1024*1024*50; + my $left = $file_size; + my $buf; + + do + { + if($left > $max_size) + { + $len = $max_size; + } + else + { + $len = $left; + } + + use bytes; + read FILE,$buf,$len; + + #print $fh pack("C" x $len,$buf); + print $fh $buf; + + $left -= $len; + + }while($left>0); + + #my $align = (($file_size+3) & 0xFFFFFFFC) - $file_size ; + #if($align>0) + #{ + # print $fh (pack("C",0) x $align); + #} +} + +sub CalcCrc +{ + if (!open(TARGET, "+<$pac_file")) + { + unlink $pac_file; + die "Can't open $pac_file"; + } + binmode TARGET; + + my $buf; + + print "\ncrc first part...\n"; + seek TARGET,0,SEEK_SET; + + my $wCRC1 = 0; + read(TARGET,$buf,2120); + my @part1 = unpack("C" x 2120,$buf); + $wCRC1 = crc16($wCRC1,@part1); + @part1=(); + $wCRC1 = GetWORD($wCRC1); + seek TARGET,2120,SEEK_SET; + print TARGET $wCRC1; + + + print "\ncrc second part...\n"; + seek TARGET,2124,SEEK_SET; + my $wCRC2 = 0; + + my $size = $offset-2124; + my $max_size = 1024*1024; + my $left = $size; + + do{ + if($left > $max_size) + { + $len = $max_size; + } + else + { + $len = $left; + } + read TARGET,$buf,$len; + + my @part = unpack("C" x $len,$buf); + $wCRC2 = crc16($wCRC2,@part); + @part = (); + + $left -= $len; + }while($left>0); + + $wCRC2 = GetWORD($wCRC2); + seek TARGET,2122,SEEK_SET; + print TARGET $wCRC2; + + close TARGET; + return True; +} + +sub crc16 +{ + my $crc = shift; + my @data = @_; + + foreach $b (@data) {$crc = (($crc >> 8)^( ${ crc16_table[ ($crc^$b) & 0xff] } )) & 0xFFFF;} + + return $crc & 0xFFFF; +} + +sub CheckParam +{ + my $j; + my $error_msg = ""; + for ($j = 0; $j < $file_count; $j++) + { + my $id = $param[$j][0]; + my $file_path = $param[$j][1]; + my $file_flag = $param[$j][2]; + my $check_flag = $param[$j][3]; + my $omit_flag = $param[$j][4]; + + if($file_flag == 0x0101) + { + if(!(-e $file_path)) + { + $error_msg .= "$id: [$file_path] does not exist\n"; + } + else + { + $param[$j][3] = 1; + $param[$j][4] = 0; + } + } + elsif($file_flag == 1) + { + if(!(-e $file_path)) + { + $param[$j][3] = 0; + } + } + elsif($file_flag == 1) + { + $param[$j][1] = ""; + } + } + + if(length($error_msg)>0) + { + print $error_msg; + return 0; + } + + return true; + +} + +sub Fill_pac_para_array +{ + #ID , file_path , file_flag, check_flag, omit_flag + my $section_hash = shift; + my $xml_file = shift; + my $index = 0; + my @OutArray = (); + my ($key, $value); + + while ( ($key, $value) = each(%$section_hash) ) + { + my ($sel, $file) = split (/@/, $value); + if( $key eq 'FDL' || $key eq 'FDL2') + { + $file =~ s/\\/\//g; + $OutArray[$index][0] = $key; + $OutArray[$index][1] = $file; + if( $file && (substr($file,0,1) eq '.')) + { + $OutArray[$index][1] = $Current_ProcDir.'/'.$file; + } + $OutArray[$index][2] = 0x0101; + $OutArray[$index][3] = 0x1; + $OutArray[$index][4] = 0x0; + $OutArray[$index][5] = 0x0; + $OutArray[$index][6] = 0xFFFFFFFF; + $index++; + } + + } + + while ( ($key, $value) = each(%$section_hash) ) + { + my ($sel, $file) = split (/@/, $value); + if( $key ne 'FDL' && $key ne 'FDL2') + { + $OutArray[$index][0] = $key; + $OutArray[$index][1] = $file; + if($file) + { + if( substr($file,0,1) eq '.') + { + $OutArray[$index][1] = $Current_ProcDir.'/'.$file; + } + $OutArray[$index][2] = 0x1; + } + else + { + $OutArray[$index][2] = 0x0; + } + + $OutArray[$index][3] = 0x1; + $OutArray[$index][4] = 0x0; + if($sel == 0) + { + $OutArray[$index][3] = 0x0; + $OutArray[$index][4] = 0x1; #omit_flag + } + $OutArray[$index][5] = 0x0; + $OutArray[$index][6] = 0xFFFFFFFF; + $index++; + } + } + + # add xml file + $OutArray[$index][0] = ""; + $OutArray[$index][1] = $xml_file; + $OutArray[$index][2] = 0x2; + $OutArray[$index][3] = 0x0; + $OutArray[$index][4] = 0x0; + $OutArray[$index][5] = 0x0; + $OutArray[$index][6] = 0xFFFFFFFF; + + return @OutArray; +} + + + +sub Parse_config_file +{ + my %all_settings = (); + my ($config_line, $key, $value); + my $File = shift; + chomp($File); + open (CONFIG, "<$File") or die "ERROR: Config file not found : $File"; + my $entry; + while ($config_line = ) + { + chomp ($config_line); # Get rid of the trailling \n + $config_line =~ s/^\s*//; # Remove spaces at the start of the line + $config_line =~ s/\s*$//; # Remove spaces at the end of the line + #print "$config_line\n"; + if ( ($config_line !~ /^#/) && ($config_line !~ /^;/) && ($config_line ne "") ) + { # Ignore lines starting with # and blank lines + if ($config_line =~ /\s*\[\s*\S+\s*\]\s*/) + { + #ignore section line + $config_line =~s/\s*\[\s*([^\]]*)\s*\]\s*/$1/g; + $config_line=~s/ +$//; + $entry = $config_line; + } + else + { + ($key, $value) = split (/=/, $config_line); # Split each line into name value pairs + $key =~ s/^\s*//; + $key =~ s/\s*$//; + $value =~ s/^\s*//; + $value =~ s/\s*$//; + #print "($key, $value)", "\n"; + $all_settings{$entry}{$key} = $value; + } + } + } + + close(CONFIG); + return %all_settings ; +} diff --git a/laphone/pac/uis7885_pac.sh b/laphone/pac/uis7885_pac.sh new file mode 100755 index 0000000000000000000000000000000000000000..0ef640a7414f61c7cd62abd0729dde74ee96d365 --- /dev/null +++ b/laphone/pac/uis7885_pac.sh @@ -0,0 +1,60 @@ +#!/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 +set -v + +curr=$(pwd -P) +basepath=$(cd `dirname $0`; pwd) + +# args from build.sh or from bash execue +if [[ $# -ge 1 ]]; then +package_path=$1 +else +package_path=`cd ../../../../../out/laphone/packages/phone/images; pwd` +fi + +# some prebuild img here +work_path=$basepath/ImageFiles/ + +# we output the pac to this dest path +target_path=$package_path/laphone_nosec_userdebug.tar.gz +pac_path=$package_path/laphone_nosec_userdebug.pac + + +echo curr path: $curr +echo package path: $package +echo target path: $work_path + +# del it first +if [[ -f "$target_path" ]]; then + rm -f $target_path +fi + +# cp image to work path +cp $package_path/*.img $work_path -rfv +# cp $package_path/*.bin $work_path + +# go to work path and make pac +cd $work_path +perl ./../Script/mkpac.pl "$pac_path" "flash.cfg" "FlashParam" + +tar -czf $target_path -C $package_path laphone_nosec_userdebug.pac + +# check if pac is done +if [[ -f "$target_path" ]]; then +# rm $pac_path + echo -e "\033[32m laphone build pac successful. \033[0m" +fi diff --git a/laphone/startup/reboot_loader/BUILD.gn b/laphone/startup/reboot_loader/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..6d7bda0c845f06459fdbe50372af504819f6ee21 --- /dev/null +++ b/laphone/startup/reboot_loader/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# 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. + +import("//build/ohos.gni") + +ohos_prebuilt_shared_library("rebootloader") { + source = "lib/librebootloader.z.so" + if (target_cpu == "arm64") { + module_install_dir = "lib64/init/autorun" + } else { + module_install_dir = "lib/init/autorun" + } + install_enable = true + install_images = [ "vendor" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + diff --git a/laphone/startup/reboot_loader/lib/librebootloader.z.so b/laphone/startup/reboot_loader/lib/librebootloader.z.so new file mode 100755 index 0000000000000000000000000000000000000000..cd343f3724551f981189d7259f4383501b499a63 Binary files /dev/null and b/laphone/startup/reboot_loader/lib/librebootloader.z.so differ diff --git a/laphone/updater/BUILD.gn b/laphone/updater/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..07232e0109d8d0f6d3c0e88dbc3d20a71e922757 --- /dev/null +++ b/laphone/updater/BUILD.gn @@ -0,0 +1,97 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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. + +import("//build/ohos.gni") + +ohos_prebuilt_etc("updater_init.cfg") { + source = "config/init.cfg" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("updater_usb_init.cfg") { + source = "config/init.usb.cfg" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("updater_init_usb_configfs.cfg") { + source = "config/init.usb.configfs.cfg" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("signing_cert.crt") { + source = "config/signing_cert.crt" + module_install_dir = "etc/certificate" + install_images = [ + "updater", + "system" + ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("fstab.updater") { + source = "config/fstab.updater" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("product_cfg.json") { + source = "config/product_cfg.json" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_etc("OTA.hap") { + source = "config/OTA.hap" + module_install_dir = "app/com.ohos.ota" + part_name = "device_laphone" + subsystem_name = "device_laphone" +} + +ohos_prebuilt_executable("novatek_ts_fw_updater") { + source = "//vendor/$product_company/$product_name/modules/novatek_nt36xxx/novatek_ts_fw.bin" + module_install_dir = "lib/firmware" + install_images = [ "updater" ] + part_name = "device_laphone" + subsystem_name = "device_laphone" + install_enable = true +} + +if (enable_ramdisk) { + ohos_copy("updater_ramdisk_resource_config.ini") { + sources = [ "updater_ramdisk_resource_config.ini" ] + outputs = + [ "$product_output_dir/phone/updater_ramdisk_resource_config.ini" ] + } +} + +group("updater_files") { + deps = [ + ":fstab.updater", + ":signing_cert.crt", + ":updater_init.cfg", + ":updater_init_usb_configfs.cfg", + ":updater_usb_init.cfg", + ":novatek_ts_fw_updater", + ":product_cfg.json", + ":OTA.hap", + ] +} diff --git a/laphone/updater/config/OTA.hap b/laphone/updater/config/OTA.hap new file mode 100644 index 0000000000000000000000000000000000000000..6403722f5b474a6597a3b5c582e905c74b76fae0 Binary files /dev/null and b/laphone/updater/config/OTA.hap differ diff --git a/laphone/updater/config/fstab.updater b/laphone/updater/config/fstab.updater new file mode 100644 index 0000000000000000000000000000000000000000..199b8fca54ca0e11cfa78c685542025787fdbdd6 --- /dev/null +++ b/laphone/updater/config/fstab.updater @@ -0,0 +1,6 @@ +# fstab file. +# +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/system /usr ext4 ro,barrier=1 wait,required +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/vendor /vendor ext4 ro,barrier=1 wait,required +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/userdata /data f2fs discard,noatime,nosuid,nodev wait,check,fileencryption=software,quota +/dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name/misc /misc none none wait,required diff --git a/laphone/updater/config/init.cfg b/laphone/updater/config/init.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e1bbe85f1d394159f7751d0226bcfb63ee48d9e8 --- /dev/null +++ b/laphone/updater/config/init.cfg @@ -0,0 +1,86 @@ +{ + "jobs" : [{ + "name" : "pre-init", + "cmds" : [ + "symlink /system/bin /bin", + "start ueventd" + ] + }, { + "name" : "init", + "cmds" : [ + "wait /dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name", + "symlink /dev/block/platform/soc/soc:ap-ahb/22000000.ufs/by-name /dev/block/by-name", + "mkdir /system", + "mkdir /vendor", + "mkdir /tmp", + "mkdir /param", + "mount tmpfs tmpfs /tmp", + "chown 0 2000 /tmp", + "chmod 0755 /tmp", + "chmod 0755 /param", + "mkdir /dev/usb-ffs 0770 shell shell", + "mkdir /dev/usb-ffs/hdc 0770 shell shell", + "mkdir /dev/usb-ffs/hdc 0770 shell shell", + "mkdir /config 0770 shell shell", + "mount configfs none /config", + "setparam sys.usb.config hdc" + ] + }, { + "name" : "post-init", + "cmds" : [ + "trigger fs", + "trigger boot", + "start shell", + "start updater" + ] + }, { + "name" : "fs", + "cmds" : [ + "insmod /modules/nvt_nt36xxx_spi_ts.ko", + "sleep 3" + ] + } + ], + "services" : [{ + "name" : "shell", + "path" : ["/bin/sh"], + "uid" : 0, + "gid" : 2000, + "once" : 0, + "importance" : 0, + "console" : 1 + }, { + "name" : "updater", + "path" : ["/bin/updater"], + "uid" : 0, + "gid" : 0, + "importance" : 0, + "caps" : [0, 1] + }, { + "name" : "ueventd", + "path" : ["/bin/ueventd"], + "uid" : 0, + "gid" : 2000, + "once" : 0, + "importance" : 0, + "caps" : [0, 1], + "socket" : [{ + "name" : "ueventd", + "family" : "AF_NETLINK", + "type" : "SOCK_DGRAM", + "protocol" : "NETLINK_KOBJECT_UEVENT", + "permissions" : "0660", + "uid" : "0", + "gid" : "2000", + "option" : [ + "SOCKET_OPTION_PASSCRED", + "SOCKET_OPTION_RCVBUFFORCE", + "SOCK_CLOEXEC", + "SOCK_NONBLOCK" + ] + }], + "critical" : [ 0, 15, 5], + "ondemand" : true + } + ] +} diff --git a/laphone/updater/config/init.usb.cfg b/laphone/updater/config/init.usb.cfg new file mode 100644 index 0000000000000000000000000000000000000000..1de6b4651d5cdfd2f2f668b3583bdbf00e9e3fbb --- /dev/null +++ b/laphone/updater/config/init.usb.cfg @@ -0,0 +1,32 @@ +{ + "jobs" : [{ + "name" : "boot && param:persist.sys.usb.config=*", + "condition" : "boot && persist.sys.usb.config=*", + "cmds" : [ + "setparam sys.usb.config ${persist.sys.usb.config}" + ] + }, { + "name" : "param:sys.usb.config=none && param:sys.usb.configfs=0", + "condition" : "sys.usb.config=none && sys.usb.configfs=0", + "cmds" : [ + "stop hdcd" + ] + } + ], + "services" : [{ + "name" : "hdcd", + "path" : ["/bin/hdcd"], + "socket" : [{ + "name" : "hdcd", + "family" : "AF_UNIX", + "type" : "SOCK_SEQPACKET", + "protocol" : "default", + "permissions" : "0660", + "uid" : "system", + "gid" : "system" + }], + "start-mode" : "condition", + "disabled" : 1 + } + ] +} diff --git a/laphone/updater/config/init.usb.configfs.cfg b/laphone/updater/config/init.usb.configfs.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3c36ead697a8a86db61be88a2b64182f9d183f67 --- /dev/null +++ b/laphone/updater/config/init.usb.configfs.cfg @@ -0,0 +1,39 @@ +{ + "jobs" : [{ + "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", + "condition" : "sys.usb.config=none && sys.usb.configfs=1", + "cmds" : [ + "write /config/usb_gadget/g1/UDC none", + "stop hdcd", + "setparam sys.usb.ffs.ready 0", + "write /config/usb_gadget/g1/bDeviceClass 0", + "write /config/usb_gadget/g1/bDeviceSubClass 0", + "write /config/usb_gadget/g1/bDeviceProtocol 0", + "rm /config/usb_gadget/g1/configs/b.1/f1", + "setparam sys.usb.state ${sys.usb.config}" + ] + }, { + "name" : "param:startup.service.ctl.hdcd=stopped", + "condition" : "startup.service.ctl.hdcd=stopped", + "cmds" : [ + "setparam sys.usb.ffs.ready 0" + ] + }, { + "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", + "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", + "cmds" : [ + "start hdcd" + ] + }, { + "name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=hdc && param:sys.usb.configfs=1", + "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc && sys.usb.configfs=1", + "cmds" : [ + "write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration hdc", + "symlink /config/usb_gadget/g1/functions/ffs.hdc /config/usb_gadget/g1/configs/b.1/f1", + "write /config/usb_gadget/g1/UDC ${sys.usb.controller}", + "setparam sys.usb.state ${sys.usb.config}" + ] + } + ] +} + diff --git a/laphone/updater/config/product_cfg.json b/laphone/updater/config/product_cfg.json new file mode 100644 index 0000000000000000000000000000000000000000..d98dae2456c888f119bc96c0c0af58f0de63787e --- /dev/null +++ b/laphone/updater/config/product_cfg.json @@ -0,0 +1,3 @@ +{ + "lowBatteryLevel": 40 +} diff --git a/laphone/updater/config/rsa_private_key.pem b/laphone/updater/config/rsa_private_key.pem new file mode 100644 index 0000000000000000000000000000000000000000..6c999593b77a38a6cc20d1519bbd80856f8e7440 --- /dev/null +++ b/laphone/updater/config/rsa_private_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA1c0DaNjcI61Et4MuOuy61itvMmvrFQ//FhB7FyS0HrYIvYoX +wMwR3XYLpvkD+5iYKYW5BHb23OtrCRytwWeiWqDmDGqeYyHFECifqSXR3b8TJQdn +eTP5GM/YMQR5IKTaSBrJVwp+VfJuKxPMpzrhRXpcGJzYpitK0xoVrim+EnuqYRZQ +kNMoHA8XJDOvNtKMEOKMUd018r5Re+YxHIcywfHFg82yYyHwhd5/x69Bh/SzFnnz +754SReUBlusbe6C5aC4t9XGc1OogtaSPCJizOmLXOSbbx10lOhHgoykMXo0kJo+r +EOg3NFeaU2eotD5ennxkev62wjHGeBwdLUx7zwIDAQABAoIBADwSZHjbJc9oabxe +QWkRBtYSUiYKqHy8h+G9M7im+Wz/nKkU2eOz8vkUp+V8ZiAVGfvgtMGKY4ZjJyni +QvfqlHV+a+TlOCeGX4ZQw7uVAsiZXVm0IOCvN7g+/fGX3ijL6QEFdbjdG+4uNcIo +yAHcy1roLGRF/aGC3H1AAQN0exFZ5js7XCSpSNqgUDTfhQi2KZYmfUJZK1vvYbsC +FD6jZypBqzxMNJpMW7eBrVvaNrICZqVXLUxeygbWxbjBOB8nqn2+wYsPA7cCzFeT +S0rI8VY7lAMoNqRGTvELFHfdUQ0KPuLtM9CGFegemsOOi5sLqHAoTogiHetzeHsq +/tgmuGECgYEA9j9Y0PTerHR2+3yF97BCRF33YopC/8JvEk3wSh8NM27t/lRo20gN +YE/REgMpItjUnnspHyf6or/IYVhb0vjS+1diTDyDeK6T4Fq5ZZE6hzu14YXZUUxM +3ZRL+wB6P11CuWzcY9QcNDSJ4e03M07nduD8oFMBztUrIa9ajVcrl0cCgYEA3kSy +W32EPcMa1dIAYdr9k720s5jbOUJ70p+oVkForXimqpolEi8rgI8QgMrz6fZ8Pqa+ +/ETl/sCTETHP3KaCFxPPT8bhbHE1Xf1xh/lhZUGzWfuJdp8Hq9Z1jCyDzTj3R/sR +htTHsirdx365DEyFGK3yHksuEHiy1y+HyHWKSzkCgYEAq7N1+ZWUook+4ZJtU00K +l+MxePtRRkbL7eZ8cyJ9sOxbdGhlCOmPsiVVcYrUpyCr+KmF/dyBjfPOA9p5hHzN +mEXRG7liLscEA38fIOwH9H21D8ClzGM4gZRC+ozVsNMVkHeQoOcol1o+/lLKl7Mg +ACtW22+lphPLVFyR9lXe5kcCgYEAwcsZy4V7qLIVErsgFDHxCEDObgznj1w1Q+Zq +ypILJ7zbbEIr8lfoURXr6K+LzcFYgPO375JPCjhzwfkxaAxRvrdJ+R/JalimlEWn +GExKLBQFwX38U83CzYOWR9qELInvqPXySSH635BagFcwFtYc8fCv+tPH3Rqvq8lI +VXKOWpkCgYAZ9KmQbtne6iwoyNGDi7ek3afHGtpxKdEZfvaFsSqzB4VHIaRgu6Nu +9+77O4sWRAoz8xoFoXM6pPwxNcvHDgPLCDBNGY9sum13EOBxI2Jfk+cBA4Dqu873 +BkOjOW9dANo7aVMXfvca4y+/jW+e5ah9iywqzhTljXtNQmj0gy1LQA== +-----END RSA PRIVATE KEY----- diff --git a/laphone/updater/config/signing_cert.crt b/laphone/updater/config/signing_cert.crt new file mode 100644 index 0000000000000000000000000000000000000000..689f7354f4b31441246f10f68a7ec1cd8e5b961a --- /dev/null +++ b/laphone/updater/config/signing_cert.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDazCCAlOgAwIBAgIUA5UPHkbyXYOzywwlULdFaVYZ5cUwDQYJKoZIhvcNAQEL +BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM +GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzA1MTUwOTEwNTRaFw0zMzA1 +MTIwOTEwNTRaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw +HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDVzQNo2NwjrUS3gy467LrWK28ya+sVD/8WEHsXJLQe +tgi9ihfAzBHddgum+QP7mJgphbkEdvbc62sJHK3BZ6JaoOYMap5jIcUQKJ+pJdHd +vxMlB2d5M/kYz9gxBHkgpNpIGslXCn5V8m4rE8ynOuFFelwYnNimK0rTGhWuKb4S +e6phFlCQ0ygcDxckM6820owQ4oxR3TXyvlF75jEchzLB8cWDzbJjIfCF3n/Hr0GH +9LMWefPvnhJF5QGW6xt7oLloLi31cZzU6iC1pI8ImLM6Ytc5JtvHXSU6EeCjKQxe +jSQmj6sQ6Dc0V5pTZ6i0Pl6efGR6/rbCMcZ4HB0tTHvPAgMBAAGjUzBRMB0GA1Ud +DgQWBBQN14qTSbmLinZUNURv9tloZP1xqDAfBgNVHSMEGDAWgBQN14qTSbmLinZU +NURv9tloZP1xqDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDI +HOj8EMkuW2HClavTIFD62xrbZrCXrffsOnR2kaWZkwb+ooNlTxhYxV7EUeW/raVL +c13+3LCz0NifJ6FjR9gl5BjcIEB6YgCm/juYpVV4OF8xMfqs7NzXtNkbgMc+zuWG +9+v+tx2pykoYOCBO/oVm7vi2vMYuFjExtGWYMJfziyuIRKBrI3NDQJ7+HloeNTLu +Gr9+oViPksgJwd7Qc2OALOXGM8vWNadYEMzmBxrqwD2Krb1kbNyrAaklb5fP5OWy +SOsrpaYEgmBYaohMZ+TJ37GMYYDA7PXZWdlHTRTaCMZt5vkfo3YGWwR3ebKWrEO+ +zhGfuSZSLVOjroJLZLY3 +-----END CERTIFICATE-----