From 884ba50a078f57df5bf18a1bbc8aa337f5ce404d Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Fri, 6 Aug 2021 06:44:26 +0200 Subject: spl_fit. add hook to make fixes after fit header is loaded add hook function spl_load_simple_fit_fix_load() which is called after fit image header is loaded. Signed-off-by: Heiko Schocher Reviewed-by: Simon Glass --- include/spl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index afbf39bef49..7ddb2abe0fb 100644 --- a/include/spl.h +++ b/include/spl.h @@ -304,6 +304,14 @@ ulong spl_get_image_text_base(void); */ bool spl_load_simple_fit_skip_processing(void); +/** + * spl_load_simple_fit_fix_load() - Hook to make fixes + * after fit image header is loaded + * + * Returns pointer to fit + */ +void *spl_load_simple_fit_fix_load(const void *fit); + /** * spl_load_simple_fit() - Loads a fit image from a device. * @spl_image: Image description to set up -- cgit v1.2.3 From 80c9cb3cb529f06faa21e63682c30833d79c374c Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Sun, 29 Aug 2021 22:39:11 +0300 Subject: imx8mm_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB The BSP platform LmP supports the board NXP iMX8M Mini EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov --- include/configs/imx8mm_evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index a03a7a72ec9..4c8f5627375 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -10,7 +10,7 @@ #include #include -#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) +#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN SZ_512K #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR -- cgit v1.2.3 From 13586e46686bfcbd6a43c12e6bfec589d8db16f8 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Sun, 29 Aug 2021 22:39:12 +0300 Subject: imx8mq_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB The BSP platform LmP supports the board NXP iMX8M Plus EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov --- include/configs/imx8mq_evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index 9b9d6fd6513..f2eb7774767 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -10,7 +10,7 @@ #include #include -#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) +#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) #define CONFIG_SPL_MAX_SIZE (124 * 1024) #define CONFIG_SYS_MONITOR_LEN (512 * 1024) -- cgit v1.2.3 From 32139c25e4402aa7be12b5b6ab928a62734f4781 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Sun, 29 Aug 2021 22:39:13 +0300 Subject: imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov --- include/configs/imx8qm_mek.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h index 152fa6f1c27..803daa45c80 100644 --- a/include/configs/imx8qm_mek.h +++ b/include/configs/imx8qm_mek.h @@ -10,6 +10,8 @@ #include #include +#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) + #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_MAX_SIZE (124 * 1024) #define CONFIG_SYS_MONITOR_LEN (1024 * 1024) -- cgit v1.2.3 From bc959905df4b31c2b9f77e5745e9d10d229a9bfa Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 28 Sep 2021 13:40:52 +0200 Subject: imx: mx7: spl: fix CONFIG_SPL_MAX_SIZE definition The CONFIG_SPL_MAX_SIZE definition did not account for all areas that are used by the boot ROM according to the manual, causing boot failures due to truncated SPL images when actually hitting this limit. Signed-off-by: Matthias Schiffer --- include/configs/imx7_spl.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/configs/imx7_spl.h b/include/configs/imx7_spl.h index 01d1cd83b23..128f612392f 100644 --- a/include/configs/imx7_spl.h +++ b/include/configs/imx7_spl.h @@ -18,15 +18,23 @@ * - Set the stack at the end of the free area section, at 0x00946BB8. * - The BOOT ROM loads what they consider the firmware image * which consists of a 4K header in front of us that contains the IVT, DCD - * and some padding thus 'our' max size is really 0x00946BB8 - 0x00911000. - * 64KB is more then enough for the SPL. + * and some padding. However, the manual also states that the ROM uses the + * OCRAM_EPCD and OCRAM_PXP areas for itself. While the SPL is free to use + * this range for stack and malloc, the SPL itself must fit below 0x920000, + * or the image will be truncated in at least some boot modes like USB SDP. + * Thus our max size is really 0x00920000 - 0x00912000. If necessary, + * CONFIG_SPL_TEXT_BASE could be moved to 0x00911000 to gain 4KB of space + * for the SPL, but 56KB should be more than enough for the SPL. */ -#define CONFIG_SPL_MAX_SIZE 0x10000 +#define CONFIG_SPL_MAX_SIZE 0xE000 #define CONFIG_SPL_STACK 0x00946BB8 /* - * Pad SPL to 68KB (4KB header + 64KB max size). This allows to write the - * SPL/U-Boot combination generated with u-boot-with-spl.imx directly to a - * boot media (given that boot media specific offset is configured properly). + * Pad SPL to 68KB (4KB header + 56KB max size + 8KB extra padding) + * The extra padding could be removed, but this value was used historically + * based on an incorrect CONFIG_SPL_MAX_SIZE definition. + * This allows to write the SPL/U-Boot combination generated with + * u-boot-with-spl.imx directly to a boot media (given that boot media specific + * offset is configured properly). */ #define CONFIG_SPL_PAD_TO 0x11000 -- cgit v1.2.3 From e6f48aad153ae901ca3340b3207968e2f9c47f66 Mon Sep 17 00:00:00 2001 From: Frieder Schrempf Date: Wed, 29 Sep 2021 16:42:41 +0200 Subject: imx: imx6ul: Add support for Kontron Electronics SL/BL i.MX6UL/ULL boards (N63xx/N64xx) This adds support for i.MX6UL/ULL-based evaluation kits with SoMs by Kontron Electronics GmbH. Currently there are the following SoM flavors (SoM-Line): * N6310: SOM with i.MX6UL-2, 256MB RAM, 256MB SPI NAND * N6311: SOM with i.MX6UL-2, 512MB RAM, 512MB SPI NAND * N6411: SOM with i.MX6ULL, 512MB RAM, 512MB SPI NAND And the according evaluation boards (Board-Line): * N6310-S: Baseboard with SOM N6310, eMMC, display (optional), ... * N6311-S: Baseboard with SOM N6311, eMMC, display (optional), ... * N6411-S: Baseboard with SOM N6411, eMMC, display (optional), ... Currently U-Boot describes i.MX6UL and i.MX6ULL through separate config options at compile-time. Though the differences are so minor, that for the scope of these SoMs we just use a single defconfig that is compatible with both SoCs. Signed-off-by: Frieder Schrempf Reviewed-by: Stefano Babic --- include/configs/kontron-sl-mx6ul.h | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 include/configs/kontron-sl-mx6ul.h (limited to 'include') diff --git a/include/configs/kontron-sl-mx6ul.h b/include/configs/kontron-sl-mx6ul.h new file mode 100644 index 00000000000..65aa2508942 --- /dev/null +++ b/include/configs/kontron-sl-mx6ul.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018 Kontron Electronics GmbH + * + * Configuration settings for the Kontron i.MX6UL boards/SoMs. + */ +#ifndef __KONTRON_MX6UL_CONFIG_H +#define __KONTRON_MX6UL_CONFIG_H + +#include +#include + +#include "mx6_common.h" +#ifdef CONFIG_SPL_BUILD +#include "imx6_spl.h" +#endif + +/* RAM */ +#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM + +#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR +#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE + +#define CONFIG_SYS_HZ 1000 + +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE + +/* Board and environment settings */ +#define CONFIG_MXC_UART_BASE UART4_BASE +#define CONFIG_HOSTNAME "kontron-mx6ul" +#define CONFIG_ETHPRIME "eth0" + +#ifdef CONFIG_USB_EHCI_HCD +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#endif + +/* Boot order for distro boot */ +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + func(UBIFS, ubifs, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#include +#else +#define BOOTENV +#endif + +/* MMC Configs */ +#ifdef CONFIG_FSL_USDHC +#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR +#define CONFIG_SYS_FSL_USDHC_NUM 2 +#define CONFIG_SYS_MMC_IMG_LOAD_PART 1 +#endif + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x82000000\0" \ + "ramdisk_addr_r=0x88080000\0" \ + "pxefile_addr_r=0x80100000\0" \ + "scriptaddr=0x80100000\0" \ + "bootdelay=3\0" \ + "ethact=" CONFIG_ETHPRIME "\0" \ + "hostname=" CONFIG_HOSTNAME "\0" \ + BOOTENV + +#endif /* __KONTRON_MX6UL_CONFIG_H */ -- cgit v1.2.3 From d75ebf3482c3feb0f7e11a469f7d2766ca7b099a Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 29 Sep 2021 15:04:20 -0700 Subject: imx: ventana: fix splash logo drawing After mxc_ipuv3 DM_VIDEO conversion showing splash image doesn't work. Fix this by adding new requirements: - splashimage env variable. - CONFIG_SPLASH_SCREEN - CONFIG_CMD_BMP Signed-off-by: Tim Harvey --- include/configs/gw_ventana.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 3f6afc1646f..170d6a7bf0a 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -107,6 +107,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "usb_pgood_delay=2000\0" \ "console=ttymxc1\0" \ "bootdevs=usb mmc sata flash\0" \ -- cgit v1.2.3 From 9cab87f184bc7689fba1c856c3c8af0c7b4566ed Mon Sep 17 00:00:00 2001 From: Frieder Schrempf Date: Wed, 29 Sep 2021 16:42:42 +0200 Subject: imx: imx8mm: Add support for Kontron Electronics SL/BL i.MX8M-Mini boards (N801x) The Kontron SoM-Line i.MX8MM (N801x) by Kontron Electronics GmbH is a SoM module with an i.MX8M-Mini SoC, 1/2/4 GB LPDDR4 RAM, SPI NOR, eMMC and PMIC. The matching evaluation boards (Board-Line) have 2 Ethernets, USB 2.0, HDMI/LVDS, SD card, CAN, RS485 and much more. Signed-off-by: Frieder Schrempf Reviewed-by: Stefano Babic Tested-by: Heiko Thiery --- include/configs/kontron-sl-mx8mm.h | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 include/configs/kontron-sl-mx8mm.h (limited to 'include') diff --git a/include/configs/kontron-sl-mx8mm.h b/include/configs/kontron-sl-mx8mm.h new file mode 100644 index 00000000000..4909b3679d8 --- /dev/null +++ b/include/configs/kontron-sl-mx8mm.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Kontron Electronics GmbH + * + * Configuration settings for the Kontron SL/BL i.MX8M-Mini boards and modules (N81xx). + */ +#ifndef __KONTRON_MX8MM_CONFIG_H +#define __KONTRON_MX8MM_CONFIG_H + +#include +#include + +#ifdef CONFIG_SPL_BUILD +#include +#endif + +/* RAM */ +#define PHYS_SDRAM DDR_CSD1_BASE_ADDR +#define PHYS_SDRAM_SIZE (SZ_4G) +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM + +#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +#define CONFIG_SYS_INIT_RAM_SIZE 0x200000 + +#define CONFIG_SYS_MALLOC_LEN SZ_64M +#define CONFIG_SYS_HZ 1000 + +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +/* Board and environment settings */ +#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR +#define CONFIG_HOSTNAME "kontron-mx8mm" + +#ifdef CONFIG_USB_EHCI_HCD +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#endif + +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) +#include +/* Do not try to probe USB net adapters for net boot */ +#undef BOOTENV_RUN_NET_USB_START +#define BOOTENV_RUN_NET_USB_START +#else +#define BOOTENV +#endif + +#define CONFIG_LOADADDR 0x40480000 +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR +#define CONFIG_SYS_BOOTM_LEN SZ_64M +#define CONFIG_SPL_MAX_SIZE (148 * SZ_1K) +#define CONFIG_FSL_USDHC + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_STACK 0x91fff0 +#define CONFIG_SPL_BSS_START_ADDR 0x910000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K +/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +#define CONFIG_MALLOC_F_ADDR 0x930000 +#endif + +#define FEC_QUIRK_ENET_MAC + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x42000000\0" \ + "fdt_addr_r=0x44000000\0" \ + "ramdisk_addr_r=0x46400000\0" \ + "pxefile_addr_r=0x46000000\0" \ + "scriptaddr=0x46000000\0" \ + "dfu_alt_info=sf 0:0=flash-bin raw 0x400 0x1f0000\0" \ + "bootdelay=3\0" \ + "hostname=" CONFIG_HOSTNAME "\0" \ + BOOTENV + +#endif /* __KONTRON_MX8MM_CONFIG_H */ -- cgit v1.2.3 From 84482e4f4e9100cebd069fb59f44eb92e0eeac83 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 24 Aug 2021 07:58:46 -0300 Subject: smegw01: Pass 'mmcpart' to the kernel command line When using SWUpdate, it is necessary to toggle between partitions. Use the 'mmcpart' environment variable to accomplish that. Signed-off-by: Fabio Estevam --- include/configs/smegw01.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h index cf80801bd84..55ca8019851 100644 --- a/include/configs/smegw01.h +++ b/include/configs/smegw01.h @@ -26,9 +26,8 @@ "bootm_size=0x10000000\0" \ "mmcdev=0\0" \ "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ + "root=/dev/mmcblk0p${mmcpart} rootwait rw\0" \ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ -- cgit v1.2.3 From fa0223a75946ad3aec2596dac34d88f2dcca7baa Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Wed, 8 Sep 2021 21:56:43 +0300 Subject: mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Import HS400 support for iMX7ULP B0 from the Linux kernel: 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET before any setting of STROBE_DLL_CTRL register. USDHC has register bits(bit[27~20] of register STROBE_DLL_CTRL) for slave sel value. If this register bits value is 0, it needs 256 ref_clk cycles to update slave sel value. IC suggest to set bit[27~20] to 0x4, it only need 4 ref_clk cycle to update slave sel value. This will short the lock time of slave. i.MX7ULP B0 will need more time to lock the REF and SLV, so change to add 5us delay. Signed-off-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam Reviewed-by: Jaehoon Chung Reviewed-by: Igor Opaniuk --- include/fsl_esdhc_imx.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h index 45ed635a77b..12e91633826 100644 --- a/include/fsl_esdhc_imx.h +++ b/include/fsl_esdhc_imx.h @@ -194,6 +194,7 @@ #define ESDHC_STROBE_DLL_CTRL_RESET BIT(1) #define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT 0x7 #define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_SHIFT 3 +#define ESDHC_STROBE_DLL_CTRL_SLV_UPDATE_INT_DEFAULT (4 << 20) #define ESDHC_STROBE_DLL_STATUS 0x74 #define ESDHC_STROBE_DLL_STS_REF_LOCK BIT(1) -- cgit v1.2.3 From 4d98af69965aea4060c0352fe2c0e6fdf66fe662 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Thu, 26 Aug 2021 14:04:24 +0300 Subject: board: ea: mx7ulp_com: move setting CONFIG_BOOTCOMMAND to defconfig Move setting CONFIG_BOOTCOMMAND to the mx7ulp_com_defconfig file. It also allows replacing the default CONFIG_BOOTCOMMAND without code modification. Signed-off-by: Ricardo Salveti Signed-off-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam Reviewed-by: Tom Rini --- include/configs/mx7ulp_com.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h index 48172de1d0f..58d48edac43 100644 --- a/include/configs/mx7ulp_com.h +++ b/include/configs/mx7ulp_com.h @@ -60,11 +60,6 @@ "bootz ${loadaddr} - ${fdt_addr}; " \ "fi;\0" \ -#define CONFIG_BOOTCOMMAND \ - "if run loadimage; then " \ - "run mmcboot; " \ - "fi; " \ - #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K -- cgit v1.2.3 From abc6eee0e76f5418f64f8a95878ac2bd6d2b2e69 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 12 Sep 2021 00:40:00 +0200 Subject: ARM: imx: mx5: Add altbootcmd and resets to M53Menlo Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts altbootcmd instead of the default bootcmd boot command. The altbootcmd swaps the default boot partition for the other boot partition, which is an identical copy or an older copy, and tries booting from that one instead. Signed-off-by: Marek Vasut Cc: Stefano Babic --- include/configs/m53menlo.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 5dd5ddac172..375a7588dc5 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -161,6 +161,13 @@ "splashfile=boot/usplash.bmp.gz\0" \ "splashimage=0x88000000\0" \ "splashpos=m,m\0" \ + "altbootcmd=" \ + "if test ${mmcpart} -eq 1 ; then " \ + "setenv mmcpart 2 ; " \ + "else " \ + "setenv mmcpart 1 ; " \ + "fi ; " \ + "boot\0" \ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0" \ "addcons=" \ @@ -175,14 +182,14 @@ "setenv bootargs ${bootargs} ${miscargs}\0" \ "addargs=run addcons addmisc addmtd\0" \ "mmcload=" \ - "mmc rescan ; load mmc ${mmcdev}:${mmcpart} " \ - "${kernel_addr_r} ${bootfile}\0" \ + "mmc rescan || reset ; load mmc ${mmcdev}:${mmcpart} " \ + "${kernel_addr_r} ${bootfile} || reset\0" \ "miscargs=nohlt panic=1\0" \ "mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rw " \ "rootwait\0" \ "mmc_mmc=" \ - "run mmcload mmcargs addargs ; " \ - "bootm ${kernel_addr_r}\0" \ + "run mmcload mmcargs addargs || reset ; " \ + "bootm ${kernel_addr_r} ; reset\0" \ "netload=tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ "net_nfs=" \ "run netload nfsargs addip addargs ; " \ -- cgit v1.2.3 From 0105bda050c89b70d632e2efc76f83b73f0e421a Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 20 Oct 2021 11:55:25 +0200 Subject: kontron-sl-mx8mm: fix missing configs and deadlock in CI Even if board can be successfuly built, CI goes in deadlock (see thread on https://www.mail-archive.com/u-boot@lists.denx.de/msg419663.html). This is caused by SYS_CONFIG set in header file and because defconfig for the board is out of sync with Kconfig. As result, buildman goes on to read from stdin until an OOM is reached. Signed-off-by: Stefano Babic CC: Frieder Schrempf --- include/configs/kontron-sl-mx8mm.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/kontron-sl-mx8mm.h b/include/configs/kontron-sl-mx8mm.h index 4909b3679d8..0d9ab3b7558 100644 --- a/include/configs/kontron-sl-mx8mm.h +++ b/include/configs/kontron-sl-mx8mm.h @@ -22,7 +22,6 @@ #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 #define CONFIG_SYS_INIT_RAM_SIZE 0x200000 -#define CONFIG_SYS_MALLOC_LEN SZ_64M #define CONFIG_SYS_HZ 1000 #define CONFIG_SYS_INIT_SP_OFFSET \ @@ -55,8 +54,6 @@ #define BOOTENV #endif -#define CONFIG_LOADADDR 0x40480000 -#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR #define CONFIG_SYS_BOOTM_LEN SZ_64M #define CONFIG_SPL_MAX_SIZE (148 * SZ_1K) #define CONFIG_FSL_USDHC -- cgit v1.2.3