[U-Boot] [PATCH 2/2] ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x

Masahiro Yamada yamada.masahiro at socionext.com
Mon Apr 13 03:28:15 CEST 2015


Hi Sören,

2015-04-12 11:45 GMT+09:00 Sören Brinkmann <soren.brinkmann at xilinx.com>:

>>
>> > Does this mechanism allow to build for one of the supported boards (e.g.
>> > zc706) using custom init files? We need to maintain this capability,
>> > IMHO, since these initfiles are generated by Xilinx tools depending on
>> > various settings in Vivado. They can be quite different between
>> > use-cases/applications, even when targeting the same board.
>>
>> Don't worry.  Custom init files are still supporte.
>> I added CONFIG_ZYNQ_CUSTOM_INIT.
>
> But doesn't it cause 'multiple definition of...' like errors if I copy
> custom ps7_init files additionally to the already present ones into the
> source tree? Looking at the Makefile above, it seems for a "supported"
> board, it would add <board>_hw_platform/ps7_init_gpl.o _and_
> custom_hw_platform/ps7_init_gpl.o - both defining the same symbols. Or
> am I missing something?

I do not think the "multiple definition" error will happen.



Please see the following part of my patch.

+# Copied from Xilinx SDK 2014.4
+ps7-init-$(CONFIG_TARGET_ZYNQ_ZED) := zed_hw_platform/ps7_init_gpl.o
+ps7-init-$(CONFIG_TARGET_ZYNQ_MICROZED) := MicroZed_hw_platform/ps7_init_gpl.o
+ps7-init-$(CONFIG_TARGET_ZYNQ_ZC702) := ZC702_hw_platform/ps7_init_gpl.o
+ps7-init-$(CONFIG_TARGET_ZYNQ_ZC706) := ZC706_hw_platform/ps7_init_gpl.o
+# If you want to use customized ps7_init_gpl.c/h (or ps7_init.c/h),
+# enable CONFIG_ZYNQ_CUSTOM_INIT and put them into custom_hw_platform/.
+ps7-init-$(CONFIG_ZYNQ_CUSTOM_INIT) := \
+ $(if $(wildcard $(srctree)/$(src)/custom_hw_platform/ps7_init_gpl.c), \
+ custom_hw_platform/ps7_init_gpl.o, \
+ $(if $(wildcard $(srctree)/$(src)/custom_hw_platform/ps7_init.c), \
+ custom_hw_platform/ps7_init.o custom_hw_platform/legacy.o))
+


The source files are added by ":=", not "+=".
This is intentional.

If CONFIG_ZYNQ_CUSTOM_INIT is enabled, the files in
custom_hw_platform/ directory
take precedence over the default ones.




-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list