summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental/recipes-core
diff options
context:
space:
mode:
authorAppana Durga Kedareswara rao <appana.durga.rao@xilinx.com>2022-04-11 16:38:50 +0530
committerMark Hatle <mhatle@xilinx.com>2022-05-24 10:48:53 -0700
commit3447913e58c109cb1014e49c2caaf1503e488d06 (patch)
tree5cc53dfe99c89e8563079ceb38fb0c4329fe79cc /meta-xilinx-standalone-experimental/recipes-core
parent593746847639d0e895ad50110988eaa0584f4fa4 (diff)
downloadmeta-xilinx-3447913e58c109cb1014e49c2caaf1503e488d06.tar.gz
meta-xilinx-standalone-experimental: recipes-core: meta: dt-processor.sh: Add support for generating petalinux conf file
This commit adds an optional -P argument for generating the petalinux conf file, Generated file will be consumed by the petalinux tool. Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com> Signed-off-by: Mark Hatle <mhatle@xilinx.com> (cherry picked from commit 1ddaf20eb0935d76d95011084c90fda02e614508) Signed-off-by: Mark Hatle <mhatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental/recipes-core')
-rwxr-xr-xmeta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh18
1 files changed, 17 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 c0c9df18..441dc7d2 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
@@ -41,6 +41,7 @@ $0
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 [-l <config_file>] write local.conf changes to this file 43 [-l <config_file>] write local.conf changes to this file
44 [-P <petalinux_schema>] Path to petalinux schema file
44 45
45EOF 46EOF
46 exit 47 exit
@@ -49,7 +50,7 @@ EOF
49parse_args() { 50parse_args() {
50 [ $# -eq 0 ] && usage 51 [ $# -eq 0 ] && usage
51 52
52 while getopts ":c:s:d:o:e:m:l:h" opt; do 53 while getopts ":c:s:d:o:e:m:l:h:P:" opt; do
53 case ${opt} in 54 case ${opt} in
54 c) config_dir=$OPTARG ;; 55 c) config_dir=$OPTARG ;;
55 s) system_dtb=$OPTARG ;; 56 s) system_dtb=$OPTARG ;;
@@ -59,6 +60,7 @@ parse_args() {
59 m) machine=$OPTARG ;; 60 m) machine=$OPTARG ;;
60 p) psu_init_path=$OPTARG ;; 61 p) psu_init_path=$OPTARG ;;
61 l) localconf=$OPTARG ;; 62 l) localconf=$OPTARG ;;
63 P) petalinux_schema=$OPTARG ;;
62 h) usage ;; 64 h) usage ;;
63 :) error "Missing argument for -$OPTARG" ;; 65 :) error "Missing argument for -$OPTARG" ;;
64 \?) error "Invalid option -$OPTARG" 66 \?) error "Invalid option -$OPTARG"
@@ -920,6 +922,13 @@ gen_local_conf() {
920 echo 922 echo
921} 923}
922 924
925gen_petalinux_conf() {
926 cd "${config_dir}" || exit
927 (
928 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- petalinuxconfig_xlnx ${petalinux_schema} \
929 || error "lopper failed"
930 )
931}
923parse_args "$@" 932parse_args "$@"
924 933
925lopper=$(command -v lopper) 934lopper=$(command -v lopper)
@@ -964,5 +973,12 @@ else
964 gen_local_conf ${localconf} 973 gen_local_conf ${localconf}
965fi 974fi
966 975
976if [ -n "${petalinux_schema}" ]; then
977 echo
978 echo "Generating petalinux config file:"
979 echo
980 gen_petalinux_conf
981fi
982
967# Cleanup our temp file 983# Cleanup our temp file
968rm ${cpulist} 984rm ${cpulist}