artik305: configs: clear local variable after load_fdt
authorChanho Park <chanho61.park@samsung.com>
Thu, 22 Jun 2017 07:21:24 +0000 (16:21 +0900)
committerChanho Park <chanho61.park@samsung.com>
Thu, 22 Jun 2017 07:21:24 +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: Id65262c5d06beabfcc640c62d66d99a7a8b835f0
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
include/configs/artik305_raptor.h

index 23b9f96420dab1551df26801c2bf1b7769275ca7..bc5eb7e154fcf49fd715856bf79d4be32b5a432a 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              \