diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-05-21 14:55:50 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-05-21 14:56:33 +0200 |
commit | d4e258f286d748a25a48d323bd1af5865b7ba7c9 (patch) | |
tree | f34c15b3f37451f0a126ab80139d106584b8d069 | |
parent | fc223e3bcdf0c1d26bd26b58e7eea338161b508a (diff) |
u-boot: add patch to increase malloc_f
Otherwise U-Boot freezes before outputting anything.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | recipes-bsp/u-boot-mainline/files/0001-imx-Use-a-convenient-default-value-for-SYS_MALLOC_F_.patch | 42 | ||||
-rw-r--r-- | recipes-bsp/u-boot-mainline/u-boot-common.inc | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot-mainline/files/0001-imx-Use-a-convenient-default-value-for-SYS_MALLOC_F_.patch b/recipes-bsp/u-boot-mainline/files/0001-imx-Use-a-convenient-default-value-for-SYS_MALLOC_F_.patch new file mode 100644 index 0000000..0c7df2a --- /dev/null +++ b/recipes-bsp/u-boot-mainline/files/0001-imx-Use-a-convenient-default-value-for-SYS_MALLOC_F_.patch @@ -0,0 +1,42 @@ +From d15d7403a8f511a1c8b4cd25410f351c46e3b8af Mon Sep 17 00:00:00 2001 +From: Fabio Estevam <festevam@gmail.com> +Date: Fri, 3 May 2019 14:05:04 -0300 +Subject: [PATCH] imx: Use a convenient default value for SYS_MALLOC_F_LEN + +Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to +simple-bus driver") causes some i.MX boards that were converted +to DM, such as warp7, to fail to boot. + +As explained by Lukas Auer: + +"With the patch, U-Boot probes the drivers for devices under simple-bus +device tree nodes in the pre-relocation device model. The default value +of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to +do this, causing it to hang." + +Fix this problem by providing a convenient default value for +CONFIG_SYS_MALLOC_F_LEN. + +Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io> +Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> +Signed-off-by: Fabio Estevam <festevam@gmail.com> +--- + Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Kconfig b/Kconfig +index 7a5491bd67..fd4ff42c17 100644 +--- a/Kconfig ++++ b/Kconfig +@@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN + depends on SYS_MALLOC_F + default 0x1000 if AM33XX + default 0x2800 if SANDBOX ++ default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ ++ ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5) + default 0x400 + help + Before relocation, memory is very limited on many platforms. Still, +-- +2.13.6 + diff --git a/recipes-bsp/u-boot-mainline/u-boot-common.inc b/recipes-bsp/u-boot-mainline/u-boot-common.inc index 44a2382..f6c4dad 100644 --- a/recipes-bsp/u-boot-mainline/u-boot-common.inc +++ b/recipes-bsp/u-boot-mainline/u-boot-common.inc @@ -13,6 +13,7 @@ SRCREV = "b4ee6daad7a2604ca9466b2ba48de86cc27d381f" SRC_URI = "git://git.denx.de/u-boot.git" SRC_URI += " \ + file://0001-imx-Use-a-convenient-default-value-for-SYS_MALLOC_F_.patch \ file://0003-usb-limit-USB_MAX_XFER_BLK-to-256.patch \ file://0004-apalis_imx6-add-device-tree-to-makefile.patch \ file://0005-colibri-imx6ull-fix-usb-host-mode.patch \ |