cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135 Uboot libfdt fdt_check_header(): FDT_ERR_BADMAGIC

jhi
Senior

I'm trying to boot from SD-card and u-boot doesn't seem to find device tree. I have built my system with buildroot (bootlin st/2023.02.2) overriding the sources for tf-a, u-boot, op-tee and kernel, to be able to boot at least to u-boot (I did write another posts of my problems).

The files in SD-card

boot
├── extlinux
│   └── extlinux.conf
├── myb-stm32mp135x-512m.dtb
└── zImage

extlinux.conf

label myb-stm32mp135x-512m-buildroot
  kernel /boot/zImage
  devicetree /boot/myb-stm32mp135x-512m.dtb
  append root=/dev/mmcblk0p5 rootwait rw console=ttySTM0,115200

genimage

image sdcard.img {
	hdimage {
		partition-table-type = "gpt"
	}

	partition fsbl1 {
		image = "%ATFBIN%"
	}

	partition fsbl2 {
		image = "%ATFBIN%"
	}

	partition fip {
		image = "fip.bin"
	}

	partition u-boot-env {
		size = 2M
	}

	partition rootfs {
		image = "rootfs.ext4"
		bootable = "yes"
	}
}

So any ideas why it doesn't work?

4 REPLIES 4
jhi
Senior

I forgot to add the boot log

Boot over mmc0!
Saving Environment to MMC... Writing to redundant MMC(0)... OK
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:5...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@58005000.blk...
Scanning disk mmc@58007000.blk...
Found 16 disks
No EFI system partition

Error: eth2@5800e000 address not set.

Error: eth1@5800a000 address not set.

Error: eth2@5800e000 address not set.

Error: eth1@5800a000 address not set.
spi-nand: spi_nand MT29F2G01AB@0: unknown raw ID daf51a88
Device spi-nand0 not found!
ETZPC: 0x5a003000 node disabled, decprot 6=1
FDT: cryp@54002000 node disabled for STM32MP135D Rev.Y
BootOrder not defined
EFI boot manager: Cannot load any image

 

 

ahamod3.1416
Associate II

Hi, 

were you able to solve your problem? I having similar issue. 

Hi,

please have a look to https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command ?

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks a lot, Patrick. This worked for formatting the SD card. But I had some changed configuration, because of that It could not boot to linux. I changed my configuration, and from u-boot console I gave some boot command and after that, and it booted through Linux. Thanks again.