[meta-xilinx] custom ps7_init_gpl

Nathan Rossi nathan at nathanrossi.com
Fri Sep 9 01:33:28 PDT 2016


On Fri, Sep 9, 2016 at 5:32 PM, Alan Levy <alan.levy at plextek.com> wrote:
>
> For Jethro and earlier you add a recipe called platform-init.bbappend containing the following append function:

For reference platform-init has been available since the fido release.
However the FORCE_PS7INIT variable I mention below was only added in
the krogoth release.

>
>
>
> do_install_append() {
>
>     install –m 06444 <source directory>/ps7_init_gpl.c ${D}${PLATFORM_INIT_DIR}/
>
>     install –m 06444 <source directory>/ps7_init_gpl.h ${D}${PLATFORM_INIT_DIR}/
>
> }
>
>
>
> Where <source directory> is the location of your replacement sources.

The method Alan describes works ok if you are pulling in the files
from your local system and not from within a custom layer. You will
also need to make your machine "COMPATIBLE_MACHINE" with the
platform-init recipe. Here is an example bbappend that uses a set of
platform init files from a files/ directory in your own layer.

--
COMPATIBLE_MACHINE_<machine-name> = "<machine-name>"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
--

In the files/ directory you can place your machine specific
ps7_init_gpl* files. (Note for legal correctness with the
platform-init recipe you should use the ps7_init_gpl* files)

files/
files/<machine-name>/ps7_init_gpl.c
files/<machine-name>/ps7_init_gpl.h


If you are using the machine "zedboard-zynq7" you will also have to
tell u-boot to use the zynq7-platform-init provider (by default it
uses the files from u-boot source). Whilst it is recommended that you
create your own machine (that clones or inherits the zedboard-zynq7
machine), you can force u-boot to use the custom platform-init by
setting FORCE_PS7INIT = "zed" (Note, newer u-boots that are not in
meta-xilinx yet are not supported by this yet due some changes that
make the directories in u-boot source different), you can do this in
local.conf or in your custom machine (if it is using the zed u-boot
config).

>
>
>
> This is an area that is being re-engineered by Xilinx so for Krogoth onwards this solution may well not work.
>
> ALAN LEVY
> Lead Consultant, Embedded Systems
>
> Tel > +44 (0) 1799 533200
> Email > alan.levy at plextek.com
>
> www.plextek.com
> The Plextek Building, London Road, Great Chesterford, Saffron Walden, CB10 1NY, UK
>
> Plextek is the trading name of Plextek Services Ltd. Registered in England and Wales, no. 09826669
>
>
>
> The existing recipes will take care of the rest.
>
>
>
> From: Danny Bergh [mailto:Danny.Bergh at sioux.eu]
> Sent: 08 September 2016 10:37
> To: meta-xilinx at lists.yoctoproject.org
> Subject: [meta-xilinx] custom ps7_init_gpl
>
>
>
> Dear meta-xilinx,
>
>
>
> We are trying to use a custom hardware layout with yocto. Building a base image for the zed board is no problem, it runs and works fine. Our custom platform uses (for instance) different MIO pin configurations. These are set in the ps7_init_gpl files.

Depending on what you need to change in regards to the platform-init
files, if all you need to do is change some pin muxing or enable the
fclk's, both of these can be done with device trees (pinmux) and
kernel userspace api (pinmux and fclk). Saving the need to handle the
platform init files. But if you have any other significant changes
(e.g. dram/clocks/etc.) then you will need to use the platform-init.

Regards,
Nathan

>
>
>
> How can I add these file and what do I need to configure for compiling these files??
>
>
>
> With kind regards,
>
>
>
> Ing. Danny Bergh
>
> Embedded Software Engineer
>
> ______________________________________________
>
>
>
> Sioux. Source of your Technology
> danny.bergh at sioux.eu I www.sioux.eu
>
>
>
>
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>



More information about the meta-xilinx mailing list