From 72f7aa47e73e9a93dbfa3e4128c0d8e7932edb50 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Tue, 21 Jul 2026 20:42:44 +0200 Subject: [PATCH] configs/stm32f429_disco_xip: fix boot failure after uClibc bump Since uClibc was bumped to 1.0.58 (c7fef3704c70, "package/uclibc: bump to 1.0.58"), the board fails to boot: sh: out of memory Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 CPU: 0 PID: 1 Comm: init Not tainted 6.1.167 #2 Hardware name: STM32 (Device Tree Support) Function entered at [<0800ea1e>] from [<0800de7b>] Function entered at [<0800de7b>] from [<080e4991>] Function entered at [<080e4991>] from [<080e2d19>] Function entered at [<080e2d19>] from [<080125eb>] Function entered at [<080125eb>] from [<08012b09>] Function entered at [<08012b09>] from [<08012b69>] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]--- The STM32F429 has no MMU, and uClibc's standard malloc() implementation returns NULL for allocations performed during early init on this target, causing init to abort immediately. Fix this by switching to MALLOC_SIMPLE, a plain mmap-based allocator meant for small/noMMU systems, via a uClibc config fragment. The fragment is placed under board/stmicroelectronics/common/stm32f4xx/, rather than under the board-specific directory, so that it can be shared with the STM32F469, another Cortex-M4/noMMU board affected by the same issue, which will be fixed in a subsequent patch. Signed-off-by: Dario Binacchi Signed-off-by: Julien Olivain --- .../stmicroelectronics/common/stm32f4xx/uclibc-fragment.config | 2 ++ configs/stm32f429_disco_xip_defconfig | 1 + 2 files changed, 3 insertions(+) create mode 100644 board/stmicroelectronics/common/stm32f4xx/uclibc-fragment.config diff --git a/board/stmicroelectronics/common/stm32f4xx/uclibc-fragment.config b/board/stmicroelectronics/common/stm32f4xx/uclibc-fragment.config new file mode 100644 index 0000000000..fb8fa9ee01 --- /dev/null +++ b/board/stmicroelectronics/common/stm32f4xx/uclibc-fragment.config @@ -0,0 +1,2 @@ +# MALLOC is not set +MALLOC_SIMPLE=y diff --git a/configs/stm32f429_disco_xip_defconfig b/configs/stm32f429_disco_xip_defconfig index 489303b93e..e6edfa9061 100644 --- a/configs/stm32f429_disco_xip_defconfig +++ b/configs/stm32f429_disco_xip_defconfig @@ -1,6 +1,7 @@ BR2_arm=y BR2_cortex_m4=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y +BR2_UCLIBC_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/common/stm32f4xx/uclibc-fragment.config" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_ENABLE_LTO=y BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f429-disco/patches"