Since uClibc was bumped to 1.0.58 (c7fef3704c, "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 <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps the Linux kernel to version 6.12.95 and U-Boot to
version 2026.07 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
Tested on STM32MP157C-DK2 Discovery Board.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Bump TF-A LTS LTS version to 2.12 for:
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
Bump the OP-TEE version to 4.9.0 for:
- stm32mp135f_dk_defconfig
Tested on STM32MP135F-DK and STM32MP157C-DK2 boards.
While at it, fix the below U-Boot build error by adding
BR2_TARGET_UBOOT_NEEDS_DTC=y
Adding host-dtc avoid the following build error, when the host has
libyaml:
/usr/bin/ld.bfd: scripts/dtc/yamltree.o: in function `yaml_propval_int':
yamltree.c:(.text+0x130): undefined reference to `yaml_sequence_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x13d): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x19f): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x1ae): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x22d): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x286): undefined reference to `yaml_sequence_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x293): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: scripts/dtc/yamltree.o: in function `yaml_tree':
yamltree.c:(.text+0x380): undefined reference to `yaml_mapping_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x38b): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x417): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x427): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x461): undefined reference to `yaml_sequence_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x46e): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x513): undefined reference to `yaml_sequence_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x520): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x5b0): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x5c0): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x6a7): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x6b4): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x6da): undefined reference to `yaml_mapping_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x6e5): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x74d): undefined reference to `yaml_scalar_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x75d): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: scripts/dtc/yamltree.o: in function `dt_to_yaml':
yamltree.c:(.text+0x8a5): undefined reference to `yaml_emitter_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x8b2): undefined reference to `yaml_emitter_set_output_file'
/usr/bin/ld.bfd: yamltree.c:(.text+0x8bf): undefined reference to `yaml_stream_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x8cc): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x8e5): undefined reference to `yaml_document_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x8f2): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x911): undefined reference to `yaml_sequence_start_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x91e): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x93c): undefined reference to `yaml_sequence_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x949): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x95b): undefined reference to `yaml_document_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x968): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x974): undefined reference to `yaml_stream_end_event_initialize'
/usr/bin/ld.bfd: yamltree.c:(.text+0x981): undefined reference to `yaml_emitter_emit'
/usr/bin/ld.bfd: yamltree.c:(.text+0x98f): undefined reference to `yaml_emitter_delete'
Signed-off-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
[Julien:
- change error log to english locale in commit log
- also add BR2_TARGET_UBOOT_NEEDS_DTC=y in stm32mp157c_dk2_defconfig
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps the Linux kernel to version 6.12.80 and U-Boot to
version 2026.04 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
The removed patches are contained in the new U-Boot version.
Tested on STM32MP157C-DK2 Discovery Board.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Backport upstream patches to fix a silent crash in U-Boot on
STM32MP135F-DK.
Fixes:
799d184e89
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
[Romain: add Fixes link]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Add 'set -eu' to ensure that command failures or unset variables are
properly reported to the 'make' process. This prevents silent failures
during the image generation phase.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps the Linux kernel to version 6.12.63 and U-Boot to
version 2026.01 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
Tested on STM32MP157C-DK2 Discovery Board.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps the Linux kernel to version 6.12.53 and U-Boot to
version 2025.10 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
Tested on STM32MP157C-DK2 Discovery Board.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps the Linux kernel to version 6.12.36 and U-Boot to
version 2025.07 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
The new version of U-Boot with commit [1] enabled OF_UPSTREAM flag for
STM32MP15 platforms. This required properly updating the DEVICE_TREE
parameter to pass to U-Boot in order to successfully complete the build.
Tested on STM32MP157C-DK2 Discovery Board.
[1] 35f90f76f4
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
The patch bumps Arm Trusted Firmware (TF-A) to version 2.10 LTS for
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
the Linux kernel to version 6.12.22 and U-Boot to version 2025.04 for
- stm32mp135f_dk_defconfig
- stm32mp157a_dk1_defconfig
- stm32mp157c_dk2_defconfig
The new version of U-Boot has added EFI Capsule support, which depends on
GnuTLS, thus requiring the activation of BR2_TARGET_UBOOT_NEEDS_GNUTLS
for stm32mp135f_dk_defconfig.
Tested on STM32MP157C-DK2 Discovery Board.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
STM32MP15x and STM32MP13 can use almost of the same configuration
regarding bootloaders and the Linux kernel. To make profit of the
commont folder, rename it to 'stm32mp1xx' and change dependencies
accordingly.
Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
ARM_TRUSTED_FIRMWARE_SITE is currently pointing to the deprecated
ARM-software github read-only mirror[0] which is no longer publishing
new tags. They do have a newer github mirror under the TrustedFirmware-A
organization[1] which continues to receive tag updates we could use
however because of the way github generates tarballs changing the SITE
to point to TrustedFormware-A changes the pre-calculated hash values
for every version for everyone.
Without much way around changing all hash values if we want these latest
tags, lets drop the github mirrors and move to the official git
source[2] so we can download real tarballs which shouldn't change even
if the ARM_TRUSTED_FIRMWARE_SITE moves again and hopefully preventing
this from ever happening again.
[2] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
[1] https://github.com/TrustedFirmware-A/trusted-firmware-a
[0] https://github.com/ARM-software/arm-trusted-firmware
Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Now that the configurations of boards stm32mp157a-dk1 and stm32mp157c-dk2
have the same software versions, it is possible to share the hash files as
well.
The patch uses the hash files for Arm Trusted Firmware, Linux, Linux
headers and U-Boot of stm32mp175a_dk1 also for stm32mp175c_dk2, and then
enables BR2_DOWNLOAD_FORCE_CHECK_HASHES. With this, we can now drop the
defconfig from .checkpackageignore.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
- v2.6 changes to FIP instead of SSBL boot.
- This requires switching to u-boot.bin in U-Boot, and using that
instead of .stm32 in ATF.
- fiptool expects dtb to be split off from u-boot.bin, so need custom
u-boot-nodtb.bin in addition to u-boot.dtb.
Caveat: this is perhaps not really obligatory, but the ATF
documentation explains it like that.
- The partition must be named fip (while it must be named ssbl for
SSBL boot).
- Since the partition name is set in the common template, all
defconfigs using that template must be bumped in a single commit
- ATF now produces both fip.bin and <boardname>.stm32, so fip.bin has
been added to the configs
- While we're at it, add the structuring comments to
avenger96_defconfig similar like the other defconfigs
Signed-off-by: Marleen Vos <marleen.vos@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The regex was a bit too strict in which characters it allowed. Thus,
if e.g. a file name appears in the
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES string, it no
longer matches, and we end up with an empty ATF_VARIABLES. This makes
the subsequent grep fail, and the post-image.sh script fails without
any error message (thanks to the -e option).
Simplify the regex to match everything except the closing quotation
mark. Note that Kconfig doesn't allow quotation marks at all inside a
string (even escaped ones), so this regular expression is always OK.
Signed-off-by: Marleen Vos <marleen.vos@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The post-image.sh script is used in several STM32MP157-based board
configs. It had hardcoded device tree file names for the supported
boards which were used for matching the expected TF-A binary name.
Replace this mechanism with a pair of grep and sed that build the TF-A
binary name from the device tree file name. For example, if
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES contained
DTB_FILE_NAME=stm32mp157c-dk2.dtb, the appropriate TF-A file would be
named tf-a-stm32mp157c-dk2.stm32.
Since the Bash Here Strings are removed with this change, I took the
opportunity to remove the only other non-POSIX command, "local", and
then I was able to change the shebang to plain /bin/sh, with -eu for
simpler error handling.
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Kernel is built without network support. It is useless to compile the
package and then remove it from rootfs.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
The gpt = "true" form is deprecated in genimage, use
partition-table-type = "gpt" instead.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
The stm32mp157 images successfully boot only once. Subsequent boot
attempts fail to reach U-Boot. The root cause turns out to be in U-Boot
corruption during the first boot. The stm32mp1 U-Boot stores its
environment at the end of GPT partition named 'ssbl' since v2020.10-rc2.
However Buildroot genimage template for stm32mp157 boards creates 'ssbl'
partition w/o extra space for U-Boot primary and redundant environments.
This patch explicitly specifies 'ssbl' partition size that should be
enough for both u-boot.stm32 image (~1M) and both environments (16K).
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Tested-by: Pierre-Jean Texier <texier.pj2@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Very similar to the other stm32mp157-based boards, except that we use the
multi_v7 defconfig for ease of maintenance.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit changes the stm32mp1 configurations to use the TF-A ->
U-Boot boot flow (called "trusted boot flow" by ST) instead of the
U-Boot SPL -> U-Boot boot flow. ST recommands this trusted boot, and
it's also the only one that allows to use the STM32 Cube Programmer
for reflashing devices.
As part of this, the genimage configuration file is now generated, as
it contains some file names that depend on the platform. Removing
partition-type from genimage.cfg is mandatory, since it would cause a
hybrid MBR partition table to be created, which itself would prevent
ATF from finding the ssbl parition.
Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Let's clean up "boards/stmicroelectronics" directory a bit
to have everything in particular directories.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>