Skip to content

Commit e3de4ef

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

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

u-boot/tools/build

Lines changed: 7 additions & 3 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,13 +52,17 @@ 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
GIT_DATE=$(git -C $TMP log -1 --format=%cd)
5760
GIT_HASH=$(git -C $TMP log -1 --format=%H)
5861

59-
WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
60-
if [ $# -eq 2 ]; then
62+
if [ $# -ge 2 -a "$2" != all ]; then
6163
WORK_QUEUE="$TARGET_ARCH/$2"
64+
else
65+
WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
6266
fi
6367

6468
for dir in $WORK_QUEUE; do

0 commit comments

Comments
 (0)