Skip to content

Commit

Permalink
u-boot: add option to build specific revision
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkaroly committed Apr 6, 2022
1 parent d57ce9b commit e3de4ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions u-boot/tools/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
TARGET_ARCH=$1

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

Expand Down Expand Up @@ -52,13 +52,17 @@ GIT_REPO="git://git.denx.de/u-boot.git"

echo "Cloning sources..."
git clone $GIT_REPO $TMP
if [ $# -eq 3 ]; then
git -C $TMP checkout $3
fi

GIT_DATE=$(git -C $TMP log -1 --format=%cd)
GIT_HASH=$(git -C $TMP log -1 --format=%H)

WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
if [ $# -eq 2 ]; then
if [ $# -ge 2 -a "$2" != all ]; then
WORK_QUEUE="$TARGET_ARCH/$2"
else
WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d)
fi

for dir in $WORK_QUEUE; do
Expand Down

0 comments on commit e3de4ef

Please sign in to comment.