[PATCH 1/2] gxp: Convert to text file environment

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 | 27 +++++++++++++++++++++++++++ include/configs/gxp.h | 28 ---------------------------- 2 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 board/hpe/gxp/gxp.env
diff --git a/board/hpe/gxp/gxp.env b/board/hpe/gxp/gxp.env new file mode 100644 index 000000000000..4760bf1663a7 --- /dev/null +++ b/board/hpe/gxp/gxp.env @@ -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; diff --git a/include/configs/gxp.h b/include/configs/gxp.h index ae46126399f8..e3c97b20d51e 100644 --- a/include/configs/gxp.h +++ b/include/configs/gxp.h @@ -12,32 +12,4 @@
#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

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/armltd/corstone1000/corstone1000.env | 13 +++++++++++++ include/configs/corstone1000.h | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 board/armltd/corstone1000/corstone1000.env
diff --git a/board/armltd/corstone1000/corstone1000.env b/board/armltd/corstone1000/corstone1000.env new file mode 100644 index 000000000000..b24ff07fc6bd --- /dev/null +++ b/board/armltd/corstone1000/corstone1000.env @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +usb_pgood_delay=250 +boot_bank_flag=0x08002000 +kernel_addr_bank_0=0x083EE000 +kernel_addr_bank_1=0x0936E000 +retrieve_kernel_load_addr= + if itest.l *${boot_bank_flag} == 0; then + setenv kernel_addr $kernel_addr_bank_0; + else + setenv kernel_addr $kernel_addr_bank_1; + fi; +kernel_addr_r=0x88200000 diff --git a/include/configs/corstone1000.h b/include/configs/corstone1000.h index eba5cba0fba8..38d7fe8d0d42 100644 --- a/include/configs/corstone1000.h +++ b/include/configs/corstone1000.h @@ -24,18 +24,4 @@
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
-#define CONFIG_EXTRA_ENV_SETTINGS \ - "usb_pgood_delay=250\0" \ - "boot_bank_flag=0x08002000\0" \ - "kernel_addr_bank_0=0x083EE000\0" \ - "kernel_addr_bank_1=0x0936E000\0" \ - "retrieve_kernel_load_addr=" \ - "if itest.l *${boot_bank_flag} == 0; then " \ - "setenv kernel_addr $kernel_addr_bank_0;" \ - "else " \ - "setenv kernel_addr $kernel_addr_bank_1;" \ - "fi;" \ - "\0" \ - "kernel_addr_r=0x88200000\0" - #endif

On Wed, Jun 22, 2022 at 03:21:45PM -0400, Tom Rini wrote:
Convert this platform to using the text file environment rather than defining CONFIG_EXTRA_ENV_SETTINGS.
Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/next, thanks!

On Wed, Jun 22, 2022 at 03:21:44PM -0400, Tom Rini wrote:
Convert this platform to using the text file environment rather than defining CONFIG_EXTRA_ENV_SETTINGS.
Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/next, thanks!
participants (1)
-
Tom Rini