From d15f444cb9b5d3c1a2b102bbe0f3ba5916f239f1 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Thu, 25 Nov 2021 20:12:20 +0800 Subject: [PATCH] update linux kernel and bootloader build shell script --- 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