Fwd: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c

2020-06-23 Thread Brandon Maier
Forgot to CC
-- Forwarded message -
From: Brandon Maier 
Date: Tue, Jun 23, 2020 at 12:16 PM
Subject: Re: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c
To: Michal Simek 


On Tue, Jun 23, 2020 at 11:11 AM Michal Simek  wrote:
> On 22. 06. 20 22:45, Brandon Maier wrote:
> > Add a config to set the file format, but leave the default as binary
> > type for backwards compatibility.
>
>
> Based on description I can't see the reason for it.
> pmu config object should be aligned with pmu not with u-boot itself.

What I mean is, for example if there is a bug in
zynqmp_pm_cfg_obj_convert then the pm_cfg binary will automatically be
updated the next time U-Boot is built. Compared to if the
pm_cfg_obj.bin is stored separately and has to be independently
updated for a bug. But it's a minor issue and not that important.

>
> Also using this script is just one way how to get pmufw config object.
> I personally don't use it but I can't see any issue to be in u-boot
> project if others want to use it.
>

We've been trying to piece together the scripts to build pmu config
from an HDF using Luca's blog posts and other source code. Out of
curiosity, what are these other methods?

>
> Thanks,
> Michal


Fwd: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c

2020-06-23 Thread Brandon Maier
Forwarding as I forgot to CC
-- Forwarded message -
From: Brandon Maier 
Date: Tue, Jun 23, 2020 at 12:08 PM
Subject: Re: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c
To: Luca Ceresoli 


On Tue, Jun 23, 2020 at 10:18 AM Luca Ceresoli  wrote:
>
> Hi Brandon,
>
> On 22/06/20 22:45, Brandon Maier wrote:
> > To use CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE, a developer must pull down the
> > U-Boot source and run ./tools/zynqmp_pm_cfg_obj_convert.py to convert
> > their pm_cfg_obj.c into U-Boot's PMU loader format, then feed that file
> > back to U-Boot during build.
> >
> > Instead, by doing the conversion in U-Boot during the build, we can
> > simplify the developer's build system. And it ensures that if
> > zynqmp_pm_cfg_obj_convert.py is updated, the pm_cfg_obj will stay in
> > sync with U-Boot.
>
> In the workflows I have used so far U-Boot tools are extracted in a
> different step w.r.t. U-Boot cross-compilation, so I never felt the need
> for this feature. But I understand this feature can be handy.

I'm trying to get it to work with Buildroot. Buildroot does have a
package for uboot-tools, so I could use that to run it. I'd have to
move the config and build commands into Buildroot's uboot package.
Since the script belongs to U-Boot anyway, it seemed cleaner to
integrate it directly into U-Boot so it could be used by other build
systems too.

>
> The code looks OK too.
>
> Reviewed-by: Luca Ceresoli 
>
> --
> Luca