From 3447913e58c109cb1014e49c2caaf1503e488d06 Mon Sep 17 00:00:00 2001 From: Appana Durga Kedareswara rao Date: Mon, 11 Apr 2022 16:38:50 +0530 Subject: 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 Signed-off-by: Mark Hatle (cherry picked from commit 1ddaf20eb0935d76d95011084c90fda02e614508) Signed-off-by: Mark Hatle --- .../recipes-core/meta/files/dt-processor.sh | 18 +++++++++++++++++- 1 file changed, 17 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 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 [-m ] zynqmp or versal [-p ] Path to psu_init files, defaults to system_dtb path [-l ] write local.conf changes to this file + [-P ] Path to petalinux schema file EOF exit @@ -49,7 +50,7 @@ EOF parse_args() { [ $# -eq 0 ] && usage - while getopts ":c:s:d:o:e:m:l:h" opt; do + while getopts ":c:s:d:o:e:m:l:h:P:" opt; do case ${opt} in c) config_dir=$OPTARG ;; s) system_dtb=$OPTARG ;; @@ -59,6 +60,7 @@ parse_args() { m) machine=$OPTARG ;; p) psu_init_path=$OPTARG ;; l) localconf=$OPTARG ;; + P) petalinux_schema=$OPTARG ;; h) usage ;; :) error "Missing argument for -$OPTARG" ;; \?) error "Invalid option -$OPTARG" @@ -920,6 +922,13 @@ gen_local_conf() { echo } +gen_petalinux_conf() { + cd "${config_dir}" || exit + ( + LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- petalinuxconfig_xlnx ${petalinux_schema} \ + || error "lopper failed" + ) +} parse_args "$@" lopper=$(command -v lopper) @@ -964,5 +973,12 @@ else gen_local_conf ${localconf} fi +if [ -n "${petalinux_schema}" ]; then + echo + echo "Generating petalinux config file:" + echo + gen_petalinux_conf +fi + # Cleanup our temp file rm ${cpulist} -- cgit v1.2.3-54-g00ecf