[PATCH] dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration
Mattijs Korpershoek
mkorpershoek at baylibre.com
Thu Nov 2 10:15:14 CET 2023
Hi Jaehoon,
On mar., oct. 31, 2023 at 15:50, Mattijs Korpershoek <mkorpershoek at baylibre.com> wrote:
> Hi,
>
> On Mon, 20 Jun 2022 20:13:54 +0900, Jaehoon Chung wrote:
>> Add CONFIG_DFU_NAME_MAX_SIZE to change the proper size.
>> If name is longer than default size, it can do wrong behavior during updating
>> image. So it need to change the proper maximum size.
>>
>> This patch is proviced the solution to change value with configuration.
>>
>>
>> [...]
>
> Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)
>
> [1/1] dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration
> https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/de9b2e10f10996050a10998a0836abe2f9e425e3
This patch breaks CI for both arm32 and arm64 platforms:
* https://source.denx.de/u-boot/custodians/u-boot-dfu/-/jobs/725163
* https://source.denx.de/u-boot/custodians/u-boot-dfu/-/jobs/725164
It breaks because multiple boards which include dfu.h without having
CONFIG_DFU being set.
Tom attempted to fix this with:
https://patchwork.ozlabs.org/project/uboot/list/?series=369275
But that had some different issues, see:
https://libera.irclog.whitequark.org/u-boot/2023-10-31#35154532;
I've fixed it up with the following diff:
diff --git a/include/dfu.h b/include/dfu.h
index 4573f753c565..2c3ffa3f9297 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -99,7 +99,12 @@ struct virt_internal_data {
int dev_num;
};
+
+#if defined(CONFIG_DFU_NAME_MAX_SIZE)
#define DFU_NAME_SIZE CONFIG_DFU_NAME_MAX_SIZE
+#else
+#define DFU_NAME_SIZE 32
+#endif
#ifndef DFU_DEFAULT_POLL_TIMEOUT
#define DFU_DEFAULT_POLL_TIMEOUT 0
#endif
If you have a better idea to fix this, can you please let me know?
Otherwise, I will squash this to keep CI green.
Thank you
>
> --
> Mattijs
More information about the U-Boot
mailing list