[meta-xilinx] [PATCH 1/2] u-boot-xlnx.inc : Add support for building working SPL.
Philip Balister
philip at balister.org
Mon Oct 20 06:37:59 PDT 2014
On 10/10/2014 12:14 AM, Nathan Rossi wrote:
>> -----Original Message-----
>> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
>> bounces at yoctoproject.org] On Behalf Of Philip Balister
>> Sent: Friday, October 10, 2014 4:10 AM
>> To: meta-xilinx at yoctoproject.org
>> Subject: [meta-xilinx] [PATCH 1/2] u-boot-xlnx.inc : Add support for
>> building working SPL.
>
> Missing patch 2/2?
Too large :) I'll resend this one, then we can worry about the details
setting up meta-xilinx for the reference boards.
>
>>
>> You need to add the files ps7_init.[ch] via a board specific
>> SRC_URI append. The ps7 files should be GPL licensed to avoid
>> license headaches.
>>
>> Signed-off-by: Philip Balister <philip at balister.org>
>> ---
>> recipes-bsp/u-boot/u-boot-xlnx.inc | 22 +++++++++++++++++++++-
>> 1 file changed, 21 insertions(+), 1 deletion(-)
>>
>> diff --git a/recipes-bsp/u-boot/u-boot-xlnx.inc b/recipes-bsp/u-boot/u-
>> boot-xlnx.inc
>> index ee6b32c..6f5e5c6 100644
>> --- a/recipes-bsp/u-boot/u-boot-xlnx.inc
>> +++ b/recipes-bsp/u-boot/u-boot-xlnx.inc
>> @@ -4,7 +4,27 @@ LICENSE = "GPLv2+"
>>
>> XILINX_EXTENSION = "-xilinx"
>>
>> -FILESEXTRAPATHS += "${THISDIR}/u-boot-xlnx:"
>> +FILESEXTRAPATHS += "${THISDIR}/u-boot-xlnx:${THISDIR}/${MACHINE}:"
>> SRC_URI = "git://github.com/Xilinx/u-boot-xlnx.git;protocol=https"
>>
>> +SPL_BINARY = "boot.bin"
>> +UBOOT_SUFFIX = "img"
>> +
>> +do_configure_prepend () {
>> + if test -e ${WORKDIR}/ps7_init.h; then
>> + cp ${WORKDIR}/ps7_init.h ${S}/board/xilinx/zynq/
>> + cp ${WORKDIR}/ps7_init.c ${S}/board/xilinx/zynq/
>> + fi
>
> Worth checking for ps7_init_gpl.* as well, probably before the ps7_init.* as the _gpl part implies that it is more likely to be the properly licensed version.
>
The u-boot source is expecting the ps7_init.[ch] files. To use the _gpl
versions we would need to rename them and edit the c file to include the
new name, or maybe just rename the c file.
At any rate, we need to get the layer building a working boot.bin file.
People are having issues using meta-xilinx due to the bad boot.bin it
creates.
> I am interested in making ps7_init.c/h a package/dependency in its own right, that would provide the ps7_init.c/h files in the machines sysroot. That way a bsp could have a recipe that provides the files (which might exist in a git repo, in the layer or in a tarball, etc). Any ideas/opinions on handling these files in a formalized way?
>
> Also MicroBlaze has a similar need for this sort of thing but for the xparameters.h file.
>
>> +}
>> +
>> +do_deploy_append () {
>> + if test -e ${WORKDIR}/uEnv.txt; then
>> + cp ${WORKDIR}/uEnv.txt ${DEPLOYDIR}
>> + fi
>
> There is already some recipe infrastructure for 'environment' files, I haven't tested it but it looks like it might work for what you have here.
> https://github.com/openembedded/oe-core/blob/master/meta/recipes-bsp/u-boot/u-boot.inc#L41
>
> Looks like all that needs to be set is:
> UBOOT_ENV = "uEnv"
>
OK, let me check this. This patch is made of all the local stuff I am
carrying to build u-boot. I needed to publish the patch to get this sort
of feedback :)
>> + if test -e ${WORKDIR}fpga.bin; then
>> + cp ${WORKDIR}/fpga.bin ${DEPLOYDIR}
>> + fi
>
> Not sure if this belongs in the u-boot recipe, any specific reason for it here? Or just a convenience thing (so that you can put all the files in the 'u-boot/${MACHINE}/' directory)?
>
SPL load the file fpga.bin. I put this hear since I didn't have another
place to load it. When the board comes up, we load a simple image to set
the default state of various outputs and connect any wires to
peripherals to continue boot. In our case, user space loads the "real"
image later.
For the BSP recipe, this is intended to show users how to load an image
at boot time using a feature of SPL.
I'll work through the other comments and resend.
Philip
>> +}
>> +
>> include u-boot-extra.inc
>> +
>> --
>> 1.8.3.1
>>
>> --
>> _______________________________________________
>> meta-xilinx mailing list
>> meta-xilinx at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
>
More information about the meta-xilinx
mailing list