Commit Graph

1035 Commits

Author SHA1 Message Date
Neal Frager
fdfd0486c5 boot/xilinx-prebuilt: add support for plmfw.elf filename
AMD / Xilinx has made the decision to change the name of plm.elf to plmfw.elf
in the prebuilt binaries repo starting with the next update.

This patch updates the xilinx-prebuilt package to support either the old
plm.elf filename or the new plmfw.elf filename.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 6f435187c6)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-09-30 11:05:16 +02:00
Neal Frager
151a96a20f boot/xilinx-prebuilt: only allow binaries for device family
Add an architecture cpu dependency to each family to make sure that users can
only install prebuilt firmware which is applicable to their target device
family.

The versal family is based on BR2_cortex_a72.

The kria and zynqmp families are based on BR2_cortex_a53.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 92f76f6c35)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-09-30 11:05:07 +02:00
Neal Frager
f924ba6ad1 boot/xilinx-embeddedsw: only allow apps for device family
Add an architecture cpu dependency to each application to make sure that users
can only build applications which are applicable to their target device
family.

The versal_plm and versal_psmfw applications are specific to versal devices
which are based on BR2_cortex_a72.

The zynqmp_pmufw application is specific to zynqmp devices which are based on
BR2_cortex_a53.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 9e25bcfdab)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-09-30 11:04:54 +02:00
Julien Olivain
25158caa94 boot/boot-wrapper-aarch64: add hash file
Since boot-wrapper-aarch64 introduction in commit [1]
"boot-wrapper-aarch64: new package", the package never received a hash
file. This commit adds it, including the source archive and license
hashes.

[1] 7689b72e00

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 4b14018a38)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-09-25 22:07:11 +02:00
Julien Olivain
eb0777987a boot/boot-wrapper-aarch64/Config.in: switch homepage URL to https
Buildroot commit [1] ("package: replace git:// URLs with https://
URLs where possible") switched _SITE URL from git to https, but did
not updated the package homepage in Config.in.

This commit updates it to match the package _SITE URL.

[1] 6626bf7c5f

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit afff65c340)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-09-25 22:07:10 +02:00
Bryan Brattlof
49fd8ba6f3 boot/ti-k3-boot-firmware: switch to github mirror
The git.ti.com cgit server continues to be plagued with reliability
issues which are reportedly from heavy bot traffic. To combat this the
system administrators have removed the archived downloads feature from
this server.

Switch to TI's Github mirror so new downloads continue to be possible.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit ebf0131e3e)
[thomas: adapt hash to 09.02.00 version]
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-09-18 10:17:30 +02:00
Thomas Petazzoni
6243ccd337 boot/grub2: add patches to fix numerous CVEs
This patch brings the entire stack of Debian patches on grub2 titled
"cve-2025-jan" and available at:

  https://salsa.debian.org/grub-team/grub/-/tree/debian/2.12-9/debian/patches/cve-2025-jan?ref_type=tags

As of this exact Debian grub2 version 2.12-9. Some minor conflicts had
to be fixed. All patches are in upstream Grub master, but mixed with
hundreds of other changes, which is why Debian's effort to backport
them has been leveraged here.

In addition to those patches, 2 extra patches are added:

 0073-net-drivers-ieee1275-ofnet-Add-missing-grub_malloc.patch
 0074-Constant-time-grub_crypto_memcmp.patch

The first one fixes an issue in one of the earlier patches. The fix is
not in Debian, but is in upstream Grub.

The second one fixes another CVE, not fixed in Debian, but fixed in
OpenSUSE. This fix is not upstream as upstream has decided to move to
libgcrypt instead to avoid the problem, but that's a fairly large
change.

Overall, this patch fixes all CVEs currently reported by pkg-stats
against our grub2 package, namely:

CVE-2024-45777
CVE-2024-45778
CVE-2024-45779
CVE-2024-45780
CVE-2024-45782
CVE-2024-56737
CVE-2024-56738
CVE-2025-0678
CVE-2025-0684
CVE-2025-0685
CVE-2025-0686
CVE-2025-0689
CVE-2025-1125

With the previous fixes on runtime tests added (to use glibc
toolchains to build grub2 tests), this commit successfully passes all
tests:

- The ISO9660 tests that use grub2:
  https://gitlab.com/tpetazzoni/buildroot/-/pipelines/1985234563

- The grub2 tests:
  https://gitlab.com/tpetazzoni/buildroot/-/pipelines/1985234685

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Julien: also tested by building and booting
 - qemu_aarch64_sbsa_defconfig
 - qemu_arm_ebbr_defconfig
 - qemu_loongarch64_virt_efi_defconfig
 - qemu_riscv64_virt_efi_defconfig
 - pc_x86_64_bios_defconfig
 - pc_x86_64_efi_defconfig
]
Tested-by: Julien Olivain <ju.o@free.fr>
[Julien:
 - fix patch #72 upstream link to point to the initial patch
   sumbission rather than a reply
 - merge two _IGNORE_CVES blocks for patch #50 into a single one
 - order _IGNORE_CVES blocks by numerical patch order
 - order numerically the CVE list in commit log
 - add a "Fixes:" tag in patch #74 since its commit log does not
   mention the CVE.
]
Signed-off-by: Julien Olivain <ju.o@free.fr>

(cherry picked from commit ded3e0045a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-21 16:28:56 +02:00
Julien Olivain
1946b22c0a boot/shim: bump to version 16.0
For release note, see:
https://github.com/rhboot/shim/releases/tag/16.0

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 7c0da58313)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-07-10 11:23:55 +02:00
Yann E. MORIN
22d808b108 boot/syslinux: fix install with top-level parallel build
syslinux is... special. It is a target package, but it is installed in
HOST_DIR *in the target install commands*: in addition to the boot files
that run on the target, syslinux installs a set of host tools that are
to be used at build time (e.g. extlinux, to prepare bootable media, like
an iso96660 image). Then, from HOST_DIR, the actual boot files are
copied into BINARIES_DIR (i.e. images/); we do it that way because the
boot files are scattered about everywhere in the build tree, while they
are all packed together in a single directory once installed.

However, there is no dependency between the target and image install
steps. So, when using top-level parallel builds, there is no guarantee
that the target install commands are finished before the image install
commands are started.

We fix that by first installing into a temporary location, as part of
the build step, and by then copying from there as part of the install
step. This ensures that the boot files are easily available, without
needing a dependency on the target install step, that we can't express.

Note that we do not change the actual installation into HOST_DIR: it can
be set up differently that our temporary location, and we do not want
to duplicate that setup here (it's going to diverge over time).

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 90e76818a1)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-07-03 10:07:20 +02:00
Julien Olivain
4c3660a215 boot/edk2: add security fix for CVE-2024-38805
This commit adds a security fix from the upstream commit:
b3a2f7ff24

It fixes CVE-2024-38805:
https://www.cve.org/CVERecord?id=CVE-2024-38805
Note: at the time of this commit, this CVE is "reserved" by a CNA.
Details will come later.

See also the associated pull request:
https://github.com/tianocore/edk2/pull/11042

This commit also adds the corresponding _IGNORE_CVES entry.

Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 14d07d1914)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-07-03 09:52:22 +02:00
Thomas Petazzoni
c07f2fb051 boot/grub2: drop stale IGNORE_CVES entries
CVE-2020-15705 is only applicable to grub versions up to 2.04, and
we're using a more recent version, so it is no longer needed to ignore
it.

CVE-2021-46705 is only applicable to grub versions up to 2.06, and
we're using a more recent version, so it is no longer needed to ignore
it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 06afaf5347)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-27 18:25:09 +02:00
Cherniaev Andrei
4970691c0e boot/grub2/readme.txt: fix loopback mount notes
Commit 7dd56b6cd9 ("boot/grub2/readme.txt: don't specify /dev/loop0")
changed the description of the loopback mounting to use losetup -f <img>,
but forgot to add the --show option, causing losetup to not print the
loopback device name.

Fix that by adding the --show option.

Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
[Peter: Reword commit message]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit a480ae9ffe)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-26 17:48:59 +02:00
Vincent Stehlé
29556eb61b boot/edk2: drop dependency on tf-a for macchiatobin
When building a firmware for the MACCHIATObin with edk2 and
arm-trusted-firmware, the build can randomly fail with the
following make error:

    make[1]: Circular output/build/edk2-edk2-stable202411/.stamp_configured <- arm-trusted-firmware dependency dropped.

The message appears also when the build is not failing, depending on
the number of parallel jobs and the build order.

The issue can be observed with the following commands:

    cat >.config <<EOF
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
    BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
    BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33=y
    BR2_TARGET_BINARIES_MARVELL=y
    BR2_TARGET_EDK2=y
    BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN=y
    BR2_TARGET_MV_DDR_MARVELL=y
    EOF
    make olddefconfig
    utils/brmake
    grep -FC5 'dependency dropped' br.log

The circular dependency happen due to [1] and [2].

In fact, only TF-A depends on EDK II (passed as BL33) for building and
not vice versa. See [3]. The EDK II "SolidRun MacchiatoBin" platform
build does not need any TF-A image, compared to some other platforms
such as "Socionext DeveloperBox" or "QEMU SBSA" which are referencing
TF-A images in a hook added in EDK2_PRE_BUILD_HOOKS.

Drop the false dependency on TF-A to fix the build.

This issue has been present since the EDK2 introduction in commit [4].

[1] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.02/boot/arm-trusted-firmware/arm-trusted-firmware.mk#L121
[2] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.02/boot/edk2/edk2.mk#L118
[3] https://github.com/Semihalf/edk2-platforms/wiki/Build_firmware
[4] 1074a37e78

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
[Julien: add extra info in commit log]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 7361a155ef)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-02 12:10:44 +02:00
Vincent Stehlé
9c28c060aa boot/arm-trusted-firmware: fix the build for macchiatobin
When Building arm-trusted-firmware for the Macchiatobin platform
(a80x0_mcbin), which depends on the mv-ddr-marvell package, the build fails
complaining that this package's folder "does not contain valid
mv-ddr-marvell git repository".
This is expected under Buildroot, where we use intermediate archives.

The issue can be reproduced with the commands:

    cat >.config <<EOF
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
    BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
    BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33=y
    BR2_TARGET_BINARIES_MARVELL=y
    BR2_TARGET_EDK2=y
    BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN=y
    BR2_TARGET_MV_DDR_MARVELL=y
    EOF
    make olddefconfig
    make

The build is failing with the error message:

    plat/marvell/armada/a8k/common/ble/ble.mk:34: *** "'MV_DDR_PATH=/buildroot/output/build/mv-ddr-marvell-d5acc10c287e40cc2feeb28710b92e45c93c702c' was specified, but '/buildroot/output/build/mv-ddr-marvell-d5acc10c287e40cc2feeb28710b92e45c93c702c' does not contain valid mv-ddr-marvell git repository".  Stop.

Add patches to fix the build for this platform, for a few versions of TF-A
(v2.6, v2.7, v2.8, lts-v2.8.20, v2.9, v2.10, lts-v2.10.5, v2.11, v2.12 and
lts-v2.12.1).

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
Cc: Sergey Matyukevich <geomatsi@gmail.com>
[Julien: add commands to reproduce the issue]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit fd02add21b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-02 12:10:41 +02:00
Luca Ceresoli
8ea9c11a1a boot/xilinx-embeddedsw: fix menuconfig visualization
Due to how menuconfig works, a 'comment' entry following a 'config' entry
prevents correct indentation of items depending on the 'config'
entry. xilinx-embeddedsw currently shows as:

  [*] xilinx-embeddedsw
      *** xilinx-embeddedsw needs a bare metal toolchain for tuple microblazeel-xilinx-elf ***
  (xilinx_v2024.2) xilinx-embeddedsw version (NEW)
  [ ] versal plm (NEW)
  [ ] versal psmfw (NEW)
  [ ] zynqmp pmufw (NEW)
  [ ] xilinx-prebuilt

So the 'versal *' and 'zynqmp pmufw' items are not indented even though
they should be.

Do like most other Config.in files which have the 'comment' before the
'config' entry, makeing it render as expected:

      *** xilinx-embeddedsw needs a bare metal toolchain for tuple microblazeel-xilinx-elf ***
  [*] xilinx-embeddedsw
  (xilinx_v2024.2) xilinx-embeddedsw version (NEW)
  [ ]   versal plm (NEW)
  [ ]   versal psmfw (NEW)
  [ ]   zynqmp pmufw (NEW)
  [ ] xilinx-prebuilt

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 088808ccc7)
2025-04-06 17:21:06 +02:00
Cherniaev Andrei
3fbc4e583f boot/grub2/readme.txt: typo
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-10 22:30:42 +01:00
Daniel Lang
f2498258d4 boot/optee-os: add CPE identifier
cpe:2.3linaro:op-tee:4.3.0:*:*:*:*:*:*:* is a valid CPE ID.

See:
https://nvd.nist.gov/products/cpe/detail/2754E8CF-9BD5-448D-9F32-CFAC92278CD9

Note: this commit needs to set _CPE_ID_PREFIX because optee-os CPE
"part" needs to be set to "o" (OS), while the default Buildroot prefix
is "a" (Application).

Signed-off-by: Daniel Lang <dalang@gmx.at>
[Julien:
 - add extra info in commit log (and fix CVE to CPE)
 - add a new line after OPTEE_OS_CPE_ID_PRODUCT for readability
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-07 22:12:46 +01:00
Fabio Estevam
1ec956130d package/freescale-imx: Allow firmware installation on i.MX93
Currently, the LPDDR firmware binaries do not get installed into the
U-Boot mainline directory, causing U-Boot build to fail for i.MX93.

Fix this problem by expanding the BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
checks to also take BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9 into account.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-26 21:58:15 +01:00
Vincent Stehlé
bd41cccc7a boot/boot-wrapper-aarch64: bump version
Bump boot-wrapper to the latest version.

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-19 22:06:32 +01:00
Neal Frager
3761177a89 boot/xilinx-embeddedsw: change dependency
Now that BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH can contain multiple tuples,
BR2_TARGET_XILINX_EMBEDDEDSW can no longer be dependent on:

depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH = "microblazeel-xilinx-elf"

A valid definition could have "microblazeel-xilinx-elf" as just one of many
tuples in the list.

For this reason, this patch changes the dependency to:

depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT

One side effect of this is that the user comment will be displayed now when
using multiple tuples, even if one of them is the required tuple.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-17 23:22:20 +01:00
Neal Frager
9f52cc8c0a boot/uboot: add qspi.bin file support
u-boot has introduced a new file called qspi.bin for users who boot from a
qspi flash device.  It combines the spl/boot.bin and u-boot.itb files into a
single binary that can be written to the qspi flash.

Here is an example of how binman generates the qspi.bin:
a4c9811910

At the moment, the qspi.bin is only used for the zynqmp platform, but other
platforms may adopt it, so the buildroot support has been made in a generic
way.

This patch adds the necessary support for buildroot to install this binary.

[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-04 14:18:29 +01:00
Neal Frager
00039d7059 boot/uboot: support binman generated u-boot.itb
When using binman to generate u-boot images, there will no longer be a make
rule for generating files produced by binman.  However, these files will still
need to be installed to the output/images directory.

One such file is the u-boot.itb.  If the u-boot.itb is generated by binman,
then the file still needs to be copied, but without the make rule.

Here is an example of how binman generates the u-boot.itb:
a4c9811910

[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-04 14:17:09 +01:00
Neal Frager
7dadbb6dcc boot/xilinx-prebuilt: remove xilinx_v2024.2 hash
Now that the versal defconfigs have been bumped to the new default version
xilinx_v2024.2_update1, the xilinx_v2024.2 hash can be removed.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-03 16:15:13 +01:00
Neal Frager
a72537c763 boot/xilinx-prebuilt: bump default to xilinx_v2024.2_update1
This patch bumps the default version of xilinx-prebuilt to
xilinx_v2024.2_update1.  For some reason, the original xilinx_v2024.2
release tag was missing the kria boards.  There is no difference between
the xilinx_v2024.2 and the xilinx_v2024.2_update1 release tags other than
the fact that the kria boards are included.

Now that the release tag includes all the boards, it is possible to bump
the default version from xilinx_v2024.1 to xilinx_v2024.2_update1.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Brandon Maier <brandon.maier@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
--
2025-02-03 16:10:05 +01:00
Neal Frager
4e99bc14eb boot/xilinx-prebuilt: merge hash files
There is actually no need to have two hash files for the xilinx-prebuilt
package.  As long as the boot/xilinx-prebuilt/xilinx-prebuilt.hash contains
the hash value for the default version as well as any version used by a
xilinx board defconfig, a single hash file is all that is needed.

In the future, when bumping the defconfig files independently of the
xilinx-prebuilt default version, all that has to be done is the following
process.

Patch Series:
1. Add new version hash to boot/xilinx-prebuilt/xilinx-prebuilt.hash.
2. Bump board defconfigs to new version.
3. Bump xilinx-prebuilt default version.

For this reason, this patch merges the two xilinx-prebuilt.hash files and
removes the board/xilinx xilinx-prebuilt.hash file.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-03 16:09:53 +01:00
Neal Frager
92945909f1 boot/xilinx-prebuilt: add hash for LICENSE file
Add hash for xilinx-prebuilt LICENSE file.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-24 21:39:11 +01:00
Neal Frager
a5b360e53f boot/uboot.mk: new zynqmp pmufw embeddedsw option
The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
use the xilinx-embeddedsw package for building a pmufw.elf that gets included
in the generated boot.bin.

If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
custom location will be ignored.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
[Luca: Tested on Kria KV260 starter kit]
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-24 19:24:52 +01:00
Neal Frager
1cbd222150 boot/xilinx-embeddedsw: new boot package
This patch adds a new boot package to Buildroot for building boot firmware
applications from the https://github.com/Xilinx/embeddedsw repo.

If a user chooses to build a boot firmware application, it will not be
installed by the xilinx-prebuilt package since it will come from the
xilinx-embeddedsw package.  In this way, users can mix and match applications
to be built by the xilinx-embeddedsw package and applications to be copied
from the xilinx-prebuilt package.  This is necessary for the versal platform
because the pdi file can only be built by AMD Vivado.

Support for additional applications in the https://github.com/Xilinx/embeddedsw
repo can always be added to this package as needed or requested.

The xilinx-embeddedsw package replaces previous solutions including
zynqmp-firmware, versal-firmware and xilinx-source.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
[Luca: Tested on Kria KV260 starter kit]
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-24 19:24:18 +01:00
Thomas Petazzoni
a311245ff7 boot/syslinux: add multiple patches fixing build issues with GCC >= 14
No autobuilder failures reported, but it fixes build issues that can
be reproduced with:

BR2_x86_64=y
BR2_x86_corei7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE=y
BR2_TARGET_SYSLINUX=y
BR2_TARGET_SYSLINUX_EFI=y

First patch is backported from upstream. Last 3 patches are not from
upstream, and they have not been submitted as upstream is basically
dead (last release 10 years ago, last commit 5 years ago).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-19 11:36:10 +01:00
Akhilesh Nema
6ff1a66e20 boot/uboot: bump to version 2025.01
Release announcement:
https://lists.denx.de/pipermail/u-boot/2025-January/576668.html

Changelog:
https://github.com/u-boot/u-boot/compare/v2024.10...v2025.01

Signed-off-by: Akhilesh Nema <nemaakhilesh@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-17 19:26:07 +01:00
Vincent Stehlé
0f3791f25f boot/optee-os: add custom version option
Add custom version option, to enable easily specifying an official OP-TEE
version to use.
This is similar to what is done in other packages, such as linux, uboot or
arm-trusted-firmware.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Étienne Carrière <etienne.carriere@foss.st.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-08 21:51:17 +01:00
Vincent Stehlé
1220b505bc boot/uboot: add support for embedded TEE in binary format
We can embed a TEE in ELF format into U-Boot, but versions of OP-TEE since
3.8.0 must be embedded in binary format, as the tee.bin contains important
meta-data. [1]

Update the configuration menu and the Makefile to allow selecting to
embed either tee.elf or tee.bin.

By default, embed the TEE in ELF format to stay compatible with existing
configurations.

[1] https://github.com/OP-TEE/optee_os/issues/4542

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-08 19:40:26 +01:00
Romain Naour
0919d98e83 boot/edk2: bump to version edk2-stable202411
Sync edk2-platforms with the last commit merged at the edk2 release
date (2024-11-22).

See:
https://github.com/tianocore/edk2/releases/tag/edk2-stable202411

Runtime tested with tests using EDK2 package: TestFwts, TestEdk2,
TestIso9660Grub2EFI, TestIso9660Grub2Hybrid, TestGrubi386EFI,
TestGrubX8664EFI, TestGrubAArch64EFI, TestGrubRiscV64EFI.

Runtime tested with defconfig using EDK2 package:
qemu_aarch64_sbsa_defconfig, qemu_riscv64_virt_efi_defconfig.

Cc: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-04 21:32:03 +01:00
Bryan Brattlof
eb9bb65629 boot/ti-k3-r5-loader: add host-gnutls to dependencies
Newer versions of U-Boot (2024.10 and newer) will require the GnuTLS
library to be installed on the host machine to build the mkeficapsule
tool for U-Boot's image packaging phase to generate the final capsule
for all the boot images including the tiboot3.bin image.

Add host-gnutls to the list of dependencies.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8723483578 (ti_am62x_sk_defconfig)

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-01-01 21:20:11 +01:00
Kilian Zinnecker
8d94747b33 boot/opensbi: bump version to 1.6
Release notes at:
https://github.com/riscv-software-src/opensbi/releases/tag/v1.6

From release notes:
"Overall, this release adds more ISA extensions, drivers, and other
improvements."

This OpenSBI version 1.6 can be tested in qemu with the commands:

    cat <<EOF >.config
    BR2_riscv=y
    BR2_LINUX_KERNEL=y
    BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
    BR2_TARGET_ROOTFS_EXT2=y
    BR2_TARGET_OPENSBI=y
    BR2_TARGET_OPENSBI_PLAT="generic"
    BR2_TOOLCHAIN_EXTERNAL=y
    EOF
    make olddefconfig
    make

Then:

    qemu-system-riscv64 \
        -M virt \
        -bios output/images/fw_jump.bin \
        -kernel output/images/Image \
        -append "rootwait root=/dev/vda ro" \
        -drive file=output/images/rootfs.ext2,format=raw \
        -nographic

Note that in the previous qemu command line, the OpenSBI ".bin"
image is passed rather than the ".elf" image.

Loading the ".elf" image in qemu can now lead to the following
qemu error:

    qemu-system-riscv64: Some ROM regions are overlapping
    These ROM regions might have been loaded by direct user request or by default.
    They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest memory.
    Check whether you intended to load all this guest code, and whether it has been built to load to the correct addresses.

    The following two regions overlap (in the memory address space):
      fw_jump.elf ELF program header segment 1 (addresses 0x0000000000000000 - 0x00000000000271e0)
      mrom.reset (addresses 0x0000000000001000 - 0x0000000000001028)

See: https://github.com/riscv-software-src/opensbi/issues/372

Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
Tested-by: Julien Olivain <ju.o@free.fr>
[Julien: reworded the commit log about testing]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2024-12-29 13:23:14 +01:00
Julien Olivain
c583befc8e boot/opensbi: bump to version 1.5
For release notes since version 1.3, see:
https://github.com/riscv-software-src/opensbi/releases/tag/v1.5
https://github.com/riscv-software-src/opensbi/releases/tag/v1.4

This commit also updates the package home page url and the
download _SITE to reflect the change of github account from "riscv"
to "riscv-software-src".

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-12-18 20:28:42 +01:00
Vincent Stehlé
24615d1502 boot/arm-trusted-firmware: bump to v2.12
For change log, see [1].

Update trusted-firmware-a version to v2.12 and add a hash file
accordingly.

Compared to v2.11, the license has changed with the additional mention
of files from the pydevicetree project under Apache 2.0 license.
As we only document the main license of TF-A, BSD-3-Clause, this change
has no impact for us.

[1] https://git.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a.git/+/refs/tags/v2.12/docs/change-log.md

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
Cc: Sergey Matyukevich <geomatsi@gmail.com>
[Julien:
  - add link to change log
  - remove v2.11 hash file
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2024-12-16 21:57:13 +01:00
Julien Olivain
51858c4a34 boot/grub2: update _SITE to use BR2_GNU_MIRROR
The grub2 package is distributed on the GNU project servers. See [1]
and [2]. Buildroot has the BR2_GNU_MIRROR configuration which can
be used for that purpose. See [3].

For consistency with all other GNU packages, this commit updates
the _SITE to use BR2_GNU_MIRROR.

Note: Commit [4] introduced the grub2 package using BR2_GNU_MIRROR.
Commit [5] changed it to use "http://ftp.gnu.org/gnu/grub" without
providing a justification for that change.

[1] https://www.gnu.org/software/grub/grub-download.html
[2] https://www.gnu.org/prep/ftp.html
[3] https://gitlab.com/buildroot.org/buildroot/-/blob/2024.08.2/Config.in#L286
[4] c24fdb3680
[5] 5ffafd2353

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-12-11 15:03:20 +01:00
Bryce Johnson
f22d407637 boot/ti-k3-r5-loader: use BR2_PACKAGE_HOST_ARM_GNU_TOOLCHAIN_SUPPORTS
ti-k3-r5-loader can only be built on x86_64 or aarch64 hosts due
to ARM gnu toolchain dependency.

[Romain: improve commit log]
Signed-off-by: Bryce Johnson <bryce@redpinelabs.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-12-11 14:15:36 +01:00
Bryce Johnson
b948c25978 boot/arm-trusted-firmware: use BR2_PACKAGE_HOST_ARM_GNU_TOOLCHAIN_SUPPORTS
Allow to enable BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
option on aarch64 hosts using HOST_ARM_GNU_TOOLCHAIN_SUPPORTS, in order
to build an ATF firmwares that require a pre-built bare metal toolchain
(rockpro64_defconfig).

[Romain: improve commit log]
Signed-off-by: Bryce Johnson <bryce@redpinelabs.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-12-11 14:13:11 +01:00
Cherniaev Andrei
7dd56b6cd9 boot/grub2/readme.txt: don't specify /dev/loop0
losetup -f returns the next free loop device, which may not be
/dev/loop0.  If you blindly follow the readmy you may end up destroying
an existing device.

Make it more robust with a variable to store the loop device.

Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
[Arnout: keep the actual losetup atomic]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-12-04 22:17:09 +01:00
Romain Naour
cc0823c2d1 boot/edk2: bump to version edk2-stable202405
Release notes:

  https://github.com/tianocore/edk2/releases/tag/edk2-stable202405

We can't bump to edk2-stable202408 yet due to a runtime issue while
testing qemu_aarch64_sbsa_defconfig following the switch generic
ArmPsciResetSystemLib [1]

  ERROR:   sbsa_sip_smc_handler: unhandled SMC (0xc20000ca) (function id: 202)

Qemu 9.0/9.1 is using a slightly older edk2 firmware based on
edk2-stable202405 release [2] that contains a commit [3] fixing a
bootloader crash produced with qemu_aarch64_sbsa_defconfig [4] since
Qemu 9.0.

From [5]:
"The version of the sbsa-ref EDK2 firmware we used to use in this test
had a bug where it might make an unaligned access to the framebuffer,
which causes a guest crash on newer versions of QEMU where we enforce
the architectural requirement that unaligned accesses to Device memory
should take an exception."

This commit [5] is backported to edk2-stable202405.

For the same reason, we have to update edk2-platforms to a specific
version [6]:

"QemuSbsa: enable WriteCombine for the FrameBuffer
QEMU no longer permits misaligned access to device memory, which breaks
QemuVideoDxe on SbsaQemu.

c1d1910be6e04a8b1a73090cf2881fb698947a6e commit in EDK2 fixed it by
enabling WriteCombine for Framebuffer memory. This change enables that
fix."

As a side note, the edk2-non-osi package does not need to be updated, so
it is left untouched.

Finally, this EDK2 version requires a recent Qemu version. The version
included in the reference Docker image (5.2.0) is too old and will not
allow to start this EDK2 version. Therefore, this bump is known to be
incompatible with runtime tests which are using EDK2 on Aarch64
architecture. At the authoring time of this commit, broken tests are:
- tests.boot.test_edk2
- tests.boot.test_grub.TestGrubAArch64EFI
- tests.package.test_fwts

Note that the EDK2/Qemu incompatibility is only affecting Aarch64
tests. Other tests using EDK2 on i386 or x86_64 are not affected.

To prevent this commit introducing broken runtime tests, those have
been disabled in a previous commit.

[1] 2d0668d399
[2] 24a7cd6a7c
[3] c1d1910be6
[4] https://gitlab.com/buildroot.org/buildroot/-/jobs/7764483764
[5] 6c84daac58
[6] 3f08401365

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Waldemar Brodkorb <wbx@openadk.org>
[Julien: add comments in commit log]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2024-11-04 23:03:44 +01:00
Bryan Brattlof
06a1cf4854 boot/ti-k3-r5-loader: bump to v2024.10
A new version of U-Boot has been released. Update to this latest version
to pull in the latest features and bug fixes

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-22 22:53:04 +02:00
Bryan Brattlof
164d9f0546 boot/uboot: update link to the U-Boot docs
The denx.de/wiki/U-Boot link now redirects to docs.u-boot.org/en/latest
Replace the link to the new location for the U-Boot documentation

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-22 22:52:32 +02:00
Dario Binacchi
fe295d94e9 boot/uboot: bump to version 2024.10
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-11 08:39:22 +02:00
Julien Olivain
8a71fda371 boot/grub2: replace host-python3 with BR2_PYTHON3_HOST_DEPENDENCY
Commit 86bb1b236 "boot/grub2: needs host-python3" [1] introduced a
dependency on host-python3.

Since grub does not have any specific requirements on host Python
modules, or recent host Python version, this commit replaces the
host-python3 dependency with BR2_PYTHON3_HOST_DEPENDENCY. This will
skip the host-python3 compilation if a sufficient version (3.4 or
greater at the time of this commit) is already present on host. This
will save build time.

This optimization was suggested by Peter, in [2].

Note 1: this commit was checked to ensure that grub is building with
Python 3.4.

Note 2: BR2_PYTHON3_HOST_DEPENDENCY was introduced in commit b60729784
"support/dependencies: add a check for python3" [3].

[1] 86bb1b2360
[2] https://lists.buildroot.org/pipermail/buildroot/2024-September/763967.html
[3] b60729784a

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-03 11:30:21 +02:00
Ben Wolsieffer
ceff8dbaa5 boot/uboot: pass -mno-fdpic if FDPIC is enabled
If the FDPIC ABI is enabled by default in the toolchain, it must be
explicitly disabled when building U-Boot.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-02 22:34:38 +02:00
Peter Korsgaard
ab34bdcb38 boot/uboot: fix typos
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 20:39:49 +02:00
Peter Korsgaard
6dc6a747fd boot/shim/shim.mk: fix 'deactivate' typo
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 20:39:47 +02:00
Peter Korsgaard
7bd00d5506 boot/optee-os/optee-os.mk: fix 'PLATFORM' typo
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 20:39:46 +02:00