diff options
author | Mark Hatle <mark.hatle@amd.com> | 2023-01-15 11:50:53 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2023-01-16 07:26:08 -0800 |
commit | 98f8a0f585bb5b72d831a8ff7a85e8f2bcaf7014 (patch) | |
tree | c2060e513a637c0fd9153b96682f49082f143ce5 /meta-xilinx-standalone-experimental/recipes-core | |
parent | ede3354d41a97de08bfa8ce009f0e9370047fe01 (diff) | |
download | meta-xilinx-98f8a0f585bb5b72d831a8ff7a85e8f2bcaf7014.tar.gz |
dt-processor.sh: Minor revisions for better user errors
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental/recipes-core')
-rwxr-xr-x | meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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() { | |||
35 | $0 | 35 | $0 |
36 | -c <config_dir> Location of the build conf directory | 36 | -c <config_dir> Location of the build conf directory |
37 | -s <system_dtb> Path to system DTB | 37 | -s <system_dtb> Path to system DTB |
38 | -d <domain_file> Path to domain file (.yml/.dts) | 38 | [-d <domain_file>] Path to domain file (.yml/.dts) |
39 | [-o <overlay_dtb>] Generate overlay dts | 39 | [-o <overlay_dtb>] Generate overlay dts |
40 | [-e <external_fpga>] Apply a partial overlay | 40 | [-e <external_fpga>] Apply a partial overlay |
41 | [-m <machine_conf>] The name of the machine .conf to generate | 41 | [-m <machine_conf>] The name of the machine .conf to generate |
@@ -51,6 +51,7 @@ EOF | |||
51 | 51 | ||
52 | parse_args() { | 52 | parse_args() { |
53 | [ $# -eq 0 ] && usage | 53 | [ $# -eq 0 ] && usage |
54 | [ $1 = "--help" ] && usage | ||
54 | 55 | ||
55 | while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do | 56 | while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do |
56 | case ${opt} in | 57 | case ${opt} in |
@@ -71,6 +72,8 @@ parse_args() { | |||
71 | esac | 72 | esac |
72 | done | 73 | done |
73 | 74 | ||
75 | [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c" | ||
76 | [ -z "${system_dtb}" ] && error "You must specify the path to the system device tree with -s" | ||
74 | [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" | 77 | [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" |
75 | [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" | 78 | [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" |
76 | system_dtb=$(realpath ${system_dtb}) | 79 | system_dtb=$(realpath ${system_dtb}) |