aboutsummaryrefslogtreecommitdiffstats
path: root/dts
diff options
context:
space:
mode:
authorRaymond Mao <raymond.mao@linaro.org>2024-07-25 06:57:51 -0700
committerTom Rini <trini@konsulko.com>2024-07-31 11:20:36 -0600
commitc502d7ada25ab21cc04e1df62fd22af5c8360275 (patch)
treef5b431e1629326bdbbc41514329817ecb0aa7de7 /dts
parentb2345dbdaa864b71cd58bd20b1b9e8440de639c7 (diff)
downloadu-boot-c502d7ada25ab21cc04e1df62fd22af5c8360275.tar.gz
tools: Add script to update git subtree projects
Recently we are introducing multiple git subtree projects and it is the right time to have a universal script to update various subtrees and replace the dts/update-dts-subtree.sh. update-subtree.sh is a wrapper of git subtree commands. Usage: From U-Boot top directory, run $ ./tools/update-subtree.sh pull <subtree-name> <release-tag> for pulling a tag from the upstream. Or run $ ./tools/update-subtree.sh pick <subtree-name> <commit-id> for cherry-pick a commit from the upstream. Currently <subtree-name> supports dts, mbedtls and lwip. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Diffstat (limited to 'dts')
-rwxr-xr-xdts/update-dts-subtree.sh48
1 files changed, 0 insertions, 48 deletions
diff --git a/dts/update-dts-subtree.sh b/dts/update-dts-subtree.sh
deleted file mode 100755
index a57b78a41d3..00000000000
--- a/dts/update-dts-subtree.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright 2024 Linaro Ltd.
-#
-# Usage: from the top level U-Boot source tree, run:
-# $ ./dts/update-dts-subtree.sh pull <release-tag>
-# $ ./dts/update-dts-subtree.sh pick <commit-id>
-#
-# The script will pull changes from devicetree-rebasing repo into U-Boot
-# as a subtree located as <U-Boot>/dts/upstream sub-directory. It will
-# automatically create a squash/merge commit listing the commits imported.
-
-set -e
-
-merge_commit_msg=$(cat << EOF
-Subtree merge tag '$2' of devicetree-rebasing repo [1] into dts/upstream
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/
-EOF
-)
-
-remote_add_and_fetch() {
- if ! git remote get-url devicetree-rebasing 2>/dev/null
- then
- echo "Warning: Script automatically adds new git remote via:"
- echo " git remote add devicetree-rebasing \\"
- echo " https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git"
- git remote add devicetree-rebasing \
- https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git
- fi
- git fetch devicetree-rebasing master
-}
-
-if [ "$1" = "pull" ]
-then
- remote_add_and_fetch
- git subtree pull --prefix dts/upstream devicetree-rebasing \
- "$2" --squash -m "${merge_commit_msg}"
-elif [ "$1" = "pick" ]
-then
- remote_add_and_fetch
- git cherry-pick -x --strategy=subtree -Xsubtree=dts/upstream/ "$2"
-else
- echo "usage: $0 <op> <ref>"
- echo " <op> pull or pick"
- echo " <ref> release tag [pull] or commit id [pick]"
-fi