* [PATCH master] fastboot: populate is-logical:$partition variable
@ 2025-07-22 14:05 Ahmad Fatoum
2025-07-22 14:55 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-07-22 14:05 UTC (permalink / raw)
To: barebox; +Cc: Uwe Kleine-König, Andrei Lalaev, Ahmad Fatoum
Uwe reports on IRC that fastboot tries to read some default variables
that barebox doesn't define, which triggers host-side error output:
ERROR: fastboot: no such variable: is-logical:kernel
Flashing didn't seem impacted though.
Referring to the documentation[1], is-logical is related to a number of
commands that create/delete/resize logical partitions.
We have support for modifying partition tables in barebox, but we don't expose
it over Fastboot. Until we do, let's report all partitions as physical
partitions, which is the default value.
This issue has always existed, but only became apparent once we started
returning an error for non-existent variables.
[1]: https://android.googlesource.com/platform/system/core/+show/refs/heads/main/fastboot/README.md#237
Fixes: dd377c937f8b ("common: fastboot: send FAIL if variable does not exist")
Fixes: 3d5080aae90d ("USB: gadget: Add Android fastboot support")
Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Cc: Andrei Lalaev <andrey.lalaev@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
@Uwe, can you give this a test?
---
common/fastboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/fastboot.c b/common/fastboot.c
index 4d16e3997279..603391de7739 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -178,6 +178,8 @@ static int fastboot_add_partition_variables(struct fastboot *fb, struct list_hea
fb_setvar(var, "%08zx", size);
var = fb_addvar(fb, list, "partition-type:%s", fentry->name);
fb_setvar(var, "%s", type);
+ var = fb_addvar(fb, list, "is-logical:%s", fentry->name);
+ fb_setvar(var, "%s", "no");
return ret;
}
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH master] fastboot: populate is-logical:$partition variable
2025-07-22 14:05 [PATCH master] fastboot: populate is-logical:$partition variable Ahmad Fatoum
@ 2025-07-22 14:55 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2025-07-22 14:55 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox, Andrei Lalaev
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
Hello Ahmad,
On Tue, Jul 22, 2025 at 04:05:34PM +0200, Ahmad Fatoum wrote:
> Uwe reports on IRC that fastboot tries to read some default variables
> that barebox doesn't define, which triggers host-side error output:
>
> ERROR: fastboot: no such variable: is-logical:kernel
>
> Flashing didn't seem impacted though.
>
> Referring to the documentation[1], is-logical is related to a number of
> commands that create/delete/resize logical partitions.
>
> We have support for modifying partition tables in barebox, but we don't expose
> it over Fastboot. Until we do, let's report all partitions as physical
> partitions, which is the default value.
>
> This issue has always existed, but only became apparent once we started
> returning an error for non-existent variables.
>
> [1]: https://android.googlesource.com/platform/system/core/+show/refs/heads/main/fastboot/README.md#237
>
> Fixes: dd377c937f8b ("common: fastboot: send FAIL if variable does not exist")
> Fixes: 3d5080aae90d ("USB: gadget: Add Android fastboot support")
> Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> Cc: Andrei Lalaev <andrey.lalaev@gmail.com>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> @Uwe, can you give this a test?
I did, and with it the error messages I wailed about are gone.
Thanks, 🌟🌟🌟🌟🌟
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-22 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-22 14:05 [PATCH master] fastboot: populate is-logical:$partition variable Ahmad Fatoum
2025-07-22 14:55 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox