From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] bootm: add generic android image handler
Date: Wed, 21 Jan 2026 10:13:42 +0100 [thread overview]
Message-ID: <2b6f48d1-7258-40f1-9fa3-8f2f399f4bb6@pengutronix.de> (raw)
In-Reply-To: <aXCJwR366e11cIMM@pengutronix.de>
Hi Sascha,
On 1/21/26 09:09, Sascha Hauer wrote:
> On Tue, Jan 20, 2026 at 04:04:37PM +0100, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 1/20/26 3:55 PM, Sascha Hauer wrote:
>>> + if (kernel)
>>> + bootm_data.os_file = kernel;
>>> +
>>> + if (initrd)
>>> + bootm_data.initrd_file = initrd;
>>> +
>>> + close(fd);
>>> +
>>> + ret = bootm_boot(&bootm_data);
>>
>> Two quick comments:
>>
>> I think this feature will not be usable when
>> CONFIG_BOOTM_OFTREE_FALLBACK is disabled, which is a shame, because I
>> think normal deployments should disable that option to avoid unexpected
>> fallback behavior.
>>
>> Here the fallback is expected though. Would it be possible to change
>> this, so the barebox oftree is passed along explicitly to avoid falling
>> into the fallback?
>
> When a user chooses to disable CONFIG_BOOTM_OFTREE_FALLBACK to avoid
> using the internal device tree as a fallback then this decision should
> be universally honoured. Explicitly inserting the internal device tree
> in special cases contradicts this.
>
> Note that I have used this feature with a FIT image which carries its
> own device tree, so I wasn't affected.
>
> We currently only support version 1 of the Android image format. Since
> version 2 the image can also embed a device tree which can be passed
> with the --dtb option to the fastboot command, so the solution to
> address your concerns should be adding support for version 2.
>
> I would consider this a future enhancement though.
Ah, didn't consider that you can just boot FIT images this way.
Then I also think it's ok keeping it as-is.
>> On a related note, this will probably trigger a warning on every boot if
>> the barebox device tree has a state node. Maybe we could mark dupes of
>> the barebox device tree as such (maybe set device_node::dev to a special
>> value?!), so we can skip the warning?
>
> You mean this warning?
>
> dev_warn(&state->dev, "Warning: Kernel devicetree contains state node, replacing it\n");
>
> We could mark it as duplicate as you suggested. Another possibility
> would be to delete state nodes while duplicating the internal device tree.
Oh, I like the second suggestion, thanks.
Cheers,
Ahmad
>
> Sascha
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-01-21 9:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 14:55 [PATCH 0/2] Android image support Sascha Hauer
2026-01-20 14:55 ` [PATCH 1/2] libfile: copy_fd: add size argument Sascha Hauer
2026-01-20 14:55 ` [PATCH 2/2] bootm: add generic android image handler Sascha Hauer
2026-01-20 15:04 ` Ahmad Fatoum
2026-01-21 8:09 ` Sascha Hauer
2026-01-21 9:13 ` Ahmad Fatoum [this message]
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=2b6f48d1-7258-40f1-9fa3-8f2f399f4bb6@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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