• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 Talkweb Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14#!/bin/bash
15
16hb_env_str=`hb env | grep "\[OHOS INFO\] root path"`
17root_path=${hb_env_str##* }
18
19hb_env_str=`hb env | grep "\[OHOS INFO\] board"`
20board_name=${hb_env_str##* }
21
22BOOT_LOADER_PATH=$root_path/out/$board_name/$board_name/bin/tw_boot.bin
23MERGE_TOOL_PATH=$root_path/out/$board_name/$board_name/bin/merge_bin
24APP_PATH=$root_path/out/$board_name/$board_name/OHOS_Image.bin
25OUTPUT_ALLINONE_PATH=$root_path/out/$board_name/$board_name/OHOS_Image_allinone.bin
26
27#合并bootloader程序
28$MERGE_TOOL_PATH $BOOT_LOADER_PATH $APP_PATH $OUTPUT_ALLINONE_PATH
29rm $APP_PATH
30mv $OUTPUT_ALLINONE_PATH $APP_PATH
31