]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: gateworks: venice: do not overwrite serial#
authorTim Harvey <tharvey@gateworks.com>
Wed, 18 Aug 2021 22:24:28 +0000 (15:24 -0700)
committerStefano Babic <sbabic@denx.de>
Thu, 7 Oct 2021 14:53:50 +0000 (16:53 +0200)
Do not overwrite existing serial# env to avoid:
 ## Error: Can't overwrite "serial#"
 ## Error inserting "serial#" variable, errno=1

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/venice/imx8mm_venice.c

index 2a97d55d32765fe3c57f7f30f04519fd1f190304..46f4bff925317b968e721b20776343e1bf88fbe5 100644 (file)
@@ -114,7 +114,8 @@ int board_late_init(void)
        led_default_state();
 
        /* Set board serial/model */
-       env_set_ulong("serial#", gsc_get_serial());
+       if (!env_get("serial#"))
+               env_set_ulong("serial#", gsc_get_serial());
        env_set("model", gsc_get_model());
 
        /* Set fdt_file vars */