[U-Boot] rockchip: board: puma-rk3399: define ENV_SIZE for SPI FLASH

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Thu Dec 7 20:25:32 UTC 2017


Klaus,

On Thu, 7 Dec 2017, Klaus Goger wrote:

> be942f2e0d introduced a common CONFIG_ENV_SIZE of 32k in rockchip-common.h
> On puma-rk3399 with ENV_IN_SPI active we place the environment in the
> gap between SPL and the FIT image. Previously undefined it defaulted to
> one sector defined with CONFIG_ENV_SECT_SIZE. With the now larger
> environment a saveenv overwrites the FIT image. Therefore we now
> redefine CONFIG_ENV_SIZE if build for ENV_IS_IN_SPI_FLASH.

Sorry, this is a NAK for doing this via the config-header file
ENV_SIZE has been converted to Kconfig in commit 0649cd0d and Kever's 
change slipped past me.

We need to convert this to use Kconfig:
  - please add the appropriate defaults to env/Kconfig for ARCH_ROCKCHIP
    and remove the defaults from configs/rockchip-common.h
  - add appropriate defaults for the RK3399-Q7 to our board-specific Kconfig
    in board/theobroma-systems/puma_rk3399/Kconfig or override via
    menuconfig or defconfig-files

> Signed-off-by: Klaus Goger <klaus.goger at theobroma-systems.com>
> Acked-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> ---
>
> include/configs/puma_rk3399.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/puma_rk3399.h b/include/configs/puma_rk3399.h
> index 39d0786266..c9d475ebbb 100644
> --- a/include/configs/puma_rk3399.h
> +++ b/include/configs/puma_rk3399.h
> @@ -20,6 +20,8 @@
> #if defined(CONFIG_ENV_IS_IN_MMC)
> #define CONFIG_SYS_MMC_ENV_DEV 1
> #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
> +#undef CONFIG_ENV_SIZE
> +#define CONFIG_ENV_SIZE	SZ_8K
> #define CONFIG_ENV_SECT_SIZE		(8 * 1024)
> #define CONFIG_ENV_SPI_BUS		CONFIG_SF_DEFAULT_BUS
> #define CONFIG_ENV_SPI_CS		CONFIG_SF_DEFAULT_CS
>


More information about the U-Boot mailing list