diff --git a/build/common_functions.sh b/build/common_functions.sh index 7edaa86a2..569e68717 100644 --- a/build/common_functions.sh +++ b/build/common_functions.sh @@ -191,6 +191,21 @@ function pack_cfg fi )} +function copy_tools +{( + # Copy USB_DL, partition.xml and bootlogo + if [[ "${chip_cv[*]}" =~ "$CHIP" ]] && [[ ${BOARD} != "fpga" && ${BOARD} != "palladium" ]]; then + command rm -rf "$OUTPUT_DIR"/tools + command mkdir -p "$OUTPUT_DIR"/tools/ + command cp -rf "$TOOLS_PATH"/common/usb_dl/ "$OUTPUT_DIR"/tools/ + if [ "$ENABLE_BOOTLOGO" -eq 1 ];then + python3 "$IMGTOOL_PATH"/raw2cimg.py "$BOOTLOGO_PATH" "$OUTPUT_DIR" "$FLASH_PARTITION_XML" + fi + command cp --remove-destination "$FLASH_PARTITION_XML" "$OUTPUT_DIR"/ + fi +)} + + function pack_upgrade {( local TMPDIR diff --git a/build/envsetup_soc.sh b/build/envsetup_soc.sh index 0683a4999..9e114d688 100644 --- a/build/envsetup_soc.sh +++ b/build/envsetup_soc.sh @@ -596,6 +596,7 @@ function build_all() pack_rootfs || return $? pack_data || return $? pack_system || return $? + copy_tools || return $? pack_upgrade || return $? )}