Skip to content

Commit d9c346b

Browse files
committed
u-boot: add option to build specific revision
1 parent f4328e2 commit d9c346b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

u-boot/tools/build

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
TARGET_ARCH=$1
77

88
if [ ! -n "$TARGET_ARCH" ]; then
9-
echo "Usage: $0 <arch> [board]"
9+
echo "Usage: $0 <arch> [board|all] [commit]"
1010
exit 1
1111
fi
1212

@@ -52,15 +52,20 @@ GIT_REPO="git://git.denx.de/u-boot.git"
5252

5353
echo "Cloning sources..."
5454
git clone $GIT_REPO $TMP
55+
if [ $# -eq 3 ]; then
56+
git -C $TMP checkout $3
57+
fi
5558

5659
echo "Calculating dates..."
5760
GIT_DATE=$(git -C $TMP log -1 --format=%cd)
5861
GIT_HASH=$(git -C $TMP log -1 --format=%H)
5962

6063
echo "Locating work..."
6164
WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
62-
if [ $# -eq 2 ]; then
65+
if [ $# -ge 2 -a "$2" != all ]; then
6366
WORK_QUEUE="$TARGET_ARCH/$2"
67+
else
68+
WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
6469
fi
6570

6671
for dir in $WORK_QUEUE; do

0 commit comments

Comments
 (0)