From 1a57216a36456359179f8538642be16b3e233c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 9 Apr 2025 15:14:06 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:updater=5Fbinary=E9=9D=99=E6=80=81?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: I376b80ebabbe020efa52ed35ecd298c308350966 --- bundle.json | 7 ++ .../kits/include/slot_info/slot_info_static.h | 27 +++++ interfaces/kits/slot_info/BUILD.gn | 21 ++++ .../kits/slot_info/slot_info_static.cpp | 98 +++++++++++++++++++ services/BUILD.gn | 1 + services/flow_update/update_bin/BUILD.gn | 1 + .../update_bin/component_processor.cpp | 4 +- services/stream_update/BUILD.gn | 1 + services/stream_update/bin_chunk_update.cpp | 14 +-- services/updater.cpp | 11 +++ services/updater_binary/BUILD.gn | 2 +- .../updater_binary/update_image_block.cpp | 9 +- .../updater_binary/update_image_patch.cpp | 7 +- services/updater_binary/update_processor.cpp | 11 +-- updater_default_cfg.gni | 2 +- 15 files changed, 192 insertions(+), 24 deletions(-) create mode 100755 interfaces/kits/include/slot_info/slot_info_static.h create mode 100755 interfaces/kits/slot_info/slot_info_static.cpp diff --git a/bundle.json b/bundle.json index c997c816..30af65ae 100644 --- a/bundle.json +++ b/bundle.json @@ -320,6 +320,13 @@ "header_base": "//base/update/updater/interfaces/kits/include" } }, + { + "name": "//base/update/updater/interfaces/kits/slot_info:libslotinfo_static", + "header": { + "header_files": [], + "header_base": "//base/update/updater/interfaces/kits/include" + } + }, { "name": "//base/update/updater/services/script:libthreadpool", "header": { diff --git a/interfaces/kits/include/slot_info/slot_info_static.h b/interfaces/kits/include/slot_info/slot_info_static.h new file mode 100755 index 00000000..5d36d31f --- /dev/null +++ b/interfaces/kits/include/slot_info/slot_info_static.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 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. + */ +#ifndef SLOT_INFO_STATIC_H +#define SLOT_INFO_STATIC_H + +#include +#include +#include +#include + +namespace Updater { +void GetPartitionSuffixStatic(std::string &suffix); +void GetActivePartitionSuffixStatic(std::string &suffix); +} // Updater +#endif /* SLOT_INFO_STATIC_H */ \ No newline at end of file diff --git a/interfaces/kits/slot_info/BUILD.gn b/interfaces/kits/slot_info/BUILD.gn index e513ffb5..83cfe4d2 100644 --- a/interfaces/kits/slot_info/BUILD.gn +++ b/interfaces/kits/slot_info/BUILD.gn @@ -38,3 +38,24 @@ ohos_static_library("libslotinfo") { subsystem_name = "updater" part_name = "updater" } +ohos_static_library("libslotinfo_static") { + sources = [ "slot_info_static.cpp" ] + + include_dirs = [ + "${updater_path}/interfaces/kits/include", + "${updater_path}/services/include", + "${updater_path}/utils/include", + ] + + if (init_feature_ab_partition) { + defines = [ "UPDATER_AB_SUPPORT" ] + external_deps = [ + "c_utils:utilsbase", + "hilog:libhilog_base", + ] + } + + subsystem_name = "updater" + part_name = "updater" +} + diff --git a/interfaces/kits/slot_info/slot_info_static.cpp b/interfaces/kits/slot_info/slot_info_static.cpp new file mode 100755 index 00000000..8bb374e2 --- /dev/null +++ b/interfaces/kits/slot_info/slot_info_static.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2025 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. + */ + +#include +#include "slot_info/slot_info_static.h" +#include "log/log.h" +#include + +namespace Updater { +#define MISC_DEVICE_NODE "/dev/block/by-name/bootctrl" +#ifndef UPDATER_AB_SUPPORT +void GetPartitionSuffixStatic(std::string &suffix) +{ + suffix = ""; +} +void GetActivePartitionSuffixStatic(std::string &suffix) +{ + suffix = ""; +} +#else +static int ReadMisc(off_t offset, off_t size) +{ + int fd = open(MISC_DEVICE_NODE, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + if (fd < 0) { + return -1; + } + if (lseek(fd, offset, SEEK_SET) < 0) { + LOG(ERROR) << "Failed lseek miscDevice"; + close(fd); + return -1; + } + int32_t slot = 0; + if (read(fd, &slot, size) != size) { + LOG(ERROR) <<"Failed read migic miscDevice"; + close(fd); + return -1; + } + LOG(INFO) << "Read slot:" << slot; + close(fd); + return slot; +} + +void GetPartitionSuffixStatic(std::string &suffix) +{ + // 1. 通过popen执行cat命令获取cmdline内容 + int32_t current_slot = ReadMisc(1024, 4); + + LOG(INFO) << "current_slot: " << current_slot; + + // 4. 校验槽位有效性 + if (current_slot < 1 || current_slot > 2) { + LOG(ERROR) << "Invalid slot value: " << current_slot + << ", expected 1 or 2"; + suffix = ""; + return; + } + + // 5. 生成目标分区后缀(取反当前槽位) + // 业务逻辑:当前槽位1时写_b分区,槽位2时写_a分区 + suffix = (current_slot == 1) ? "_b" : "_a"; + LOG(INFO) << "2---Active slot: " << current_slot + << ", target suffix: " << suffix; +} + +void GetActivePartitionSuffixStatic(std::string &suffix) +{ + // 1. 通过popen执行cat命令获取cmdline内容 + int32_t current_slot = ReadMisc(1024, 4); + + LOG(INFO) << "current_slot: " << current_slot; + + // 4. 校验槽位有效性 + if (current_slot < 1 || current_slot > 2) { + LOG(ERROR) << "Invalid slot value: " << current_slot + << ", expected 1 or 2"; + suffix = ""; + return; + } + + // 5. 生成目标分区后缀 + suffix = (current_slot == 1) ? "_a" : "_b"; + LOG(INFO) << "Active slot: " << current_slot + << ", target suffix: " << suffix; +} +#endif +} // updater \ No newline at end of file diff --git a/services/BUILD.gn b/services/BUILD.gn index 3e2f3a68..d2206451 100755 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -80,6 +80,7 @@ ohos_static_library("libupdater_static") { deps += [ "${updater_path}/interfaces/kits/misc_info:libmiscinfo", "${updater_path}/services/sdcard_update:libsdupdate", + "${updater_path}/interfaces/kits/slot_info:libslotinfo", ] if (defined(use_ptable)) { diff --git a/services/flow_update/update_bin/BUILD.gn b/services/flow_update/update_bin/BUILD.gn index 83e3d6df..62f93ad8 100644 --- a/services/flow_update/update_bin/BUILD.gn +++ b/services/flow_update/update_bin/BUILD.gn @@ -45,6 +45,7 @@ ohos_static_library("libBinFlowUpdate") { "${updater_path}/services/log:libupdaterlog", "${updater_path}/services/package:libupdaterpackage", "${updater_path}/utils:libutils", + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", ] external_deps = [ "bounds_checking_function:libsec_static", diff --git a/services/flow_update/update_bin/component_processor.cpp b/services/flow_update/update_bin/component_processor.cpp index f2cfccc1..f5d4514b 100644 --- a/services/flow_update/update_bin/component_processor.cpp +++ b/services/flow_update/update_bin/component_processor.cpp @@ -23,7 +23,7 @@ #ifdef UPDATER_USE_PTABLE #include "ptable_parse/ptable_manager.h" #endif -#include "slot_info/slot_info.h" +#include "slot_info/slot_info_static.h" #include "updater/updater_const.h" using namespace std; @@ -260,7 +260,7 @@ int RawImgProcessor::GetWritePathAndOffset(const std::string &partitionName, std #ifndef UPDATER_UT if (partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); writePath += suffix; } LOG(INFO) << "write partition path: " << writePath; diff --git a/services/stream_update/BUILD.gn b/services/stream_update/BUILD.gn index aabb0996..4c5161a7 100755 --- a/services/stream_update/BUILD.gn +++ b/services/stream_update/BUILD.gn @@ -49,6 +49,7 @@ ohos_static_library("libbinchunkupdate") { "${updater_path}/services/log:libupdaterlog", "${updater_path}/services/package:libupdaterpackage", "${updater_path}/utils:libutils", + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", ] external_deps = [ "bounds_checking_function:libsec_static", diff --git a/services/stream_update/bin_chunk_update.cpp b/services/stream_update/bin_chunk_update.cpp index a9140fd9..60e42ef9 100755 --- a/services/stream_update/bin_chunk_update.cpp +++ b/services/stream_update/bin_chunk_update.cpp @@ -27,14 +27,16 @@ #include "fs_manager/mount.h" #include "log.h" #include "scope_guard.h" -#include "slot_info/slot_info.h" #include "utils.h" +#include "slot_info/slot_info_static.h" namespace Updater { using namespace Uscript; using namespace Hpackage; using namespace std::placeholders; +#define MISC_DEVICE_NODE "/dev/block/by-name/bootctrl" + constexpr const char *UPDATE_BIN_FILE = "update.bin"; constexpr const size_t HASH_BUFFER_SIZE = 50 * 1024; BinChunkUpdate::BinChunkUpdate(uint32_t maxBufSize) @@ -214,9 +216,9 @@ UpdateResultCode BinChunkUpdate::UpdateBinHash(uint8_t *data, uint32_t &len) return STREAM_UPDATE_FAILURE; } - //切换ab分区 + //切换ab分区到system_install实现 #ifndef UPDATER_UT - SetActiveSlot(); + // SetActiveSlot(); #else int result = remove("/data/updater/test.txt"); if (result != 0) { @@ -519,9 +521,9 @@ bool BinChunkUpdate::OpenDevPath() if (updateInfo_.curPartition != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); targetPath += suffix; - GetActivePartitionSuffix(suffix); + GetActivePartitionSuffixStatic(suffix); srcPath += suffix; } @@ -762,7 +764,7 @@ std::string BinChunkUpdate::ComputeFileHash(const std::string &partitionName, std::string devPath = GetBlockDeviceByMountPoint(partitionName); if (partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); devPath += suffix; } #else diff --git a/services/updater.cpp b/services/updater.cpp index a5b2429e..fa7aadae 100644 --- a/services/updater.cpp +++ b/services/updater.cpp @@ -36,6 +36,7 @@ #include "package/packages_info.h" #include "parameter.h" #include "misc_info/misc_info.h" +#include "slot_info/slot_info.h" #ifdef WITH_SELINUX #include #include "selinux/selinux.h" @@ -550,6 +551,11 @@ static std::string GetBinaryPathFromBin(PkgManager::PkgManagerPtr pkgManager, Up fullPath = "/bin/updater_binary"; } + // 执行Binary成功后,切换分区 +#ifndef UPDATER_UT + SetActiveSlot(); +#endif + #ifdef UPDATER_UT fullPath = "/data/updater/updater_binary"; #endif @@ -565,6 +571,11 @@ static std::string GetBinaryPath(PkgManager::PkgManagerPtr pkgManager, UpdaterPa fullPath = "/bin/updater_binary"; } + // 执行Binary成功后,切换分区 +#ifndef UPDATER_UT + SetActiveSlot(); +#endif + #ifdef UPDATER_UT fullPath = "/data/updater/updater_binary"; #endif diff --git a/services/updater_binary/BUILD.gn b/services/updater_binary/BUILD.gn index 3f79682c..4a3ba53f 100644 --- a/services/updater_binary/BUILD.gn +++ b/services/updater_binary/BUILD.gn @@ -57,8 +57,8 @@ ohos_static_library("libupdater_binary") { ldflags = [ "-Wl -std=c++11" ] deps = [ + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", "${updater_path}/interfaces/kits/misc_info:libmiscinfo", - "${updater_path}/interfaces/kits/slot_info:libslotinfo", "${updater_path}/services/applypatch:libapplypatch", "${updater_path}/services/diffpatch/patch:libpatch", "${updater_path}/services/flow_update/update_bin:libBinFlowUpdate", diff --git a/services/updater_binary/update_image_block.cpp b/services/updater_binary/update_image_block.cpp index c0953a4e..a240bdc8 100644 --- a/services/updater_binary/update_image_block.cpp +++ b/services/updater_binary/update_image_block.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ #include "update_image_block.h" +#include "update_processor.h" #include #include #include @@ -30,7 +31,7 @@ #include "updater/updater_const.h" #include "updater/hwfault_retry.h" #include "utils.h" -#include "slot_info/slot_info.h" +#include "slot_info/slot_info_static.h" using namespace Uscript; using namespace Hpackage; @@ -181,7 +182,7 @@ static int32_t GetUpdateBlockInfo(struct UpdateBlockInfo &infos, Uscript::UScrip #ifndef UPDATER_UT if (infos.partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); infos.devPath += suffix; } #else @@ -465,7 +466,7 @@ int32_t UScriptInstructionBlockCheck::Execute(Uscript::UScriptEnv &env, Uscript: #ifndef UPDATER_UT if (partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); devPath += suffix; } #else @@ -734,7 +735,7 @@ int32_t UScriptInstructionShaCheck::Execute(Uscript::UScriptEnv &env, Uscript::U #ifndef UPDATER_UT if (partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); devPath += suffix; } LOG(INFO) << "write partition path: " << devPath; diff --git a/services/updater_binary/update_image_patch.cpp b/services/updater_binary/update_image_patch.cpp index 5ce712dd..4bbee86f 100644 --- a/services/updater_binary/update_image_patch.cpp +++ b/services/updater_binary/update_image_patch.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ #include "update_image_patch.h" +#include "update_processor.h" #include #include #include @@ -35,7 +36,7 @@ #include "updater/updater_const.h" #include "updater/hwfault_retry.h" #include "utils.h" -#include "slot_info/slot_info.h" +#include "slot_info/slot_info_static.h" using namespace Uscript; using namespace Hpackage; @@ -74,7 +75,7 @@ int32_t USInstrImagePatch::GetParam(Uscript::UScriptContext &context, ImagePatch #ifndef UPDATER_UT if (para.partName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); para.devPath += suffix; } #else @@ -265,7 +266,7 @@ int32_t USInstrImageShaCheck::GetParam(Uscript::UScriptContext &context, CheckPa #ifndef UPDATER_UT if (para.partName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); para.devPath += suffix; } #else diff --git a/services/updater_binary/update_processor.cpp b/services/updater_binary/update_processor.cpp index bec492cd..895edd10 100644 --- a/services/updater_binary/update_processor.cpp +++ b/services/updater_binary/update_processor.cpp @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "update_processor.h" #include #include @@ -31,7 +32,7 @@ #endif #include "script_instruction.h" #include "script_manager.h" -#include "slot_info/slot_info.h" +#include "slot_info/slot_info_static.h" #include "update_image_block.h" #include "update_image_patch.h" #include "update_partitions.h" @@ -460,7 +461,7 @@ int UScriptInstructionRawImageWrite::GetWritePathAndOffset(const std::string &pa #ifndef UPDATER_UT if (partitionName != "/userdata") { std::string suffix = ""; - GetPartitionSuffix(suffix); + GetPartitionSuffixStatic(suffix); writePath += suffix; } LOG(INFO) << "write partition path: " << writePath; @@ -525,11 +526,7 @@ int ProcessUpdater(bool retry, int pipeFd, const std::string &packagePath, const } }); PkgManager::ReleasePackageInstance(pkgManager); -#ifndef UPDATER_UT - if (ret == 0) { - SetActiveSlot(); - } -#endif + return ret; } } // Updater \ No newline at end of file diff --git a/updater_default_cfg.gni b/updater_default_cfg.gni index e2036f20..796286a3 100644 --- a/updater_default_cfg.gni +++ b/updater_default_cfg.gni @@ -45,7 +45,7 @@ template("updater_gen") { } else { ohos_executable(target_name) { if (!is_asan && !is_emulator && target_name == "updater_binary") { - static_link = false + static_link = true } forward_variables_from(invoker, "*") -- Gitee From c93982843073817d7d44a3cc76b3e4e7153f653d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 9 Apr 2025 15:47:27 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: Ic8fc6c900ef9dd4cdfb77bff12597c5087c113aa --- .../kits/slot_info/slot_info_static.cpp | 32 +++++++++---------- services/stream_update/bin_chunk_update.cpp | 2 -- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/interfaces/kits/slot_info/slot_info_static.cpp b/interfaces/kits/slot_info/slot_info_static.cpp index 8bb374e2..bcd6a0e4 100755 --- a/interfaces/kits/slot_info/slot_info_static.cpp +++ b/interfaces/kits/slot_info/slot_info_static.cpp @@ -20,6 +20,11 @@ namespace Updater { #define MISC_DEVICE_NODE "/dev/block/by-name/bootctrl" +constexpr int32_t UPDATE_PARTITION_A = 1; +constexpr int32_t UPDATE_PARTITION_AB = 2; +constexpr off_t MISC_PARTITION_ACTIVE_SLOT_OFFSET = 1024; +constexpr off_t MISC_PARTITION_ACTIVE_SLOT_SIZE = 4; + #ifndef UPDATER_AB_SUPPORT void GetPartitionSuffixStatic(std::string &suffix) { @@ -52,47 +57,42 @@ static int ReadMisc(off_t offset, off_t size) return slot; } -void GetPartitionSuffixStatic(std::string &suffix) +void GetPartitionSuffixStatic(std::string &suffix) { // 1. 通过popen执行cat命令获取cmdline内容 - int32_t current_slot = ReadMisc(1024, 4); + int32_t current_slot = ReadMisc(MISC_PARTITION_ACTIVE_SLOT_OFFSET, MISC_PARTITION_ACTIVE_SLOT_SIZE); LOG(INFO) << "current_slot: " << current_slot; // 4. 校验槽位有效性 - if (current_slot < 1 || current_slot > 2) { - LOG(ERROR) << "Invalid slot value: " << current_slot - << ", expected 1 or 2"; + if (current_slot < UPDATE_PARTITION_A || current_slot > UPDATE_PARTITION_AB) { + LOG(ERROR) << "Invalid slot value: " << current_slot << ", expected 1 or 2"; suffix = ""; return; } // 5. 生成目标分区后缀(取反当前槽位) - // 业务逻辑:当前槽位1时写_b分区,槽位2时写_a分区 - suffix = (current_slot == 1) ? "_b" : "_a"; - LOG(INFO) << "2---Active slot: " << current_slot - << ", target suffix: " << suffix; + suffix = (current_slot == UPDATE_PARTITION_A) ? "_b" : "_a"; + LOG(INFO) << "Active slot: " << current_slot << ", target suffix: " << suffix; } void GetActivePartitionSuffixStatic(std::string &suffix) { // 1. 通过popen执行cat命令获取cmdline内容 - int32_t current_slot = ReadMisc(1024, 4); + int32_t current_slot = ReadMisc(MISC_PARTITION_ACTIVE_SLOT_OFFSET, MISC_PARTITION_ACTIVE_SLOT_SIZE); LOG(INFO) << "current_slot: " << current_slot; // 4. 校验槽位有效性 - if (current_slot < 1 || current_slot > 2) { - LOG(ERROR) << "Invalid slot value: " << current_slot - << ", expected 1 or 2"; + if (current_slot < UPDATE_PARTITION_A || current_slot > UPDATE_PARTITION_AB) { + LOG(ERROR) << "Invalid slot value: " << current_slot << ", expected 1 or 2"; suffix = ""; return; } // 5. 生成目标分区后缀 - suffix = (current_slot == 1) ? "_a" : "_b"; - LOG(INFO) << "Active slot: " << current_slot - << ", target suffix: " << suffix; + suffix = (current_slot == UPDATE_PARTITION_A) ? "_a" : "_b"; + LOG(INFO) << "Active slot: " << current_slot << ", target suffix: " << suffix; } #endif } // updater \ No newline at end of file diff --git a/services/stream_update/bin_chunk_update.cpp b/services/stream_update/bin_chunk_update.cpp index 60e42ef9..68acd84a 100755 --- a/services/stream_update/bin_chunk_update.cpp +++ b/services/stream_update/bin_chunk_update.cpp @@ -216,9 +216,7 @@ UpdateResultCode BinChunkUpdate::UpdateBinHash(uint8_t *data, uint32_t &len) return STREAM_UPDATE_FAILURE; } - //切换ab分区到system_install实现 #ifndef UPDATER_UT - // SetActiveSlot(); #else int result = remove("/data/updater/test.txt"); if (result != 0) { -- Gitee From 1d3a4da1f769af51d33186bf831c8fde3234e7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 16 Apr 2025 08:53:31 +0800 Subject: [PATCH 3/7] fix:code check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: I362249efbe7544c1da798d7e6e17dd4b5c46f816 --- interfaces/kits/slot_info/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/interfaces/kits/slot_info/BUILD.gn b/interfaces/kits/slot_info/BUILD.gn index 83cfe4d2..74ae4b4e 100644 --- a/interfaces/kits/slot_info/BUILD.gn +++ b/interfaces/kits/slot_info/BUILD.gn @@ -58,4 +58,3 @@ ohos_static_library("libslotinfo_static") { subsystem_name = "updater" part_name = "updater" } - -- Gitee From 02985e6c37554ee9dd7cd60b5ea66478b867db25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 16 Apr 2025 09:11:00 +0800 Subject: [PATCH 4/7] fix:code check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: I6637fc7d95a2e5a1163fa6909b334f1e711adc7e --- services/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/BUILD.gn b/services/BUILD.gn index d2206451..88b57aaa 100755 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -79,8 +79,8 @@ ohos_static_library("libupdater_static") { deps = updater_common_deps deps += [ "${updater_path}/interfaces/kits/misc_info:libmiscinfo", - "${updater_path}/services/sdcard_update:libsdupdate", "${updater_path}/interfaces/kits/slot_info:libslotinfo", + "${updater_path}/services/sdcard_update:libsdupdate", ] if (defined(use_ptable)) { -- Gitee From b7ef29246eccfd8b8681dc5d8aac10aba9d9015e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 16 Apr 2025 09:22:33 +0800 Subject: [PATCH 5/7] fix: code check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: I01c78d01559c3527cf7fc244ae2f6e3f5f7821a6 --- services/flow_update/update_bin/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/flow_update/update_bin/BUILD.gn b/services/flow_update/update_bin/BUILD.gn index 62f93ad8..48094b55 100644 --- a/services/flow_update/update_bin/BUILD.gn +++ b/services/flow_update/update_bin/BUILD.gn @@ -40,12 +40,12 @@ ohos_static_library("libBinFlowUpdate") { ] deps = [ "${updater_path}/interfaces/kits/packages:libpackageExt", + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", "${updater_path}/services/applypatch:libapplypatch", "${updater_path}/services/fs_manager:libfsmanager", "${updater_path}/services/log:libupdaterlog", "${updater_path}/services/package:libupdaterpackage", "${updater_path}/utils:libutils", - "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", ] external_deps = [ "bounds_checking_function:libsec_static", -- Gitee From 74395c37ac890ff3468412e7050b42bdd3b6b548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 16 Apr 2025 09:33:39 +0800 Subject: [PATCH 6/7] fix:code check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: I8f8753a04a248e2c48e6a0c51a703c98dd9f4ce2 --- services/stream_update/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/stream_update/BUILD.gn b/services/stream_update/BUILD.gn index 4c5161a7..236efcae 100755 --- a/services/stream_update/BUILD.gn +++ b/services/stream_update/BUILD.gn @@ -44,12 +44,12 @@ ohos_static_library("libbinchunkupdate") { ] deps = [ "${updater_path}/interfaces/kits/packages:libpackageExt", + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", "${updater_path}/services/applypatch:libapplypatch", "${updater_path}/services/fs_manager:libfsmanager", "${updater_path}/services/log:libupdaterlog", "${updater_path}/services/package:libupdaterpackage", "${updater_path}/utils:libutils", - "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", ] external_deps = [ "bounds_checking_function:libsec_static", -- Gitee From f40efae3ced215fe49de99a04b6c17e98833fa58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=98=E7=BD=97=E5=AE=87?= Date: Wed, 16 Apr 2025 09:43:14 +0800 Subject: [PATCH 7/7] fix:code check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 甘罗宇 Change-Id: Ie38db42c56d9d7b6fd38b811fe9153ede8bd9cc1 --- services/updater_binary/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/updater_binary/BUILD.gn b/services/updater_binary/BUILD.gn index 4a3ba53f..a5cf9c36 100644 --- a/services/updater_binary/BUILD.gn +++ b/services/updater_binary/BUILD.gn @@ -57,8 +57,8 @@ ohos_static_library("libupdater_binary") { ldflags = [ "-Wl -std=c++11" ] deps = [ - "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", "${updater_path}/interfaces/kits/misc_info:libmiscinfo", + "${updater_path}/interfaces/kits/slot_info:libslotinfo_static", "${updater_path}/services/applypatch:libapplypatch", "${updater_path}/services/diffpatch/patch:libpatch", "${updater_path}/services/flow_update/update_bin:libBinFlowUpdate", -- Gitee