From 91a690169ae9de24917144ee78ffcdc711f0c0a9 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Thu, 25 Nov 2021 23:51:50 +0800
Subject: [PATCH] update top build shell script to call tarball build.sh
---
bsp/kernel/build.sh | 51 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 9 deletions(-)
diff --git a/bsp/kernel/build.sh b/bsp/kernel/build.sh
index 3edb15e..a4c5888 100755
--- a/bsp/kernel/build.sh
+++ b/bsp/kernel/build.sh
@@ -4,7 +4,7 @@
PRJ_PATH=`pwd`
-IMG_PATH=${PRJ_PATH}/../images/bin
+IMG_PATH=${PRJ_PATH}/../images/boot
BOARD=imx6ull
@@ -140,16 +140,49 @@
mv ${LINUX_SRC}-${BOARD} ${LINUX_SRC}
}
-if [[ $# == 1 ]] && [[ $1 == "patch" ]] ; then
- gen_patch
- exit 0;
-fi
+function do_usage()
+{
+ echo ""
+ echo "Usage:"
+ echo " $0 [-b] [p] [-c] [-h]"
+ echo " -b: download and build $PRJ_NAME"
+ echo " -p: generate $PRJ_NAME patch file"
+ echo " -c: clean the source code"
+ echo " -h: show this help message"
+ echo ""
+ exit;
+}
-do_fetch
+while getopts "bpch" OPTNAME
+do
+ case "${OPTNAME}" in
+ "b")
+ break;
+ ;;
-do_patch
+ "p")
+ gen_patch
+ exit;
+ ;;
-do_build
+ "c")
+ do_clean
+ exit;
+ ;;
-do_install
+ "*")
+ do_usage
+ exit;
+ ;;
+ esac
+done
+
+# Default do build action
+
+do_fetch
+do_patch
+do_build
+do_install
+
+exit;
--
Gitblit v1.9.1