Skip to main content
jhi
Senior
August 7, 2024
Question

STM32MP135 Uboot libfdt fdt_check_header(): FDT_ERR_BADMAGIC

  • August 7, 2024
  • 2 replies
  • 2940 views

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?

2 replies

jhi
jhiAuthor
Senior
August 7, 2024

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

 

 

PatrickF
Technical Moderator
September 20, 2024
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.NEW ! Sidekick STM32 AI agent, see here
Associate III
September 28, 2024

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.

Associate III
September 19, 2024

Hi, 

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