From patchwork Thu Jan 16 07:21:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 239636 List-Id: U-Boot discussion From: bmeng.cn at gmail.com (Bin Meng) Date: Wed, 15 Jan 2020 23:21:09 -0800 Subject: [PATCH] riscv: sifive: fu540: Enable saving environment in MMC Message-ID: <1579159269-27531-1-git-send-email-bmeng.cn@gmail.com> At present U-Boot environment is not saved so it's a little bit inconvenient if booting kernel via network as each time we need input the network environment variables from U-Boot shell. We already have the MMC support and let's enable saveenv with that. Signed-off-by: Bin Meng --- configs/sifive_fu540_defconfig | 2 ++ include/configs/sifive-fu540.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig index 7d38ec9..6f9e619 100644 --- a/configs/sifive_fu540_defconfig +++ b/configs/sifive_fu540_defconfig @@ -1,5 +1,6 @@ CONFIG_RISCV=y CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x1000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_TARGET_SIFIVE_FU540=y CONFIG_ARCH_RV64I=y @@ -11,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y CONFIG_OF_SEPARATE=y +CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM_MTD=y diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index 2756ed5..fb829be 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -24,6 +24,8 @@ /* Environment options */ +#define CONFIG_SYS_MMC_ENV_DEV 0 + #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ func(DHCP, dhcp, na)