From a88f8c72e7deea5a77776fe8c42454bac5d3437d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 16 Feb 2021 00:55:21 +0200 Subject: kbuild: Add --help argument Signed-off-by: Laurent Pinchart --- kbuild.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/kbuild.sh b/kbuild.sh index 3ec4856..3776e72 100755 --- a/kbuild.sh +++ b/kbuild.sh @@ -30,6 +30,25 @@ version=$(get_kernel_version) # Options parsing # +usage() { + echo "Usage: $(basename $1) [options] platform [make options]" + echo "" + echo "Supported options:" + echo "--bootloader file Boot loader file (CrOS images only)" + echo "--cmdline Command line arguments file (CrOS images only)" + echo "--config Run menuconfig" + echo "--deb Create Debian packages" + echo "--defconfig file Generate a new .config with defaults from file" + echo "--doc[=dir] Compile the documentation (for the specified dir only)" + echo "-h, --help Print this help text" + echo "-- End options parsing, next argument is the platform" + echo "" + echo "Supported platforms:" + for f in $kbuild_root/platforms/*.sh ; do + echo "- $(basename -s .sh $f)" + done +} + do_compile_doc=0 do_menu_config=0 do_package_deb=0 @@ -81,6 +100,10 @@ while [[ $# != 0 ]] ; do do_compile_doc=1 opt_doc_dirs="${option/--doc=/}" ;; + -h|--help) + usage $0 + exit 1 + ;; --) platform=auto ;; -- cgit v1.2.3