public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Simon Glass <sjg@chromium.org>
Cc: "Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
	"Xavier Drudis Ferran" <xdrudis@tinet.cat>,
	"Quentin Schulz" <foss+uboot@0leil.net>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Lin Huang" <hl@rock-chips.com>, 陈健洪 <chenjh@rock-chips.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Nick Xie" <nick@khadas.com>, "Johan Jonker" <jbx6244@gmail.com>,
	deepakdas.linux@gmail.com, linux@alxd.me,
	"U-Boot Mailing List" <u-boot@lists.denx.de>
Subject: Re: [SPAM] Re: Replace make-fit-atf.py with binman. Was: migrate u-boot-rockchip.bin to binman and generate an image for SPI
Date: Tue, 2 Aug 2022 10:19:25 +0200	[thread overview]
Message-ID: <YujdQcwc+I0/iOew@begut> (raw)
In-Reply-To: <CAPnjgZ0Ch-=fnpSu7oSL5nGmDr6Sup2QbOMNtek0bhDXCUMP9A@mail.gmail.com>

El Mon, Aug 01, 2022 at 01:13:27PM -0600, Simon Glass deia:
> >
> > Am I completely lost or does what I want to do make some kind of sense?
> 
> Well I still feel that we should handle this properly in binman.
>

I respect your feelings but would you care explaining the goal of binman?
I first thought it was about handling binaries (things like copy binary content,
aligning it, padding, extracting and selecting parts from one binary to form
the final image...). A little like a linker but for other kinds of binary files,
with maybe headers but no symbol resolution and all. Maybe more like GNU ar but
for images instead of executables.
     
But then you seem to say it should handle dependencies between build files and 
be called only once ? So should it eventually become a sort of make itself ?
 
> I don't even think we need to allow images to be incorporated in other
> images. We can probably just allow a section to have a filename, a bit
> like this patch [1].
> 

There's a image r-sd and an image r-spi. Both need to have inside the
same binary itb, packed differently. If r-sd has a section with itb
and writes that section to a file, r-spi still needs to incorporate
that section as a binary, and to do that it needs to know the other
image has already written its section to a file or built into
somewhere in memory. So there're dependencies, and synchronisation if
you want to built images in parallel. make can handle that if you call
binman multiple times. But if you don't want that, then you need to
either include dependency management into binman (turning it into a
little make working from dts subtrees instead of makefiles) or forbid
that binaries used by binman could be images produced by binman, and
then you need other binary manipulation tools (like make_fit_atf.py,
which is basically what you have now, but that's apparently not
desired either).

If it was just me who feels lost, then it'd be just that I don't get it, 
but Quentin is saying something similar.

In any case, don't forget what Jerome said about tee.bin needing different
parsing than split-elf does in binman. The sections of tee.bin can also
end up in u-boot.itb. Adding that to binman would maybe make more sense
that what I was trying to add, in the sense that binman be a swiss army knive 
of parsing and building binaries. But then you'd still have the problem 
that if images built by binman cannot be incorporated in images built by binman, 
then something else has to build u-boot.itb. And that something else is 
currently make_fit_atf.py and works fine, so why the trouble ?

We're kind of running in circles, and for me it would be helpful to
understand the goal and scope of binman to understand what would be
desirable, because the status quo seems preferable to some kind of
feature creep in binman that I can't seem to reconcile with the 
philosophy of one tool doing one task and well. 

Maybe most people here already understand all this, but sometimes 
explaining the basics to a foreign bystander who knows little of
the subject (hello, that's me) can help people sort out thoughts?

Thanks, and sorry for the wall of text.

  reply	other threads:[~2022-08-02  8:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 17:29 Replace make-fit-atf.py with binman. Was: migrate u-boot-rockchip.bin to binman and generate an image for SPI Xavier Drudis Ferran
2022-07-25 17:33 ` Xavier Drudis Ferran
2022-07-26  9:08   ` Quentin Schulz
2022-07-26 19:08     ` Xavier Drudis Ferran
2022-07-26 19:15       ` Jerome Forissier
2022-07-26 19:48         ` [SPAM] " Xavier Drudis Ferran
2022-07-26 19:52       ` Xavier Drudis Ferran
2022-07-26 19:58       ` Simon Glass
2022-07-26 19:58     ` Simon Glass
2022-07-27 10:34       ` Quentin Schulz
2022-07-31  1:27         ` Simon Glass
2022-08-01 17:04           ` Quentin Schulz
2022-08-01 19:13             ` Simon Glass
2022-08-02  8:19               ` Xavier Drudis Ferran [this message]
2022-08-02 12:41                 ` [SPAM] " Simon Glass
2022-08-02 17:19                   ` Xavier Drudis Ferran
2022-08-07 18:50                     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YujdQcwc+I0/iOew@begut \
    --to=xdrudis@tinet.cat \
    --cc=andy.yan@rock-chips.com \
    --cc=chenjh@rock-chips.com \
    --cc=deepakdas.linux@gmail.com \
    --cc=foss+uboot@0leil.net \
    --cc=hl@rock-chips.com \
    --cc=jbx6244@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux@alxd.me \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nick@khadas.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox