AR# 70304

2017.1-2017.4 PetaLinux: Removing DTB "from boot image" settings causes U-Boot to fail to load ramdisk image.ub

Description

Removing the DTB "from boot image" settings as outlined below causes U-Boot to fail to load the ramdisk image.ub:

1. In petalinux-config change the "dtb image settings" from 'from boot image' to 'primary sd'
( ) from boot image 
( ) primary flash
(X) primary sd
( ) ethernet
( ) manual
2. petalinux-build
3. package the image and copy BOOT.BIN, system.dtb, and Image to SD Card
4. Boot from SD mode


Boot log:

Xilinx Zynq MP First Stage Boot Loader
Release 2017.2   Dec 11 2017  -  20:36:21
NOTICE:  ATF running on XCZU9EG/silicon v3/RTL5.1 at 0xfffea000, with PMU firmware
NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v1.3(release):0d9d51a
NOTICE:  BL31: Built : 22:43:34, Dec 12 2017


U-Boot 2017.01 (Dec 12 2017 - 15:44:16 -0700) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  4 GiB
EL Level:       EL2
Chip ID:        xczu9eg
MMC:   sdhci@ff170000: 0 (SD)
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
eth0: ethernet@ff0e0000
Hit any key to stop autoboot:  0
Device: sdhci@ff170000
Manufacturer ID: 1b
OEM: 534d
Name: 00000
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
** Unable to read file image.ub **
ZynqMP>

Solution

This is due to kernel_image bootargs not updating to "Image", but instead still using image.ub.

Work-around:

This problem can be avoided by using any of the below methods.


Method 1:

  1. Copy BOOT.BIN, system.dtb and Image to the SD card and boot from SD.
  2. Halt at U-Boot then add the below env settings:
ZynqMP> setenv kernel_img Image
ZynqMP> setenv cp_kernel2ram 'mmcinfo && fatload mmc 0 ${netstart} ${kernel_img}'
ZynqMP> setenv cp_dtb2ram 'mmcinfo && fatload mmc 0:1 ${dtbnetstart} ${dtb_img}'
ZynqMP> setenv default_bootcmd 'run cp_kernel2ram && run cp_dtb2ram && booti ${netstart} - ${dtbnetstart}'
ZynqMP> boot

Method 2:

In petalinux-config, change the name as shown below.

Petalinux tools will then update the kernel_image name in the U-Boot args.

CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_IMAGE_NAME="Image"

  1. Copy BOOT.BIN, system.dtb and Image to the SD card and boot from the SD.
  2. Halt at U-Boot then add the below env settings:
ZynqMP> setenv cp_dtb2ram 'mmcinfo && fatload mmc 0:1 ${dtbnetstart} ${dtb_img}'
ZynqMP> setenv default_bootcmd 'run cp_kernel2ram && run cp_dtb2ram && booti ${netstart} - ${dtbnetstart}'
ZynqMP> boot
AR# 70304
Date 05/18/2018
Status Active
Type General Article
Devices
Tools More Less
Boards & Kits