[U-Boot] [PATCH 2/3] arm64: zynqmp: add tool to minimize psu_init_gpl.c files

Michal Simek michal.simek at xilinx.com
Wed May 22 11:11:27 UTC 2019


On 10. 05. 19 10:15, Luca Ceresoli wrote:
> This script transforms a pair of psu_init_gpl.c and .h files produced by
> the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that
> is checkpatch compliant.
> 
> Based on a script by Michal Simek.
> 
> Signed-off-by: Luca Ceresoli <luca at lucaceresoli.net>
> ---
>  tools/zynqmp_psu_init_minimize.sh | 129 ++++++++++++++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100755 tools/zynqmp_psu_init_minimize.sh
> 
> diff --git a/tools/zynqmp_psu_init_minimize.sh b/tools/zynqmp_psu_init_minimize.sh
> new file mode 100755
> index 000000000000..932426348df4
> --- /dev/null
> +++ b/tools/zynqmp_psu_init_minimize.sh
> @@ -0,0 +1,129 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0+
> +# Copyright (C) 2018 Michal Simek <michal.simek at xilinx.com>
> +# Copyright (C) 2019 Luca Ceresoli <luca at lucaceresoli.net>
> +
> +# Transform a pair of psu_init_gpl.c and .h files produced by the Xilinx
> +# Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that is almost
> +# checkpatch compliant. Minor coding style might still be needed. Must be
> +# run from the top-level U-Boot source directory.
> +#
> +# Usage:   zynqmp_psu_init_minimize.sh INPUT_DIR OUTPUT_DIR
> +# Example: zynqmp_psu_init_minimize.sh \
> +#              /path/to/original/psu_init_gpl_c_and_h/ \
> +#              board/xilinx/zynqmp/<my_board>/
> +# Note:    INPUT_DIR must contain both .c and .h files
> +
> +set -o errexit -o errtrace
> +set -o nounset
> +
> +IN="${1}/psu_init_gpl.c"
> +OUT="${2}/psu_init_gpl.c"

Output looks good but there should be a fix when script is called
without parameters.

[u-boot](arm-mainline)$ ./tools/zynqmp_psu_init_minimize.sh
./tools/zynqmp_psu_init_minimize.sh: line 20: 1: unbound variable

Thanks,
Michal


More information about the U-Boot mailing list