Post Go back to editing

Analog Devices Kuiper Linux + ZCU102 + AD-FMCOMMS2-EBZ FMC setup problems

Category: Software

Hello, i am following the Analog Device Kuiper Linux image setup guide resources:tools-software:linux-software:zynq_images [Analog Devices Wiki] to prepare a SD card.

 My hardware is an AD-FMCOMMS2-EBZ FMC connected to  Zynq UltraScale + MPSoC ZCU102.

I follow the tutorial without problems, having setting the SD boot card with the appropiate files:

  • Boot.bin
  • uImage (the one in zynq-common subfolder)
  • uEnv.txt
  • system.db
  • bootgen_sysfiles.tgz

But when i have to put the SD Card on the ZCU102,  setup the default environment and set the ethernet addres of my ZCU102 board in the U-Boot terminal (steps showed in the image below).

When i enter the reset command i get the following error: ## Error: "setup" not defined and ## Error: "distro_bootcmd" not defined

I show you the complete terminal output if it helps to see whats the problem:

Xilinx Zynq MP First Stage Boot Loader
Release 2019.1 Jul 27 2021 - 12:47:21
NOTICE: ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE: BL31: Secure code at 0x0
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v2.0(release):xilinx-v2019.2
NOTICE: BL31: Built : 10:19:24, Jan 13 2020
PMUFW: v1.1


U-Boot 2018.01-21436-gbba91bc203 (Jan 13 2020 - 10:50:58 +0200) Xilinx ZynqMP ZCU102 rev1.0, Build: jenkins-development-build_uboot-1

I2C: ready
DRAM: 4 GiB
EL Level: EL2
Chip ID: zu9eg
MMC: sdhci@ff170000: 0 (SD)
*** Warning - bad CRC, using default environment

In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Bootmode: LVL_SHFT_SD_MODE1
Net: ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id

Warning: ethernet@ff0e0000 using MAC address from ROM
eth0: ethernet@ff0e0000
Hit any key to stop autoboot: 0
ZynqMP> env default -a
## Resetting to default environment
ZynqMP> saveenv
Saving Environment to FAT...
writing uboot.env
done
ZynqMP> setenv ethaddr 00:0A:35:07:93:9B
ZynqMP> saveenv
Saving Environment to FAT...
writing uboot.env
done
ZynqMP> reset
resetting ...
Xilinx Zynq MP First Stage Boot Loader
Release 2019.1 Jul 27 2021 - 12:47:21
NOTICE: ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE: BL31: Secure code at 0x0
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v2.0(release):xilinx-v2019.2
NOTICE: BL31: Built : 10:19:24, Jan 13 2020
PMUFW: v1.1


U-Boot 2018.01-21436-gbba91bc203 (Jan 13 2020 - 10:50:58 +0200) Xilinx ZynqMP ZCU102 rev1.0, Build: jenkins-development-build_uboot-1

I2C: ready
DRAM: 4 GiB
EL Level: EL2
Chip ID: zu9eg
MMC: sdhci@ff170000: 0 (SD)
reading uboot.env
In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Net: ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
eth0: ethernet@ff0e0000
## Error: "setup" not defined
Hit any key to stop autoboot: 0
run - run commands in an environment variable

Usage:
run var [...]
- run the commands in the environment variable(s) 'var'
## Error: "distro_bootcmd" not defined

Any help will be very gratefull, as i am very stuck with this.

Thanks in advance.

  • Not sure why uboot writes a broken environment to FAT.

    However I tell you how to resolve it.

    1. Delete broken uboot.env from your SD card FAT partition
    2. Instead modify uEnv.txt: uenvcmd=setenv -f ethaddr 00:0A:35:07:93:9B; run adi_sdboot

    -Michael

  • Hi Michael,

    Thank you for your answer.

    Modifying uEnv.txt this way solved the errors.

    However, i still have some problems when loading Linux, i paste the terminal output:

    Xilinx Zynq MP First Stage Boot Loader
    Release 2019.1 Jul 27 2021 - 12:47:21
    NOTICE: ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
    NOTICE: BL31: Secure code at 0x0
    NOTICE: BL31: Non secure code at 0x8000000
    NOTICE: BL31: v2.0(release):xilinx-v2019.2
    NOTICE: BL31: Built : 10:19:24, Jan 13 2020
    PMUFW: v1.1


    U-Boot 2018.01-21436-gbba91bc203 (Jan 13 2020 - 10:50:58 +0200) Xilinx ZynqMP ZCU102 rev1.0, Build: jenkins-development-build_uboot-1

    I2C: ready
    DRAM: 4 GiB
    EL Level: EL2
    Chip ID: zu9eg
    MMC: sdhci@ff170000: 0 (SD)
    *** Warning - bad CRC, using default environment

    In: serial@ff000000
    Out: serial@ff000000
    Err: serial@ff000000
    Bootmode: LVL_SHFT_SD_MODE1
    Net: ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id

    Warning: ethernet@ff0e0000 using MAC address from ROM
    eth0: ethernet@ff0e0000
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0 is current device
    Device: sdhci@ff170000
    Manufacturer ID: 3
    OEM: 5344
    Name: SC64G
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 59.5 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    reading uEnv.txt
    444 bytes read in 14 ms (30.3 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from SD ...
    Running uenvcmd ...
    Copying Linux from SD to RAM...
    ** No boot file defined **
    reading system.dtb
    43080 bytes read in 21 ms (2 MiB/s)
    ** Unable to read file Image **
    ## Error: "distro_bootcmd" not defined

    No boot file is detected. In the root of my SD card FAT partition i have the linux images provided on 2021-07-28-ADI-Kuiper-full.img:

    • uImage (on zynq-common folder)
    • BOOT.bin (copied from zynqmp-zcu102-rev10-ad9361-fmcomms2-3-4 subfolder)

    I also let you the content of my uEnv.txt file:

    uenvcmd=setenv -f ethaddr 00:0A:35:07:93:9B; run adi_sdboot
    adi_sdboot=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && if fatload mmc 0 0x2000000 ${ramdisk_image}; then bootm 0x3000000 0x2000000 0x2A00000; else bootm 0x3000000 - 0x2A00000; fi
    bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlycon rootfstype=ext4 rootwait clk_ignore_unused cpuidle.off=1

    Best regards.

  • ** Unable to read file Image **

    You need to copy Image from the zynqmp-common folder for ZCU102!

    -Michael