zynqmp: Save "bootseq" environment variable in decimal format
authorBenjamin Szőke <egyszeregy@freemail.hu>
Tue, 4 Feb 2025 20:56:17 +0000 (21:56 +0100)
committerMichal Simek <michal.simek@amd.com>
Wed, 5 Feb 2025 15:22:55 +0000 (16:22 +0100)
In U-Boot, most of mmc releated commands uses decimal value in arguments, like
"mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to
improve compatibilities, export "bootseq" number to environment variable in
decimal format instead of hex.

Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Link: https://lore.kernel.org/r/20250204205617.1238-1-egyszeregy@freemail.hu
Signed-off-by: Michal Simek <michal.simek@amd.com>
board/xilinx/zynqmp/zynqmp.c

index 8cdd9d8..820fb25 100644 (file)
@@ -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);
                }
 
                /*