[meta-xilinx] [PATCH v3] platform-init: add support for psu_init_gpl files
Jean-Francois Dagenais
jeff.dagenais at gmail.com
Sat Feb 4 10:33:52 PST 2017
> On Feb 3, 2017, at 07:00, Nathan Rossi <nathan at nathanrossi.com> wrote:
>
> So before I make any comments, I would like to point out I have some
> changes that I have been working on to add similar support for ZynqMP
> platform init files. I hit some issues regarding compatibility with
> existing layers, which is why I have not sent out a series for it yet.
>
> https://github.com/nathanrossi/meta-xilinx/commits/nrossi/wip
>
> I would be interested in your opinion of your changes vs the changes
> in in that branch.
I will take a look soon.
>
> So I think the biggest issue with this patch would be that it breaks
> the ability work with existing provides/etc. Which I think is quite
> important. However I am open to breaking that if users would prefer to
> do so.
You mean in their own layers? In meta-xilinx, I fixed the provides and depends.
>> diff --git a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
>> index cc06de6..6a5fe25 100644
>> --- a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
>> +++ b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
>> @@ -1,35 +1,35 @@
>> -inherit zynq7-platform-paths
>> +inherit zynq-platform-paths
>>
>> do_configure_prepend() {
>> - if ${@bb.utils.contains('DEPENDS', 'virtual/zynq7-platform-init', 'true', 'false', d)}; then
>> + if ${@bb.utils.contains('DEPENDS', 'virtual/zynq-platform-init', 'true', 'false', d)}; then
>> if [ -d "${S}/board/xilinx/zynq/custom_hw_platform" ]; then
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/custom_hw_platform/
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/custom_hw_platform/
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.h ${S}/board/xilinx/zynq/custom_hw_platform/
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.c ${S}/board/xilinx/zynq/custom_hw_platform/
>> else
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.h ${S}/board/xilinx/zynq/
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.c ${S}/board/xilinx/zynq/
>> fi
>> - if [ -n "${FORCE_PS7INIT}" ]; then
>> - # overwrite all the existing platforms ps7_init files, this is a shotgun approach and only works due to
>> + if [ -n "${FORCE_PSxINIT}" ]; then
>> + # overwrite all the existing platforms ${PSx}_init files, this is a shotgun approach and only works due to
>> # u-boot being built for each machine seperately with seperate source directories.
>> for i in ${S}/board/xilinx/zynq/*/; do
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h $i
>> - cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c $i
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.h $i
>> + cp ${PLATFORM_INIT_STAGE_DIR}/${PSx}_init_gpl.c $i
>
> This should populate into the "zynqmp" board directory for zynqmp and
> "zynq" for "zynq".
If you look at the PSx assignment, it is "ps7" for zynq's, and "psu" for
zynqmp's. The same directory can be used since the files are put in a machine
specific staging sysroot.
>
>> done
>> fi
>> fi
>> }
>>
>> -FORCE_PS7INIT[doc] = "This variable is used to force the overriding of all ps7_init_gpl.* files in u-boot source with what is provided by virtual/zynq7-platform-init."
>> +FORCE_PSxINIT[doc] = "This variable is used to force the overriding of all ${PSx}_init_gpl.* files in u-boot source with what is provided by virtual/zynq-platform-init."
>>
>> python () {
>> - # Determine if target machine needs to provide a custom ps7_init_gpl.*
>> - if d.getVar("SOC_FAMILY", True) == "zynq":
>> + # Determine if target machine needs to provide a custom ${PSx}_init_gpl.*
>> + if "zynq" in d.getVar("SOC_FAMILY", True):
>
> This should be a full match, since it is likely for future SOC's to
> have the "*zynq*" name.
I assume that every zynq and zynqmp and other variants to come will use the
platform-init mechanism with psX_init_gpl.c/h files. This is why I wanted to
match anything that contains the word "zynq" in it.
Thanks for the feedback!
To be continued...
More information about the meta-xilinx
mailing list