bootstd: android: Add U-Boot version to cmdline
PATCH v2 1/1 bootstd: android: Add U-Boot version to cmdline
When booting into Android fastbootd (a subset of recovery), the default UI shows the bootloader version in the screen [1].
This is done via the ro.bootloader property which should come from the bootloader.
Provide the U-Boot version via a kernel commandline argument so that fastbootd can show it properly on the screen.
---
Changes in v2:
- Clarify by a comment that we intentionally ignore return (Simon)
- Link to v1: https://lore.kernel.org/r/20240904-bootmeth-bootloader-version-v1-1-9979a8428566@baylibre.com
--- boot/bootmeth_android.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
boot/bootmeth_android.c +12 -1
@@ -22,6 +22,7 @@#include <malloc.h> #include <mapmem.h> #include <part.h> +#include <version.h> #include "bootmeth_android.h" #define BCB_FIELD_COMMAND_SZ 32
@@ -171,6 +172,12 @@ static int configure_serialno(struct bootflow *bflow)return bootflow_cmdline_set_arg (bflow,"androidboot.serialno" , serialno, false); } +static int configure_bootloader_version (struct bootflow *bflow) +{ +return bootflow_cmdline_set_arg (bflow,"androidboot.bootloader" , +PLAIN_VERSION , false); +} +static int android_read_bootflow (struct udevice *dev,struct bootflow *bflow) {struct blk_desc *desc =dev_get_uclass_plat (bflow->blk);
@@ -264,8 +271,12 @@ static int android_read_bootflow(struct udevice *dev, struct bootflow *bflow) goto free_priv; } -/* Ignoring return code: setting serial number is not mandatory for booting */ +/* +* Ignoring return code for the following configurations: +* these are not mandatory for booting. +*/ configure_serialno (bflow); +configure_bootloader_version (bflow);if (priv->boot_mode ==ANDROID_BOOT_MODE_NORMAL ) { ret = bootflow_cmdline_set_arg(bflow, "androidboot.force_normal_boot",
---
base-commit: 360aaddd9cea8c256f50c576794415cadfb61819
change-id: 20240904-bootmeth-bootloader-version-2a2b35fce4cf
Best regards,
Signature · 1 line
Mattijs Korpershoek <[email protected]>
Quoted 14 lines · Mattijs Korpershoek
When booting into Android fastbootd (a subset of recovery), the default UI shows the bootloader version in the screen [1].
This is done via the ro.bootloader property which should come from the bootloader.Provide the U-Boot version via a kernel commandline argument so that fastbootd can show it properly on the screen.
Reviewed-by Julien Masson <[email protected]>Reviewed-by Guillaume La Roque <[email protected]>Signed-off-by Mattijs Korpershoek <[email protected]>
Quoted 7 lines
---
Changes in v2:
- Clarify by a comment that we intentionally ignore return (Simon)
- Link to v1: https://lore.kernel.org/r/20240904-bootmeth-bootloader-version-v1-1-9979a8428566@baylibre.com--- boot/bootmeth_android.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Hi,
Quoted 9 lines · Mattijs Korpershoek
When booting into Android fastbootd (a subset of recovery), the default UI shows the bootloader version in the screen [1].
This is done via the ro.bootloader property which should come from the bootloader.Provide the U-Boot version via a kernel commandline argument so that fastbootd can show it properly on the screen.
[...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)
[1/1] bootstd: android: Add U-Boot version to cmdline
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/3af5b851b4c66c63ad0036d4a10ea5b67e7827a1
--
Mattijs