* [PATCH v2] fastboot: read fastboot buffer address from fastboot_addr_r
[not found] <CGME20260521105819eucas1p18eab88ecd16fe3563eb8717324e77dba@eucas1p1.samsung.com>
@ 2026-05-21 10:57 ` Łukasz Stelmach
2026-06-08 9:14 ` Mattijs Korpershoek
0 siblings, 1 reply; 3+ messages in thread
From: Łukasz Stelmach @ 2026-05-21 10:57 UTC (permalink / raw)
To: Mattijs Korpershoek, Tom Rini, Quentin Schulz
Cc: Marek Szyprowski, Łukasz Stelmach, u-boot
Following the previous advice (link below) check fastboot_addr_r
environment variable for fastboot buffer address.
Link: https://lore.kernel.org/u-boot/aWiWFrdwvy7-IK63@sumit-xelite/
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
drivers/fastboot/fb_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Changes in v2:
* replaced the nested ternary operator with the parameterised call to
env_get_hex()
* fixed a typo in the commit message
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 9c52e004588..f2f063ebfbb 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -240,7 +240,7 @@ void fastboot_init(void *buf_addr, u32 buf_size)
#endif
fastboot_buf_addr = buf_addr ? buf_addr :
- (void *)CONFIG_FASTBOOT_BUF_ADDR;
+ (void *)env_get_hex("fastboot_addr_r", CONFIG_FASTBOOT_BUF_ADDR);
fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
fastboot_set_progress_callback(NULL);
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] fastboot: read fastboot buffer address from fastboot_addr_r
2026-05-21 10:57 ` [PATCH v2] fastboot: read fastboot buffer address from fastboot_addr_r Łukasz Stelmach
@ 2026-06-08 9:14 ` Mattijs Korpershoek
2026-06-16 7:22 ` Mattijs Korpershoek
0 siblings, 1 reply; 3+ messages in thread
From: Mattijs Korpershoek @ 2026-06-08 9:14 UTC (permalink / raw)
To: Łukasz Stelmach, Mattijs Korpershoek, Tom Rini,
Quentin Schulz
Cc: Marek Szyprowski, Łukasz Stelmach, u-boot
Hi Łukasz,
Thank you for the patch.
On Thu, May 21, 2026 at 12:57, Łukasz Stelmach <l.stelmach@samsung.com> wrote:
> Following the previous advice (link below) check fastboot_addr_r
> environment variable for fastboot buffer address.
>
> Link: https://lore.kernel.org/u-boot/aWiWFrdwvy7-IK63@sumit-xelite/
> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Sorry for the late review.
The change looks fine, but this new environment variable should be added
to the docs as well:
https://docs.u-boot.org/en/latest/android/fastboot.html
Please add a small sub-section in doc/android/fastboot.rst
under "Fastboot environment variables".
> ---
> drivers/fastboot/fb_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Changes in v2:
>
> * replaced the nested ternary operator with the parameterised call to
> env_get_hex()
>
> * fixed a typo in the commit message
>
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 9c52e004588..f2f063ebfbb 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -240,7 +240,7 @@ void fastboot_init(void *buf_addr, u32 buf_size)
> #endif
>
> fastboot_buf_addr = buf_addr ? buf_addr :
> - (void *)CONFIG_FASTBOOT_BUF_ADDR;
> + (void *)env_get_hex("fastboot_addr_r", CONFIG_FASTBOOT_BUF_ADDR);
> fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
> fastboot_set_progress_callback(NULL);
>
> --
> 2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] fastboot: read fastboot buffer address from fastboot_addr_r
2026-06-08 9:14 ` Mattijs Korpershoek
@ 2026-06-16 7:22 ` Mattijs Korpershoek
0 siblings, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2026-06-16 7:22 UTC (permalink / raw)
To: Mattijs Korpershoek, Łukasz Stelmach, Mattijs Korpershoek,
Tom Rini, Quentin Schulz
Cc: Marek Szyprowski, Łukasz Stelmach, u-boot
Hi Łukasz,
On Mon, Jun 08, 2026 at 11:14, Mattijs Korpershoek <mkorpershoek@kernel.org> wrote:
> Hi Łukasz,
>
> Thank you for the patch.
>
> On Thu, May 21, 2026 at 12:57, Łukasz Stelmach <l.stelmach@samsung.com> wrote:
>
>> Following the previous advice (link below) check fastboot_addr_r
>> environment variable for fastboot buffer address.
>>
>> Link: https://lore.kernel.org/u-boot/aWiWFrdwvy7-IK63@sumit-xelite/
>> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
>
> Sorry for the late review.
>
> The change looks fine, but this new environment variable should be added
> to the docs as well:
> https://docs.u-boot.org/en/latest/android/fastboot.html
>
> Please add a small sub-section in doc/android/fastboot.rst
> under "Fastboot environment variables".
I have given this some more thoughts. The fastboot command already has a
-l argument:
=> fastboot
fastboot - run as a fastboot usb or udp device
Usage:
fastboot [-l addr] [-s size] usb <controller> | udp
addr - address of buffer used during data transfers (0x6000000)
size - size of buffer used during data transfers (0x7000000)
The -l argument is already used by various boards:
$ rg 'fastboot -l'
board/samsung/exynos-mobile/exynos-mobile.env
14: fastboot -l $fastboot_addr_r usb 0
board/qualcomm/qcom-phone.env
9:fastboot=fastboot -l $fastboot_addr_r usb 0
board/qualcomm/default.env
5:fastboot=fastboot -l $fastboot_addr_r usb 0
board/qualcomm/dragonboard410c/dragonboard410c.env
3:fastboot=fastboot -l $fastboot_addr_r usb 0
Why can't we use the -l argument?
>
>
>> ---
>> drivers/fastboot/fb_common.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Changes in v2:
>>
>> * replaced the nested ternary operator with the parameterised call to
>> env_get_hex()
>>
>> * fixed a typo in the commit message
>>
>> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
>> index 9c52e004588..f2f063ebfbb 100644
>> --- a/drivers/fastboot/fb_common.c
>> +++ b/drivers/fastboot/fb_common.c
>> @@ -240,7 +240,7 @@ void fastboot_init(void *buf_addr, u32 buf_size)
>> #endif
>>
>> fastboot_buf_addr = buf_addr ? buf_addr :
>> - (void *)CONFIG_FASTBOOT_BUF_ADDR;
>> + (void *)env_get_hex("fastboot_addr_r", CONFIG_FASTBOOT_BUF_ADDR);
>> fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
>> fastboot_set_progress_callback(NULL);
>>
>> --
>> 2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-16 7:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20260521105819eucas1p18eab88ecd16fe3563eb8717324e77dba@eucas1p1.samsung.com>
2026-05-21 10:57 ` [PATCH v2] fastboot: read fastboot buffer address from fastboot_addr_r Łukasz Stelmach
2026-06-08 9:14 ` Mattijs Korpershoek
2026-06-16 7:22 ` Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox