diff options
author | Mark Hatle <mark.hatle@amd.com> | 2023-01-15 11:50:53 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-10 09:03:22 -0700 |
commit | 436d8e876553ddeee33f1b321bb38ddac0ffadf7 (patch) | |
tree | 4793c885426dd42d711cbdeb5934e985f369c6bb /meta-xilinx-standalone-experimental | |
parent | 6b9e839d268136356a6e3b623ce3abb058468c3b (diff) | |
download | meta-xilinx-436d8e876553ddeee33f1b321bb38ddac0ffadf7.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')
-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 fde17c04..22345321 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>] zynqmp or versal | 41 | [-m <machine>] zynqmp or versal |
@@ -50,6 +50,7 @@ EOF | |||
50 | 50 | ||
51 | parse_args() { | 51 | parse_args() { |
52 | [ $# -eq 0 ] && usage | 52 | [ $# -eq 0 ] && usage |
53 | [ $1 = "--help" ] && usage | ||
53 | 54 | ||
54 | while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do | 55 | while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do |
55 | case ${opt} in | 56 | case ${opt} in |
@@ -69,6 +70,8 @@ parse_args() { | |||
69 | esac | 70 | esac |
70 | done | 71 | done |
71 | 72 | ||
73 | [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c" | ||
74 | [ -z "${system_dtb}" ] && error "You must specify the path to the system device tree with -s" | ||
72 | [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" | 75 | [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" |
73 | [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" | 76 | [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" |
74 | system_dtb=$(realpath ${system_dtb}) | 77 | system_dtb=$(realpath ${system_dtb}) |