All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Olivain via buildroot <buildroot@buildroot.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: buildroot@buildroot.org,
	Christophe Priouzeau <christophe.priouzeau@foss.st.com>,
	linux-amarula@amarulasolutions.com
Subject: Re: [Buildroot] [PATCH 1/6] configs/stm32f429_disco_xip: fix boot failure after uClibc bump
Date: Tue, 21 Jul 2026 22:54:55 +0200	[thread overview]
Message-ID: <59d2eac82e3a58e006e67d3ee35f3bf6@free.fr> (raw)
In-Reply-To: <20260721184249.1579381-2-dario.binacchi@amarulasolutions.com>

Hi Dario,

On 21/07/2026 20:42, Dario Binacchi wrote:
> 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.

For info, the issue may have been introduced by uclibc commit:
https://github.com/wbx-github/uclibc-ng/commit/487af14988c3c923aa661f204642597cff356a83

There is an upstream fix, not released yet,  which seems to fix the 
issue:
https://github.com/wbx-github/uclibc-ng/commit/7730f0d05a51cd89a7123bd696e4638c3c035d7b

You could possibly drop this malloc config change after the next uclibc 
bump.

> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

In the meantime, I applied this series to master, thanks.

> ---
>  .../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 000000000000..fb8fa9ee01c3
> --- /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 489303b93e0d..e6edfa906177 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"
> --
> 2.43.0

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-07-21 20:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 18:42 [Buildroot] [PATCH 0/6] configs/stm32f4xx, stm32f769: fix uClibc boot failure and bump Linux/U-Boot Dario Binacchi
2026-07-21 18:42 ` [Buildroot] [PATCH 1/6] configs/stm32f429_disco_xip: fix boot failure after uClibc bump Dario Binacchi
2026-07-21 20:54   ` Julien Olivain via buildroot [this message]
2026-07-24  3:11     ` Waldemar Brodkorb
2026-07-21 18:42 ` [Buildroot] [PATCH 2/6] configs/stm32f469_disco_{sd, xip}: " Dario Binacchi
2026-07-21 18:42 ` [Buildroot] [PATCH 3/6] configs/stm32f769_disco_sd: " Dario Binacchi
2026-07-21 18:42 ` [Buildroot] [PATCH 4/6] configs/stm32f429_disco_xip: bump Linux to 6.1.177 Dario Binacchi
2026-07-21 18:42 ` [Buildroot] [PATCH 5/6] configs/stm32f469_disco_{sd, xip}: bump Linux to 5.15.211 Dario Binacchi
2026-07-21 18:42 ` [Buildroot] [PATCH 6/6] configs/stm32f769_disco_sd: bump Linux to 5.15.211 and U-Boot to 2026.07 Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59d2eac82e3a58e006e67d3ee35f3bf6@free.fr \
    --to=buildroot@buildroot.org \
    --cc=christophe.priouzeau@foss.st.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=ju.o@free.fr \
    --cc=linux-amarula@amarulasolutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.