All of lore.kernel.org
 help / color / mirror / Atom feed
* binman should create a list of output files
@ 2021-08-20  6:49 Heiko Thiery
  2021-08-20 18:22 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Thiery @ 2021-08-20  6:49 UTC (permalink / raw)
  To: Simon Glass
  Cc: sbabic, uboot-imx, u-boot, hs, frieder.schrempf, tharvey,
	marcel.ziswiler, Fabio Estevam

Hi Simon,

During the discussion on [1] I had the idea if binman could create a
list of all output files, so that it is possible to do a real clean in
the u-boot makefile.

Currently there are not all binaries listed in the files list and
especially during the port of some boards to binman we had some
trouble due to fragments of old/previous builds.

What do you think?

[1] https://lists.denx.de/pipermail/u-boot/2021-August/458530.html

-- 
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: binman should create a list of output files
  2021-08-20  6:49 binman should create a list of output files Heiko Thiery
@ 2021-08-20 18:22 ` Simon Glass
  2021-08-23  6:38   ` Heiko Thiery
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2021-08-20 18:22 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Stefano Babic, dl-uboot-imx, U-Boot Mailing List, Heiko Schocher,
	Schrempf Frieder, Tim Harvey, Marcel Ziswiler, Fabio Estevam

Hi Heiko,

On Fri, 20 Aug 2021 at 00:49, Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> Hi Simon,
>
> During the discussion on [1] I had the idea if binman could create a
> list of all output files, so that it is possible to do a real clean in
> the u-boot makefile.
>
> Currently there are not all binaries listed in the files list and
> especially during the port of some boards to binman we had some
> trouble due to fragments of old/previous builds.
>
> What do you think?

Yes i like this. Perhaps something like:

binman ls-files output   - to list output files

We could also create a binman.filelist file in the target directory.

The interesting question is how to implement it. It might be best to
add a new method to Entry() which returns a list of output filenames.
Then we can simply call all the entries recursively to get the list,
as we do with other things today.

The other issue is temporary files, which are currently lumped into
the same output dir. One day I think we should distinguish between
output files that produce something useful and files that are just
there for debugging (e.g. the input file used for compression or
signing). The latter could go in a separate binman-working/ directory
inside the output dir, and could be removed wholesale.

Regards,
Simon


>
> [1] https://lists.denx.de/pipermail/u-boot/2021-August/458530.html
>
> --
> Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: binman should create a list of output files
  2021-08-20 18:22 ` Simon Glass
@ 2021-08-23  6:38   ` Heiko Thiery
  2021-08-23 17:25     ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Thiery @ 2021-08-23  6:38 UTC (permalink / raw)
  To: Simon Glass
  Cc: Stefano Babic, dl-uboot-imx, U-Boot Mailing List, Heiko Schocher,
	Schrempf Frieder, Tim Harvey, Marcel Ziswiler, Fabio Estevam

Hi Simon,

Am Fr., 20. Aug. 2021 um 20:22 Uhr schrieb Simon Glass <sjg@chromium.org>:
>
> Hi Heiko,
>
> On Fri, 20 Aug 2021 at 00:49, Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > During the discussion on [1] I had the idea if binman could create a
> > list of all output files, so that it is possible to do a real clean in
> > the u-boot makefile.
> >
> > Currently there are not all binaries listed in the files list and
> > especially during the port of some boards to binman we had some
> > trouble due to fragments of old/previous builds.
> >
> > What do you think?
>
> Yes i like this. Perhaps something like:
>
> binman ls-files output   - to list output files
>
> We could also create a binman.filelist file in the target directory.
>
> The interesting question is how to implement it. It might be best to
> add a new method to Entry() which returns a list of output filenames.
> Then we can simply call all the entries recursively to get the list,
> as we do with other things today.
>
> The other issue is temporary files, which are currently lumped into
> the same output dir. One day I think we should distinguish between
> output files that produce something useful and files that are just
> there for debugging (e.g. the input file used for compression or
> signing). The latter could go in a separate binman-working/ directory
> inside the output dir, and could be removed wholesale.


I tried to dig into the binman code. one possible point to remember
the output files could be the tools function GetOutputFilename from
patman. For this you could use a binman wrapper function that
remembers the files. But this only works if the "output_files" would
be saved when creating the image. a standalone binman option to list
the output files doesn't work then. but this way you would have an
automatic list with all (image and temporary) files.

Is it correct that the output files are created in BuildImage() and
all other (like mkimage.*.mkimage) files are only the temporary ones?


--
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: binman should create a list of output files
  2021-08-23  6:38   ` Heiko Thiery
@ 2021-08-23 17:25     ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2021-08-23 17:25 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Stefano Babic, dl-uboot-imx, U-Boot Mailing List, Heiko Schocher,
	Schrempf Frieder, Tim Harvey, Marcel Ziswiler, Fabio Estevam

Hi Heiko,

On Mon, 23 Aug 2021 at 00:38, Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> Hi Simon,
>
> Am Fr., 20. Aug. 2021 um 20:22 Uhr schrieb Simon Glass <sjg@chromium.org>:
> >
> > Hi Heiko,
> >
> > On Fri, 20 Aug 2021 at 00:49, Heiko Thiery <heiko.thiery@gmail.com> wrote:
> > >
> > > Hi Simon,
> > >
> > > During the discussion on [1] I had the idea if binman could create a
> > > list of all output files, so that it is possible to do a real clean in
> > > the u-boot makefile.
> > >
> > > Currently there are not all binaries listed in the files list and
> > > especially during the port of some boards to binman we had some
> > > trouble due to fragments of old/previous builds.
> > >
> > > What do you think?
> >
> > Yes i like this. Perhaps something like:
> >
> > binman ls-files output   - to list output files
> >
> > We could also create a binman.filelist file in the target directory.
> >
> > The interesting question is how to implement it. It might be best to
> > add a new method to Entry() which returns a list of output filenames.
> > Then we can simply call all the entries recursively to get the list,
> > as we do with other things today.
> >
> > The other issue is temporary files, which are currently lumped into
> > the same output dir. One day I think we should distinguish between
> > output files that produce something useful and files that are just
> > there for debugging (e.g. the input file used for compression or
> > signing). The latter could go in a separate binman-working/ directory
> > inside the output dir, and could be removed wholesale.
>
>
> I tried to dig into the binman code. one possible point to remember
> the output files could be the tools function GetOutputFilename from
> patman. For this you could use a binman wrapper function that
> remembers the files. But this only works if the "output_files" would
> be saved when creating the image. a standalone binman option to list
> the output files doesn't work then. but this way you would have an
> automatic list with all (image and temporary) files.

Yes, I think that could work in the short term but I don't really
think it is worth it. We need a way to determine in advance what files
will be written, or determine it without actually writing.

For temp files, should we keep a list? Or would it be OK to put them
all in a subdir? At the moment we use tmpname so the filenames are
quite strange.

>
> Is it correct that the output files are created in BuildImage() and
> all other (like mkimage.*.mkimage) files are only the temporary ones?

For a narrow definition of output files, yes. I think that could work.
There is also the map file. We could have a thing in state.py to keep
a list of output files, perhaps. It should be possible to add an
option to dry run and not produce output, just the list.

Regards,
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-23 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  6:49 binman should create a list of output files Heiko Thiery
2021-08-20 18:22 ` Simon Glass
2021-08-23  6:38   ` Heiko Thiery
2021-08-23 17:25     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.