History log of /u-boot/tools/zynqmp_pm_cfg_obj_convert.py
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2f9dd4bf 12-Feb-2022 Luca Ceresoli <luca@lucaceresoli.net>

tools/zynqmp_pm_cfg_obj_convert.py: fix build with Vivado 2021.x

This tool fails with a pm_cfg_obj.c file generated by Vitis 2021.2. This is
because that version of Vitis added the PM_CONFIG_OBJECT_TYPE_BASE that was
not previously generated, thus the script does not implement it.

Reported-by: Neal Frager <nealf@xilinx.com>
[report: https://lists.buildroot.org/pipermail/buildroot/2022-February/636639.html]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Link: https://lore.kernel.org/r/20220212125121.3398547-1-luca@lucaceresoli.net
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# d42ab39f 24-Nov-2020 Adrian Fiergolski <adrian.fiergolski@fastree3d.com>

tools: zynqmp: Fix regex expression around XPm_ConfigObject

The XPm_ConfigObject array definition generated by Vitis 2020.1 differs
from previous Vivado versions (before 2019.2).

-const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) = {
+const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) =
+#elif defined (__ICCARM__)
+#pragma location = ".sys_cfg_data"
+__root const u32 XPm_ConfigObject[] =
+#endif
+{

Change the matching regex to handle both cases.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 4f4b5620 21-May-2019 Luca Ceresoli <luca@lucaceresoli.net>

arm64: zynqmp: add tool to convert PMU config object .c to binary

The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
PMUFW configuration object from a binary blob. However the configuration
object is produced by Xilinx proprietary tools as a C source file and no
tool exists to easily convert it to a binary blob in an embedded Linux
build system for U-Boot to use.

Add a simple Python script to do the conversion.

It is definitely not a complete C language parser, but it is enough to
parse the known patterns generated by Xilinx tools, including:

- defines
- literal integers, optionally with a 'U' suffix
- bitwise OR between them

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# d42ab39f 24-Nov-2020 Adrian Fiergolski <adrian.fiergolski@fastree3d.com>

tools: zynqmp: Fix regex expression around XPm_ConfigObject

The XPm_ConfigObject array definition generated by Vitis 2020.1 differs
from previous Vivado versions (before 2019.2).

-const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) = {
+const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) =
+#elif defined (__ICCARM__)
+#pragma location = ".sys_cfg_data"
+__root const u32 XPm_ConfigObject[] =
+#endif
+{

Change the matching regex to handle both cases.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 4f4b5620 21-May-2019 Luca Ceresoli <luca@lucaceresoli.net>

arm64: zynqmp: add tool to convert PMU config object .c to binary

The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
PMUFW configuration object from a binary blob. However the configuration
object is produced by Xilinx proprietary tools as a C source file and no
tool exists to easily convert it to a binary blob in an embedded Linux
build system for U-Boot to use.

Add a simple Python script to do the conversion.

It is definitely not a complete C language parser, but it is enough to
parse the known patterns generated by Xilinx tools, including:

- defines
- literal integers, optionally with a 'U' suffix
- bitwise OR between them

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 4f4b5620 21-May-2019 Luca Ceresoli <luca@lucaceresoli.net>

arm64: zynqmp: add tool to convert PMU config object .c to binary

The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
PMUFW configuration object from a binary blob. However the configuration
object is produced by Xilinx proprietary tools as a C source file and no
tool exists to easily convert it to a binary blob in an embedded Linux
build system for U-Boot to use.

Add a simple Python script to do the conversion.

It is definitely not a complete C language parser, but it is enough to
parse the known patterns generated by Xilinx tools, including:

- defines
- literal integers, optionally with a 'U' suffix
- bitwise OR between them

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>