AnsweredAssumed Answered

Build u-boot for Zedboard+AD-FMCOMMS4-EBZ

Question asked by yahniukov on Jul 25, 2018
Latest reply on Jul 26, 2018 by mhennerich

Hi everyone!

My general task is booting Linux OS from Analog Devices from QSPI on Zedboard+AD-FMCOMMS4-EBZ. FPGA should be programmed during boot.

I prepared BOOT.mcs like in this link: Xilinx Wiki - Prepare boot image 

But example in this link doesn't contain pl.bit file and this is problem.

It's my .bif file:

    [offset = 0xF00000]D:\linux_zynq_flash_test_zed\linux\uImage
    [offset = 0x1400000]D:\linux_zynq_flash_test_zed\linux\devicetree.dtb
    [offset = 0x1410000]D:\linux_zynq_flash_test_zed\linux\uramdisk.image.gz

All files (zynq_fsbl_0.elf, system.bit, u-boot-zed.elf, uImage, devicetree.dtb and uramdisk.image.gz) was taken from AD distribution 2016_R1. Linux is not booting.

The main problem in u-boot behavioral. It don't take into account the *.bit file and load kernel image, devicetree and ramdisk from very low offset addresses (kernel - 0x100000, devicetree - 0x600000, ramdisk - 0x620000). I need to stop u-boot every time and change offsets to normally boot Linux. So I decided to build u-boot myself with correct offsets.

In "<uboot-dir>/include/configs/zynq-common.h" I found the next lines:

"qspiboot=echo Copying Linux from QSPI flash to RAM... && " \
        "sf probe 0 0 0 && " \
        "sf read ${kernel_load_address} 0x100000 ${kernel_size} && " \
        "sf read ${devicetree_load_address} 0x600000 ${devicetree_size} && " \
        "echo Copying ramdisk... && " \
        "sf read ${ramdisk_load_address} 0x620000 ${ramdisk_size} && " \
        "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0"

I was change the offset addresses:

0x1000000 -> 0xF000000

0x600000 -> 0x1400000

0x620000 -> 0x1410000

Then I configured u-boot for "zynq_zed_defconfig" and successfully build it. But when I try to boot with new u-boot in the same way as above it's couldn't find QSPI (can't detect).

My question is how can I build u-boot like it did Analog Devices (u-boot-zed.elf file in distribution) but with needed for me offsets?