U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Marek Vasut <marex@denx.de>, Eddie James <eajames@linux.ibm.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Safae Ouajih <souajih@baylibre.com>,
	Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH v2 3/5] bootm: Allow omitting the load address
Date: Tue, 14 Nov 2023 13:04:30 -0500	[thread overview]
Message-ID: <20231114180430.GZ6601@bill-the-cat> (raw)
In-Reply-To: <20231114163846.GX6601@bill-the-cat>

[-- Attachment #1: Type: text/plain, Size: 2883 bytes --]

On Tue, Nov 14, 2023 at 11:38:46AM -0500, Tom Rini wrote:
> On Sat, Nov 11, 2023 at 08:49:55PM -0700, Simon Glass wrote:
> 
> > The kernel_noload image type indicates that no loading is to be done by
> > U-Boot. This works well when the image is uncompressed.
> > 
> > When the image is compressed, loading is of course required. The load
> > address in the FIT is used for loading.
> > 
> > However a FIT built from Linux v6.6 supports about 990 boards. Each has
> > a different memory arrangement, so no one load address is suitable.
> > Therefore the 'load' address in the kernel node is not useful.
> > 
> > It would be better in this case to be able to omit the load address and
> > have U-Boot choose something suitable. The kernel_addr_r environment
> > variable seems to be a more reliable final address for the kernel. Use
> > that as a backup when the load address is missing.
> > 
> > Similarly, use the load address as the entry address when the latter is
> > omitted.
> > 
> > Update the FIT documentation accordingly.
> > 
> > Note that mkimage still requires each image in a FIT to have a load
> > address, at least for now.
> > 
> > Another option would be to create a new Kconfig for this, or to use a
> > region of memory known to be free, e.g. calculated from the DRAM banks.
> > But in any case we should try to avoid conflicting with the
> > kernel_addr_r variable. So the approach in this patch seems reasonable
> > to me.
> > 
> > It might perhaps be useful to introduce an 'entry-offset' property
> > which allows the entry to be set as an offset from the load address,
> > whether that is explicit or calculated.
> > 
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> 
> OK, so I dug out what I was trying to determine before, and while I
> might see if I can bisect down to when this regressed, it might be a
> little hard given that my previously functional image is from 2013.
> 
> What should happen in the case of kernel_noload, and why the later patch
> to fail on kernel_noload + compression, is that we don't move the kernel
> contents of the FIT. We don't need the load address to be set because
> we're using it where it is. What happened before in the case of the
> ramdisk, and more importantly device tree, is what I why I want to
> bisect down to when my image stopped working. But:

Well, it seems I was wrong. I was able to (with only minor difficulty)
go back to v2013.04, which was just after I made the fitImage I was
trying to test and it doesn't bootm as-is. So whereas I had thought we
had a defined and working case for kernel_noload and FIT images as you
describe them, that does not seem to be the case. So please disregard
this and I will review the patch again in light of what I've confirmed
now, sorry for the incorrect feedback here and in the other thread.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2023-11-14 18:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12  3:49 [PATCH v2 0/5] bootm: Handle compressed arm64 images with bootm Simon Glass
2023-11-12  3:49 ` [PATCH v2 1/5] image: Correct load_bug typo Simon Glass
2023-11-14 16:40   ` Tom Rini
2023-11-12  3:49 ` [PATCH v2 2/5] image: Show the load address when decompressing Simon Glass
2023-11-14 22:36   ` Tom Rini
2023-11-12  3:49 ` [PATCH v2 3/5] bootm: Allow omitting the load address Simon Glass
2023-11-14 16:38   ` Tom Rini
2023-11-14 18:04     ` Tom Rini [this message]
2023-11-18 17:10       ` Simon Glass
2023-11-12  3:49 ` [PATCH v2 4/5] bootm: Move arm64-image processing later Simon Glass
2023-11-12  3:49 ` [PATCH v2 5/5] boot: Don't allow kernel_noload with compression Simon Glass
2023-11-14 16:31   ` Tom Rini

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=20231114180430.GZ6601@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=eajames@linux.ibm.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=marex@denx.de \
    --cc=mkorpershoek@baylibre.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=souajih@baylibre.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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