]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gxp: Convert to text file environment
authorTom Rini <trini@konsulko.com>
Wed, 22 Jun 2022 15:23:03 +0000 (11:23 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 01:30:05 +0000 (21:30 -0400)
Convert this platform to using the text file environment rather than
defining CONFIG_EXTRA_ENV_SETTINGS.

Signed-off-by: Tom Rini <trini@konsulko.com>
board/hpe/gxp/gxp.env [new file with mode: 0644]
include/configs/gxp.h

diff --git a/board/hpe/gxp/gxp.env b/board/hpe/gxp/gxp.env
new file mode 100644 (file)
index 0000000..4760bf1
--- /dev/null
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+recover_file=openbmc-hpe-recovery-image.mtd
+recover_cmd=usb start; mw.b 0xD100000D 0x40;
+       if fatload usb 0 0x50000000 $recover_file 0x4C0000 0x80000; then
+               setenv bootargs console=ttyS0,115200 recovery;
+               setenv force_recovery;
+               saveenv;
+               bootm  0x50000000;
+       else
+               while itest 0 < 1; do
+                       mw.b 0xd1000005 0xc0;
+                       sleep .1;
+               mw.b 0xd1000005 0x00;
+               sleep .1;
+               done;
+       fi;
+       reset;
+spiboot=if itest.b *0xD10000B2 == 6; then
+               run recover_cmd;
+       fi;
+       if printenv force_recovery; then
+               run recover_cmd;
+       else
+               bootm 0xfc080000;
+               run recover_cmd;
+       fi;
index ae46126399f88de52d060e929f1217ef5958f18b..e3c97b20d51ef1efddbfefaf9efdde8d4e76c36f 100644 (file)
 
 #define CONFIG_SYS_SDRAM_BASE   0x40000000
 
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "recover_file=openbmc-hpe-recovery-image.mtd\0" \
-       "recover_cmd=usb start; " \
-       "mw.b 0xD100000D 0x40; " \
-       "if fatload usb 0 0x50000000 $recover_file 0x4C0000 0x80000; then " \
-               "setenv bootargs console=ttyS0,115200 recovery; " \
-               "setenv force_recovery; " \
-               "saveenv; " \
-               "bootm  0x50000000; " \
-       "else " \
-               "while itest 0 < 1; do " \
-               "mw.b 0xd1000005 0xc0; " \
-               "sleep .1; " \
-               "mw.b 0xd1000005 0x00; " \
-               "sleep .1; " \
-               "done; " \
-       "fi; " \
-       "reset;\0" \
-       "spiboot=if itest.b *0xD10000B2 == 6; then " \
-               "run recover_cmd;" \
-       "fi;" \
-       "if printenv force_recovery; then " \
-               "run recover_cmd; " \
-       "else " \
-               "bootm 0xfc080000; " \
-               "run recover_cmd; " \
-       "fi;\0"
-
 #endif