[PATCH RFT v2 1/3] fastboot: blk: introduce fastboot block flashing support
neil.armstrong at linaro.org
neil.armstrong at linaro.org
Tue Apr 29 18:22:24 CEST 2025
Hi,
<snip>
> But using raw partition descriptors[1] does not work with the above
>
> [1] https://docs.u-boot.org/en/latest/android/fastboot.html#raw-partition-descriptors
Right, not all features will work with generic block backend, but it's a start!
>
>>
>>>
>>>> +
>>>> +config FASTBOOT_FLASH_BLOCK_DEVICE_ID
>>>> + int "Define FASTBOOT block device id"
>>>> + depends on FASTBOOT_FLASH_BLOCK
>>>> + help
>>>> + "Fastboot block device id"
>>>
>>> This is similar as CONFIG_FASTBOOT_FLASH_MMC_DEV, no?
>>
>> No, the MMC one makes the mmc type implicit, while the block one
>> can target any block device (and mmc)
>
> I understand, but when CONFIG_FASTBOOT_FLASH_BLOCK_INTERFACE_NAME="mmc",
> CONFIG_FASTBOOT_FLASH_MMC_DEV and FASTBOOT_FLASH_BLOCK_DEVICE_ID are the
> same thing.
>
>>
>>>
>>> To me, it's confusing to have similar KConfig entries based on interface
>>> type.
>>>
>>> If we really want to do it this way, then we should add a safeguard in
>>> the code: test if FASTBOOT_FLASH_BLOCK_INTERFACE_NAME is "mmc" and if so, add a
>>> warning to recommend using FASTBOOT_FLASH_MMC instead.
>>>
>>> What's your opinion on this?
>>
>> Perhaps, not sure it's really problematic
>
> Maybe not for you, because you have the history on this project. But to
> a newcomer, having both options seems a bit strange.
>
> If we look at how the blk-uclass is implemented, it inconsisent with how
> it's done with fastboot.
>
> longer term, I'd rather deprecate the CONFIG_FASTBOOT_FLASH_MMC_DEV
> entry so that we use FASTBOOT_FLASH_BLOCK_INTERFACE_NAME for everything
> (including mmc)
>
> I understand that you might not have the time for doing so, so as a
> first step can we add a (printf) warning in the fastboot block layer
> when the interface name is mmc ?
>
Yeah my goal is to first have a support for generic block, merging
both makes sense.
Ok I'll add a warning
Thanks,
Neil
More information about the U-Boot
mailing list