env: Do not make CONFIG_EXTRA_ENV_TEXT and CONFIG_EXTRA_ENV_SETTINGS conflict
Subsystems (6)
PATCH 1/8 env: Do not make CONFIG_EXTRA_ENV_TEXT and CONFIG_EXTRA_ENV_SETTINGS conflict
Largely, the use of CONFIG_EXTRA_ENV_SETTINGS can be migrated directly to come from CONFIG_EXTRA_ENV_TEXT. The biggest case that cannot easily be migrated is distro_bootcmd support. Rather than block migration on this, remove the #error here so that we can being moving forward.
---
I spent about a day working at getting config_distro_bootcmd to work via CONFIG_EXTRA_ENV_TEXT and _maybe_ there's a path forward if we rely on less nesting of macros, I'm not convinced. But I can clearly see how moving everything else forward to text based environment files will encourage sharing of environment and both remove otherwise unmigrated CONFIG symbols and generally move forward with being able to remove include/config/board.h files.
--- include/env_default.h | 3 --- 1 file changed, 3 deletions(-)
include/env_default.h +0 -3
@@ -109,9 +109,6 @@ const char default_environment[] = { "bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"#endif #ifdef CONFIG_EXTRA_ENV_TEXT -# ifdef CONFIG_EXTRA_ENV_SETTINGS -# error "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS" -# endif /* This is created in the Makefile */ CONFIG_EXTRA_ENV_TEXT#endif
Signature · 1 line
2.25.1
PATCH 2/8 env: Remove include/generated/env.* under "make clean"
When running "make clean" we want to remove env.in and well as env.txt.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -2209,7 +2209,7 @@ CLEAN_DIRS += $(MODVERDIR) \ $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ - include/generated/env.in drivers/video/u_boot_logo.S \ + include/generated/env.* drivers/video/u_boot_logo.S \ tools/version.h u-boot* MLO* SPL System.map fit-dtb.blob* \ u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \
Signature · 1 line
2.25.1
PATCH 3/8 dragonboard410c: Migrate to using CONFIG_EXTRA_ENV_TEXT
In reply to Tom RiniWith the exception of distro_boot support, we can move all of the rest of the environment changes to come from CONFIG_EXTRA_ENV_TEXT and in turn remove CONFIG_ENV_REFLASH.
--- .../dragonboard410c/dragonboard410c.env | 36 ++++++++++++++++ include/configs/dragonboard410c.h | 42 +------------------ 2 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 board/qualcomm/dragonboard410c/dragonboard410c.env
board/qualcomm/dragonboard410c/dragonboard410c.env new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* Does what recovery does */ +#define REFLASH(file, partnum) \ +part start mmc 0 partnum start && \ +part size mmc 0 partnum size && \ +tftp $loadaddr file && \ +mmc write $loadaddr $start $size && + +reflash= +mmc dev 0 && +usb start && +dhcp && +tftp $loadaddr dragonboard/rescue/gpt_both0.bin && +mmc write $loadaddr 0 43 && +mmc rescan && +REFLASH(dragonboard/rescue/NON-HLOS.bin, 1) +REFLASH(dragonboard/rescue/sbl1.mbn, 2) +REFLASH(dragonboard/rescue/rpm.mbn, 3) +REFLASH(dragonboard/rescue/tz.mbn, 4) +REFLASH(dragonboard/rescue/hyp.mbn, 5) +REFLASH(dragonboard/rescue/sec.dat, 6) +REFLASH(dragonboard/rescue/emmc_appsboot.mbn, 7) +REFLASH(dragonboard/u-boot.img, 8) +usb stop && +echo Reflash completed + +loadaddr=0x81000000 +initrd_high=0xffffffffffffffff +linux_image=Image +kernel_addr_r=0x81000000 +fdtfile=qcom/apq8016-sbc.dtb +fdt_addr_r=0x83000000 +ramdisk_addr_r=0x84000000 +scriptaddr=0x90000000 +pxefile_addr_r=0x90100000
include/configs/dragonboard410c.h +2 -40
53 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 4/8 Convert CONFIG_ENV_RANGE to Kconfig
In reply to Tom RiniThis converts the following to Kconfig:
CONFIG_ENV_RANGE
Now that this is in Kconfig we can enforce a minimum size and so remove the check in C code to ensure range is larger than size.
--- configs/P1010RDB-PA_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PA_NAND_defconfig | 1 + configs/P1010RDB-PB_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PB_NAND_defconfig | 1 + configs/P1020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P1020RDB-PC_NAND_defconfig | 1 + configs/P1020RDB-PD_NAND_defconfig | 1 + configs/P2020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P2020RDB-PC_NAND_defconfig | 1 + configs/colibri-imx6ull_defconfig | 1 + configs/colibri_imx7_defconfig | 1 + configs/colibri_vf_defconfig | 1 + configs/draco_defconfig | 1 + configs/etamin_defconfig | 1 + configs/m53menlo_defconfig | 1 + configs/mx28evk_nand_defconfig | 1 + configs/rastaban_defconfig | 1 + configs/smartweb_defconfig | 1 + configs/thuban_defconfig | 1 + configs/vf610twr_nand_defconfig | 1 + env/Kconfig | 18 ++++++++++-------- env/nand.c | 8 -------- include/configs/P1010RDB.h | 6 ------ include/configs/colibri-imx6ull.h | 5 ----- include/configs/colibri_imx7.h | 5 ----- include/configs/colibri_vf.h | 5 ----- include/configs/draco.h | 3 --- include/configs/etamin.h | 4 ---- include/configs/m53menlo.h | 3 --- include/configs/mx28evk.h | 11 ----------- include/configs/p1_p2_rdb_pc.h | 1 - include/configs/rastaban.h | 3 --- include/configs/smartweb.h | 5 ----- include/configs/thuban.h | 3 --- include/configs/vf610twr.h | 4 ---- 35 files changed, 30 insertions(+), 74 deletions(-)
configs/P1010RDB-PA_36BIT_NAND_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1010RDB-PA_NAND_defconfig +1 -0
@@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1010RDB-PB_36BIT_NAND_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1010RDB-PB_NAND_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1020RDB-PC_36BIT_NAND_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1020RDB-PC_NAND_defconfig +1 -0
@@ -68,6 +68,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P1020RDB-PD_NAND_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ec000000.nor:128k(dtb),6016k(kernel),57088k(fs CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x60000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P2020RDB-PC_36BIT_NAND_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fef000000.nor:256k(vsc7385-firmware),256k(dtb) CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/P2020RDB-PC_NAND_defconfig +1 -0
@@ -72,6 +72,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb), CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage"
configs/colibri-imx6ull_defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_VERSION_VARIABLE=y
configs/colibri_imx7_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y
configs/colibri_vf_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_VERSION_VARIABLE=y
configs/draco_defconfig +1 -0
@@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10
configs/etamin_defconfig +1 -0
@@ -80,6 +80,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x200000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10
configs/m53menlo_defconfig +1 -0
@@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1m(u-boot),512k(env1),512k(env2),-(ub CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y
configs/mx28evk_nand_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),5 CONFIG_CMD_UBI=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y
configs/rastaban_defconfig +1 -0
@@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10
configs/smartweb_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=20
configs/thuban_defconfig +1 -0
@@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10
configs/vf610twr_nand_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_VYBRID_GPIO=y
env/Kconfig +10 -8
@@ -264,14 +264,6 @@ config ENV_IS_IN_NAND during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be aligned to an erase block boundary. - - CONFIG_ENV_RANGE (optional): - - Specifies the length of the region in which the environment - can be written. This should be a multiple of the NAND device's - block size. Specifying a range with more erase blocks than - are needed to hold CONFIG_ENV_SIZE allows bad blocks within - the range to be avoided. - - CONFIG_ENV_OFFSET_OOB (optional): Enables support for dynamically retrieving the offset of the
@@ -280,6 +272,16 @@ config ENV_IS_IN_NAND Currently, CONFIG_ENV_OFFSET_REDUND is not supported when using CONFIG_ENV_OFFSET_OOB. +config ENV_RANGE + hex "Length of the region in which the environment can be written" + depends on ENV_IS_IN_NAND + range ENV_SIZE 0x7fffffff + default ENV_SIZE + help + This should be a multiple of the NAND device's block size. + Specifying a range with more erase blocks than are needed to hold + CONFIG_ENV_SIZE allows bad blocks within the range to be avoided. + config ENV_IS_IN_NVRAM bool "Environment in a non-volatile RAM" depends on !CHAIN_OF_TRUST
env/nand.c +0 -8
@@ -33,10 +33,6 @@#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND#endif -#ifndef CONFIG_ENV_RANGE -#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE -#endif -#if defined(ENV_IS_EMBEDDED )static env_t *env_ptr = &environment;#elif defined(CONFIG_NAND_ENV_DST )
@@ -201,10 +197,6 @@ static int env_nand_save(void)#endif }; - -if (CONFIG_ENV_RANGE <CONFIG_ENV_SIZE ) -return 1 ; - ret =env_export (env_new);if (ret)return ret;
include/configs/P1010RDB.h +0 -6
@@ -477,12 +477,6 @@ extern unsigned long get_sdram_size(void);#elif defined(CONFIG_MTD_RAW_NAND )#ifdef CONFIG_TPL_BUILD #define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10)) -#else -#if defined(CONFIG_TARGET_P1010RDB_PA ) -#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)/* 3*16=48K for env */ -#elif defined(CONFIG_TARGET_P1010RDB_PB ) -#define CONFIG_ENV_RANGE (32 * CONFIG_ENV_SIZE)/* new block size 512K */ -#endif #endif #endif
include/configs/colibri-imx6ull.h +0 -5
@@ -122,11 +122,6 @@#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -/* environment organization */ -#if defined(CONFIG_ENV_IS_IN_NAND ) -#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE) -#endif -#ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND /* NAND stuff */ #define CONFIG_SYS_MAX_NAND_DEVICE 1
include/configs/colibri_imx7.h +0 -5
@@ -166,11 +166,6 @@#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -/* environment organization */ -#if defined(CONFIG_ENV_IS_IN_NAND ) -#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE) -#endif -#ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND /* NAND stuff */ #define CONFIG_SYS_MAX_NAND_DEVICE 1
include/configs/colibri_vf.h +0 -5
@@ -91,11 +91,6 @@#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -/* Environment organization */ -#ifdef CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_RANGE (4 * 64 * 2048) -#endif -/* USB Host Support */ /* USB DFU */
include/configs/draco.h +0 -3
@@ -27,9 +27,6 @@/* Physical Memory Map */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20)/* 1GB */ -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) -/* Default env settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=draco\0" \
include/configs/etamin.h +0 -4
@@ -77,10 +77,6 @@/* nedded by compliance test in read mode */ -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) - -#undef COMMON_ENV_DFU_ARGS#define COMMON_ENV_DFU_ARGS "dfu_args=run bootargs_defaults;" \ "setenv bootargs ${bootargs};" \
include/configs/m53menlo.h +0 -3
@@ -51,9 +51,6 @@#define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR#define CONFIG_SYS_NAND_LARGEPAGE #define CONFIG_MXC_NAND_HWECC - -/* Environment is in NAND */ -#define CONFIG_ENV_RANGE (0x00080000)/* 512 KiB */ #endif /*
include/configs/mx28evk.h +0 -11
@@ -15,17 +15,6 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* Max 1 GB RAM */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -/* Environment */ - -/* Environment is in MMC */ - -/* Environment is in NAND */ -#if defined(CONFIG_CMD_NAND ) && defined(CONFIG_ENV_IS_IN_NAND ) -#define CONFIG_ENV_RANGE (512 * 1024) -#endif - -/* Environment is in SPI flash */ -/* UBI and NAND partitioning */ /* RTC */
include/configs/p1_p2_rdb_pc.h +0 -1
@@ -433,7 +433,6 @@#if defined(CONFIG_SDCARD )#define CONFIG_FSL_FIXED_MMC_LOCATION #elif defined(CONFIG_MTD_RAW_NAND ) -#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)#ifdef CONFIG_TPL_BUILD #define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))#endif
include/configs/rastaban.h +0 -3
@@ -37,9 +37,6 @@#define EEPROM_ADDR_DDR3 0x90#define EEPROM_ADDR_CHIP 0x120 -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) -/* Default env settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=rastaban\0" \
include/configs/smartweb.h +0 -5
@@ -87,11 +87,6 @@/* General Boot Parameter */ -/* -* The NAND Flash partitions: -*/ -#define CONFIG_ENV_RANGE (SZ_512K) -/* * Predefined environment variables. * Usefull to define some easy to use boot commands.
include/configs/thuban.h +0 -3
@@ -30,9 +30,6 @@#define EEPROM_ADDR_DDR3 0x90#define EEPROM_ADDR_CHIP 0x120 -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) -/* Default env settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=thuban\0" \
include/configs/vf610twr.h +0 -4
@@ -130,8 +130,4 @@#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -#ifdef CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_RANGE (512 * 1024) -#endif -#endif
Signature · 1 line
2.25.1
PATCH 5/8 opos6uldev: Migrate to using CONFIG_EXTRA_ENV_TEXT
In reply to Tom RiniMove the environment text over from being set via CONFIG_EXTRA_ENV_SETTINGS in include/configs/opos6uldev.h and over to plain text in board/armadeus/opos6uldev/opos6uldev.env. This lets us manage env_version without a CONFIG variable.
--- board/armadeus/opos6uldev/opos6uldev.env | 133 +++++++++++++++++++++++ include/configs/opos6uldev.h | 131 ---------------------- 2 files changed, 133 insertions(+), 131 deletions(-) create mode 100644 board/armadeus/opos6uldev/opos6uldev.env
board/armadeus/opos6uldev/opos6uldev.env new file +133 -0
@@ -0,0 +1,133 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* + * Copyright (C) 2017 Armadeus Systems + */ + +/* Environment is stored in the eMMC boot partition */ + +env_version=100 +consoledev=ttymxc0 +board_name=opos6ul +fdt_addr=0x88000000 +fdt_high=0xffffffff +fdt_name=opos6uldev +initrd_high=0xffffffff +ip_dyn=yes +stdin=serial +stdout=serial +stderr=serial +mmcdev=0 +mmcpart=2 +mmcroot=/dev/mmcblk0p2 ro +mmcrootfstype=ext4 rootwait +kernelimg=opos6ul-linux.bin +splashpos=0,0 +splashimage=CONFIG_SYS_LOAD_ADDR +videomode=video=ctfb:x:800,y:480,depth:18,pclk:33033,le:96,ri:96,up:20,lo:21,hs:64,vs:4,sync:0,vmode:0 +check_env=if test -n ${flash_env_version}; + then env default env_version; + else env set flash_env_version ${env_version}; env save; + fi; + if itest ${flash_env_version} != ${env_version}; then + echo "*** Warning - Environment version + change suggests: run flash_reset_env; reset"; + env default flash_reset_env; + else exit; fi; +flash_reset_env=env default -f -a && saveenv && + echo Environment variables erased! +download_uboot_spl=tftpboot ${loadaddr} ${board_name}-u-boot.spl +flash_uboot_spl= + if mmc dev 0 1; then + setexpr sz ${filesize} / 0x200; + setexpr sz ${sz} + 1; + if mmc write ${loadaddr} 0x2 ${sz}; then + echo Flashing of U-boot SPL succeed; + else echo Flashing of U-boot SPL failed; + fi; + fi; +download_uboot_img=tftpboot ${loadaddr} ${board_name}-u-boot.img +flash_uboot_img= + if mmc dev 0 1; then + setexpr sz ${filesize} / 0x200; + setexpr sz ${sz} + 1; + if mmc write ${loadaddr} 0x8a ${sz}; then + echo Flashing of U-boot image succeed; + else echo Flashing of U-boot image failed; + fi; + fi; +update_uboot=run download_uboot_spl flash_uboot_spl + download_uboot_img flash_uboot_img +download_kernel=tftpboot ${loadaddr} ${kernelimg} +flash_kernel= + if ext4write mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${kernelimg} ${filesize}; then + echo kernel update succeed; + else echo kernel update failed; + fi; +update_kernel=run download_kernel flash_kernel +download_dtb=tftpboot ${fdt_addr} imx6ul-${fdt_name}.dtb +flash_dtb= + if ext4write mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/imx6ul-${fdt_name}.dtb ${filesize}; then + echo dtb update succeed; + else echo dtb update in failed; + fi; +update_dtb=run download_dtb flash_dtb +download_rootfs=tftpboot ${loadaddr} ${board_name}-rootfs.ext4 +flash_rootfs= + if mmc dev 0 0; then + setexpr nbblocks ${filesize} / 0x200; + setexpr nbblocks ${nbblocks} + 1; + if mmc write ${loadaddr} 0x40800 ${nbblocks}; then + echo Flashing of rootfs image succeed; + else echo Flashing of rootfs image failed; + fi; + fi; +update_rootfs=run download_rootfs flash_rootfs +flash_failsafe= + if mmc dev 0 0; then + setexpr nbblocks ${filesize} / 0x200; + setexpr nbblocks ${nbblocks} + 1; + if mmc write ${loadaddr} 0x800 ${nbblocks}; then + echo Flashing of rootfs image in failsafe partition succeed; + else echo Flashing of rootfs image in failsafe partition failed; + fi; + fi; +update_failsafe=run download_rootfs flash_failsafe +download_userdata=tftpboot ${loadaddr} ${board_name}-user_data.ext4 +flash_userdata= + if mmc dev 0 0; then + setexpr nbblocks ${filesize} / 0x200; + setexpr nbblocks ${nbblocks} + 1; + if mmc write ${loadaddr} 0 ${nbblocks}; then + echo Flashing of user_data image succeed; + else echo Flashing of user_data image failed; + fi; + fi; +update_userdata=run download_userdata flash_userdata; mmc rescan +erase_userdata= + if mmc dev 0 0; then + echo Erasing eMMC User Data partition, no way out...; + mw ${loadaddr} 0 0x200000; + mmc write ${loadaddr} 0 0x1000; + mmc write ${loadaddr} 0x800 0x1000; + mmc write ${loadaddr} 0x40800 0x1000; + mmc write ${loadaddr} 0x440800 0x1000; + fi; + mmc rescan +update_all=run update_rootfs update_uboot +initargs=setenv bootargs console=${consoledev},${baudrate} ${extrabootargs} +addipargs=setenv bootargs ${bootargs} + ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off +addmmcargs=setenv bootargs ${bootargs} root=${mmcroot} + rootfstype=${mmcrootfstype} +emmcboot=run initargs; run addmmcargs; + load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${kernelimg} && + load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/imx6ul-${fdt_name}.dtb && + bootz ${loadaddr} - ${fdt_addr}; +emmcsafeboot=setenv mmcpart 1; setenv mmcroot /dev/mmcblk0p1 ro; run emmcboot; +addnfsargs=setenv bootargs ${bootargs} root=/dev/nfs rw + nfsroot=${serverip}:${rootpath} +nfsboot=run initargs; run addnfsargs addipargs; + nfs ${loadaddr} ${serverip}:${rootpath}/boot/${kernelimg} && + nfs ${fdt_addr} ${serverip}:${rootpath}/boot/imx6ul-${fdt_name}.dtb && + bootz ${loadaddr} - ${fdt_addr};
include/configs/opos6uldev.h +0 -131
138 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 6/8 Rename CONFIG_SYS_AUTOLAOD to CONFIG_SYS_DISABLE_AUTOLOAD
In reply to Tom RiniThe "autoload" environment variable is always checked with env_get_yesno as it can be set to any form of no. The default behavior of env_get_yesno is to return -1 on variables that are not set, which acts as true in general (we test for non-zero return). To convert CONFIG_SYS_AUTOLOAD to Kconfig, given that it was almost always used to set autoload to no, first rename to CONFIG_SYS_DISABLE_AUTOLOAD for consistency sake. Then, make it so that if enabled we set autoload=0 in the default environment. Migrate all platforms which set CONFIG_SYS_AUTOLOAD to non-true or that set autoload to false in their default environment to using CONFIG_SYS_DISABLE_AUTOLOAD
--- cmd/Kconfig | 9 +++++++++ configs/am335x_guardian_defconfig | 1 + configs/bitmain_antminer_s9_defconfig | 1 + configs/bk4r1_defconfig | 1 + configs/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig | 1 + configs/brppt2_defconfig | 1 + configs/brsmarc1_defconfig | 1 + configs/brxre1_defconfig | 1 + configs/cl-som-imx7_defconfig | 1 + configs/cm_fx6_defconfig | 1 + configs/cm_t335_defconfig | 1 + configs/cm_t43_defconfig | 1 + configs/d2net_v2_defconfig | 1 + configs/devkit3250_defconfig | 1 + configs/dns325_defconfig | 1 + configs/ethernut5_defconfig | 1 + configs/inetspace_v2_defconfig | 1 + configs/nas220_defconfig | 1 + configs/net2big_v2_defconfig | 1 + configs/netspace_lite_v2_defconfig | 1 + configs/netspace_max_v2_defconfig | 1 + configs/netspace_mini_v2_defconfig | 1 + configs/netspace_v2_defconfig | 1 + configs/octeontx2_95xx_defconfig | 1 + configs/octeontx2_96xx_defconfig | 1 + configs/omap35_logic_defconfig | 1 + configs/omap35_logic_somlv_defconfig | 1 + configs/omap3_logic_defconfig | 1 + configs/omap3_logic_somlv_defconfig | 1 + configs/opos6uldev_defconfig | 1 + configs/pcm052_defconfig | 1 + configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig | 1 + configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig | 1 + .../stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig | 1 + configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig | 1 + configs/stm32mp15_basic_defconfig | 1 + configs/stm32mp15_defconfig | 1 + configs/stm32mp15_dhcom_basic_defconfig | 1 + configs/stm32mp15_dhcor_basic_defconfig | 1 + configs/stm32mp15_trusted_defconfig | 1 + include/configs/am335x_guardian.h | 1 - include/configs/bitmain_antminer_s9.h | 1 - include/configs/bk4r1.h | 1 - include/configs/brppt1.h | 1 - include/configs/brppt2.h | 1 - include/configs/brsmarc1.h | 1 - include/configs/brxre1.h | 1 - include/configs/cl-som-imx7.h | 4 ---- include/configs/cm_fx6.h | 1 - include/configs/cm_t335.h | 2 -- include/configs/cm_t43.h | 1 - include/configs/devkit3250.h | 1 - include/configs/dns325.h | 1 - include/configs/ethernut5.h | 5 ----- include/configs/imx7-cm.h | 1 - include/configs/lacie_kw.h | 1 - include/configs/nas220.h | 3 +-- include/configs/octeontx2_common.h | 3 +-- include/configs/octeontx_common.h | 1 - include/configs/omap3_logic.h | 1 - include/configs/opos6uldev.h | 1 - include/configs/pcm052.h | 1 - include/configs/siemens-am33x-common.h | 2 -- include/configs/smartweb.h | 3 --- include/configs/stm32mp15_common.h | 1 - include/env_default.h | 4 ++-- 68 files changed, 54 insertions(+), 40 deletions(-)
cmd/Kconfig +9 -0
@@ -1732,6 +1732,15 @@ config NFS_TIMEOUT "ERROR: Cannot umount" in nfs command, try longer timeout such as 10000. +config SYS_DISABLE_AUTOLOAD + bool "Disable automatically loading files over the network" + depends on CMD_BOOTP || CMD_DHCP || CMD_NFS || CMD_RARP + help + Typically, commands such as "dhcp" will attempt to automatically + load a file from the network, once the initial network configuration + is complete. Enable this option to disable this behavior and instead + require files to be loaded over the network by subsequent commands. + config CMD_MII bool "mii" imply CMD_MDIO
configs/am335x_guardian_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_CMD_MTD=y CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_BMP=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y
configs/bitmain_antminer_s9_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_CMD_PART=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_PXE=y
configs/bk4r1_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND_TRIMFFS=y CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_BOOTCOUNT=y
configs/brppt1_mmc_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_BOOTCOUNT=y
configs/brppt1_nand_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_BOOTCOUNT=y
configs/brppt1_spi_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_BOOTCOUNT=y
configs/brppt2_defconfig +1 -0
@@ -57,6 +57,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y
configs/brsmarc1_defconfig +1 -0
@@ -72,6 +72,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
configs/brxre1_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_MAY_FAIL=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_TIME=y
configs/cl-som-imx7_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y # CONFIG_CMD_MDIO is not set CONFIG_CMD_PING=y
configs/cm_fx6_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT4_WRITE=y
configs/cm_t335_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_DNS2=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand"
configs/cm_t43_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_CMD_NAND=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y # CONFIG_CMD_NFS is not set +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y CONFIG_OF_CONTROL=y
configs/d2net_v2_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/devkit3250_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y
configs/dns325_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/ethernut5_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_SPI=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_RARP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y # CONFIG_CMD_MDIO is not set CONFIG_CMD_PING=y
configs/inetspace_v2_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/nas220_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/net2big_v2_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/netspace_lite_v2_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/netspace_max_v2_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/netspace_mini_v2_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_SATA=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/netspace_v2_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y
configs/octeontx2_95xx_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_TFTPPUT=y CONFIG_CMD_TFTPSRV=y CONFIG_CMD_RARP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CDP=y
configs/octeontx2_96xx_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_TFTPPUT=y CONFIG_CMD_TFTPSRV=y CONFIG_CMD_RARP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CDP=y
configs/omap35_logic_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_CMD_SPL_WRITE_SIZE=0x20000 # CONFIG_CMD_FLASH is not set CONFIG_CMD_NAND=y CONFIG_CMD_NAND_LOCK_UNLOCK=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y CONFIG_CMD_MTDPARTS=y
configs/omap35_logic_somlv_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_CMD_SPL_NAND_OFS=0x240000 CONFIG_CMD_SPL_WRITE_SIZE=0x20000 CONFIG_CMD_NAND=y CONFIG_CMD_NAND_LOCK_UNLOCK=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y CONFIG_CMD_MTDPARTS=y
configs/omap3_logic_defconfig +1 -0
@@ -50,6 +50,7 @@ CONFIG_CMD_SPL_WRITE_SIZE=0x20000 # CONFIG_CMD_FLASH is not set CONFIG_CMD_NAND=y CONFIG_CMD_NAND_LOCK_UNLOCK=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y CONFIG_CMD_MTDPARTS=y
configs/omap3_logic_somlv_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_CMD_SPL_NAND_OFS=0x240000 CONFIG_CMD_SPL_WRITE_SIZE=0x20000 CONFIG_CMD_NAND=y CONFIG_CMD_NAND_LOCK_UNLOCK=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y CONFIG_CMD_MTDPARTS=y
configs/opos6uldev_defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_DHCP=y CONFIG_CMD_TFTPPUT=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y
configs/pcm052_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND_TRIMFFS=y CONFIG_CMD_DHCP=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y
configs/stm32mp15-icore-stm32mp1-ctouch2_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15-microgea-stm32mp1-microdev2-of7_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15-microgea-stm32mp1-microdev2_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15_basic_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EFIDEBUG=y
configs/stm32mp15_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EFIDEBUG=y
configs/stm32mp15_dhcom_basic_defconfig +1 -0
@@ -72,6 +72,7 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15_dhcor_basic_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y
configs/stm32mp15_trusted_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SYS_DISABLE_AUTOLOAD=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EFIDEBUG=y
include/configs/am335x_guardian.h +0 -1
@@ -52,7 +52,6 @@MEM_LAYOUT_ENV_SETTINGS \ BOOTENV \GUARDIAN_DEFAULT_PROD_ENV \ -"autoload=no\0" \"backlight_brightness=50\0" \"bootubivol=rootfs\0" \"distro_bootcmd=" \
include/configs/bitmain_antminer_s9.h +0 -1
@@ -10,7 +10,6 @@#define CONFIG_SYS_SDRAM_SIZE 0x40000000#define CONFIG_EXTRA_ENV_SETTINGS \ - "autoload=no\0" \ "pxefile_addr_r=0x2000000\0" \ "scriptaddr=0x3000000\0" \ "kernel_addr_r=0x2000000\0" \
include/configs/bk4r1.h +0 -1
@@ -67,7 +67,6 @@/* Extra env settings (including the target-defined ones if any) */ #define CONFIG_EXTRA_ENV_SETTINGS \ BK4_EXTRA_ENV_SETTINGS \ - "autoload=no\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "blimg_file=u-boot.vyb\0" \
include/configs/brppt1.h +0 -1
@@ -102,7 +102,6 @@ MMCSPI_TGTS \#define CONFIG_EXTRA_ENV_SETTINGS \ BUR_COMMON_ENV \ "verify=no\0" \ -"autoload=0\0" \ "scraddr=" __stringify(LOAD_OFFSET(0000000)) "\0" \ "cfgaddr=" __stringify(LOAD_OFFSET(0020000)) "\0" \ "dtbaddr=" __stringify(LOAD_OFFSET(0040000)) "\0" \
include/configs/brppt2.h +0 -1
@@ -29,7 +29,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ BUR_COMMON_ENV \ -"autoload=0\0" \ "cfgaddr=0x106F0000\0" \ "scraddr=0x10700000\0" \ "loadaddr=0x10800000\0" \
include/configs/brsmarc1.h +0 -1
@@ -27,7 +27,6 @@/* Default environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ BUR_COMMON_ENV \ -"autoload=0\0" \ "scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "cfgscr=mw ${dtbaddr} 0;" \ " sf probe && sf read ${scradr} 0xC0000 0x10000 && source ${scradr};" \
include/configs/brxre1.h +0 -1
@@ -26,7 +26,6 @@/* Default environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ BUR_COMMON_ENV \ -"autoload=0\0" \ "scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "bootaddr=0x80001100\0" \ "bootdev=cpsw(0,0)\0" \
include/configs/cl-som-imx7.h +0 -4
@@ -26,13 +26,9 @@#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} } -#undef CONFIG_SYS_AUTOLOAD#undef CONFIG_EXTRA_ENV_SETTINGS -#define CONFIG_SYS_AUTOLOAD "no" -#define CONFIG_EXTRA_ENV_SETTINGS \ - "autoload=off\0" \ "script=boot.scr\0" \ "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0" \ "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0" \
include/configs/cm_fx6.h +0 -1
@@ -43,7 +43,6 @@"stdout=serial,vidconsole\0" \"stderr=serial,vidconsole\0" \"panel=HDMI\0" \ -"autoload=no\0" \"uImage=uImage-cm-fx6\0" \"zImage=zImage-cm-fx6\0" \"kernel=uImage-cm-fx6\0" \
include/configs/cm_t335.h +0 -2
@@ -55,8 +55,6 @@MMCARGS \NANDARGS -#define CONFIG_SYS_AUTOLOAD "no" -/* Serial console configuration */ /* NS16550 Configuration */
include/configs/cm_t43.h +0 -1
@@ -56,7 +56,6 @@"loadaddr=0x80200000\0" \"fdtaddr=0x81200000\0" \"bootm_size=0x8000000\0" \ -"autoload=no\0" \"console=ttyO0,115200n8\0" \"fdtfile=am437x-sb-som-t43.dtb\0" \"kernel=zImage-cm-t43\0" \
include/configs/devkit3250.h +0 -1
@@ -71,7 +71,6 @@*/ #define CONFIG_EXTRA_ENV_SETTINGS \ - "autoload=no\0" \ "ethaddr=00:01:90:00:C0:81\0" \ "dtbaddr=0x81000000\0" \ "nfsroot=/opt/projects/images/vladimir/oe/devkit3250/rootfs\0" \
include/configs/dns325.h +0 -1
@@ -40,7 +40,6 @@"stdout=serial\0" \"stderr=serial\0" \"loadaddr=0x800000\0" \ -"autoload=no\0" \"console=ttyS0,115200\0" \"mtdparts=" CONFIG_MTDPARTS_DEFAULT \"optargs=\0" \
include/configs/ethernut5.h +0 -5
@@ -98,11 +98,6 @@#define I2C_DELAY udelay(100)#define I2C_READ at91_get_pio_value(AT91_PIO_PORTA, 23) -/* DHCP/BOOTP options */ -#ifdef CONFIG_CMD_DHCP -#define CONFIG_SYS_AUTOLOAD "n" -#endif -/* File systems */ /* Boot command */
include/configs/imx7-cm.h +0 -1
@@ -12,7 +12,6 @@#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR -#undef CONFIG_SYS_AUTOLOAD#undef CONFIG_EXTRA_ENV_SETTINGS/*
include/configs/lacie_kw.h +0 -1
@@ -57,7 +57,6 @@"stderr=serial\0" \"bootfile=uImage\0" \"loadaddr=0x800000\0" \ -"autoload=no\0" \"netconsole=" \"set stdin $stdin,nc; " \"set stdout $stdout,nc; " \
include/configs/nas220.h +1 -2
@@ -42,8 +42,7 @@"0x500000@0xc0000(uimage)," \"0x1a40000@0x5c0000(rootfs)\0" \"mtdids=nand0=orion_nand\0" \ -"autostart=no\0" \ -"autoload=no\0" +"autostart=no\0" /* * Ethernet Driver configuration
include/configs/octeontx2_common.h +1 -2
@@ -18,8 +18,7 @@/** Extra environment settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=20080000\0" \ - "ethrotate=yes\0" \ - "autoload=0\0" + "ethrotate=yes\0"#define CONFIG_SYS_MMC_MAX_BLK_COUNT 8192
include/configs/octeontx_common.h +0 -1
@@ -18,7 +18,6 @@#include <config_distro_bootcmd.h> /* Extra environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ - "autoload=0\0" \ "loadaddr=0x20080000\0" \ "kernel_addr_r=0x02000000\0" \ "ramdisk_addr_r=0x03000000\0" \
include/configs/omap3_logic.h +0 -1
@@ -87,7 +87,6 @@"nfsroot=${nfsrootpath} " \"ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \"nfsrootpath=/opt/nfs-exports/omap\0" \ -"autoload=no\0" \"fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \"loadfdt=mmc rescan; " \"load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
include/configs/opos6uldev.h +0 -1
@@ -31,7 +31,6 @@/* LCD */ #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR -#define CONFIG_SYS_AUTOLOAD "no"#define CONFIG_ROOTPATH "/tftpboot/opos6ul-root"#endif /* __OPOS6ULDEV_CONFIG_H */
include/configs/pcm052.h +0 -1
@@ -33,7 +33,6 @@/* Extra env settings (including the target-defined ones if any) */ #define CONFIG_EXTRA_ENV_SETTINGS \ PCM052_EXTRA_ENV_SETTINGS \ - "autoload=no\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "blimg_file=u-boot.vyb\0" \
include/configs/siemens-am33x-common.h +0 -2
@@ -19,8 +19,6 @@#define CONFIG_ROOTPATH "/opt/eldk" -#define CONFIG_SYS_AUTOLOAD "yes" -/* Clock Defines */ #define V_OSCK 24000000/* Clock output from T2 */ #define V_SCLK (V_OSCK)
include/configs/smartweb.h +0 -3
@@ -41,9 +41,6 @@/* misc settings */ -/* setting board specific options */ -#define CONFIG_SYS_AUTOLOAD "yes" -/* * SDRAM: 1 bank, 64 MB, base address 0x20000000 * Already initialized before u-boot gets started.
include/configs/stm32mp15_common.h +0 -1
@@ -44,7 +44,6 @@/* Ethernet need */ #ifdef CONFIG_DWC_ETH_QOS #define CONFIG_SERVERIP 192.168.1.1 -#define CONFIG_SYS_AUTOLOAD "no"#endif /*****************************************************************************/
include/env_default.h +2 -2
@@ -59,8 +59,8 @@ const char default_environment[] = {#ifdef CONFIG_SERVERIP "serverip=" __stringify(CONFIG_SERVERIP) "\0"#endif -#ifdef CONFIG_SYS_AUTOLOAD - "autoload=" CONFIG_SYS_AUTOLOAD "\0" +#ifdef CONFIG_SYS_DISABLE_AUTOLOAD + "autoload=0\0"#endif #ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0"
Signature · 1 line
2.25.1
PATCH 7/8 Complete migration of MTDPARTS_DEFAULT / MTDIDS_DEFAULT, include in environment
In reply to Tom Rini- Ensure that everyone setting mtdids= and mtdparts= is doing so via the CONFIG options.
- If the CONFIG options are set, ensure that the default environment sets mtdparts / mtdids.
--- configs/aristainetos2c_defconfig | 2 ++ configs/aristainetos2ccslb_defconfig | 2 ++ configs/dockstar_defconfig | 1 + configs/ib62x0_defconfig | 1 + configs/iconnect_defconfig | 1 + configs/nas220_defconfig | 2 ++ configs/nsa310s_defconfig | 1 + configs/pogo_e02_defconfig | 2 ++ include/configs/am335x_evm.h | 2 -- include/configs/am335x_igep003x.h | 2 -- include/configs/am3517_evm.h | 2 -- include/configs/am43xx_evm.h | 2 -- include/configs/am65x_evm.h | 9 --------- include/configs/aristainetos2.h | 3 --- include/configs/at91sam9n12ek.h | 1 - include/configs/baltos.h | 2 -- include/configs/bk4r1.h | 1 - include/configs/brppt1.h | 2 -- include/configs/chiliboard.h | 2 -- include/configs/cm_fx6.h | 2 -- include/configs/cm_t335.h | 2 -- include/configs/colibri-imx6ull.h | 1 - include/configs/colibri_imx7.h | 1 - include/configs/colibri_t20.h | 1 - include/configs/colibri_vf.h | 1 - include/configs/dns325.h | 1 - include/configs/dockstar.h | 2 -- include/configs/goflexhome.h | 2 -- include/configs/guruplug.h | 1 - include/configs/gw_ventana.h | 2 -- include/configs/ib62x0.h | 2 -- include/configs/iconnect.h | 2 -- include/configs/ids8313.h | 2 -- include/configs/imx27lite-common.h | 2 -- include/configs/imx8mn_bsh_smm_s2.h | 2 -- include/configs/j721e_evm.h | 9 --------- include/configs/j721s2_evm.h | 9 --------- include/configs/km/keymile-common.h | 2 -- include/configs/ls1028aqds.h | 1 - include/configs/ls1028ardb.h | 1 - include/configs/ls1043a_common.h | 1 - include/configs/m53menlo.h | 2 -- include/configs/mccmon6.h | 1 - include/configs/mys_6ulx.h | 2 -- include/configs/nas220.h | 5 ----- include/configs/npi_imx6ull.h | 2 -- include/configs/nsa310s.h | 2 -- include/configs/omap3_evm.h | 2 -- include/configs/omap3_logic.h | 2 -- include/configs/pcl063.h | 2 -- include/configs/pcm052.h | 1 - include/configs/pcm058.h | 2 -- include/configs/phycore_am335x_r2.h | 2 -- include/configs/pm9261.h | 2 -- include/configs/pm9263.h | 2 -- include/configs/pogo_e02.h | 3 --- include/configs/pogo_v4.h | 2 -- include/configs/s5pc210_universal.h | 1 - include/configs/smartweb.h | 1 - include/configs/smdkc100.h | 1 - include/configs/socfpga_arria5_secu1.h | 2 -- include/configs/sunxi-common.h | 16 ---------------- include/configs/ti816x_evm.h | 4 +--- include/configs/ti_armv7_keystone2.h | 4 +--- include/configs/usb_a9263.h | 1 - include/configs/vcoreiii.h | 9 --------- include/env_default.h | 6 ++++++ 67 files changed, 20 insertions(+), 148 deletions(-)
configs/aristainetos2c_defconfig +2 -0
@@ -51,6 +51,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nor0=spi0.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red),-(ubi-nor)" CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_DTB_RESELECT=y
configs/aristainetos2ccslb_defconfig +2 -0
@@ -51,6 +51,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nor0=spi0.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red),-(ubi-nor)" CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_DTB_RESELECT=y
configs/dockstar_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:1m(uboot),-(root)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y
configs/ib62x0_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),-@0x100000(root)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y
configs/iconnect_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0x80000@0x0(uboot),0x20000@0x80000(uboot_env),-@0xa0000(rootfs)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y
configs/nas220_defconfig +2 -0
@@ -38,6 +38,8 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" +CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_EFI_PARTITION=y
configs/nsa310s_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(root)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y
configs/pogo_e02_defconfig +2 -0
@@ -35,6 +35,8 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" +CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)" CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y
include/configs/am335x_evm.h +0 -2
@@ -27,8 +27,6 @@#ifdef CONFIG_MTD_RAW_NAND #define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${nandroot} " \
include/configs/am335x_igep003x.h +0 -2
@@ -54,8 +54,6 @@"bootz ${loadaddr} - ${fdtaddr};" \"fi;" \"fi;\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"nandroot=ubi0:rootfs rw ubi.mtd=1\0" \"nandrootfstype=ubifs rootwait\0" \"nandload=ubi part UBI; " \
include/configs/am3517_evm.h +0 -2
@@ -49,8 +49,6 @@"bootenv=uEnv.txt\0" \"cmdline=\0" \"optargs=\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"mmcdev=0\0" \"mmcpart=1\0" \"mmcroot=/dev/mmcblk0p2 rw\0" \
include/configs/am43xx_evm.h +0 -2
@@ -146,8 +146,6 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 26#define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${nandroot} " \
include/configs/am65x_evm.h +0 -9
@@ -65,14 +65,6 @@"0 /lib/firmware/am65x-mcu-r5f0_0-fw " \"1 /lib/firmware/am65x-mcu-r5f0_1-fw " -#ifdef CONFIG_TARGET_AM654_A53_EVM -#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" -#else -#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD -#endif - #define EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \"init_ubi=run args_all args_ubi; sf probe; " \"ubi part ospi.rootfs; ubifsmount ubi:rootfs;\0" \
@@ -104,7 +96,6 @@DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_AM65X_BOARD_SETTINGS \EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \ - EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \ EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \EXTRA_ENV_RPROC_SETTINGS \EXTRA_ENV_DFUARGS \
include/configs/aristainetos2.h +0 -3
@@ -112,9 +112,6 @@"splashpos=m,m\0" \"console=" CONSOLE_DEV "\0" \"emmcroot=/dev/mmcblk1p1 rootwait rw\0" \ -"mtdids=nor0=spi0.0\0" \ -"mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \ -"-(ubi-nor)\0" \"mk_fitfile_path=setenv fit_file /${sysnum}/system.itb\0" \"mk_rescue_fitfile_path=setenv rescue_fit_file /${rescue_sysnum}/system.itb\0" \"mk_uboot_path=setenv uboot /${sysnum}/u-boot.imx\0" \
include/configs/at91sam9n12ek.h +0 -1
@@ -36,7 +36,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \ "bootargs_nand=rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw\0"\ "bootargs_mmc=root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait\0"
include/configs/baltos.h +0 -2
@@ -29,8 +29,6 @@#ifdef CONFIG_MTD_RAW_NAND #define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "${mtdparts} " \
include/configs/bk4r1.h +0 -1
@@ -80,7 +80,6 @@"nfs_root=/path/to/nfs/root\0" \"tftptimeout=1000\0" \"tftptimeoutcountmax=1000000\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"ipaddr=192.168.0.60\0" \"serverip=192.168.0.1\0" \"bootargs_base=setenv bootargs rw " \
include/configs/brppt1.h +0 -2
@@ -39,8 +39,6 @@#ifdef CONFIG_MTD_RAW_NAND #define NANDTGTS \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "cfgscr=mw ${dtbaddr} 0; nand read ${cfgaddr} cfgscr && source ${cfgaddr};" \ " fdt addr ${dtbaddr} || cp ${fdtcontroladdr} ${dtbaddr} 4000\0" \ "nandargs=setenv bootargs console=${console} ${optargs} ${optargs_rot} " \
include/configs/chiliboard.h +0 -2
@@ -13,8 +13,6 @@#define V_SCLK (V_OSCK)#define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} ${optargs} " \ "${mtdparts} " \ "root=${nandroot} " \
include/configs/cm_fx6.h +0 -2
@@ -53,8 +53,6 @@"video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \"doboot=bootm ${kernel_addr_r}\0" \"doloadfdt=false\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"setboottypez=setenv kernel ${zImage};" \"setenv doboot bootz ${kernel_addr_r} - ${fdt_addr_r};" \"setenv doloadfdt true;\0" \
include/configs/cm_t335.h +0 -2
@@ -31,8 +31,6 @@"bootm ${loadaddr}\0" #define NANDARGS \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"nandroot=ubi0:rootfs rw\0" \"nandrootfstype=ubifs\0" \"nandargs=setenv bootargs console=${console} " \
include/configs/colibri-imx6ull.h +0 -1
@@ -65,7 +65,6 @@#define DFU_ALT_NAND_INFO "imx6ull-bcb part 0,1;u-boot1 part 0,2;u-boot2 part 0,3;u-boot-env part 0,4;ubi partubi 0,5"#define MODULE_EXTRA_ENV_SETTINGS \ "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ UBI_BOOTCMD#else #define MODULE_EXTRA_ENV_SETTINGS ""
include/configs/colibri_imx7.h +0 -1
@@ -102,7 +102,6 @@#if defined(CONFIG_TARGET_COLIBRI_IMX7_NAND )#define MODULE_EXTRA_ENV_SETTINGS \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ UBI_BOOTCMD#elif defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC )#define MODULE_EXTRA_ENV_SETTINGS \
include/configs/colibri_t20.h +0 -1
@@ -25,7 +25,6 @@/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */ #define BOARD_EXTRA_ENV_SETTINGS \ "boot_script_dhcp=boot.scr\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ UBOOT_UPDATE#include "tegra-common-post.h"
include/configs/colibri_vf.h +0 -1
@@ -68,7 +68,6 @@"fdt_board=eval-v3\0" \"fdt_fixup=;\0" \"kernel_image=zImage\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"setsdupdate=mmc rescan && set interface mmc && " \"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \"source ${loadaddr}\0" \
include/configs/dns325.h +0 -1
@@ -41,7 +41,6 @@"stderr=serial\0" \"loadaddr=0x800000\0" \"console=ttyS0,115200\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT \"optargs=\0" \"bootenv=uEnv.txt\0" \"importbootenv=echo Importing environment ...; " \
include/configs/dockstar.h +0 -2
@@ -24,8 +24,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdids=nand0=orion_nand\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/uImage\0" \ "initrd=/boot/uInitrd\0" \ "bootargs_root=ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro\0"
include/configs/goflexhome.h +0 -2
@@ -33,8 +33,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdids=nand0=orion_nand\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/uImage\0" \ "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
include/configs/guruplug.h +0 -1
@@ -26,7 +26,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ "mtdids=nand0=orion_nand\0" \ - "mtdparts="CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/zImage\0" \ "fdt=/boot/guruplug-server-plus.dtb\0" \ "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
include/configs/gw_ventana.h +0 -2
@@ -85,8 +85,6 @@"hwconfig=_UNKNOWN_\0" \"video=\0" \ \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \"disk=0\0" \"part=1\0" \ \
include/configs/ib62x0.h +0 -2
@@ -20,8 +20,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdids=nand0=orion_nand\0" \ - "mtdparts="CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/zImage\0" \ "fdt=/boot/ib62x0.dtb\0" \ "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
include/configs/iconnect.h +0 -2
@@ -13,8 +13,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdids=nand0=orion_nand\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/uImage\0" \ "bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
include/configs/ids8313.h +0 -2
@@ -244,8 +244,6 @@"${netmask}:${hostname}:${netdev}:off " \"console=${console},${baudrate} ${othbootargs}\0" \"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"\0" /* UBI Support */
include/configs/imx27lite-common.h +0 -2
@@ -132,8 +132,6 @@" +${filesize};cp.b ${fileaddr} " \ __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \"upd=run load update\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \/* additions for new relocation code, must be added to all boards */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
include/configs/imx8mn_bsh_smm_s2.h +0 -2
@@ -14,8 +14,6 @@#include <config_distro_bootcmd.h> #define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${nandroot} " \
include/configs/j721e_evm.h +0 -9
@@ -151,14 +151,6 @@DFU_ALT_INFO_RAM \ DFU_ALT_INFO_OSPI -#if defined(CONFIG_TARGET_J721E_A72_EVM ) || defined(CONFIG_TARGET_J7200_A72_EVM ) -#define EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" -#else -#define EXTRA_ENV_J721E_BOARD_SETTINGS_MTD -#endif -#if CONFIG_IS_ENABLED (CMD_PXE )# define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else
@@ -189,7 +181,6 @@EXTRA_ENV_RPROC_SETTINGS \ EXTRA_ENV_DFUARGS \DEFAULT_UFS_TI_ARGS \ - EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \ BOOTENV
include/configs/j721s2_evm.h +0 -9
@@ -128,14 +128,6 @@DFU_ALT_INFO_RAM \DFU_ALT_INFO_OSPI -#if defined(CONFIG_TARGET_J721S2_A72_EVM ) || defined(CONFIG_TARGET_J7200_A72_EVM ) -#define EXTRA_ENV_J721S2_BOARD_SETTINGS_MTD \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" -#else -#define EXTRA_ENV_J721S2_BOARD_SETTINGS_MTD -#endif - /* Incorporate settings into the U-Boot environment */#define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \
@@ -146,7 +138,6 @@EXTRA_ENV_RPROC_SETTINGS \ EXTRA_ENV_DFUARGS \DEFAULT_UFS_TI_ARGS \ - EXTRA_ENV_J721S2_BOARD_SETTINGS_MTD \EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY /* Now for the remaining common defines */
include/configs/km/keymile-common.h +0 -2
@@ -171,8 +171,6 @@"init=/sbin/init-overlay.sh\0" \ "load_addr_r=" __stringify(CONFIG_KM_KERNEL_ADDR) "\0" \"load=tftpboot ${load_addr_r} ${u-boot}\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ ""#endif /* CONFIG_KM_DEF_ENV */
include/configs/ls1028aqds.h +0 -1
@@ -87,7 +87,6 @@"kernelhdr_addr_sd=0x3000\0" \"kernelhdr_size_sd=0x10\0" \"console=ttyS0,115200\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \BOOTENV \"boot_scripts=ls1028aqds_boot.scr\0" \"boot_script_hdr=hdr_ls1028aqds_bs.out\0" \
include/configs/ls1028ardb.h +0 -1
@@ -82,7 +82,6 @@"kernelhdr_addr_sd=0x3000\0" \"kernelhdr_size_sd=0x20\0" \"console=ttyS0,115200\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \BOOTENV \"boot_scripts=ls1028ardb_boot.scr\0" \"boot_script_hdr=hdr_ls1028ardb_bs.out\0" \
include/configs/ls1043a_common.h +0 -1
@@ -167,7 +167,6 @@"kernelhdr_size_sd=0x10\0" \"console=ttyS0,115200\0" \"boot_os=y\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \BOOTENV \"boot_scripts=ls1043ardb_boot.scr\0" \"boot_script_hdr=hdr_ls1043ardb_bs.out\0" \
include/configs/m53menlo.h +0 -2
@@ -112,8 +112,6 @@"mmcpart=1\0" \"rootpath=/srv/\0" \"kernel_addr_r=0x72000000\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"netdev=eth0\0" \"splashsource=mmc_fs\0" \"splashfile=boot/usplash.bmp.gz\0" \
include/configs/mccmon6.h +0 -1
@@ -109,7 +109,6 @@"fi;" \"fi;" \"fi\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"bootdev=1\0" \"bootpart=1\0" \"netdev=eth0\0" \
include/configs/mys_6ulx.h +0 -2
@@ -39,8 +39,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=ttymxc0,115200n8\0" \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "fdt_addr_r=0x82000000\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
include/configs/nas220.h +0 -5
@@ -37,11 +37,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "bootargs=console=ttyS0,115200\0" \ - "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\ - "0x010000@0xa0000(env),"\ - "0x500000@0xc0000(uimage),"\ - "0x1a40000@0x5c0000(rootfs)\0" \ - "mtdids=nand0=orion_nand\0"\ "autostart=no\0"/*
include/configs/npi_imx6ull.h +0 -2
@@ -48,8 +48,6 @@"console=ttymxc0,115200n8\0" \"image=zImage\0" \"fdtfile=imx6ull-seeed-npi-dev-board.dtb\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"fdt_addr_r=0x82000000\0" \"kernel_addr_r=0x81000000\0" \"pxefile_addr_r=0x87100000\0" \
include/configs/nsa310s.h +0 -2
@@ -15,8 +15,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ - "mtdids=nand0=orion_nand\0" \ - "mtdparts="CONFIG_MTDPARTS_DEFAULT \ "kernel=/boot/zImage\0" \ "fdt=/boot/nsa310s.dtb\0" \ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
include/configs/omap3_evm.h +0 -2
@@ -76,8 +76,6 @@DEFAULT_MMC_TI_ARGS \ DEFAULT_FIT_TI_ARGS \"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"fdt_high=0xffffffff\0" \"console=ttyO0,115200n8\0" \"bootdir=/boot\0" \
include/configs/omap3_logic.h +0 -2
@@ -35,8 +35,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "mmcdev=0\0" \ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ "mmcrootfstype=ext4 rootwait\0" \
include/configs/pcl063.h +0 -2
@@ -51,8 +51,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "console=ttymxc0,115200n8\0" \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "fdt_addr_r=0x82000000\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
include/configs/pcm052.h +0 -1
@@ -49,7 +49,6 @@"nfs_root=/path/to/nfs/root\0" \"tftptimeout=1000\0" \"tftptimeoutcountmax=1000000\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"bootargs_base=setenv bootargs rw " \ " mem=" __stringify(CONFIG_PCM052_DDR_SIZE) "M " \"console=ttyLP1,115200n8\0" \
include/configs/pcm058.h +0 -2
@@ -37,8 +37,6 @@"mmcboot=run mmcloadfit;run mmcargs;bootm ${loadaddr}\0" #define ENV_NAND \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"nandroot=ubi0:root ubi.mtd=rootfs\0" \"nandrootfstype=ubifs\0" \"nandargs=setenv bootargs root=${nandroot} " \
include/configs/phycore_am335x_r2.h +0 -2
@@ -16,8 +16,6 @@#ifdef CONFIG_MTD_RAW_NAND #define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${nandroot} " \
include/configs/pm9261.h +0 -2
@@ -161,8 +161,6 @@#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2#define CONFIG_EXTRA_ENV_SETTINGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "partition=nand0,0\0" \ "ramargs=setenv bootargs $(bootargs) $(mtdparts)\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \
include/configs/pm9263.h +0 -2
@@ -184,8 +184,6 @@#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2#define CONFIG_EXTRA_ENV_SETTINGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "partition=nand0,0\0" \ "ramargs=setenv bootargs $(bootargs) $(mtdparts)\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \
include/configs/pogo_e02.h +0 -3
@@ -19,9 +19,6 @@*/ #define CONFIG_EXTRA_ENV_SETTINGS \ - "mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)," \ - "32M(rootfs),-(data)\0"\ - "mtdids=nand0=orion_nand\0"\ "bootargs_console=console=ttyS0,115200\0" \ "bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; " \ "ext2load usb 0:1 0x01100000 /uInitrd\0"
include/configs/pogo_v4.h +0 -2
@@ -26,8 +26,6 @@*/ #define CONFIG_EXTRA_ENV_SETTINGS \ "dtb_file=/boot/dts/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"\ - "mtdids=nand0=orion_nand\0"\ "bootargs_console=console=ttyS0,115200\0" \ "bootcmd_usb=usb start; load usb 0:1 0x00800000 /boot/uImage; " \ "load usb 0:1 0x01100000 /boot/uInitrd; " \
include/configs/s5pc210_universal.h +0 -1
@@ -75,7 +75,6 @@"verify=n\0" \"rootfstype=ext4\0" \"console=console=ttySAC1,115200n8\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT \"mbrparts=" MBRPARTS_DEFAULT \"meminfo=crashkernel=32M@0x50000000\0" \"nfsroot=/nfsroot/arm\0" \
include/configs/smartweb.h +0 -1
@@ -92,7 +92,6 @@ \"basicargs=console=ttyS0,115200\0" \ \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" /* * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,
include/configs/smdkc100.h +0 -1
@@ -69,7 +69,6 @@" console=ttySAC0,115200n8 mem=128M" \" initrd=0x33000000,8M ramdisk=8192\0" \"rootfstype=cramfs\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"meminfo=mem=128M\0" \"nfsroot=/nfsroot/arm\0" \"bootblock=5\0" \
include/configs/socfpga_arria5_secu1.h +0 -2
@@ -66,8 +66,6 @@ "fdt_addr=" __stringify(CONFIG_KM_FDT_ADDR) "\0" \"load=tftpboot ${loadaddr} u-boot-with-nand-spl.sfp\0" \ "loadaddr=" __stringify(CONFIG_KM_KERNEL_ADDR) "\0" \ -"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"update=nand erase 0x0 0x00100000 && nand write ${loadaddr} 0x0 ${filesize}\0" \"userload=ubi part nand.ubi &&" \"ubi check rootfs$bootnum &&" \
include/configs/sunxi-common.h +0 -16
@@ -317,20 +317,6 @@ "stderr=serial\0"#endif -#ifdef CONFIG_MTDIDS_DEFAULT -#define SUNXI_MTDIDS_DEFAULT \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" -#else -#define SUNXI_MTDIDS_DEFAULT -#endif - -#ifdef CONFIG_MTDPARTS_DEFAULT -#define SUNXI_MTDPARTS_DEFAULT \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" -#else -#define SUNXI_MTDPARTS_DEFAULT -#endif -#define PARTS_DEFAULT \ "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \ "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \
@@ -362,8 +348,6 @@DFU_ALT_INFO_RAM \"fdtfile=" FDTFILE "\0" \"console=ttyS0,115200\0" \ -SUNXI_MTDIDS_DEFAULT \ -SUNXI_MTDPARTS_DEFAULT \"uuid_gpt_esp=" UUID_GPT_ESP "\0" \"uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \"partitions=" PARTS_DEFAULT "\0" \
include/configs/ti816x_evm.h +1 -3
@@ -13,9 +13,7 @@#include <asm/arch/omap.h> #define CONFIG_EXTRA_ENV_SETTINGS \ - DEFAULT_LINUX_BOOT_ENV \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ + DEFAULT_LINUX_BOOT_ENV/* Clock Defines */ #define V_OSCK 24000000/* Clock output from T2 */
include/configs/ti_armv7_keystone2.h +1 -3
@@ -184,9 +184,7 @@"args_ramfs=setenv bootargs ${bootargs} " \"rdinit=/sbin/init rw root=/dev/ram0 " \"initrd=0x808080000,80M\0" \ -"no_post=1\0" \ -"mtdparts=mtdparts=davinci_nand.0:" \ -"1024k(bootloader)ro,512k(params)ro,-(ubifs)\0" +"no_post=1\0" /* Now for the remaining common defines */#include <configs/ti_armv7_common.h>
include/configs/usb_a9263.h +0 -1
@@ -55,6 +55,5 @@/* bootstrap + u-boot + env + linux in dataflash on CS0 */ #define CONFIG_EXTRA_ENV_SETTINGS \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ #endif
include/configs/vcoreiii.h +0 -9
@@ -32,18 +32,9 @@#error Unknown DDR size - please add!#endif -#if defined(CONFIG_MTDIDS_DEFAULT ) && defined(CONFIG_MTDPARTS_DEFAULT ) -#define VCOREIII_DEFAULT_MTD_ENV \ - "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \ - "mtdids="CONFIG_MTDIDS_DEFAULT"\0" -#else -#define VCOREIII_DEFAULT_MTD_ENV /* Go away */ -#endif -#define CONFIG_SYS_BOOTM_LEN (16 << 20)/* Increase max gunzip size */ #define CONFIG_EXTRA_ENV_SETTINGS \ - VCOREIII_DEFAULT_MTD_ENV \ "loadaddr=0x81000000\0" \ "spi_image_off=0x00100000\0" \ "console=ttyS0,115200\0" \
include/env_default.h +6 -0
@@ -108,6 +108,12 @@ const char default_environment[] = {#if defined(CONFIG_BOOTCOUNT_BOOTLIMIT ) && (CONFIG_BOOTCOUNT_BOOTLIMIT >0 ) "bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"#endif +#ifdef CONFIG_MTDIDS_DEFAULT + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" +#endif +#ifdef CONFIG_MTDPARTS_DEFAULT + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" +#endif #ifdef CONFIG_EXTRA_ENV_TEXT /* This is created in the Makefile */ CONFIG_EXTRA_ENV_TEXT
Signature · 1 line
2.25.1
PATCH 8/8 gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
In reply to Tom RiniMove the environment text over from being set via CONFIG_EXTRA_ENV_SETTINGS in include/configs/gw_ventana.h and over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us drop CONFIG_EXTRA_ENV_SETTINGS_COMMON as everything resides in a single environment file now.
--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.env
board/gateworks/gw_ventana/gw_ventana.env new file +145 -0
@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endif
include/configs/gw_ventana.h +0 -148
152 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 8/8] gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
Quoted 324 lines · Tom Rini
Move the environment text over from being set via
CONFIG_EXTRA_ENV_SETTINGSininclude/configs/gw_ventana.hand over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us dropCONFIG_EXTRA_ENV_SETTINGS_COMMONas everything resides in a single environment file now.Cc Tim Harvey <[email protected]>Signed-off-by Tom Rini <[email protected]>--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.envboard/gateworks/gw_ventana/gw_ventana.env new file +145
-0@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endifinclude/configs/gw_ventana.h +0
-149@@ -76,152 +76,4 @@#define CONFIG_IPADDR 192.168.1.1#define CONFIG_SERVERIP 192.168.1.146 -#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "bootdevs=usb mmc sata flash\0" \ - "hwconfig=_UNKNOWN_\0" \ - "video=\0" \ - \ - "disk=0\0" \ - "part=1\0" \ - \ - "fdt_high=0xffffffff\0" \ - "fdt_addr=0x18000000\0" \ - "initrd_high=0xffffffff\0" \ - "fixfdt=" \ - "fdt addr ${fdt_addr}\0" \ - "bootdir=boot\0" \ - "loadfdt=" \ - "if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file1}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file2}; " \ - "run fixfdt; " \ - "fi\0" \ - \ - "fs=ext4\0" \ - "script=6x_bootscript-ventana\0" \ - "loadscript=" \ - "if ${fsload} ${loadaddr} ${bootdir}/${script}; then " \ - "source ${loadaddr}; " \ - "fi\0" \ - \ - "uimage=uImage\0" \ - "mmc_root=mmcblk0p1\0" \ - "mmc_boot=" \ - "setenv fsload \"${fs}load mmc ${disk}:${part}\"; " \ - "mmc dev ${disk} && mmc rescan && " \ - "setenv dtype mmc; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/${mmc_root} rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - \ - "sata_boot=" \ - "setenv fsload \"${fs}load sata ${disk}:${part}\"; " \ - "sata init && " \ - "setenv dtype sata; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - "usb_boot=" \ - "setenv fsload \"${fs}load usb ${disk}:${part}\"; " \ - "usb start && usb dev ${disk} && " \ - "setenv dtype usb; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" - -#ifdef CONFIG_SPI_FLASH -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \ - "image_uboot=ventana/u-boot_spi.imx\0" \ - \ - "spi_koffset=0x90000\0" \ - "spi_klen=0x200000\0" \ - \ - "spi_updateuboot=echo Updating uboot from " \ - "${serverip}:${image_uboot}...; " \ - "tftpboot ${loadaddr} ${image_uboot} && " \ - "sf probe && sf erase 0 80000 && " \ - "sf write ${loadaddr} 400 ${filesize}\0" \ - "spi_update=echo Updating OS from ${serverip}:${image_os} " \ - "to ${spi_koffset} ...; " \ - "tftp ${loadaddr} ${image_os} && " \ - "sf probe && " \ - "sf update ${loadaddr} ${spi_koffset} ${filesize}\0" \ - \ - "flash_boot=" \ - "if sf probe && " \ - "sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/mtdblock3 " \ - "rootfstype=squashfs,jffs2 " \ - "${video} ${extra}; " \ - "bootm; " \ - "fi\0" -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - \ - "image_rootfs=openwrt-imx6-ventana-rootfs.ubi\0" \ - "nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; " \ - "tftp ${loadaddr} ${image_rootfs} && " \ - "nand erase.part rootfs && " \ - "nand write ${loadaddr} rootfs ${filesize}\0" \ - \ - "flash_boot=" \ - "setenv fsload 'ubifsload'; " \ - "ubi part rootfs; " \ - "if ubi check boot; then " \ - "ubifsmount ubi0:boot; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=squashfs,ubifs; " \ - "setenv bootdir; " \ - "elif ubi check rootfs; then " \ - "ubifsmount ubi0:rootfs; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=ubifs; " \ - "fi; " \ - "setenv dtype nand; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=${root} ${video} ${extra}; " \ - "if run loadfdt; then " \ - "ubifsumount; " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "ubifsumount; bootm; " \ - "fi; " \ - "fi\0" -#endif -#endif /* __CONFIG_H */ --
Quoted 2 lines
2.25.1
Tom,
Thanks, I've been looking forward to seeing how env is going to get migrated out of headers. Can you explain the process used to create this patch? It seems you may have something automated.
Best Regards,
Tim
Re: [PATCH 8/8] gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
Quoted 330 lines · Tim Harvey
Quoted 324 lines · Tom Rini
Move the environment text over from being set via
CONFIG_EXTRA_ENV_SETTINGSininclude/configs/gw_ventana.hand over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us dropCONFIG_EXTRA_ENV_SETTINGS_COMMONas everything resides in a single environment file now.Cc Tim Harvey <[email protected]>Signed-off-by Tom Rini <[email protected]>--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.envboard/gateworks/gw_ventana/gw_ventana.env new file +145
-0@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endifinclude/configs/gw_ventana.h +0
-149@@ -76,152 +76,4 @@#define CONFIG_IPADDR 192.168.1.1#define CONFIG_SERVERIP 192.168.1.146 -#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "bootdevs=usb mmc sata flash\0" \ - "hwconfig=_UNKNOWN_\0" \ - "video=\0" \ - \ - "disk=0\0" \ - "part=1\0" \ - \ - "fdt_high=0xffffffff\0" \ - "fdt_addr=0x18000000\0" \ - "initrd_high=0xffffffff\0" \ - "fixfdt=" \ - "fdt addr ${fdt_addr}\0" \ - "bootdir=boot\0" \ - "loadfdt=" \ - "if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file1}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file2}; " \ - "run fixfdt; " \ - "fi\0" \ - \ - "fs=ext4\0" \ - "script=6x_bootscript-ventana\0" \ - "loadscript=" \ - "if ${fsload} ${loadaddr} ${bootdir}/${script}; then " \ - "source ${loadaddr}; " \ - "fi\0" \ - \ - "uimage=uImage\0" \ - "mmc_root=mmcblk0p1\0" \ - "mmc_boot=" \ - "setenv fsload \"${fs}load mmc ${disk}:${part}\"; " \ - "mmc dev ${disk} && mmc rescan && " \ - "setenv dtype mmc; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/${mmc_root} rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - \ - "sata_boot=" \ - "setenv fsload \"${fs}load sata ${disk}:${part}\"; " \ - "sata init && " \ - "setenv dtype sata; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - "usb_boot=" \ - "setenv fsload \"${fs}load usb ${disk}:${part}\"; " \ - "usb start && usb dev ${disk} && " \ - "setenv dtype usb; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" - -#ifdef CONFIG_SPI_FLASH -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \ - "image_uboot=ventana/u-boot_spi.imx\0" \ - \ - "spi_koffset=0x90000\0" \ - "spi_klen=0x200000\0" \ - \ - "spi_updateuboot=echo Updating uboot from " \ - "${serverip}:${image_uboot}...; " \ - "tftpboot ${loadaddr} ${image_uboot} && " \ - "sf probe && sf erase 0 80000 && " \ - "sf write ${loadaddr} 400 ${filesize}\0" \ - "spi_update=echo Updating OS from ${serverip}:${image_os} " \ - "to ${spi_koffset} ...; " \ - "tftp ${loadaddr} ${image_os} && " \ - "sf probe && " \ - "sf update ${loadaddr} ${spi_koffset} ${filesize}\0" \ - \ - "flash_boot=" \ - "if sf probe && " \ - "sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/mtdblock3 " \ - "rootfstype=squashfs,jffs2 " \ - "${video} ${extra}; " \ - "bootm; " \ - "fi\0" -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - \ - "image_rootfs=openwrt-imx6-ventana-rootfs.ubi\0" \ - "nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; " \ - "tftp ${loadaddr} ${image_rootfs} && " \ - "nand erase.part rootfs && " \ - "nand write ${loadaddr} rootfs ${filesize}\0" \ - \ - "flash_boot=" \ - "setenv fsload 'ubifsload'; " \ - "ubi part rootfs; " \ - "if ubi check boot; then " \ - "ubifsmount ubi0:boot; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=squashfs,ubifs; " \ - "setenv bootdir; " \ - "elif ubi check rootfs; then " \ - "ubifsmount ubi0:rootfs; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=ubifs; " \ - "fi; " \ - "setenv dtype nand; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=${root} ${video} ${extra}; " \ - "if run loadfdt; then " \ - "ubifsumount; " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "ubifsumount; bootm; " \ - "fi; " \ - "fi\0" -#endif -#endif /* __CONFIG_H */ --Quoted 2 lines
2.25.1
Tom,
Quoted 5 lines
Thanks, I've been looking forward to seeing how env is going to get migrated out of headers. Can you explain the process used to create this patch? It seems you may have something automated.
Acked-by Tim Harvey <[email protected]>
So, I do not have anything automated, unfortunately. In cases like this where we don't use distro_bootcmd and also don't use defined blocks of commands, it's a matter of applying a few regexs to remove quotes, spaces and trailing \, then giving it a quick read to make sure it's still right. This last part is some of why it can't be automated as we have cases of:
"some_bootargs=a=1 b=2" \
"c=3\0"
and since there's no indent on c=3, it would become "c=3" in the environment rather than "some_bootargs" being set to "a=1 b=2 c=3".
Signature · 1 line
Tom
Re: [PATCH 8/8] gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
Quoted 338 lines · Tom Rini
Quoted 330 lines · Tim Harvey
Quoted 324 lines · Tom Rini
Move the environment text over from being set via
CONFIG_EXTRA_ENV_SETTINGSininclude/configs/gw_ventana.hand over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us dropCONFIG_EXTRA_ENV_SETTINGS_COMMONas everything resides in a single environment file now.Cc Tim Harvey <[email protected]>Signed-off-by Tom Rini <[email protected]>--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.envboard/gateworks/gw_ventana/gw_ventana.env new file +145
-0@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endifinclude/configs/gw_ventana.h +0
-149@@ -76,152 +76,4 @@#define CONFIG_IPADDR 192.168.1.1#define CONFIG_SERVERIP 192.168.1.146 -#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "bootdevs=usb mmc sata flash\0" \ - "hwconfig=_UNKNOWN_\0" \ - "video=\0" \ - \ - "disk=0\0" \ - "part=1\0" \ - \ - "fdt_high=0xffffffff\0" \ - "fdt_addr=0x18000000\0" \ - "initrd_high=0xffffffff\0" \ - "fixfdt=" \ - "fdt addr ${fdt_addr}\0" \ - "bootdir=boot\0" \ - "loadfdt=" \ - "if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file1}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file2}; " \ - "run fixfdt; " \ - "fi\0" \ - \ - "fs=ext4\0" \ - "script=6x_bootscript-ventana\0" \ - "loadscript=" \ - "if ${fsload} ${loadaddr} ${bootdir}/${script}; then " \ - "source ${loadaddr}; " \ - "fi\0" \ - \ - "uimage=uImage\0" \ - "mmc_root=mmcblk0p1\0" \ - "mmc_boot=" \ - "setenv fsload \"${fs}load mmc ${disk}:${part}\"; " \ - "mmc dev ${disk} && mmc rescan && " \ - "setenv dtype mmc; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/${mmc_root} rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - \ - "sata_boot=" \ - "setenv fsload \"${fs}load sata ${disk}:${part}\"; " \ - "sata init && " \ - "setenv dtype sata; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - "usb_boot=" \ - "setenv fsload \"${fs}load usb ${disk}:${part}\"; " \ - "usb start && usb dev ${disk} && " \ - "setenv dtype usb; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" - -#ifdef CONFIG_SPI_FLASH -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \ - "image_uboot=ventana/u-boot_spi.imx\0" \ - \ - "spi_koffset=0x90000\0" \ - "spi_klen=0x200000\0" \ - \ - "spi_updateuboot=echo Updating uboot from " \ - "${serverip}:${image_uboot}...; " \ - "tftpboot ${loadaddr} ${image_uboot} && " \ - "sf probe && sf erase 0 80000 && " \ - "sf write ${loadaddr} 400 ${filesize}\0" \ - "spi_update=echo Updating OS from ${serverip}:${image_os} " \ - "to ${spi_koffset} ...; " \ - "tftp ${loadaddr} ${image_os} && " \ - "sf probe && " \ - "sf update ${loadaddr} ${spi_koffset} ${filesize}\0" \ - \ - "flash_boot=" \ - "if sf probe && " \ - "sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/mtdblock3 " \ - "rootfstype=squashfs,jffs2 " \ - "${video} ${extra}; " \ - "bootm; " \ - "fi\0" -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - \ - "image_rootfs=openwrt-imx6-ventana-rootfs.ubi\0" \ - "nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; " \ - "tftp ${loadaddr} ${image_rootfs} && " \ - "nand erase.part rootfs && " \ - "nand write ${loadaddr} rootfs ${filesize}\0" \ - \ - "flash_boot=" \ - "setenv fsload 'ubifsload'; " \ - "ubi part rootfs; " \ - "if ubi check boot; then " \ - "ubifsmount ubi0:boot; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=squashfs,ubifs; " \ - "setenv bootdir; " \ - "elif ubi check rootfs; then " \ - "ubifsmount ubi0:rootfs; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=ubifs; " \ - "fi; " \ - "setenv dtype nand; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=${root} ${video} ${extra}; " \ - "if run loadfdt; then " \ - "ubifsumount; " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "ubifsumount; bootm; " \ - "fi; " \ - "fi\0" -#endif -#endif /* __CONFIG_H */ --Quoted 2 lines
2.25.1
Tom,
Quoted 5 lines
Thanks, I've been looking forward to seeing how env is going to get migrated out of headers. Can you explain the process used to create this patch? It seems you may have something automated.
Acked-by Tim Harvey <[email protected]>
Quoted 11 lines
So, I do not have anything automated, unfortunately. In cases like this where we don't use
distro_bootcmdand also don't use defined blocks of commands, it's a matter of applying a few regexs to remove quotes, spaces and trailing \, then giving it a quick read to make sure it's still right. This last part is some of why it can't be automated as we have cases of:
"some_bootargs=a=1 b=2" \
"c=3\0"
and since there's no indent on c=3, it would become "c=3" in the environment rather than "some_bootargs" being set to "a=1 b=2 c=3".
Tom,
I see - Its good to see this as an example and thanks for the cleanup!
Tim
Re: [PATCH 8/8] gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
Quoted 352 lines · Tim Harvey
Quoted 338 lines · Tom Rini
Quoted 330 lines · Tim Harvey
Quoted 324 lines · Tom Rini
Move the environment text over from being set via
CONFIG_EXTRA_ENV_SETTINGSininclude/configs/gw_ventana.hand over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us dropCONFIG_EXTRA_ENV_SETTINGS_COMMONas everything resides in a single environment file now.Cc Tim Harvey <[email protected]>Signed-off-by Tom Rini <[email protected]>--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.envboard/gateworks/gw_ventana/gw_ventana.env new file +145
-0@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endifinclude/configs/gw_ventana.h +0
-149@@ -76,152 +76,4 @@#define CONFIG_IPADDR 192.168.1.1#define CONFIG_SERVERIP 192.168.1.146 -#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "bootdevs=usb mmc sata flash\0" \ - "hwconfig=_UNKNOWN_\0" \ - "video=\0" \ - \ - "disk=0\0" \ - "part=1\0" \ - \ - "fdt_high=0xffffffff\0" \ - "fdt_addr=0x18000000\0" \ - "initrd_high=0xffffffff\0" \ - "fixfdt=" \ - "fdt addr ${fdt_addr}\0" \ - "bootdir=boot\0" \ - "loadfdt=" \ - "if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file1}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file2}; " \ - "run fixfdt; " \ - "fi\0" \ - \ - "fs=ext4\0" \ - "script=6x_bootscript-ventana\0" \ - "loadscript=" \ - "if ${fsload} ${loadaddr} ${bootdir}/${script}; then " \ - "source ${loadaddr}; " \ - "fi\0" \ - \ - "uimage=uImage\0" \ - "mmc_root=mmcblk0p1\0" \ - "mmc_boot=" \ - "setenv fsload \"${fs}load mmc ${disk}:${part}\"; " \ - "mmc dev ${disk} && mmc rescan && " \ - "setenv dtype mmc; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/${mmc_root} rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - \ - "sata_boot=" \ - "setenv fsload \"${fs}load sata ${disk}:${part}\"; " \ - "sata init && " \ - "setenv dtype sata; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - "usb_boot=" \ - "setenv fsload \"${fs}load usb ${disk}:${part}\"; " \ - "usb start && usb dev ${disk} && " \ - "setenv dtype usb; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" - -#ifdef CONFIG_SPI_FLASH -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \ - "image_uboot=ventana/u-boot_spi.imx\0" \ - \ - "spi_koffset=0x90000\0" \ - "spi_klen=0x200000\0" \ - \ - "spi_updateuboot=echo Updating uboot from " \ - "${serverip}:${image_uboot}...; " \ - "tftpboot ${loadaddr} ${image_uboot} && " \ - "sf probe && sf erase 0 80000 && " \ - "sf write ${loadaddr} 400 ${filesize}\0" \ - "spi_update=echo Updating OS from ${serverip}:${image_os} " \ - "to ${spi_koffset} ...; " \ - "tftp ${loadaddr} ${image_os} && " \ - "sf probe && " \ - "sf update ${loadaddr} ${spi_koffset} ${filesize}\0" \ - \ - "flash_boot=" \ - "if sf probe && " \ - "sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/mtdblock3 " \ - "rootfstype=squashfs,jffs2 " \ - "${video} ${extra}; " \ - "bootm; " \ - "fi\0" -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - \ - "image_rootfs=openwrt-imx6-ventana-rootfs.ubi\0" \ - "nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; " \ - "tftp ${loadaddr} ${image_rootfs} && " \ - "nand erase.part rootfs && " \ - "nand write ${loadaddr} rootfs ${filesize}\0" \ - \ - "flash_boot=" \ - "setenv fsload 'ubifsload'; " \ - "ubi part rootfs; " \ - "if ubi check boot; then " \ - "ubifsmount ubi0:boot; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=squashfs,ubifs; " \ - "setenv bootdir; " \ - "elif ubi check rootfs; then " \ - "ubifsmount ubi0:rootfs; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=ubifs; " \ - "fi; " \ - "setenv dtype nand; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=${root} ${video} ${extra}; " \ - "if run loadfdt; then " \ - "ubifsumount; " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "ubifsumount; bootm; " \ - "fi; " \ - "fi\0" -#endif -#endif /* __CONFIG_H */ --Quoted 2 lines
2.25.1
Tom,
Quoted 5 lines
Thanks, I've been looking forward to seeing how env is going to get migrated out of headers. Can you explain the process used to create this patch? It seems you may have something automated.
Acked-by Tim Harvey <[email protected]>Quoted 11 lines
So, I do not have anything automated, unfortunately. In cases like this where we don't use
distro_bootcmdand also don't use defined blocks of commands, it's a matter of applying a few regexs to remove quotes, spaces and trailing \, then giving it a quick read to make sure it's still right. This last part is some of why it can't be automated as we have cases of:
"some_bootargs=a=1 b=2" \
"c=3\0"
and since there's no indent on c=3, it would become "c=3" in the environment rather than "some_bootargs" being set to "a=1 b=2 c=3".
Quoted 4 lines
Tom,
I see - Its good to see this as an example and thanks for the cleanup!
Tom,
What is the plan or challenges to move env from headers when generic distro config is used?
Best Regards,
Tim
Re: [PATCH 8/8] gw_ventana: Migrate to using CONFIG_EXTRA_ENV_TEXT
Quoted 353 lines · Tim Harvey
Quoted 352 lines · Tim Harvey
Quoted 349 lines · Tom Rini
Quoted 330 lines · Tim Harvey
Quoted 324 lines · Tom Rini
Move the environment text over from being set via
CONFIG_EXTRA_ENV_SETTINGSininclude/configs/gw_ventana.hand over to plain text in board/gateworks/gw_ventana/gw_ventana.env. This lets us dropCONFIG_EXTRA_ENV_SETTINGS_COMMONas everything resides in a single environment file now.Cc Tim Harvey <[email protected]>Signed-off-by Tom Rini <[email protected]>--- board/gateworks/gw_ventana/gw_ventana.env | 145 +++++++++++++++++++++ include/configs/gw_ventana.h | 148 ---------------------- 2 files changed, 145 insertions(+), 148 deletions(-) create mode 100644 board/gateworks/gw_ventana/gw_ventana.envboard/gateworks/gw_ventana/gw_ventana.env new file +145
-0@@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2013 Gateworks Corporation + */ + +splashpos=m,m +splashimage=CONFIG_SYS_LOAD_ADDR +usb_pgood_delay=2000 +console=ttymxc1 +bootdevs=usb mmc sata flash +hwconfig=_UNKNOWN_ + +disk=0 +part=1 + +fdt_high=0xffffffff +fdt_addr=0x18000000 +initrd_high=0xffffffff +fixfdt=fdt addr ${fdt_addr} +bootdir=boot +loadfdt= + if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then + echo Loaded DTB from ${bootdir}/${fdt_file}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then + echo Loaded DTB from ${bootdir}/${fdt_file1}; + run fixfdt; + elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then + echo Loaded DTB from ${bootdir}/${fdt_file2}; + run fixfdt; + fi + +fs=ext4 +script=6x_bootscript-ventana +loadscript= + if ${fsload} ${loadaddr} ${bootdir}/${script}; then + source ${loadaddr}; + fi + +uimage=uImage +mmc_root=mmcblk0p1 +mmc_boot= + setenv fsload "${fs}load mmc ${disk}:${part}"; + mmc dev ${disk} && mmc rescan && + setenv dtype mmc; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/${mmc_root} rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +sata_boot= + setenv fsload "${fs}load sata ${disk}:${part}"; + sata init && + setenv dtype sata; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +usb_boot= + setenv fsload "${fs}load usb ${disk}:${part}"; + usb start && usb dev ${disk} && + setenv dtype usb; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=/dev/sda1 rootfstype=${fs} + rootwait rw ${video} ${extra}; + if run loadfdt; then + bootm ${loadaddr} - ${fdt_addr}; + else + bootm; + fi; + fi + +#ifdef CONFIG_SPI_FLASH +image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin +image_uboot=ventana/u-boot_spi.imx + +spi_koffset=0x90000 +spi_klen=0x200000 + +spi_updateuboot=echo Updating uboot from + ${serverip}:${image_uboot}...; + tftpboot ${loadaddr} ${image_uboot} && + sf probe && sf erase 0 80000 && + sf write ${loadaddr} 400 ${filesize} +spi_update=echo Updating OS from ${serverip}:${image_os} + to ${spi_koffset} ...; + tftp ${loadaddr} ${image_os} && + sf probe && + sf update ${loadaddr} ${spi_koffset} ${filesize} + +flash_boot= + if sf probe && + sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then + setenv bootargs console=${console},${baudrate} + root=/dev/mtdblock3 + rootfstype=squashfs,jffs2 + ${video} ${extra}; + bootm; + fi +#else +image_rootfs=openwrt-imx6-ventana-rootfs.ubi +nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; + tftp ${loadaddr} ${image_rootfs} && + nand erase.part rootfs && + nand write ${loadaddr} rootfs ${filesize} + +flash_boot= + setenv fsload 'ubifsload'; + ubi part rootfs; + if ubi check boot; then + ubifsmount ubi0:boot; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=squashfs,ubifs; + setenv bootdir; + elif ubi check rootfs; then + ubifsmount ubi0:rootfs; + setenv root ubi0:rootfs ubi.mtd=2 + rootfstype=ubifs; + fi; + setenv dtype nand; run loadscript; + if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then + setenv bootargs console=${console},${baudrate} + root=${root} ${video} ${extra}; + if run loadfdt; then + ubifsumount; + bootm ${loadaddr} - ${fdt_addr}; + else + ubifsumount; bootm; + fi; + fi +#endifinclude/configs/gw_ventana.h +0
-149@@ -76,152 +76,4 @@#define CONFIG_IPADDR 192.168.1.1#define CONFIG_SERVERIP 192.168.1.146 -#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "bootdevs=usb mmc sata flash\0" \ - "hwconfig=_UNKNOWN_\0" \ - "video=\0" \ - \ - "disk=0\0" \ - "part=1\0" \ - \ - "fdt_high=0xffffffff\0" \ - "fdt_addr=0x18000000\0" \ - "initrd_high=0xffffffff\0" \ - "fixfdt=" \ - "fdt addr ${fdt_addr}\0" \ - "bootdir=boot\0" \ - "loadfdt=" \ - "if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file1}; " \ - "run fixfdt; " \ - "elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then " \ - "echo Loaded DTB from ${bootdir}/${fdt_file2}; " \ - "run fixfdt; " \ - "fi\0" \ - \ - "fs=ext4\0" \ - "script=6x_bootscript-ventana\0" \ - "loadscript=" \ - "if ${fsload} ${loadaddr} ${bootdir}/${script}; then " \ - "source ${loadaddr}; " \ - "fi\0" \ - \ - "uimage=uImage\0" \ - "mmc_root=mmcblk0p1\0" \ - "mmc_boot=" \ - "setenv fsload \"${fs}load mmc ${disk}:${part}\"; " \ - "mmc dev ${disk} && mmc rescan && " \ - "setenv dtype mmc; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/${mmc_root} rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - \ - "sata_boot=" \ - "setenv fsload \"${fs}load sata ${disk}:${part}\"; " \ - "sata init && " \ - "setenv dtype sata; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" \ - "usb_boot=" \ - "setenv fsload \"${fs}load usb ${disk}:${part}\"; " \ - "usb start && usb dev ${disk} && " \ - "setenv dtype usb; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/sda1 rootfstype=${fs} " \ - "rootwait rw ${video} ${extra}; " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "bootm; " \ - "fi; " \ - "fi\0" - -#ifdef CONFIG_SPI_FLASH -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - "image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \ - "image_uboot=ventana/u-boot_spi.imx\0" \ - \ - "spi_koffset=0x90000\0" \ - "spi_klen=0x200000\0" \ - \ - "spi_updateuboot=echo Updating uboot from " \ - "${serverip}:${image_uboot}...; " \ - "tftpboot ${loadaddr} ${image_uboot} && " \ - "sf probe && sf erase 0 80000 && " \ - "sf write ${loadaddr} 400 ${filesize}\0" \ - "spi_update=echo Updating OS from ${serverip}:${image_os} " \ - "to ${spi_koffset} ...; " \ - "tftp ${loadaddr} ${image_os} && " \ - "sf probe && " \ - "sf update ${loadaddr} ${spi_koffset} ${filesize}\0" \ - \ - "flash_boot=" \ - "if sf probe && " \ - "sf read ${loadaddr} ${spi_koffset} ${spi_klen}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=/dev/mtdblock3 " \ - "rootfstype=squashfs,jffs2 " \ - "${video} ${extra}; " \ - "bootm; " \ - "fi\0" -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_EXTRA_ENV_SETTINGS_COMMON \ - \ - "image_rootfs=openwrt-imx6-ventana-rootfs.ubi\0" \ - "nand_update=echo Updating NAND from ${serverip}:${image_rootfs}...; " \ - "tftp ${loadaddr} ${image_rootfs} && " \ - "nand erase.part rootfs && " \ - "nand write ${loadaddr} rootfs ${filesize}\0" \ - \ - "flash_boot=" \ - "setenv fsload 'ubifsload'; " \ - "ubi part rootfs; " \ - "if ubi check boot; then " \ - "ubifsmount ubi0:boot; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=squashfs,ubifs; " \ - "setenv bootdir; " \ - "elif ubi check rootfs; then " \ - "ubifsmount ubi0:rootfs; " \ - "setenv root ubi0:rootfs ubi.mtd=2 " \ - "rootfstype=ubifs; " \ - "fi; " \ - "setenv dtype nand; run loadscript; " \ - "if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \ - "setenv bootargs console=${console},${baudrate} " \ - "root=${root} ${video} ${extra}; " \ - "if run loadfdt; then " \ - "ubifsumount; " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "ubifsumount; bootm; " \ - "fi; " \ - "fi\0" -#endif -#endif /* __CONFIG_H */ --Quoted 2 lines
2.25.1
Tom,
Quoted 5 lines
Thanks, I've been looking forward to seeing how env is going to get migrated out of headers. Can you explain the process used to create this patch? It seems you may have something automated.
Acked-by Tim Harvey <[email protected]>So, I do not have anything automated, unfortunately. In cases like this where we don't use
distro_bootcmdand also don't use defined blocks of commands, it's a matter of applying a few regexs to remove quotes, spaces and trailing \, then giving it a quick read to make sure it's still right. This last part is some of why it can't be automated as we have cases of:
"some_bootargs=a=1 b=2" \
"c=3\0"
and since there's no indent on c=3, it would become "c=3" in the environment rather than "some_bootargs" being set to "a=1 b=2 c=3".
Quoted 8 lines
Quoted 3 lines
Tom,
I see - Its good to see this as an example and thanks for the cleanup!
Tom,
What is the plan or challenges to move env from headers when generic distro config is used?
It's a good question I don't have an answer to just yet. One potential answer is to say stop using include/config_distro_bootcmd.h and use "bootmeth" to achieve the same results, but in a way that doesn't make heavy use of macros and environment being constructed of null-terminated tokens.
Or something new and clever is needed to let the macro work done in include/config_distro_bootcmd.h work with a script that requires new variables to begin a new line with no leading whitespace.
Signature · 1 line
Tom
Quoted 9 lines · Tom Rini
Largely, the use of
CONFIG_EXTRA_ENV_SETTINGScan be migrated directly to come fromCONFIG_EXTRA_ENV_TEXT. The biggest case that cannot easily be migrated isdistro_bootcmdsupport. Rather than block migration on this, remove the #error here so that we can being moving forward.Cc Joe Hershberger <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>
For the series, applied to u-boot/next, thanks!
Signature · 1 line
Tom