[PATCH] zynqmp: Save "bootseq" environment variable in dec format

Michal Simek michal.simek at amd.com
Tue Feb 4 08:11:09 CET 2025



On 2/4/25 02:15, Szőke Benjamin wrote:
> 2025. 02. 04. 1:38 keltezéssel, Simon Glass írta:
>> Hi Benjamin,
>>
>> On Mon, 3 Feb 2025 at 09:33, <egyszeregy at freemail.hu> wrote:
>>>
>>> From: Benjamin Szőke <egyszeregy at freemail.hu>
>>>
>>> Save "bootseq" environment variable in decimal format.
>>>
>>> Signed-off-by: Benjamin Szőke <egyszeregy at freemail.hu>
>>> ---
>>>   board/xilinx/zynqmp/zynqmp.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
>>> index 8cdd9d8600..820fb252a3 100644
>>> --- a/board/xilinx/zynqmp/zynqmp.c
>>> +++ b/board/xilinx/zynqmp/zynqmp.c
>>> @@ -488,7 +488,7 @@ static int boot_targets_setup(void)
>>>                  if (bootseq >= 0) {
>>>                          bootseq_len = snprintf(NULL, 0, "%i", bootseq);
>>>                          debug("Bootseq len: %x\n", bootseq_len);
>>> -                       env_set_hex("bootseq", bootseq);
>>> +                       env_set_ulong("bootseq", (unsigned long)bootseq);
>>>                  }
>>>
>>>                  /*
>>> -- 
>>> 2.47.1.windows.2
>>>
>>
>> That seems confusing; why use decimal?
>>
> 
> Because in a U-boot command this variable have to be used in decimal format 

U-Boot please

> sure, like "mmc dev ${bootseq}" or in root params of kernel arguments like 
> "root=/dev/mmcblk${bootseq}p2".
> 
> Here is a conversation about it:
> https://lists.denx.de/pipermail/u-boot/2025-February/579253.html

As I said from my perspective the patch make sense but what needs to be improved 
is commit description to justify this change.
That's why please send v2 with better commit message which will also describe 
reasons behind this change to make it clear for everybody.

Thanks,
Michal



More information about the U-Boot mailing list