From b8fffd46400fc9dc9e89d6a397f87d0f1789e76a Mon Sep 17 00:00:00 2001 From: xiayan Date: Wed, 5 Feb 2025 13:52:35 +0800 Subject: [PATCH] fix tenglong_e build fail --- .../common/build_kernel/build_dts.sh | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/device_board_phytium/common/build_kernel/build_dts.sh b/device_board_phytium/common/build_kernel/build_dts.sh index c47fae3..7949a08 100755 --- a/device_board_phytium/common/build_kernel/build_dts.sh +++ b/device_board_phytium/common/build_kernel/build_dts.sh @@ -14,17 +14,22 @@ # 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 - DTS_SRC_DIR=${1} DTS_TARGET_DIR=${2} -cp ${DTS_SRC_DIR}/*.dts* ${DTS_TARGET_DIR} - -dts_files=$(find "$DTS_SRC_DIR" -type f -name "*.dts") +if [ ! -e $DTS_SRC_DIR ]; then + echo "there isn't path ${DTS_SRC_DIR}" + exit 0 +fi -for dts_file in $dts_files; do - dts_name=$(basename "$dts_file" .dts) - echo "dtb-\$(CONFIG_ARCH_PHYTIUM) += ${dts_name}.dtb" >> "${DTS_TARGET_DIR}/Makefile" -done \ No newline at end of file +dts_files=$(find ${DTS_SRC_DIR} -type f -name "*.dts") +if [ -n "$dts_files" ]; then + cp ${DTS_SRC_DIR}/*.dts* ${DTS_TARGET_DIR} + for dts_file in $dts_files; do + dts_name=$(basename "$dts_file" .dts) + echo "dtb-\$(CONFIG_ARCH_PHYTIUM) += ${dts_name}.dtb" >> "${DTS_TARGET_DIR}/Makefile" + done +else + echo "there aren't dts files in ${DTS_SRC_DIR}" +fi -- Gitee