mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
Since Buildroot commit [1] "package/gcc: switch to GCC 15.x as the
default", compiling freescale_imx93frdm_defconfig fails in TF-A with
error:
include/drivers/nxp/trdc/imx_trdc.h:7: error: header guard 'IMX_TRDC_H' followed by '#define' of a different macro [-Werror=header-guard]
7 | #ifndef IMX_TRDC_H
include/drivers/nxp/trdc/imx_trdc.h:8: note: 'IMX_XRDC_H' is defined here; did you mean 'IMX_TRDC_H'?
8 | #define IMX_XRDC_H
The issue happen because this defconfig is using a Buildroot
(internal) toolchain which uses gcc version 15 by default.
This issue was fixed upstream in [2], first included in TF-A v2.13.
This commit updates U-Boot, TF-A and Linux to use the NXP
tag lf-6.18.20-2.0.0, which include this fixes.
Note that, as described in the commit log of [3] which introduced
this defconfig, U-Boot and Linux were forks. Now the necessary
patches are included in the vendor BSP, this commit switches those
repos to use the vendor ones.
While at it, this commit also switches the defconfig to use an
external glibc stable Bootlin toolchain, to follow recommendations
from [4]. Since an external toolchain is used, the linux-headers.hash
custom hash file is no longer needed and is also removed. At the
time of this commit, the Bootlin stable toolchain is a gcc 14.
Also, due to the upstream uboot commit [5], this commit adds a uboot
config fragment to disable CONFIG_EFI_CAPSULE_AUTHENTICATE, to
remove the dependency on the command "cert-to-efi-sig-list", provided
the host efitools package, which is not yet in Buildroot.
This commit was run tested on board 700-94611 Rev B1.
[1] a75b8623f5
[2] 2e9198d0e0%5E%21/
[3] 2e05f22ff8
[4] https://elinux.org/Buildroot:DeveloperDaysELCE2024#Rules_for_defconfigs
[5] fd58c275f6
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Tested-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Julien Olivain <ju.o@free.fr>
**********************
NXP i.MX 93 FRDM board
**********************
This file documents the Buildroot support for the i.MX 93 FRDM
(Freedom) board. For more information on this board, see [1].
Build
=====
First, configure Buildroot for the i.MX 93 FRDM board:
make freescale_imx93frdm_defconfig
Build all components:
make
When this command completes, the generated image containing everything
to boot from the SD card is located in "output/images/sdcard.img".
Create a bootable SD card
=========================
To determine the device associated to the SD card have a look in the
/proc/partitions file:
cat /proc/partitions
Buildroot prepares a bootable "sdcard.img" image in the output/images/
directory, ready to be dumped on a SD card. Launch the following
command as root:
dd if=output/images/sdcard.img of=/dev/<your-sd-device>
*** WARNING! This will destroy all the card content. Use with care! ***
For details about the medium image layout, see the definition in
board/freescale/common/imx/genimage.cfg.template_imx9.
Boot the i.MX 93 FRDM board
===========================
To boot your newly created system (refer to the i.MX 93 FRDM
Documentation [2] for guidance):
- insert the SD card in the SD slot (P13) of the board;
- Configure the SW1 boot switches as follows:
SW1: 1100 SW1[1-4] ("USDHC2 4-bit SD3.0" Boot Mode)
- connect a USB Type-C cable into the P16 Debug USB Port and connect
using a terminal emulator at 115200 bps, 8n1;
- power on the board by connecting a USB Type-C cable into the P1
Power USB Port.
Note 1: the board boot switches default configuration is:
SW1: 0100 SW1[1-4] ("USDHC1 8-bit eMMC 5.1" Boot Mode)
and the board is also pre-flashed with a reference Linux demo
image. It is important to change the boot config switches to make
sure the system will boot on the SD Card.
Note 2: the debug USB connector presents 2 UARTs (for example
/dev/ttyACM[0-1]), the Cortex-A55 UART should be the 1st one (in the
previous example, /dev/ttyACM0). Refer to the documentation [2] for
more details.
Enjoy!
References
==========
[1] https://www.nxp.com/FRDM-IMX93
[2] https://www.nxp.com/document/guide/getting-started-with-frdm-imx93:GS-FRDM-IMX93