From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>,
neil.armstrong@linaro.org, u-boot@lists.denx.de,
Dmitrii Merkurev <dimorinny@google.com>
Subject: Re: [PATCH RFT v3 0/3] fastboot: add support for generic block flashing
Date: Thu, 22 May 2025 08:58:18 +0200 [thread overview]
Message-ID: <87a575gmid.fsf@kernel.org> (raw)
In-Reply-To: <20250521190347.GF100073@bill-the-cat>
Hi Tom,
On mer., mai 21, 2025 at 13:03, Tom Rini <trini@konsulko.com> wrote:
> On Wed, May 21, 2025 at 08:52:41PM +0200, Mattijs Korpershoek wrote:
>> Hi Tom,
>>
>> On mer., mai 21, 2025 at 09:12, Tom Rini <trini@konsulko.com> wrote:
>>
>> > On Wed, May 21, 2025 at 04:49:35PM +0200, Mattijs Korpershoek wrote:
>> >> Hi Neil,
>> >>
>> >> On mar., mai 20, 2025 at 13:35, Mattijs Korpershoek <mkorpershoek@kernel.org> wrote:
>> >>
>> >> > Hi,
>> >> >
>> >> > On Tue, 06 May 2025 18:10:06 +0200, neil.armstrong@linaro.org wrote:
>> >> >> This serie permits using any block device as target
>> >> >> for fastboot by moving the generic block logic into
>> >> >> a common set of helpers and also use them as generic
>> >> >> backend.
>> >> >>
>> >> >> The erase logic has been extended to support software
>> >> >> erase since only 2 block drivers exposes the erase
>> >> >> operation.
>> >> >>
>> >> >> [...]
>> >> >
>> >> > Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)
>> >> >
>> >> > [1/3] fastboot: blk: introduce fastboot block flashing support
>> >> > https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/88239b5bb04bea2b58f7bf4c3ea72cf832de818c
>> >> > [2/3] fastboot: blk: switch emmc to use the block helpers
>> >> > https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/25ab5c32c28b9f25fb193f726f239d75af3c365a
>> >> > [3/3] fastboot: integrate block flashing back-end
>> >> > https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/a885bd8c969e25d03bf406207d89b1145c9490fb
>> >>
>> >> It seems this series cause CI to fail:
>> >> https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/26238
>> >>
>> >> Without the patches applied, it passes:
>> >> https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/26235
>> >>
>> >> Do you have any idea what is going wrong?
>> >> I could not find anything obvious by skimming through the logs.
>> >
>> > It's a Kconfig problem then. Some platform is prompting for a value (not
>> > a y/n) and there's no default.
>>
>> You are correct. Thank you for the suggestion.
>>
>> I've applied the following diff to 3/3:
>> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
>> index 68967abb751e..fdf34a6abe1e 100644
>> --- a/drivers/fastboot/Kconfig
>> +++ b/drivers/fastboot/Kconfig
>> @@ -200,6 +200,7 @@ config FASTBOOT_MMC_USER_NAME
>> config FASTBOOT_FLASH_BLOCK_INTERFACE_NAME
>> string "Define FASTBOOT block interface name"
>> depends on FASTBOOT_FLASH_BLOCK
>> + default "none"
>> help
>> The fastboot "flash" and "erase" commands support operations
>> on any Block device, this should specify the block device name
>
> Assuming that the code will see "none" and handle the error correctly,
> OK. But we really should have a configured true value here, yes?
The code does not handle any special cases.
If FASTBOOT_FLASH_BLOCK_INTERFACE_NAME is "none", we will call:
blk_get_dev("none", 0);
Which will then be handled via:
if (!dev_desc) {
fastboot_fail("no such device", response);
return -ENODEV;
}
>
>> @@ -212,6 +213,7 @@ config FASTBOOT_FLASH_BLOCK_INTERFACE_NAME
>> config FASTBOOT_FLASH_BLOCK_DEVICE_ID
>> int "Define FASTBOOT block device identifier"
>> depends on FASTBOOT_FLASH_BLOCK
>> + default 0
>> help
>> The fastboot "flash" and "erase" commands support operations
>> on any Block device, this should specify the block device
>
> I do not like this at first. If FASTBOOT_FLASH_BLOCK_DEVICE_ID is set,
> there should be a valid ID set too yes? Potentially worse, is 0 a valid
> option here? If so, is that likely to be a real and common one? In that
Yes, 0 is a valid option here. Think of this symbol as a similar one to
FASTBOOT_FLASH_MMC_DEV however it's for generic block device type
(virtio, scsi, ...)
I'd think that 0 is typically the most common value, since it's the
first block controller of a specific type.
> case, we should also be updating the help text to make sure it's clear
> what the normal range is I think.
Ok. That's a bit too much for me to do in a fixup.
Neil, can you send a v4?
>
> --
> Tom
next prev parent reply other threads:[~2025-05-22 6:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 16:10 [PATCH RFT v3 0/3] fastboot: add support for generic block flashing neil.armstrong
2025-05-06 16:10 ` [PATCH RFT v3 1/3] fastboot: blk: introduce fastboot block flashing support neil.armstrong
2025-05-07 10:05 ` Mattijs Korpershoek
2025-05-06 16:10 ` [PATCH RFT v3 2/3] fastboot: blk: switch emmc to use the block helpers neil.armstrong
2025-05-07 10:06 ` Mattijs Korpershoek
2025-05-06 16:10 ` [PATCH RFT v3 3/3] fastboot: integrate block flashing back-end neil.armstrong
2025-05-07 10:02 ` [PATCH RFT v3 0/3] fastboot: add support for generic block flashing Mattijs Korpershoek
2025-05-07 11:50 ` Neil Armstrong
2025-05-20 11:35 ` Mattijs Korpershoek
2025-05-21 14:49 ` Mattijs Korpershoek
2025-05-21 15:12 ` Tom Rini
2025-05-21 18:52 ` Mattijs Korpershoek
2025-05-21 19:03 ` Tom Rini
2025-05-22 6:58 ` Mattijs Korpershoek [this message]
2025-05-22 7:52 ` neil.armstrong
2025-05-22 14:30 ` 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=87a575gmid.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=dimorinny@google.com \
--cc=neil.armstrong@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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