From 98f8a0f585bb5b72d831a8ff7a85e8f2bcaf7014 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Sun, 15 Jan 2023 11:50:53 -0800 Subject: dt-processor.sh: Minor revisions for better user errors Signed-off-by: Mark Hatle --- .../recipes-core/meta/files/dt-processor.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta-xilinx-standalone-experimental/recipes-core') diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh index c7caedb6..57d36ab6 100755 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh +++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh @@ -35,7 +35,7 @@ usage() { $0 -c Location of the build conf directory -s Path to system DTB - -d Path to domain file (.yml/.dts) + [-d ] Path to domain file (.yml/.dts) [-o ] Generate overlay dts [-e ] Apply a partial overlay [-m ] The name of the machine .conf to generate @@ -51,6 +51,7 @@ EOF parse_args() { [ $# -eq 0 ] && usage + [ $1 = "--help" ] && usage while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do case ${opt} in @@ -71,6 +72,8 @@ parse_args() { esac done + [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c" + [ -z "${system_dtb}" ] && error "You must specify the path to the system device tree with -s" [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" system_dtb=$(realpath ${system_dtb}) -- cgit v1.2.3-54-g00ecf