[PATCH v2 2/2] tools: mkimage: add new image type "flat_dt_legacy"

Sean Anderson seanga2 at gmail.com
Thu Nov 17 14:23:13 CET 2022


On 11/17/22 06:30, Marc Kleine-Budde wrote:
> On 17.11.2022 00:01:19, Sean Anderson wrote:
>> On 11/16/22 05:49, Marc Kleine-Budde wrote:
>>> On 31.10.2022 15:51:21, Marc Kleine-Budde wrote:
>>>> If the user select the image type "flat_dt" a FIT image will be build.
>>>> This breaks the legacy use case of putting a Flat Device Tree into a
>>>> legacy u-boot image.
>>>>
>>>> Add a new image type "flat_dt_legacy" to build a legacy u-boot image
>>>> with a "flat_dt" type.
>>>>
>>>> Link: https://lore.kernel.org/all/20221028155205.ojw6tcso2fofgnhm@pengutronix.de
>>>> Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
>>>
>>> Sean, what about this approach compared to adding the new command line
>>> parameter?
>>>
>>
>> This is good. Maybe we should just name it fdt?
> 
> There is already the "flat_dt" in boot/image.c, which is the "new" image
> type:

>> 	{	IH_TYPE_FLATDT,        "flat_dt",        "Flat Device Tree", },
> [...]
>> +      {	IH_TYPE_FLATDT_LEGACY, "flat_dt_legacy", "Flat Device Tree legacy Image", },
> 
> I need a legacy image, where the type is set to IH_TYPE_FLATDT. Maybe
> "legacy_flat_dt" or "legacy_fdt" would be an appropriate name, too.
> 
> As this string is user facing I think it should have "legacy" in it.

fdt_legacy?

I just think flat_dt_legacy is quite wordy.

--Sean

> I think "flat_dt" and "fdt" is just too similar and the user can't see
> the difference, IMHO.
> 
>>>> --- a/boot/image.c
>>>> +++ b/boot/image.c
>>>> @@ -180,6 +180,7 @@ static const table_entry_t uimage_type[] = {
>>>>    	{	IH_TYPE_COPRO, "copro", "Coprocessor Image"},
>>>>    	{	IH_TYPE_SUNXI_EGON, "sunxi_egon",  "Allwinner eGON Boot Image" },
>>>>    	{	IH_TYPE_SUNXI_TOC0, "sunxi_toc0",  "Allwinner TOC0 Boot Image" },
>>>> +         {	IH_TYPE_FLATDT_LEGACY, "flat_dt_legacy", "Flat Device Tree legacy Image", },
>>>>    	{	-1,		    "",		  "",			},
>>>>    };
> 
> regards,
> Marc
> 



More information about the U-Boot mailing list