diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-02-16 00:55:21 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-02-16 00:56:17 +0200 |
commit | a88f8c72e7deea5a77776fe8c42454bac5d3437d (patch) | |
tree | 2eb9763ab51b9ae5eb21a1d19b339ae5b2459078 | |
parent | 7c00d7f45628abefcbb7027180a9d586e191d839 (diff) |
kbuild: Add --help argument
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-x | kbuild.sh | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 ;; |