From ff4818cc3ec105a5a250188e6914ae233b75aa84 Mon Sep 17 00:00:00 2001 From: Markus Klotzbuecher Date: Wed, 15 May 2019 15:15:53 +0200 Subject: env: ubi: KConfig: add CONFIG_ENV_UBI_VOLUME_REDUND Introduce the KConfig option CONFIG_ENV_UBI_VOLUME_REDUND for defining the name of the UBI volume used to store the redundant environment. Signed-off-by: Markus Klotzbuecher Reviewed-by: Heiko Schocher Cc: Kyungmin Park hs: get rid of stm32mp1* build errors --- include/configs/stm32mp1.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 1d385e0985c..0ce2fcb8b7a 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -38,10 +38,6 @@ */ #define CONFIG_SYS_LOAD_ADDR STM32_DDR_BASE -#if defined(CONFIG_ENV_IS_IN_UBI) -#define CONFIG_ENV_UBI_VOLUME_REDUND "uboot_config_r" -#endif - #if defined(CONFIG_ENV_IS_IN_SPI_FLASH) #define CONFIG_ENV_SECT_SIZE SZ_256K #define CONFIG_ENV_OFFSET 0x00280000 -- cgit v1.2.3 From a9221f3ebd6dc71b33c14055504446d8e08f372b Mon Sep 17 00:00:00 2001 From: Markus Klotzbuecher Date: Wed, 15 May 2019 15:15:54 +0200 Subject: at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigs Enable the extended ENV options for AT91 and OMAP2PLUS in order to be able to use CONFIG_ENV_UBI_* on these architectures. As this change also makes the configs ENV_SIZE, ENV_SECT_SIZE, ENV_OFFSET visible to AT91 and OMAP2PLUS, migrate users of these to KConfig. This migration was run using an extended moveconfig.py which evaluates expressions such as "(512 << 10)". See patch ("moveconfig: expand simple expressions"). All modified boards were built with SOURCE_DATE_EPOCH=0 before and after the change and successfully confirmed that the identical binary is generated (the only exception was igep00x0, which does not define CONFIG_ENV_IS_IN_UBI in the original board header. Once that is defined, the test passes too). hs: rebased patch to: 68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT" Signed-off-by: Markus Klotzbuecher Cc: Heiko Schocher Cc: Eugen Hristev Cc: Tom Rini --- include/configs/am335x_evm.h | 3 --- include/configs/am335x_igep003x.h | 7 ------- include/configs/am335x_sl50.h | 3 --- include/configs/am3517_crane.h | 2 -- include/configs/am3517_evm.h | 2 -- include/configs/am43xx_evm.h | 5 ----- include/configs/am57xx_evm.h | 2 -- include/configs/at91-sama5_common.h | 5 ----- include/configs/at91rm9200ek.h | 2 +- include/configs/baltos.h | 3 --- include/configs/bav335x.h | 3 --- include/configs/brppt1.h | 5 ----- include/configs/chiliboard.h | 4 ---- include/configs/cm_t335.h | 2 -- include/configs/cm_t35.h | 2 -- include/configs/cm_t43.h | 5 ----- include/configs/corvus.h | 2 -- include/configs/devkit8000.h | 6 ------ include/configs/dra7xx_evm.h | 2 -- include/configs/ethernut5.h | 2 -- include/configs/gardena-smart-gateway-at91sam.h | 6 ------ include/configs/kc1.h | 2 -- include/configs/nokia_rx51.h | 1 - include/configs/omap3_beagle.h | 4 ---- include/configs/omap3_cairo.h | 4 ---- include/configs/omap3_evm.h | 3 --- include/configs/omap3_igep00x0.h | 6 ------ include/configs/omap3_logic.h | 3 --- include/configs/omap3_overo.h | 1 - include/configs/omap3_pandora.h | 3 --- include/configs/omap3_zoom1.h | 3 --- include/configs/omap5_uevm.h | 2 -- include/configs/pcm051.h | 1 - include/configs/pepper.h | 2 -- include/configs/siemens-am33x-common.h | 2 -- include/configs/smartweb.h | 2 -- include/configs/snapper9260.h | 2 -- include/configs/snapper9g45.h | 2 -- include/configs/sniper.h | 2 -- include/configs/tam3517-common.h | 1 - include/configs/tao3530.h | 2 -- include/configs/taurus.h | 2 -- include/configs/ti814x_evm.h | 1 - include/configs/ti_omap4_common.h | 5 ----- include/configs/tricorder.h | 2 -- include/configs/usb_a9263.h | 3 --- include/configs/wb50n.h | 2 -- 47 files changed, 1 insertion(+), 135 deletions(-) (limited to 'include') diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index b5fba0a8b08..1885ac8e368 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -31,9 +31,6 @@ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE SZ_128K - #ifdef CONFIG_NAND #define NANDARGS \ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ diff --git a/include/configs/am335x_igep003x.h b/include/configs/am335x_igep003x.h index 5fe7565131f..5131cd38e4e 100644 --- a/include/configs/am335x_igep003x.h +++ b/include/configs/am335x_igep003x.h @@ -20,8 +20,6 @@ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -#define CONFIG_ENV_SIZE (96 << 10) /* 96 KiB */ - #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ @@ -124,11 +122,6 @@ #define CONFIG_SPL_UBI_LEB_START 2048 #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 -/* environment organization */ -#define CONFIG_ENV_UBI_PART "UBI" -#define CONFIG_ENV_UBI_VOLUME "config" -#define CONFIG_ENV_UBI_VOLUME_REDUND "config_r" - /* NAND config */ #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index 381c75e6efc..a08e6bfe083 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -22,9 +22,6 @@ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE (128 << 10) - #ifndef CONFIG_SPL_BUILD #define MEM_LAYOUT_ENV_SETTINGS \ diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 2c510265cca..cacd799aa21 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -31,7 +31,6 @@ /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) /* initial data */ /* @@ -192,7 +191,6 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB sector */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 /*----------------------------------------------------------------------- diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 9475e9975d5..e0521abe903 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -184,8 +184,6 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_SIZE CONFIG_SYS_ENV_SECT_SIZE -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 /* Defines for SPL */ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index ef85cd29941..b0d95599629 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -59,9 +59,6 @@ /* Now bring in the rest of the common code. */ #include -/* Always 64 KiB env size */ -#define CONFIG_ENV_SIZE (64 << 10) - /* Clock Defines */ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) @@ -114,8 +111,6 @@ #ifdef CONFIG_QSPI_BOOT #define CONFIG_SYS_REDUNDAND_ENVIRONMENT -#define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64 KB sectors */ -#define CONFIG_ENV_OFFSET 0x110000 #define CONFIG_ENV_OFFSET_REDUND 0x120000 #endif diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 2c651aab178..e69e800f613 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -19,8 +19,6 @@ /* MMC ENV related defines */ #define CONFIG_SYS_MMC_ENV_DEV 1 /* eMMC */ #define CONFIG_SYS_MMC_ENV_PART 0 -#define CONFIG_ENV_SIZE SZ_128K -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h index 30c6cd47cac..b9c6a27a337 100644 --- a/include/configs/at91-sama5_common.h +++ b/include/configs/at91-sama5_common.h @@ -57,17 +57,12 @@ #ifdef CONFIG_NAND_BOOT /* u-boot env in nand flash */ -#define CONFIG_ENV_OFFSET 0x140000 #define CONFIG_ENV_OFFSET_REDUND 0x100000 -#define CONFIG_ENV_SIZE 0x20000 #define CONFIG_BOOTCOMMAND "nand read 0x21000000 0x180000 0x80000;" \ "nand read 0x22000000 0x200000 0x600000;" \ "bootz 0x22000000 - 0x21000000" #elif CONFIG_SPI_BOOT /* u-boot env in serial flash, by default is bus 0 and cs 0 */ -#define CONFIG_ENV_OFFSET 0x6000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE 0x1000 #define CONFIG_BOOTCOMMAND "sf probe 0; " \ "sf read 0x21000000 0x60000 0xc000; " \ "sf read 0x22000000 0x6c000 0x394000; " \ diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h index e2a2f3b8932..8bfba35e16a 100644 --- a/include/configs/at91rm9200ek.h +++ b/include/configs/at91rm9200ek.h @@ -145,7 +145,7 @@ */ #define CONFIG_ENV_ADDR \ (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) -#define CONFIG_ENV_SIZE SZ_64K /* sectors are 64K here */ + /* The following #defines are needed to get flash environment right */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN SZ_256K diff --git a/include/configs/baltos.h b/include/configs/baltos.h index fbf657fe659..a9b14c5b03c 100644 --- a/include/configs/baltos.h +++ b/include/configs/baltos.h @@ -25,9 +25,6 @@ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE (128 << 10) - /* FIT support */ #define CONFIG_SYS_BOOTM_LEN SZ_64M diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h index 0525efac8fa..bfa9fc9a529 100644 --- a/include/configs/bav335x.h +++ b/include/configs/bav335x.h @@ -31,9 +31,6 @@ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE (128 << 10) - #ifdef CONFIG_NAND #define NANDARGS \ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h index 82f3f1a7077..5a40f3abd12 100644 --- a/include/configs/brppt1.h +++ b/include/configs/brppt1.h @@ -59,9 +59,6 @@ #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 #endif /* CONFIG_NAND */ -/* Always 64 KiB env size */ -#define CONFIG_ENV_SIZE (64 << 10) - #ifdef CONFIG_NAND #define NANDTGTS \ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ @@ -187,8 +184,6 @@ NANDTGTS \ #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 /* Environment */ #define CONFIG_SYS_REDUNDAND_ENVIRONMENT -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE -#define CONFIG_ENV_OFFSET 0x20000 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ CONFIG_ENV_SECT_SIZE) #elif defined(CONFIG_ENV_IS_IN_MMC) diff --git a/include/configs/chiliboard.h b/include/configs/chiliboard.h index db990fcb2b4..13c15bd79f5 100644 --- a/include/configs/chiliboard.h +++ b/include/configs/chiliboard.h @@ -161,15 +161,11 @@ #endif #if defined(CONFIG_ENV_IS_IN_NAND) -#define CONFIG_ENV_OFFSET 0x001c0000 #define CONFIG_ENV_OFFSET_REDUND 0x001e0000 -#define CONFIG_ENV_SIZE SZ_128K #define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE #else #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_ENV_OFFSET SZ_128K #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) -#define CONFIG_ENV_SIZE SZ_8K #define CONFIG_SYS_REDUNDAND_ENVIRONMENT #endif diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h index 740bbd45a08..54f2cea864b 100644 --- a/include/configs/cm_t335.h +++ b/include/configs/cm_t335.h @@ -23,8 +23,6 @@ #define V_OSCK 25000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */ - #ifndef CONFIG_SPL_BUILD #define MMCARGS \ "mmcdev=0\0" \ diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index fd693cf2514..f9a6444d1d5 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -39,7 +39,6 @@ /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */ /* Sector */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) @@ -179,7 +178,6 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 /* additions for new relocation code, must be added to all boards */ diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index bd409896bc8..b2c13004270 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -75,14 +75,9 @@ #include #undef CONFIG_SYS_MONITOR_LEN -#define CONFIG_ENV_SIZE (16 * 1024) - #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) -#define CONFIG_ENV_SECT_SIZE (64 * 1024) -#define CONFIG_ENV_OFFSET (768 * 1024) - #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "fdtaddr=0x81200000\0" \ diff --git a/include/configs/corvus.h b/include/configs/corvus.h index f1b0374abe8..f2df66eaa36 100644 --- a/include/configs/corvus.h +++ b/include/configs/corvus.h @@ -88,9 +88,7 @@ #define CONFIG_SYS_LOAD_ADDR ATMEL_BASE_CS6 /* bootstrap + u-boot + env in nandflash */ -#define CONFIG_ENV_OFFSET 0x100000 #define CONFIG_ENV_OFFSET_REDUND 0x180000 -#define CONFIG_ENV_SIZE SZ_128K #define CONFIG_BOOTCOMMAND \ "nand read 0x70000000 0x200000 0x300000;" \ diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 2eb658dc619..baf1a73b956 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -37,8 +37,6 @@ #define CONFIG_REVISION_TAG 1 /* Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - /* Sector */ #undef CONFIG_SYS_MALLOC_LEN #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) @@ -144,10 +142,6 @@ #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \ 0x01000000) /* 16MB */ -/* NAND and environment organization */ - -#define CONFIG_ENV_OFFSET 0x260000 - /* SRAM config */ #define CONFIG_SYS_SRAM_START 0x40200000 #define CONFIG_SYS_SRAM_SIZE 0x10000 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index aec70ee7182..9c8141de2e7 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -21,8 +21,6 @@ #ifndef CONFIG_QSPI_BOOT /* MMC ENV related defines */ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ -#define CONFIG_ENV_SIZE (128 << 10) -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT #endif diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h index b86b54209ca..24aaae5640e 100644 --- a/include/configs/ethernut5.h +++ b/include/configs/ethernut5.h @@ -52,8 +52,6 @@ /* bootstrap + u-boot + env + linux in dataflash on CS0 */ #define CONFIG_ENV_OFFSET 0x3DE000 -#define CONFIG_ENV_SIZE (132 << 10) -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE /* NAND flash */ #ifdef CONFIG_CMD_NAND diff --git a/include/configs/gardena-smart-gateway-at91sam.h b/include/configs/gardena-smart-gateway-at91sam.h index 02bf4d195f4..482e4714b1c 100644 --- a/include/configs/gardena-smart-gateway-at91sam.h +++ b/include/configs/gardena-smart-gateway-at91sam.h @@ -43,12 +43,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ -/* environment organization */ -#define CONFIG_ENV_UBI_PART "ubi" -#define CONFIG_ENV_UBI_VOLUME "env" -#define CONFIG_ENV_UBI_VOLUME_REDUND "env_r" -#define CONFIG_ENV_SIZE (64 << 10) - /* SPL */ #define CONFIG_SPL_MAX_SIZE 0x7000 #define CONFIG_SPL_STACK 0x308000 diff --git a/include/configs/kc1.h b/include/configs/kc1.h index 59814b5514c..e3a219c46b8 100644 --- a/include/configs/kc1.h +++ b/include/configs/kc1.h @@ -103,8 +103,6 @@ * Environment */ -#define CONFIG_ENV_SIZE (128 * 1024) - #define CONFIG_ENV_OVERWRITE #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 453dd32fbdc..d9f4bdc1d64 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -50,7 +50,6 @@ /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) #define CONFIG_UBI_SIZE (512 << 10) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + CONFIG_UBI_SIZE + \ (128 << 10)) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index f0c8c990faf..a2a6be7cf8d 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -40,7 +40,6 @@ #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 #define CONFIG_SYS_ENV_SECT_SIZE SZ_128K -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 #define CONFIG_ENV_OVERWRITE /* NAND: SPL falcon mode configs */ @@ -59,9 +58,6 @@ /* TWL4030 LED Support */ -/* Environment */ -#define CONFIG_ENV_SIZE SZ_128K - #define CONFIG_PREBOOT "usb start" #define MEM_LAYOUT_ENV_SETTINGS \ diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h index ef69b24dd09..9e2b7523e5d 100644 --- a/include/configs/omap3_cairo.h +++ b/include/configs/omap3_cairo.h @@ -160,11 +160,7 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ -#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */ - #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 /* Defines for SPL */ diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 5b9d8a57e3d..4ab172c06d0 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -44,7 +44,6 @@ #define CONFIG_SYS_NAND_ECCBYTES 3 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW #define CONFIG_SYS_ENV_SECT_SIZE SZ_128K -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 #define CONFIG_ENV_OVERWRITE /* NAND: SPL falcon mode configs */ @@ -54,8 +53,6 @@ #endif /* CONFIG_NAND */ /* Environment */ -#define CONFIG_ENV_SIZE SZ_128K - #define CONFIG_PREBOOT "usb start" #define MEM_LAYOUT_ENV_SETTINGS \ diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index 23d12c6a4e8..a95a9cc664d 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h @@ -110,10 +110,4 @@ #define CONFIG_SPL_UBI_LEB_START 2048 #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 -/* environment organization */ -#define CONFIG_ENV_UBI_PART "UBI" -#define CONFIG_ENV_UBI_VOLUME "config" -#define CONFIG_ENV_UBI_VOLUME_REDUND "config_r" -#define CONFIG_ENV_SIZE (32*1024) - #endif /* __IGEP00X0_H */ diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index e318a9f8967..6b7104db5fd 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -194,10 +194,7 @@ /* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 /* Defines for SPL */ diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index ea941dbb81a..38a10e23d91 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -19,7 +19,6 @@ /* override size of malloc() pool */ #undef CONFIG_SYS_MALLOC_LEN -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */ /* Shift 128 << 15 provides 4 MiB heap to support UBI commands. * Shift 128 << 10 provides 128 KiB heap for limited-memory devices. */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 15)) diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 82c66c4b8c4..98f243f4ddd 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -15,8 +15,6 @@ #define CONFIG_REVISION_TAG 1 -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - #define CONFIG_SYS_DEVICE_NULLDEV 1 /* @@ -63,7 +61,6 @@ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 0a02ecdc149..4dc22a7a199 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -23,8 +23,6 @@ #define CONFIG_REVISION_TAG 1 -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - /* * Hardware drivers */ @@ -132,7 +130,6 @@ #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR 0x260000 #endif /* __CONFIG_H */ diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index 0d8f945349d..27e47327d30 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -32,8 +32,6 @@ /* MMC ENV related defines */ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ -#define CONFIG_ENV_SIZE (128 << 10) -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h index 8cde12e3756..153e567c2f9 100644 --- a/include/configs/pcm051.h +++ b/include/configs/pcm051.h @@ -21,7 +21,6 @@ #include -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_MACH_TYPE MACH_TYPE_PCM051 /* set to negative value for no autoboot */ diff --git a/include/configs/pepper.h b/include/configs/pepper.h index ef662d70008..662fce33557 100644 --- a/include/configs/pepper.h +++ b/include/configs/pepper.h @@ -17,8 +17,6 @@ /* Mach type */ #define CONFIG_MACH_TYPE MACH_TYPE_PEPPER -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ "bootdir=/boot\0" \ diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index 12819553b07..c07814f91b0 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -18,7 +18,6 @@ #define CONFIG_DMA_COHERENT #define CONFIG_DMA_COHERENT_SIZE (1 << 20) -#define CONFIG_ENV_SIZE (0x2000) #define CONFIG_SYS_MALLOC_LEN (16 * 1024 * 1024) #ifdef CONFIG_SIEMENS_MACH_TYPE #define CONFIG_MACH_TYPE CONFIG_SIEMENS_MACH_TYPE @@ -461,7 +460,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ #if !defined(CONFIG_SPI_BOOT) -#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ #endif #endif diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index 776d7d79705..c1a43a5e550 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -144,10 +144,8 @@ /* * The NAND Flash partitions: */ -#define CONFIG_ENV_OFFSET (0x100000) #define CONFIG_ENV_OFFSET_REDUND (0x180000) #define CONFIG_ENV_RANGE (SZ_512K) -#define CONFIG_ENV_SIZE (SZ_128K) /* * Predefined environment variables. diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h index f212d154e9c..7c2c5fb6ca6 100644 --- a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h @@ -111,8 +111,6 @@ #define CONFIG_BOOTP_BOOTFILESIZE /* Environment settings */ -#define CONFIG_ENV_OFFSET (512 << 10) -#define CONFIG_ENV_SIZE (256 << 10) #define CONFIG_ENV_OVERWRITE /* Console settings */ diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h index dac2e652314..ffcfdcaafcd 100644 --- a/include/configs/snapper9g45.h +++ b/include/configs/snapper9g45.h @@ -74,8 +74,6 @@ #define CONFIG_BOOTP_BOOTFILESIZE /* Environment settings */ -#define CONFIG_ENV_OFFSET (512 << 10) -#define CONFIG_ENV_SIZE (256 << 10) #define CONFIG_ENV_OVERWRITE #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/configs/sniper.h b/include/configs/sniper.h index 540ea77ce03..0e2fcc3e232 100644 --- a/include/configs/sniper.h +++ b/include/configs/sniper.h @@ -96,8 +96,6 @@ * Environment */ -#define CONFIG_ENV_SIZE (128 * 1024) - #define CONFIG_ENV_OVERWRITE #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index e7bab7203e4..121de2bd245 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -28,7 +28,6 @@ /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10) + \ 2 * 1024 * 1024) /* diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h index a95cbed33ae..c34e785d9e5 100644 --- a/include/configs/tao3530.h +++ b/include/configs/tao3530.h @@ -32,7 +32,6 @@ * Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (4 << 20) -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */ /* * Hardware drivers @@ -170,7 +169,6 @@ #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) -#define CONFIG_ENV_OFFSET 0x260000 #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 diff --git a/include/configs/taurus.h b/include/configs/taurus.h index dbb01af4397..36a41fff18a 100644 --- a/include/configs/taurus.h +++ b/include/configs/taurus.h @@ -110,9 +110,7 @@ #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* bootstrap in spi flash , u-boot + env + linux in nandflash */ -#define CONFIG_ENV_OFFSET 0x100000 #define CONFIG_ENV_OFFSET_REDUND 0x180000 -#define CONFIG_ENV_SIZE (SZ_128K) /* 1 sector = 128 kB */ #ifndef CONFIG_SPL_BUILD #if defined(CONFIG_BOARD_AXM) diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h index 512386ee222..90b424f4995 100644 --- a/include/configs/ti814x_evm.h +++ b/include/configs/ti814x_evm.h @@ -18,7 +18,6 @@ #include -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_SYS_MALLOC_LEN (1024 << 10) #define CONFIG_MACH_TYPE MACH_TYPE_TI8148EVM diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index fc59aba1fa5..1e316227aaa 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -23,11 +23,6 @@ /* Use General purpose timer 1 */ #define CONFIG_SYS_TIMERBASE GPT2_BASE -/* - * Total Size Environment - 128k - */ -#define CONFIG_ENV_SIZE (128 << 10) - /* * For the DDR timing information we can either dynamically determine * the timings to use or use pre-determined timings (based on using the diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 683375a0df1..2106f4e5b04 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -78,9 +78,7 @@ /* environment placement (for NAND), is different for FLASHCARD but does not * harm there */ -#define CONFIG_ENV_OFFSET 0x120000 /* env start */ #define CONFIG_ENV_OFFSET_REDUND 0x2A0000 /* redundant env start */ -#define CONFIG_ENV_SIZE (16 << 10) /* use 16KiB for env */ #define CONFIG_ENV_RANGE (384 << 10) /* allow badblocks in env */ /* the loadaddr is the same as CONFIG_SYS_LOAD_ADDR, unfortunately the defiend diff --git a/include/configs/usb_a9263.h b/include/configs/usb_a9263.h index fa38274d56f..ee72354dd53 100644 --- a/include/configs/usb_a9263.h +++ b/include/configs/usb_a9263.h @@ -79,9 +79,6 @@ #define CONFIG_SYS_MEMTEST_END 0x23e00000 /* bootstrap + u-boot + env + linux in dataflash on CS0 */ -#define CONFIG_ENV_OFFSET 0x2000 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE #define CONFIG_BOOTCOMMAND "nboot 21000000 0" #define CONFIG_EXTRA_ENV_SETTINGS \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ diff --git a/include/configs/wb50n.h b/include/configs/wb50n.h index e3973d02a2a..81d30a6114a 100644 --- a/include/configs/wb50n.h +++ b/include/configs/wb50n.h @@ -74,9 +74,7 @@ "autostart=no\0" /* bootstrap + u-boot + env in nandflash */ -#define CONFIG_ENV_OFFSET 0xA0000 #define CONFIG_ENV_OFFSET_REDUND 0xC0000 -#define CONFIG_ENV_SIZE 0x20000 #define CONFIG_BOOTCOMMAND \ "nand read 0x22000000 0x000e0000 0x500000; " \ "bootm" -- cgit v1.2.3 From 4bae76d7331cf959af2c35254260476d098d2846 Mon Sep 17 00:00:00 2001 From: Markus Klotzbuecher Date: Wed, 15 May 2019 15:15:58 +0200 Subject: configs: migrate ubispl boards to KConfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrate the ubispl configuration for the omap3_igep00x0 and am335x_igep003x boards to KConfig. Both boards were built with SOURCE_DATE_EPOCH=0 and found to be equal before and after. Signed-off-by: Markus Klotzbuecher Cc: Heiko Schocher Cc: Kyungmin Park Cc: Javier Martínez Canillas Cc: Enric Balletbo i Serra Acked-by: Enric Balletbo i Serra --- include/configs/am335x_igep003x.h | 16 ---------------- include/configs/omap3_igep00x0.h | 14 -------------- 2 files changed, 30 deletions(-) (limited to 'include') diff --git a/include/configs/am335x_igep003x.h b/include/configs/am335x_igep003x.h index 5131cd38e4e..5b5e16026e8 100644 --- a/include/configs/am335x_igep003x.h +++ b/include/configs/am335x_igep003x.h @@ -106,22 +106,6 @@ /* NAND support */ #define CONFIG_SYS_NAND_ONFI_DETECTION 1 -/* SPL */ - -/* UBI configuration */ -#define CONFIG_SPL_UBI 1 -#define CONFIG_SPL_UBI_MAX_VOL_LEBS 256 -#define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024) -#define CONFIG_SPL_UBI_MAX_PEBS 4096 -#define CONFIG_SPL_UBI_VOL_IDS 8 -#define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0 -#define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3 -#define CONFIG_SPL_UBI_LOAD_ARGS_ID 4 -#define CONFIG_SPL_UBI_PEB_OFFSET 4 -#define CONFIG_SPL_UBI_VID_OFFSET 512 -#define CONFIG_SPL_UBI_LEB_START 2048 -#define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 - /* NAND config */ #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index a95a9cc664d..4ad7dc18b10 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h @@ -96,18 +96,4 @@ #define CONFIG_SYS_NAND_ECCBYTES 14 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW -/* UBI configuration */ -#define CONFIG_SPL_UBI 1 -#define CONFIG_SPL_UBI_MAX_VOL_LEBS 256 -#define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024) -#define CONFIG_SPL_UBI_MAX_PEBS 4096 -#define CONFIG_SPL_UBI_VOL_IDS 8 -#define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0 -#define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3 -#define CONFIG_SPL_UBI_LOAD_ARGS_ID 4 -#define CONFIG_SPL_UBI_PEB_OFFSET 4 -#define CONFIG_SPL_UBI_VID_OFFSET 512 -#define CONFIG_SPL_UBI_LEB_START 2048 -#define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 - #endif /* __IGEP00X0_H */ -- cgit v1.2.3 From 6ea31cce0b63398e2a5228d685175bbc63e9072c Mon Sep 17 00:00:00 2001 From: Hamish Guthrie Date: Wed, 15 May 2019 15:15:59 +0200 Subject: ubispl: add support for loading volumes by name The motivation is to use the UBI atomic volume rename functionality to allow double copy software updates on UBI. To that end the SPL is configured to always load the same volume name (e.g. "u-boot"), whereas a software updater always installs into the secondary volume "u-boot_r". After successful installation, these two volume names are switched. This extension is protected by #ifdefs as it will somewhat slow down loading of volumes by id. This is because the code needs to disable the optimization of ignoring all volume ids which are not to-be-loaded, since these can only be resolved after attaching. This adds two vtbl related functions from Linux, which are taken from the same kernel version as the current main U-Boot UBI code (Linux 4.2 64291f7db5bd8). Signed-off-by: Hamish Guthrie Signed-off-by: Markus Klotzbuecher Reviewed-by: Heiko Schocher Cc: Kyungmin Park --- include/ubispl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/ubispl.h b/include/ubispl.h index 1e5da94eb1f..ecfe0c93c13 100644 --- a/include/ubispl.h +++ b/include/ubispl.h @@ -5,6 +5,8 @@ #ifndef __UBOOT_UBISPL_H #define __UBOOT_UBISPL_H +#define UBI_VOL_NAME_MAX 127 + /* * The following CONFIG options are relevant for UBISPL * @@ -74,6 +76,10 @@ struct ubispl_info { */ struct ubispl_load { int vol_id; +#ifdef CONFIG_SPL_UBI_LOAD_BY_VOLNAME + u32 name_len; + char name[UBI_VOL_NAME_MAX + 1]; +#endif void *load_addr; }; -- cgit v1.2.3