artik530: configs: clear local variable after load_fdt
authorChanho Park <chanho61.park@samsung.com>
Thu, 22 Jun 2017 07:21:00 +0000 (16:21 +0900)
committerChanho Park <chanho61.park@samsung.com>
Thu, 22 Jun 2017 07:21:00 +0000 (16:21 +0900)
This patch clears local variables such as success, number and loop of
load_fdt command to avoid invalid environment corruption. After
execution "run load_fdt" command on the u-boot shell, it will keep the
local variables. When a user run "saveenv" command in the situation,
it will cause invalid fdt load due to dirty local variables.

Change-Id: I3ac80a85101c1de7babbe43c0c1fa8ff5ede804a
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
include/configs/artik530_raptor.h

index 4809a209b66e21f077a7d1e3358725bc5ef1035f..2f3c10e42d37e760f15db84f3b7d8c75be95e353 100644 (file)
                        "ext4load mmc $rootdev:$bootpart $fdtaddr s5p4418-artik${model_id}-raptor-rev${number}.dtb; "   \
                "fi; "                                                  \
                "else ext4load mmc $rootdev:$bootpart $fdtaddr $fdtfile; " \
-               "fi; \0"                                                \
+               "fi; setenv success; setenv number; setenv loop;\0"     \
        "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"                 \
        "console=" CONFIG_DEFAULT_CONSOLE                               \
        "consoleon=setenv console=" CONFIG_DEFAULT_CONSOLE              \