Commit 81f53b0dafdfe9458f6d04fc5ec2732c2ea23a71
Committed by
Philipp Tomsich
1 parent
aa41220f6f
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
rockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig
This commit adds ENV_SIZE and ENV_OFFSET configuration items for ARCH_ROCKCHIP, but keeps these non-visible (i.e. not prompt is given). With these new items present, the configuration from the header files is moved to Kconfig. Keeping these non-visible is necessary to have the possibility to select new default values if CONFIG_IS_IN_* is changed (interactively or with oldconfig). Otherwise it will always be set to a previous value if used with a prompt. As an example if we do a defconfig with CONFIG_IS_IN_MMC and change it to CONFIG_IS_IN_SPI_FLASH via menuconfig, ENV_SIZE and ENV_OFFSET will not be changed to the correct values as defconfig will already have set them to the default values of CONFIG_IS_IN_MMC in .config. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Showing 4 changed files with 24 additions and 14 deletions Side-by-side Diff
board/theobroma-systems/puma_rk3399/Kconfig
env/Kconfig
... | ... | @@ -427,5 +427,23 @@ |
427 | 427 | |
428 | 428 | endif |
429 | 429 | |
430 | +if ARCH_ROCKCHIP | |
431 | + | |
432 | +config ENV_OFFSET | |
433 | + hex | |
434 | + depends on !ENV_IS_IN_UBI | |
435 | + depends on !ENV_IS_NOWHERE | |
436 | + default 0x3f8000 | |
437 | + help | |
438 | + Offset from the start of the device (or partition) | |
439 | + | |
440 | +config ENV_SIZE | |
441 | + hex | |
442 | + default 0x8000 | |
443 | + help | |
444 | + Size of the environment storage area | |
445 | + | |
446 | +endif | |
447 | + | |
430 | 448 | endmenu |
include/configs/puma_rk3399.h
... | ... | @@ -9,14 +9,6 @@ |
9 | 9 | |
10 | 10 | #include <configs/rk3399_common.h> |
11 | 11 | |
12 | -/* | |
13 | - * SPL @ 32kB for ~130kB | |
14 | - * ENV @ 240KB for 8kB | |
15 | - * FIT payload (ATF, U-Boot, FDT) @ 256kB | |
16 | - */ | |
17 | -#undef CONFIG_ENV_OFFSET | |
18 | -#define CONFIG_ENV_OFFSET (240 * 1024) | |
19 | - | |
20 | 12 | #if defined(CONFIG_ENV_IS_IN_MMC) |
21 | 13 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
22 | 14 | #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH) |
include/configs/rockchip-common.h