how to use Buildroot and latest Kernel, TF-A and U-Boot (ST GitHub)?
I'm a newbie with embedded topics, for educational purposes I'm trying to set up my ST32MP157C-DK2 using Buildroot.
Using menuconfig I pointed Kernel, TF-A and U-boot to the latest label releases of ST forked repos. But it did not work because it asked for FIP image.
I enabled FIP image using menuconfig, but building fails. After investigating a bit, I realized Buildroot is missing a value for the variable BL33_CFG, which from some documentation I understand it should be set to the U-Boot dtb.
Looking at the code and makefiles I couldn’t find a properly supported pattern for this, so I have made few changes: Buildroot to copy u-boot.dtb to the output folder, and set from menuconfig an additional variable for ARM_TRUSTED_FIRMARE:
BL33_CFG=$(BINARIES_DIR)/u-boot.dtb.
and also defined BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE=�?u-boot-nodtb.bin�?
Now building succeed without issues apparently.
The next step would be to flash using STM32CubeProgrammer, I use this tsv file:
———–
#Opt Id Name Type IP Offset Binary
– 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-dk2.stm32
– 0x03 fip-boot Binary none 0x0 fip.bin
P 0x04 fsbl1 Binary mmc0 0x00004400 tf-a-stm32mp157c-dk2.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a-stm32mp157c-dk2.stm32
PD 0x06 fip Binary mmc0 0x00084400 fip.bin
P 0x10 rootfs System mmc0 0x00484400 rootfs.ext2
———–but when I boot the board, it hangs at Starting Kernel...
does anyone has any suggestion that helps to spot where the issue is?
NOTICE: CPU: STM32MP157CAC Rev.B
NOTICE: Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE: Board: MB1272 Var2.0 Rev.C-01
NOTICE: BL2: v2.4-r1.0(release):2021.02-909-g60859ea55a-dirty
NOTICE: BL2: Built : 22:26:49, May 3 2021
NOTICE: BL2: Booting BL32
NOTICE: SP_MIN: v2.4-r1.0(release):2021.02-909-g60859ea55a-dirty
NOTICE: SP_MIN: Built : 22:26:49, May 3 2021
U-Boot 2020.10-stm32mp-r1 (May 03 2021 - 22:26:28 +0300)
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT: Started with servicing (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
131 bytes read in 41 ms (2.9 KiB/s)
1: stm32mp157c-dk2-buildroot
Retrieving file: /boot/zImage
4347640 bytes read in 225 ms (18.4 MiB/s)
append: root=/dev/mmcblk0p4 rootwait
Retrieving file: /boot/stm32mp157c-dk2.dtb
116117 bytes read in 46 ms (2.4 MiB/s)
Kernel image @ 0xc2000000 [ 0x000000 - 0x4256f8 ]
## Flattened Device Tree blob at c4000000
Booting using the fdt blob at 0xc4000000
Loading Device Tree to cffe0000, end cffff594 ... OK
Starting kernel ...