From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Jakob Kastelic <kastelic.jakob@gmail.com>
Cc: buildroot@buildroot.org, Romain Naour <romain.naour@gmail.com>,
Sergey Matyukevich <geomatsi@gmail.com>,
Dick Olsson <hi@senzilla.io>
Subject: Re: [Buildroot] [PATCH v2 1/2] boot/arm-trusted-firmware: optional Linux as BL33
Date: Tue, 3 Feb 2026 10:10:24 +0100 [thread overview]
Message-ID: <aYG5Tc4aQ4QHgWN-@windsurf> (raw)
In-Reply-To: <20250917024541.1480367-2-kastelic.jakob@gmail.com>
Hello Jakob,
Thanks for your patch, and sorry for the delay in getting back to you!
On Tue, Sep 16, 2025 at 07:45:40PM -0700, Jakob Kastelic wrote:
> Arm Trusted Firmware (TF-A) can be used to load U-Boot or another
> bootloader, which in turn loads the Linux kernel. However, TF-A is
> capable of loading the kernel directly. To this end, we need to define
> the BL33 and BL33_CFG compile options containing, respectively, the
> zImage and the DTB.
>
> This config introduces a new config option,
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33, which sets the BL33 and
> BL33_CFG parameters, and ensures that the kernel is built before the
> TF-A by having linux as a _DEPENDENCY of the TF-A.
>
Your Signed-off-by should have been here. Indeed, anything after "---"
gets stripped when applying your patch.
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33
> + bool "Linux kernel"
> + depends on BR2_LINUX_KERNEL
> + depends on (BR2_arm || BR2_armeb)
> + depends on (BR2_LINUX_KERNEL_ZIMAGE || BR2_LINUX_KERNEL_APPENDED_ZIMAGE)
> + help
> + This option allows to embed the Linux kernel as the BL33 part
> + of the ARM Trusted Firmware.
> +
> + Do not choose this option if you intend to use U-Boot or
> + another second-stage bootloader. With this option, TF-A starts
> + Linux directly.
> +
> + With this option chosen, whenever the Linux zImage changes,
> + TF-A may need need to be re-built to create the latest FIP
> + file. Since Buildroot does not track package dependencies,
> + this has to be done manually by invoking `make
> + arm-trusted-firmware-rebuild`. The final boot medium image may
> + need to be re-generated as well to include the latest FIP file
> + version.
I dropped this last paragraph, because this isn't specific to this
situation, it's also valid for any other BL33 payload.
> +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33),y)
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/zImage
> +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM),stm32mp1)
I've used
+ifeq ($(ARM_TRUSTED_FIRMWARE_PLATFORM),stm32mp1)
instead, where ARM_TRUSTED_FIRMWARE_PLATFORM is already
quote-stripped, while $(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM)
isn't.
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33_CFG=$(BINARIES_DIR)/$(LINUX_DTBS)
This is a bit "risky" as LINUX_DTBS can potentially contain multiple
entries. One option would be to add a check here that LINUX_DTBS only
contain one entry, like (untested)
ifneq ($(words $(LINUX_DTBS)),1)
$(error "Using BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33 only works when a single Linux DTB is used")
endif
If you think that's useful, you can send a follow-up patch adding
this. But I have applied your patch, with the other fixes mentioned in
this e-mail.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-02-03 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 21:45 [Buildroot] [PATCH 1/1] boot/arm-trusted-firmware: optional Linux as BL33 Jakob Kastelic
2025-05-16 15:48 ` Arnout Vandecappelle via buildroot
2025-09-17 2:45 ` [Buildroot] [PATCH v2 0/2] Linux as BL33 in TF-A Jakob Kastelic
2025-09-17 2:45 ` [Buildroot] [PATCH v2 1/2] boot/arm-trusted-firmware: optional Linux as BL33 Jakob Kastelic
2026-02-03 9:10 ` Thomas Petazzoni via buildroot [this message]
2025-09-17 2:45 ` [Buildroot] [PATCH v2 2/2] configs/qemu_arm_vexpress_tz_falcon_defconfig: new Jakob Kastelic
2026-02-03 9:18 ` Thomas Petazzoni via buildroot
2026-02-05 4:50 ` [Buildroot] [PATCH v3] support/testing/tests/boot/test_atf.py: test BL33 Jakob Kastelic
2026-02-05 22:03 ` [Buildroot] [PATCH v4] " Jakob Kastelic
[not found] ` <20260205044622.1808469-1-kastelic.jakob@gmail.com>
2026-02-05 8:04 ` [Buildroot] [PATCH v3] " Thomas Petazzoni via buildroot
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=aYG5Tc4aQ4QHgWN-@windsurf \
--to=buildroot@buildroot.org \
--cc=geomatsi@gmail.com \
--cc=hi@senzilla.io \
--cc=kastelic.jakob@gmail.com \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.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.