Programming and configuring the U-boot

1

First of all, this question is related to the creation of embedded Operating System and, to be exact, with Linux Kernel + u-boot + FSBL + device tree + FS compiled to run on an arm A9.

Context:

After booting this (just created) OS upon a Zynq device (specifically, a Pynq Board), the Uart gives these messages:

No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
initcall sequence 04061cc0 failed at call 04045e9c (err=-1)
### ERROR ### Please RESET the board ###

Question:

It is clear that the error is on the generation of the u-boot.elf: it tries to use a device tree that it is impossible to find but, in the BOOT folder, the device tree is present with the name devicetree.dtb. What can cause this problem? Which configuration file can I try to modify to point to the right device tree? Any suggestions?

Some details:

Just to add more information,

1) the first stage bootloader seems to work fine and it prints:

Xilinx First Stage Boot Loader 
Release 2017.1  Jan 25 2018-18:26:02
Devcfg driver initialized 
Silicon Version 3.1
Boot mode is SD
SD: rc= 0
SD Init Done 
Flash Base Address: 0xE0100000
Reboot status register: 0x60600000
Multiboot Register: 0x0000C000
Image Start Address: 0x00000000
Partition Header Offset:0x00000C80
Partition Count: 4
Partition Number: 1
Header Dump
Image Word Len: 0x000F6EC0
Data Word Len: 0x000F6EC0
Partition Word Len:0x000F6EC0
Load Addr: 0x00000000
Exec Addr: 0x00000000
Partition Start: 0x000065D0
Partition Attr: 0x00000020
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xFFD14B7E
Bitstream
In FsblHookBeforeBitstreamDload function 
PCAP:StatusReg = 0x40000A30
PCAP:device ready
PCAP:Clear done
Level Shifter Value = 0xA 
Devcfg Status register = 0x40000A30 
PCAP:Fabric is Initialized done
PCAP register dump:
PCAP CTRL 0xF8007000: 0x4C00E07F
PCAP LOCK 0xF8007004: 0x0000001A
PCAP CONFIG 0xF8007008: 0x00000508
PCAP ISR 0xF800700C: 0x0802000B
PCAP IMR 0xF8007010: 0xFFFFFFFF
PCAP STATUS 0xF8007014: 0x00000A30
PCAP DMA SRC ADDR 0xF8007018: 0x00100001
PCAP DMA DEST ADDR 0xF800701C: 0xFFFFFFFF
PCAP DMA SRC LEN 0xF8007020: 0x000F6EC0
PCAP DMA DEST LEN 0xF8007024: 0x000F6EC0
PCAP ROM SHADOW CTRL 0xF8007028: 0xFFFFFFFF
PCAP MBOOT 0xF800702C: 0x0000C000
PCAP SW ID 0xF8007030: 0x00000000
PCAP UNLOCK 0xF8007034: 0x757BDF0D
PCAP MCTRL 0xF8007080: 0x30800100

DMA Done ! 

FPGA Done ! 
In FsblHookAfterBitstreamDload function 
Partition Number: 2
Header Dump
Image Word Len: 0x0001BB09
Data Word Len: 0x0001BB09
Partition Word Len:0x0001BB09
Load Addr: 0x04000000
Exec Addr: 0x04000000
Partition Start: 0x000FD490
Partition Attr: 0x00000010
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xF7EAF7E3
Application
Partition Number: 3
Header Dump
Image Word Len: 0x00000A05
Data Word Len: 0x00000A05
Partition Word Len:0x00000A05
Load Addr: 0x02A00000
Exec Addr: 0x00000000
Partition Start: 0x00118FA0
Partition Attr: 0x00000012
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xFD4E4FCD
Application
Handoff Address: 0x04000000
In FsblHookBeforeHandoff function 
SUCCESSFUL_HANDOFF
FSBL Status = 0x1
No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
initcall sequence 04061cc0 failed at call 04045e9c (err=-1)
### ERROR ### Please RESET the board ###

2) The only file I modified from the original U-boot repository is the zynq-common.h. I did it because I have to use the Linaro FS and not the default initfsram. Here the part of the file modified (of couse, as you can understand, I am using an SD-Card and the modification were done for the sdboot):

/* Default environment */
#ifndef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS   \
    "fit_image=fit.itb\0"       \
    "load_addr=0x2000000\0"     \
    "fit_size=0x800000\0"       \
    "flash_off=0x100000\0"      \
    "nor_flash_off=0xE2100000\0"    \
    "fdt_high=0x20000000\0"     \
    "initrd_high=0x20000000\0"  \
    "loadbootenv_addr=0x2000000\0" \
    "bootenv=uEnv.txt\0" \
    "bootenv_dev=mmc\0" \
    "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \
    "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \
        "env import -t ${loadbootenv_addr} $filesize\0" \
    "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \
    "setbootenv=if env run bootenv_existence_test; then " \
            "if env run loadbootenv; then " \
                "env run importbootenv; " \
            "fi; " \
        "fi; \0" \
    "sd_loadbootenv=set bootenv_dev mmc && " \
            "run setbootenv \0" \
    "usb_loadbootenv=set bootenv_dev usb && usb start && run setbootenv \0" \
    "preboot=if test $modeboot = sdboot; then " \
            "run sd_loadbootenv; " \
            "echo Checking if uenvcmd is set ...; " \
            "if test -n $uenvcmd; then " \
                "echo Running uenvcmd ...; " \
                "run uenvcmd; " \
            "fi; " \
        "fi; \0" \
    "norboot=echo Copying FIT from NOR flash to RAM... && " \
        "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \
        "bootm ${load_addr}\0" \
    "kernel_image=uImage\0" \
    "kernel_load_address=0x2080000\0"   \
    "ramdisk_image=uramdisk.image.gz\0" \
    "ramdisk_load_address=0x4000000\0"  \
    "devicetree_image=devicetree.dtb\0" \
    "devicetree_load_address=0x2000000\0"   \
    "sdboot=if mmcinfo; then "  \
            "echo Copying Linux from SD to RAM... && "  \
            "load mmc 0 ${kernel_load_address} ${kernel_image} && " \
            "load mmc 0 ${devicetree_load_address} ${devicetree_image} && " \
            "bootm ${kernel_load_address} - ${devicetree_load_address}; "   \
        "fi\0"  \
    "jtagboot=echo TFTPing FIT to RAM... && " \
        "tftpboot ${load_addr} ${fit_image} && " \
        "bootm ${load_addr}\0" \
    "usbboot=if usb start; then " \
            "echo Copying FIT from USB to RAM... && " \
            "load usb 0 ${load_addr} ${fit_image} && " \
            "bootm ${load_addr}; fi\0" \
        DFU_ALT_INFO
#endif

In addition, if needed, I can share other configuration files used.

If you think stackoverflow is NOT the right place where to ask this kind of questions please, suggest me where I can do that and I will move to the other forum. Thank you for your time reading the question.

linux-kernel
embedded-linux
hardware
u-boot
device-tree
asked on Stack Overflow Feb 1, 2018 by Leos313 • edited Feb 1, 2018 by Leos313

1 Answer

1

Refer link, if zynq_artyz7_defconfig used for your pynq board yes, look into the makefile depending on what command you give to build, also you need to look CONFIG_SPL_FS_LOAD_PAYLOAD_NAME in include/configs/zynq-common.h

answered on Stack Overflow Feb 1, 2018 by Prabhakar Lad • edited Feb 1, 2018 by Leos313

User contributions licensed under CC BY-SA 3.0