27 Commits

Author SHA1 Message Date
Dario Binacchi
72f7aa47e7 configs/stm32f429_disco_xip: fix boot failure after uClibc bump
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>
2026-07-21 22:32:07 +02:00
Dario Binacchi
ec402e6c8e configs/stm32mp1*_dk*: bump Linux to 6.12.95 and U-Boot to 2026.07
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>
2026-07-12 13:25:53 +02:00
Raphaël Gallais-Pou
fe8221fb4e configs/stm32mp1*_dk*: bump OP-TEE to 4.9.0 and TF-A to LTS 2.12
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>
2026-07-12 12:59:16 +02:00
Dario Binacchi
c6d24b6170 configs/stm32mp1*_dk*: bump Linux to 6.12.80 and U-Boot to 2026.04
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>
2026-04-07 19:32:16 +02:00
Thomas Richard
5af624386e board/stmicroelectronics/stm32mp135f-dk: fix silent crash in U-Boot
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>
2026-03-13 22:47:33 +01:00
Dario Binacchi
3c8ecc05c6 board/stmicroelectronics/stm32f4xx: exit post-build.sh on error
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>
2026-01-25 21:57:57 +01:00
Dario Binacchi
799d184e89 configs/stm32mp1*_dk*: bump Linux to 6.12.63 and U-Boot to 2026.01
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>
2026-01-08 19:02:28 +01:00
Dario Binacchi
4552ed40bc configs/stm32mp1*_dk*: bump Linux to 6.12.53 and U-Boot to 2025.10
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>
2025-10-19 18:35:25 +02:00
Dario Binacchi
7a9f1744ac configs/stm32mp1*_dk*: bump Linux to 6.12.36 and U-Boot to 2025.07
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>
2025-08-25 23:04:36 +02:00
Dario Binacchi
4e125357dd configs/stm32mp1*_dk*: bump TF-A to 2.10, Linux to 6.12.22 and U-Boot to 2025.04
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>
2025-04-19 18:36:02 +02:00
Dario Binacchi
038826aad6 configs/stm32mp135f_dk: fix optee hash
The build command:

make stm32mp135f_dk_defconfig

fails with the errors:

ERROR: No hash found for optee-client-4.3.0.tar.gz
ERROR: No hash found for optee-os-4.3.0.tar.gz

Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/9690369624

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>
2025-04-19 18:34:53 +02:00
Dario Binacchi
6648d7046d board/stmicroelectronics/common/stm32mp157: restore linux hash
The commit 9802fa0b5b ("configs/stm32mp135f-dk: new defconfig") removed
the hash for the stm32mp157a_dk1 and stm32mp157c_dk2 configurations,
breaking the build. The patch restores this value.

Fixes: 9802fa0b5b ("configs/stm32mp135f-dk: new defconfig")
https://gitlab.com/buildroot.org/buildroot/-/jobs/9054933048 (stm32mp157a_dk1_defconfig)
https://gitlab.com/buildroot.org/buildroot/-/jobs/9054933050 (stm32mp157c_dk2_defconfig)

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
[Romain: add gitlab-ci links]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-02-12 23:54:57 +01:00
Raphael Gallais-Pou
9802fa0b5b configs/stm32mp135f-dk: new defconfig
Add new defconfig for STMicroelectronics board STM32MP135F-DK.

STM32MP135F-DK features can be found here:
  https://www.st.com/en/evaluation-tools/stm32mp135f-dk.html

Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-03 14:22:00 +01:00
Raphael Gallais-Pou
f21db2bd83 board/stmicroelectronics/common/stm32mp157: rename folder
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>
2024-08-15 09:48:56 +02:00
Bryan Brattlof
e1aacc3049 boot/arm-trusted-firmware: move to official source for tf-a
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>
2024-08-07 23:10:17 +02:00
Dario Binacchi
487416dfe5 configs/stm32mp157c_dk2: add hashes
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>
2024-07-14 17:06:51 +02:00
Marleen Vos
404a0b6a2a configs/stm32mp157*: bump ATF to v2.6
- 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>
2024-02-06 14:19:42 +01:00
Marleen Vos
e3debd9083 board/stmicroelectronics: generalise BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES regex
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>
2024-02-06 14:19:10 +01:00
Grzegorz Szymaszek
b8c492068b board/stm32mp157: remove hardcoded device tree names from post-image.sh
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>
2023-09-30 21:15:45 +02:00
Dario Binacchi
f187fad22d configs/stm32f4xx_defconfig: off network utils from busybox
Kernel is built without network support, so network utils are useless.
This has a positive impact on the size of busybox and xipImage, making
them smaller.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiegineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-28 23:00:38 +02:00
Dario Binacchi
58e7ac21b1 configs/stm32f4xx_defconfig: remove BR2_PACKAGE_IFUPDOWN_SCRIPTS
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>
2023-05-13 19:58:22 +02:00
Thomas Petazzoni
97fc9b2a7f board/*/genimage.cfg: use partition-table-type = "gpt"
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>
2022-07-23 15:36:21 +02:00
Sergey Matyukevich
3e70251d36 board/stmicroelectronics/common/stm32mp157: fix U-Boot corruption on the first boot
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>
2021-07-15 21:59:15 +02:00
Peter Korsgaard
2107f7a75b configs/avenger96_defconfig: add support for Arrow Avenger96 board
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>
2021-02-08 16:25:00 +01:00
Shlomi Vaknin
4d15114713 configs/stm32mp157*: switch to use TF-A based configurations
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>
2020-10-13 23:04:03 +02:00
Bartosz Bilas
092b112f48 board/stmicroelectronics/stm32f4xx: move post-build script into common directory
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>
2020-03-21 15:27:17 +01:00
Bartosz Bilas
7f82e0933a configs/stm32mp157: use common genimage config file for stm32mp157 boards
It will be useful for the upcoming introducing stm32mp157a dk2 board.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-03-21 15:27:17 +01:00