summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental
diff options
context:
space:
mode:
authorVaralaxmi Bingi <varalaxmi.bingi@xilinx.com>2022-04-27 17:33:55 +0530
committerMark Hatle <mhatle@xilinx.com>2022-04-28 06:56:59 -0700
commit10c209172ae6ff91293ac1aeee706e9eb5c52e48 (patch)
tree0a2b66bcffff5848186742f72088c68195707671 /meta-xilinx-standalone-experimental
parente75c70e4db78afa8f5c5ec1790359ede5e8bf00e (diff)
downloadmeta-xilinx-10c209172ae6ff91293ac1aeee706e9eb5c52e48.tar.gz
dt-processor.sh: adding pdi_path argument (-i)
Expecting the pdi also in the system device tree path. This patch will add teh PDI_PATH variable in versal case. if pdi not present in sdt path it will throw warning. if more then one pdi is present, throw a warning. Signed-off-by: Varalaxmi Bingi <varalaxmi.bingi@xilinx.com> Also fix -p and -h usage. Signed-off-by: Mark Hatle <mhatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental')
-rwxr-xr-xmeta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh20
1 files changed, 17 insertions, 3 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 2dc48b75..36a81cc7 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
@@ -40,6 +40,7 @@ $0
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
42 [-p <psu_init_path>] Path to psu_init files, defaults to system_dtb path 42 [-p <psu_init_path>] Path to psu_init files, defaults to system_dtb path
43 [-i <pdu_path>] Path to the pdi file
43 [-l <config_file>] write local.conf changes to this file 44 [-l <config_file>] write local.conf changes to this file
44 [-P <petalinux_schema>] Path to petalinux schema file 45 [-P <petalinux_schema>] Path to petalinux schema file
45 46
@@ -50,7 +51,7 @@ EOF
50parse_args() { 51parse_args() {
51 [ $# -eq 0 ] && usage 52 [ $# -eq 0 ] && usage
52 53
53 while getopts ":c:s:d:o:e:m:l:h:P:" opt; do 54 while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do
54 case ${opt} in 55 case ${opt} in
55 c) config_dir=$OPTARG ;; 56 c) config_dir=$OPTARG ;;
56 s) system_dtb=$OPTARG ;; 57 s) system_dtb=$OPTARG ;;
@@ -59,11 +60,12 @@ parse_args() {
59 e) external_fpga=$OPTARG ;; 60 e) external_fpga=$OPTARG ;;
60 m) machine=$OPTARG ;; 61 m) machine=$OPTARG ;;
61 p) psu_init_path=$OPTARG ;; 62 p) psu_init_path=$OPTARG ;;
63 i) pdi_path=$OPTARG ;;
62 l) localconf=$OPTARG ;; 64 l) localconf=$OPTARG ;;
63 P) petalinux_schema=$OPTARG ;; 65 P) petalinux_schema=$OPTARG ;;
64 h) usage ;; 66 h) usage ;;
65 :) error "Missing argument for -$OPTARG" ;; 67 :) error "Missing argument for -$OPTARG" ;;
66 \?) error "Invalid option -$OPTARG" 68 \?) error "Invalid option -$OPTARG" ;;
67 esac 69 esac
68 done 70 done
69 71
@@ -72,6 +74,9 @@ parse_args() {
72 if [ -z "$psu_init_path" ]; then 74 if [ -z "$psu_init_path" ]; then
73 psu_init_path=$(dirname ${system_dtb}) 75 psu_init_path=$(dirname ${system_dtb})
74 fi 76 fi
77 if [ -z "$pdi_path" ]; then
78 pdi_path=$(dirname ${system_dtb})
79 fi
75} 80}
76 81
77detect_machine() { 82detect_machine() {
@@ -297,6 +302,15 @@ EOF
297cortex_a72_linux() { 302cortex_a72_linux() {
298 info "cortex-a72 for Linux [ $1 ]" 303 info "cortex-a72 for Linux [ $1 ]"
299 304
305 # Find the first file ending in .pdi
306 full_pdi_path=$(ls ${pdi_path}/*.pdi 2>/dev/null | head -n 1)
307 if [ -z "${full_pdi_path}" ]; then
308 warn "Warning: Unable to find a pdi file in ${pdi_path}"
309 full_pdi_path="__PATH TO PDI FILE HERE__"
310 elif [ "${full_pdi_path}" != "$(ls ${pdi_path}/*.pdi 2>/dev/null)" ]; then
311 warn "Warning: multiple PDI files found, using first found $(basename ${full_pdi_path})."
312 fi
313
300 if [ "$1" = "None" ]; then 314 if [ "$1" = "None" ]; then
301 dtb_file="cortexa72-${machine}-linux.dtb" 315 dtb_file="cortexa72-${machine}-linux.dtb"
302 system_conf=conf/cortexa72-${machine}-linux.conf 316 system_conf=conf/cortexa72-${machine}-linux.conf
@@ -922,7 +936,7 @@ gen_local_conf() {
922 echo "PSM_MCDEPENDS = \"${psm_mcdepends}\"" >> $1 936 echo "PSM_MCDEPENDS = \"${psm_mcdepends}\"" >> $1
923 echo "PSM_FIRMWARE_DEPLOY_DIR = \"${psm_firmware_deploy_dir}\"" >> $1 937 echo "PSM_FIRMWARE_DEPLOY_DIR = \"${psm_firmware_deploy_dir}\"" >> $1
924 fi 938 fi
925 [ "${machine}" = "versal" ] && echo "PDI_PATH = \"__PATH TO PDI FILE HERE__\"" >> $1 939 [ "${machine}" = "versal" ] && echo "PDI_PATH = \"${full_pdi_path}\"" >> $1
926 echo 940 echo
927} 941}
928 942