[Buildroot] [PATCH 1/1] boot/arm-trusted-firmware: support debug mode

Etienne Carriere etienne.carriere at linaro.org
Fri Nov 30 09:07:49 UTC 2018

On Thu, 29 Nov 2018 at 23:06, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
> Hello,
> On Thu, 22 Nov 2018 16:22:38 +0100, Etienne Carriere wrote:
> > When the trusted firmware is built with debug support (DEBUG defined),
> > the generated images are located at a specific path. The non debug
> > images are located in generated directory build/<platform>/release/
> > while the debug images are located in generated directory
> > build/<platform>/debug/.
> >
> > This change introduces boolean BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG
> > to define whether the release or debug configuration is used to build
> > trusted firmware. Note that enabling trusted firmware debug support, i.e
> > without enabling BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG will fail since
> > buildroot will get generated files from the wrong path.
> >
> > Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
> What is this debug mode doing exactly ?

Hello Thomas,

This enable few debug support in ATF: disable compilation optims,
generate debug symbols, enable assertions, increase trace level.
... and it also makes the generates  boot binary images be located at
a specific path (compared to when not in debug mode).

> We already have a global BR2_ENABLE_DEBUG option to enable building
> with debugging symbols. I am wondering if we should use that option as
> well, or like you did, introduce a separate option. Perhaps for
> something like ATF, that is very low-level and HW-specific, a separate
> debug option is OK.

I think this feature is quite specific to people interested in want
happens during the boot stages and/or the ATF specific runtime
One may want specific ATF traces without forcing debug mode for the
whole system.

Yet I not that used the BR conventions and habits and I let you decide
whether such debug should be driven from the BR generic  debug
directive or not.
I have no strong opinion on this.

> > +     bool "Debug mode of the trusted firmware"
> > +     default n
> "default n" is not needed, since it's the default. Not need to resend
> just for that, we can fixup when applying.

Ok. Feel free to fix straight if you agree with the other changes.


> Best regards,
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

More information about the buildroot mailing list