From e2ebf8cc2da7a6bdbcd500a3736250e4b00c441b Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 26 Oct 2015 13:40:49 +0100 Subject: apalis/colibri_imx6: move env and config block to end of emmc boot area Move the U-Boot environment and config block to the end of the first eMMC (hardware) boot area partition. --- board/toradex/apalis_imx6/Kconfig | 5 +++-- board/toradex/colibri_imx6/Kconfig | 5 +++-- include/configs/apalis_imx6.h | 5 ++++- include/configs/colibri_imx6.h | 5 ++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/board/toradex/apalis_imx6/Kconfig b/board/toradex/apalis_imx6/Kconfig index 67e592b475..bb451e3c6b 100644 --- a/board/toradex/apalis_imx6/Kconfig +++ b/board/toradex/apalis_imx6/Kconfig @@ -25,10 +25,11 @@ config TRDX_CFG_BLOCK_DEV default "0" config TRDX_CFG_BLOCK_PART - default "0" + default "1" +# Toradex Configblock in eMMC, at the end of 1st "boot sector" config TRDX_CFG_BLOCK_OFFSET - default "655360" + default "-512" menuconfig TRDX_CMD_IMX_MFGR bool "Enable factory testing commands for Toradex iMX 6 modules" diff --git a/board/toradex/colibri_imx6/Kconfig b/board/toradex/colibri_imx6/Kconfig index 13d4c26ae0..64950f348f 100644 --- a/board/toradex/colibri_imx6/Kconfig +++ b/board/toradex/colibri_imx6/Kconfig @@ -25,10 +25,11 @@ config TRDX_CFG_BLOCK_DEV default "0" config TRDX_CFG_BLOCK_PART - default "0" + default "1" +# Toradex Configblock in eMMC, at the end of 1st "boot sector" config TRDX_CFG_BLOCK_OFFSET - default "655360" + default "-512" menuconfig TRDX_CMD_IMX_MFGR bool "Enable factory testing commands for Toradex iMX 6 modules" diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 0d5d4317f5..c91457da76 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -350,8 +350,11 @@ #define CONFIG_ENV_IS_IN_MMC #if defined(CONFIG_ENV_IS_IN_MMC) -#define CONFIG_ENV_OFFSET (512 * 1024) +/* Environment in eMMC, before config block at the end of 1st "boot sector" */ +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \ + CONFIG_TRDX_CFG_BLOCK_OFFSET) #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 1 #endif #define CONFIG_OF_LIBFDT diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index aa8d293d66..57bf08797c 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -310,8 +310,11 @@ #define CONFIG_ENV_IS_IN_MMC #if defined(CONFIG_ENV_IS_IN_MMC) -#define CONFIG_ENV_OFFSET (512 * 1024) +/* Environment in eMMC, before config block at the end of 1st "boot sector" */ +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \ + CONFIG_TRDX_CFG_BLOCK_OFFSET) #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 1 #endif #define CONFIG_OF_LIBFDT -- cgit v1.2.3