This patch-series includes updates for Toradex modules:
cover This patch-series includes updates for Toradex modules:
1. Environment clean-up (dropping legacy emmcboot, sdboot wrappers)
2. Boot count support for multiple modules
3. Distro Boot fixes
Igor Opaniuk (6):
apalis-tk1: enable distroboot
apalis-tk1: fix setting fdtfile value
toradex: imx: enable BOOTCOUNT feature
apalis_imx6: boot env configuration updates
colibri_imx7: boot env configuration updates
colibri_imx6: boot env configuration updates
Marcel Ziswiler (1):
apalis-imx8: enable of_system_setup
Max Krummenacher (3):
apalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL
colibri_vf_defconfig: enable part cmd configs/colibri_vf.h: drop sdboot in favour of distro_bootcmd
Oleksandr Suvorov (1):
colibri-imx8x: declare consoleargs
Stefan Agner (2):
colibri_imx7: add addresses required for distro boot colibri-imx6ull/imx7: define bootubipart for distro boot
configs/apalis-imx8qm_defconfig | 2 ++ configs/apalis-tk1_defconfig | 2 +- configs/apalis_imx6_defconfig | 3 +++ configs/colibri-imx6ull_defconfig | 3 +++ configs/colibri-imx8qxp_defconfig | 1 + configs/colibri_imx6_defconfig | 3 +++ configs/colibri_imx7_defconfig | 3 +++ configs/colibri_imx7_emmc_defconfig | 3 +++ configs/colibri_vf_defconfig | 3 +-- include/configs/apalis-tk1.h | 51 ++++++++++--------------------------- include/configs/apalis_imx6.h | 29 +-------------------- include/configs/colibri-imx6ull.h | 1 + include/configs/colibri-imx8x.h | 8 +++--- include/configs/colibri_imx6.h | 29 +-------------------- include/configs/colibri_imx7.h | 28 +++----------------- include/configs/colibri_vf.h | 18 +------------ 16 files changed, 46 insertions(+), 141 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/13 apalis-imx8: enable of_system_setup
From: Marcel Ziswiler <[email protected]>
Enable CONFIG_OF_SYSTEM_DEFAULT for Apalis iMX8.
---
configs/apalis-imx8qm_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/apalis-imx8qm_defconfig +1 -0
@@ -9,6 +9,7 @@ CONFIG_TARGET_APALIS_IMX8=y CONFIG_NR_DRAM_BANKS=3 CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg" CONFIG_LOG=y CONFIG_VERSION_VARIABLE=y
Signature · 1 line
2.7.4
PATCH 1/13 apalis-imx8: enable of_system_setup
Quoted 3 lines
From: Marcel Ziswiler <[email protected]> Enable
CONFIG_OF_SYSTEM_DEFAULTfor Apalis iMX8.Signed-off-by Marcel Ziswiler <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/13 apalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL
In reply to Igor OpaniukFrom: Max Krummenacher <[email protected]>
This got dropped by a global 'make savedefconfig' resync as required patches are still in flight.
---
configs/apalis-imx8qm_defconfig | 1 + configs/colibri-imx8qxp_defconfig | 1 + 2 files changed, 2 insertions(+)
configs/apalis-imx8qm_defconfig +1 -0
@@ -62,4 +62,5 @@ CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_DM_THERMAL=y +CONFIG_IMX_SCU_THERMAL=y # CONFIG_EFI_LOADER is not set
configs/colibri-imx8qxp_defconfig +1 -0
@@ -59,4 +59,5 @@ CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_DM_THERMAL=y +CONFIG_IMX_SCU_THERMAL=y # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.7.4
PATCH 2/13 apalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL
Quoted 4 lines
From: Max Krummenacher <[email protected]> This got dropped by a global 'make savedefconfig' resync as required patches are still in flight.
Signed-off-by Max Krummenacher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/13 colibri-imx8x: declare consoleargs
In reply to Igor OpaniukFrom: Oleksandr Suvorov <[email protected]>
Store all console-related kernel parameters
in dedicated variable.
---
include/configs/colibri-imx8x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/configs/colibri-imx8x.h +4 -4
@@ -62,7 +62,7 @@#define BOOTENV_RUN_NET_USB_START ""#define CONFIG_MFG_ENV_SETTINGS \ - "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ + "mfgtool_args=setenv bootargs ${consoleargs} " \ "rdinit=/linuxrc g_mass_storage.stall=0 " \ "g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F " \ "g_mass_storage.idProduct=0x37FF " \
@@ -81,7 +81,7 @@M4_BOOT_ENV \ MEM_LAYOUT_ENV_SETTINGS \"boot_file=Image\0" \ -"console=ttyLP3 earlycon\0" \ +"consoleargs=console=ttyLP3,${baudrate} earlycon\0" \"fdt_addr=0x83000000\0" \"fdt_file=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \"fdtfile=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \
@@ -89,11 +89,11 @@"image=Image\0" \"initrd_addr=0x83800000\0" \"initrd_high=0xffffffffffffffff\0" \ -"mmcargs=setenv bootargs console=${console},${baudrate} " \ +"mmcargs=setenv bootargs ${consoleargs} " \"root=PARTUUID=${uuid} rootwait " \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ -"netargs=setenv bootargs console=${console},${baudrate} " \ +"netargs=setenv bootargs ${consoleargs} " \"root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp " \"${vidargs}\0" \"nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr} " \
Signature · 1 line
2.7.4
PATCH 3/13 colibri-imx8x: declare consoleargs
Quoted 4 lines
From: Oleksandr Suvorov <[email protected]> Store all console-related kernel parameters
in dedicated variable.Signed-off-by Oleksandr Suvorov <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 4/13 colibri_imx7: add addresses required for distro boot
In reply to Igor OpaniukFrom: Stefan Agner <[email protected]>
Define addresses required for full distro boot support.
---
include/configs/colibri_imx7.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/colibri_imx7.h +2 -1
@@ -109,8 +109,9 @@"bootm_size=0x10000000\0" \"fdt_addr_r=0x82000000\0" \"kernel_addr_r=0x81000000\0" \ +"pxefile_addr_r=0x87100000\0" \"ramdisk_addr_r=0x82100000\0" \ -"scriptaddr=0x82500000\0" +"scriptaddr=0x87000000\0" #define NFS_BOOTCMD \"nfsargs=ip=:::::eth0: root=/dev/nfs\0" \
Signature · 1 line
2.7.4
PATCH 4/13 colibri_imx7: add addresses required for distro boot
Quoted 3 lines
From: Stefan Agner <[email protected]> Define addresses required for full distro boot support.
Signed-off-by Stefan Agner <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/13 colibri-imx6ull/imx7: define bootubipart for distro boot
In reply to Igor OpaniukFrom: Stefan Agner <[email protected]>
When using distro boot to boot from UBI volumes the boot partition has been hardcoded to "UBI" (capital letters). However, our default MTD layout uses "ubi" (lower case letter). Define "ubi" as the default UBI partition for distro boot for Toradex. This allows to use distro boot without having to redefine the MTD partition layout which is useful for TorizonCore.
---
include/configs/colibri-imx6ull.h | 1 + include/configs/colibri_imx7.h | 1 + 2 files changed, 2 insertions(+)
include/configs/colibri-imx6ull.h +1 -0
@@ -88,6 +88,7 @@NFS_BOOTCMD \ UBI_BOOTCMD \UBOOT_UPDATE \ +"bootubipart=ubi\0" \"console=ttymxc0\0" \"defargs=user_debug=30\0" \"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \
include/configs/colibri_imx7.h +1 -0
@@ -169,6 +169,7 @@MODULE_EXTRA_ENV_SETTINGS \ UBOOT_UPDATE \"boot_file=zImage\0" \ +"bootubipart=ubi\0" \"console=ttymxc0\0" \"defargs=\0" \"fdt_board=eval-v3\0" \
Signature · 1 line
2.7.4
PATCH 5/13 colibri-imx6ull/imx7: define bootubipart for distro boot
Quoted 8 lines
From: Stefan Agner <[email protected]>
When using distro boot to boot from UBI volumes the boot partition has been hardcoded to "UBI" (capital letters). However, our default MTD layout uses "ubi" (lower case letter). Define "ubi" as the default UBI partition for distro boot for Toradex. This allows to use distro boot without having to redefine the MTD partition layout which is useful for TorizonCore.Signed-off-by Stefan Agner <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 6/13 colibri_vf_defconfig: enable part cmd
In reply to Igor OpaniukFrom: Max Krummenacher <[email protected]>
This allows to boot from SD/USB with passing the rootfs partition via UUID.
---
configs/colibri_vf_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
configs/colibri_vf_defconfig +1 -2
@@ -18,8 +18,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y -# CONFIG_CMDLINE_EDITING is not set -# CONFIG_AUTO_COMPLETE is not set # CONFIG_SYS_LONGHELP is not set CONFIG_SYS_PROMPT="Colibri VFxx # " # CONFIG_CMD_BOOTD is not set
@@ -39,6 +37,7 @@ CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set
Signature · 1 line
2.7.4
PATCH 6/13 colibri_vf_defconfig: enable part cmd
Quoted 3 lines
From: Max Krummenacher <[email protected]>
This allows to boot from SD/USB with passing the rootfs partition via UUID.Signed-off-by Max Krummenacher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 7/13 configs/colibri_vf.h: drop sdboot in favour of distro_bootcmd
In reply to Igor OpaniukFrom: Max Krummenacher <[email protected]>
The distro bootscript uses kernel_image to get the file name of the kernel, so change that variable name.
UBI boot has precedence in the default boot command. If one wants to boot from SD with a working NAND installation stop in U-Boot and enter:
setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd
---
include/configs/colibri_vf.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)
include/configs/colibri_vf.h +1 -17
@@ -69,21 +69,6 @@"tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define SD_BOOTCMD \ - "set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \ - "sdboot=run setup; run sdfinduuid; run set_sdargs; " \ - "setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ - "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ - "load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \ - "load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " \ - "${soc}-colibri-${fdt_board}.dtb && " \ - "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ - "sdbootpart=1\0" \ - "sddev=0\0" \ - "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \ - "sdrootpart=2\0" - - #define UBI_BOOTCMD \"ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \"ubi.fm_autoconvert=1\0" \
@@ -112,7 +97,6 @@BOOTENV \ MEM_LAYOUT_ENV_SETTINGS \NFS_BOOTCMD \ - SD_BOOTCMD \ UBI_BOOTCMD \UBOOT_UPDATE \"console=ttyLP0\0" \
@@ -120,7 +104,7 @@"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \"fdt_fixup=;\0" \ -"kernel_file=zImage\0" \ +"kernel_image=zImage\0" \"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"setsdupdate=mmc rescan && set interface mmc && " \"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \
Signature · 1 line
2.7.4
PATCH 7/13 configs/colibri_vf.h: drop sdboot in favour of distro_bootcmd
Quoted 8 lines
From: Max Krummenacher <[email protected]>
The distro bootscript useskernel_imageto get the file name of the kernel, so change that variable name.
UBI boot has precedence in the default boot command. If one wants to boot from SD with a working NAND installation stop in U-Boot and enter:
setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && rundistro_bootcmdSigned-off-by Max Krummenacher <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 8/13 apalis-tk1: enable distroboot
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
1. Use distro_bootcmd as default boot command instead of legacy emmcboot wrapper.
2. Drop emmcboot and sdboot wrappers.
3. Provide proper boot order for Distro Boot.
---
configs/apalis-tk1_defconfig | 2 +- include/configs/apalis-tk1.h | 51 ++++++++++++-------------------------------- 2 files changed, 15 insertions(+), 38 deletions(-)
configs/apalis-tk1_defconfig +1 -1
@@ -11,7 +11,7 @@ CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=1 -CONFIG_BOOTCOMMAND="run emmcboot; setenv fdtfile ${soc}-${fdt-module}-${fdt_board}.dtb && run distro_bootcmd" +CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt-module}-${fdt_board}.dtb && run distro_bootcmd" CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_VERSION_VARIABLE=y
include/configs/apalis-tk1.h +14 -37
79 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 8/13 apalis-tk1: enable distroboot
Quoted 6 lines
From: Igor Opaniuk <[email protected]>
1. Usedistro_bootcmdas default boot command instead of legacy emmcboot wrapper.
2. Drop emmcboot and sdboot wrappers.
3. Provide proper boot order for Distro Boot.Signed-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 9/13 apalis-tk1: fix setting fdtfile value
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
s/fdt-module/fdt_module/g, as we don't use dash in fdt_file anymore.
---
configs/apalis-tk1_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/apalis-tk1_defconfig +1 -1
@@ -11,7 +11,7 @@ CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=1 -CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt-module}-${fdt_board}.dtb && run distro_bootcmd" +CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt_module}-${fdt_board}.dtb && run distro_bootcmd" CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_VERSION_VARIABLE=y
Signature · 1 line
2.7.4
PATCH 9/13 apalis-tk1: fix setting fdtfile value
Quoted 4 lines
From: Igor Opaniuk <[email protected]> s/fdt-module/fdt_module/g, as we don't use dash in
fdt_fileanymore.Fixes 4c63a601("apalis-tk1: support v1.2 hardware revision")Signed-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 10/13 toradex: imx: enable BOOTCOUNT feature
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
This introduces automatic boot counter that increases after every reset.After a power-on reset, it will be initialized with 1, and each reboot will increment the value by 1. By default it's disabled if bootlimit isn't set.
To enable this feature you have set bootcount limit ("bootlimit"), alternate boot action ("altbootcmd") that will be performed if the new value of bootcount exceeds the value of bootlimit, and "upgrade_available" to let U-Boot automatically increase and save the counter value after every reset:
Quoted 3 lines
setenv bootlimit 5
setenvupgrade_available1
setenv altbootcmd "bootm ..."
In case the bootlimit exceeds, the message will be shown and albootcmd executed:
Warning: Bootlimit (5) exceeded. Using altbootcmd.
To reset bootcount run:
Quoted 1 line
bootcount reset
Print current value:
Quoted 1 line
bootcount print
---
configs/apalis_imx6_defconfig | 3 +++ configs/colibri-imx6ull_defconfig | 3 +++ configs/colibri_imx6_defconfig | 3 +++ configs/colibri_imx7_defconfig | 3 +++ configs/colibri_imx7_emmc_defconfig | 3 +++ 5 files changed, 15 insertions(+)
configs/apalis_imx6_defconfig +3 -0
@@ -53,6 +53,7 @@ CONFIG_CMD_USB_SDP=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_NFS is not set CONFIG_CMD_BMP=y +CONFIG_CMD_BOOTCOUNT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_PMIC=y
@@ -65,6 +66,8 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=4096 CONFIG_DWC_AHSATA=y +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_DM_I2C=y CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_BOOT=y
configs/colibri-imx6ull_defconfig +3 -0
@@ -40,6 +40,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_USB_SDP=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_BMP=y +CONFIG_CMD_BOOTCOUNT=y CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_MTDPARTS=y
@@ -54,6 +55,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_DFU_NAND=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MXC=y
configs/colibri_imx6_defconfig +3 -0
@@ -52,6 +52,7 @@ CONFIG_CMD_USB_SDP=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_NFS is not set CONFIG_CMD_BMP=y +CONFIG_CMD_BOOTCOUNT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y
@@ -64,6 +65,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_DM_I2C=y CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_BOOT=y
configs/colibri_imx7_defconfig +3 -0
@@ -40,6 +40,7 @@ CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_BOOTP_PXE is not set CONFIG_CMD_BMP=y +CONFIG_CMD_BOOTCOUNT=y CONFIG_CMD_CACHE=y # CONFIG_CMD_HASH is not set CONFIG_CMD_MTDPARTS=y
@@ -54,6 +55,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_FSL_CAAM=y CONFIG_DFU_NAND=y CONFIG_DM_I2C=y
configs/colibri_imx7_emmc_defconfig +3 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_BMP=y +CONFIG_CMD_BOOTCOUNT=y CONFIG_CMD_CACHE=y # CONFIG_CMD_HASH is not set # CONFIG_ISO_PARTITION is not set
@@ -48,6 +49,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_FSL_CAAM=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x82000000
Signature · 1 line
2.7.4
PATCH 10/13 toradex: imx: enable BOOTCOUNT feature
Quoted 13 lines
From: Igor Opaniuk <[email protected]>
This introduces automatic boot counter that increases after every reset.After a power-on reset, it will be initialized with 1, and each reboot will increment the value by 1. By default it's disabled if bootlimit isn't set.
To enable this feature you have set bootcount limit ("bootlimit"), alternate boot action ("altbootcmd") that will be performed if the new value of bootcount exceeds the value of bootlimit, and "upgrade_available" to let U-Boot automatically increase and save the counter value after every reset:Quoted 3 lines
setenv bootlimit 5
setenvupgrade_available1
setenv altbootcmd "bootm ..."
Quoted 8 lines
In case the bootlimit exceeds, the message will be shown and albootcmd executed:
Warning: Bootlimit (5) exceeded. Using altbootcmd. To reset bootcount run:Quoted 1 line
bootcount reset
Print current value:
Quoted 1 line
bootcount print
Signed-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 11/13 apalis_imx6: boot env configuration updates
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines
---
include/configs/apalis_imx6.h | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-)
include/configs/apalis_imx6.h +1 -28
@@ -93,9 +93,9 @@#ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES (func) \ - func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ func(MMC, mmc, 2) \ + func(MMC, mmc, 0) \ func(USB, usb, 0) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
@@ -105,14 +105,6 @@#define BOOTENV #endif /* CONFIG_SPL_BUILD */ -#define DFU_ALT_EMMC_INFO \ - "u-boot.imx raw 0x2 0x3ff mmcpart 0;" \ - "boot part 0 1;" \ - "rootfs part 0 2;" \ - "zImage fat 0 1;" \ - "imx6q-apalis-eval.dtb fat 0 1;" \ - "imx6q-apalis-cam-eval.dtb fat 0 1" -#define UBOOT_UPDATE \ "uboot_hwpart=1\0" \ "uboot_blk=8a\0" \
@@ -124,23 +116,6 @@"update_spl=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \"mmc write ${loadaddr} ${uboot_spl_blk} ${blkcnt}\0" -#define EMMC_BOOTCMD \ - "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} " \ - "ro,noatime rootfstype=ext4 rootwait\0" \ - "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \ - "setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \ - "${vidargs}; echo Booting from internal eMMC chip...; " \ - "run emmcdtbload; load mmc ${emmcdev}:${emmcbootpart} " \ - "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \ - "bootz ${kernel_addr_r} ${dtbparam}\0" \ - "emmcbootpart=1\0" \ - "emmcdev=0\0" \ - "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \ - "${fdt_addr_r} ${fdt_file} && " \ - "setenv dtbparam \" - ${fdt_addr_r}\" && true\0" \ - "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \ - "emmcrootpart=2\0" - #define MEM_LAYOUT_ENV_SETTINGS \"bootm_size=0x20000000\0" \"fdt_addr_r=0x12100000\0" \
@@ -173,8 +148,6 @@"boot_file=zImage\0" \"console=ttymxc0\0" \"defargs=enable_wait_mode=off vmalloc=400M\0" \ -"dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \ -EMMC_BOOTCMD \"fdt_file=" FDT_FILE "\0" \"fdt_fixup=;\0" \MEM_LAYOUT_ENV_SETTINGS \
Signature · 1 line
2.7.4
PATCH 11/13 apalis_imx6: boot env configuration updates
Quoted 5 lines
From: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU definesSigned-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 12/13 colibri_imx7: boot env configuration updates
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines
---
include/configs/colibri_imx7.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-)
include/configs/colibri_imx7.h +1 -23
@@ -88,23 +88,6 @@"mmc read ${android_fdt_addr} ${env_start} ${env_size}; " \"bootm ${loadaddr} ${loadaddr} ${android_fdt_addr}\0 " -#define EMMC_BOOTCMD \ - "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} ro " \ - "rootfstype=ext4 rootwait\0" \ - "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \ - "setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \ - "${vidargs}; echo Booting from internal eMMC chip...; " \ - "run m4boot && " \ - "load mmc ${emmcdev}:${emmcbootpart} ${fdt_addr_r} " \ - "${soc}-colibri-emmc-${fdt_board}.dtb && " \ - "load mmc ${emmcdev}:${emmcbootpart} ${kernel_addr_r} " \ - "${boot_file} && run fdt_fixup && " \ - "bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ - "emmcbootpart=1\0" \ - "emmcdev=0\0" \ - "emmcfinduuid=part uuid mmc ${emmcdev}:${emmcrootpart} uuid\0" \ - "emmcrootpart=2\0" - #define MEM_LAYOUT_ENV_SETTINGS \"bootm_size=0x10000000\0" \"fdt_addr_r=0x82000000\0" \
@@ -144,7 +127,6 @@ "setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb && run distro_bootcmd;"#define MODULE_EXTRA_ENV_SETTINGS \ "variant=-emmc\0" \ - EMMC_BOOTCMD \ EMMC_ANDROID_BOOTCMD#endif
@@ -155,8 +137,8 @@ func(DHCP, dhcp, na)#elif defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC )#define BOOT_TARGET_DEVICES (func) \ - func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ func(USB, usb, 0) \ func(DHCP, dhcp, na)#endif
@@ -239,10 +221,6 @@#define CONFIG_USBD_HS -/* USB Device Firmware Update support */ -#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M -#define DFU_DEFAULT_POLL_TIMEOUT 300 -#if defined(CONFIG_VIDEO ) || defined(CONFIG_DM_VIDEO )#define CONFIG_VIDEO_MXS #define CONFIG_VIDEO_LOGO
Signature · 1 line
2.7.4
PATCH 12/13 colibri_imx7: boot env configuration updates
Quoted 5 lines
From: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU definesSigned-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 13/13 colibri_imx6: boot env configuration updates
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines
---
include/configs/colibri_imx6.h | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-)
include/configs/colibri_imx6.h +1 -28
@@ -83,6 +83,7 @@#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ func(USB, usb, 0) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
@@ -92,14 +93,6 @@#define BOOTENV #endif /* CONFIG_SPL_BUILD */ -#define DFU_ALT_EMMC_INFO \ - "u-boot.imx raw 0x2 0x3ff mmcpart 0;" \ - "boot part 0 1;" \ - "rootfs part 0 2;" \ - "zImage fat 0 1;" \ - "imx6dl-colibri-eval-v3.dtb fat 0 1;" \ - "imx6dl-colibri-cam-eval-v3.dtb fat 0 1" -#define UBOOT_UPDATE \ "uboot_hwpart=1\0" \ "uboot_blk=8a\0" \
@@ -111,24 +104,6 @@"update_spl=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \"mmc write ${loadaddr} ${uboot_spl_blk} ${blkcnt}\0" -#define EMMC_BOOTCMD \ - "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} "\ - "rw,noatime rootfstype=ext4 " \ - "rootwait\0" \ - "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \ - "setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \ - "${vidargs}; echo Booting from internal eMMC chip...; " \ - "run emmcdtbload; load mmc ${emmcdev}:${emmcbootpart} " \ - "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \ - "bootz ${kernel_addr_r} ${dtbparam}\0" \ - "emmcbootpart=1\0" \ - "emmcdev=0\0" \ - "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \ - "${fdt_addr_r} ${fdt_file} && " \ - "setenv dtbparam \" - ${fdt_addr_r}\" && true\0" \ - "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \ - "emmcrootpart=2\0" - #define MEM_LAYOUT_ENV_SETTINGS \"bootm_size=0x10000000\0" \"fdt_addr_r=0x12100000\0" \
@@ -156,8 +131,6 @@"boot_file=zImage\0" \"console=ttymxc0\0" \"defargs=enable_wait_mode=off galcore.contiguousSize=50331648\0" \ -"dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \ -EMMC_BOOTCMD \"fdt_file=" FDT_FILE "\0" \"fdt_fixup=;\0" \MEM_LAYOUT_ENV_SETTINGS \
Signature · 1 line
2.7.4
PATCH 13/13 colibri_imx6: boot env configuration updates
Quoted 5 lines
From: Igor Opaniuk <[email protected]>
1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU definesSigned-off-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================