UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor bmagnusen
Visitor
1,908 Views
Registered: ‎03-16-2018

Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

We're trying to boot PetaLinux 2017.4 on an Ultrazed-EG from SD card, but are getting the following output message during boot:

** Unable to read file system.dtb **

 

Below I've listed all pre-configuration details and the steps we've taken to produce the SD card. We want to be able to boot entirely from the SD card eventually (fsbl, u-boot, kernel, rootfs).

 

Is there something wrong with the steps we're taking perhaps?

 

 

Steps Taken To Produce SD Card

 

# Pre-Configuration
1) PetaLinux 2017.4 installed and its settings.sh file 'source'ed
2) HDF file from Vivado located at ~/hdf/uz3eg_iocc_dp_wrapper.hdf
3) SW2 Boot Mode switch (MODE[3:0]) configured as ON, OFF, ON, OFF
4) SD card present with partitions configured as:
   Partition    File System  Mount Point           Label   Size        Flags
   =========================================================================
   unallocated  unallocated                                  4.00 MiB
   /dev/sdb1    fat32        /media/brianm/BOOT    BOOT    128.00 MiB
   /dev/sdb2    ext4         /media/brianm/rootfs  rootfs   14.32 GiB
   unallocated  unallocated                                  4.00 MiB

# Create the project
$ cd ~
$ petalinux-create -t project --template zynqMP --name myproject

# Import the hardware configuration
$ cd ~/myproject/
$ petalinux-config --get-hw-description=~/hdf/

# Modify system configuration to boot from SD card when the menuconfig interface is presented
Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> boot image settings -> image storage media -> primary sd (per UG1144 pg. 42)
Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> kernel image settings -> image storage media -> primary sd (per UG1144 pg. 42)
Image Packaging Configuration -> Root filesystem type -> SD card (per UG1144 pg. 48)

# Build the project
$ petalinux-build
$ petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --fpga images/linux/uz3eg_iocc_dp_wrapper.bit --u-boot

# Prepare SD card
$ cp ~/myproject/BOOT.BIN /media/brianm/BOOT/
$ cp ~/myproject/images/linux/image.ub /media/brianm/BOOT/
$ cp ~/myproject/images/linux/system.dtb /media/brianm/BOOT/
$ cp ~/myproject/images/linux/rootfs.tar.gz /media/brianm/rootfs/
$ cd /media/brianm/rootfs/
$ tar xvf rootfs.tar.gz

 

 

Resulting Output

 

Xilinx Zynq MP First Stage Boot Loader
Release 2017.4   Mar 16 2018  -  12:07:32
NOTICE:  ATF running on XCZU3EG/silicon v4/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):47af34b
NOTICE:  BL31: Built : 18:41:56, Mar 16 2018


U-Boot 2017.01 (Mar 16 2018 - 11:41:47 -0700) Xilinx ZynqMP ZCU102 revB

I2C:   ready
DRAM:  2 GiB
ERROR: usb dr_mode not found

at /home/brianm/myproject/build/tmp/work/plnx_aarch64-xilinx-linux/u-boot-xlnx/v2017.01-xilinx-v2017.4+gitAUTOINC+5fa7d2ed06-r0/git/drivers/usb/common/common.c:32/usb_get_dr_mode()
EL Level:       EL2
Chip ID:        xczu3eg
MMC:   sdhci@ff160000: 0 (eMMC), sdhci@ff170000: 1 (SD)
zynqmp_qspi_ofdata_to_platdata: CLK 124999999
SF: Detected n25q256a with page size 512 Bytes, erase size 128 KiB, total 64 MiB
In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: ff0e0000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@ff0e0000
U-BOOT for ndazynq

ethernet@ff0e0000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded
Hit any key to stop autoboot:  0
Device: sdhci@ff160000
Manufacturer ID: 13
OEM: 14e
Name: Q2J55
Tran Speed: 200000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.1 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.1 GiB WRREL
Boot Capacity: 16 MiB ENH
RPMB Capacity: 4 MiB ENH
reading image.ub
26582120 bytes read in 1918 ms (13.2 MiB/s)
Device: sdhci@ff160000
Manufacturer ID: 13
OEM: 14e
Name: Q2J55
Tran Speed: 200000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.1 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.1 GiB WRREL
Boot Capacity: 16 MiB ENH
RPMB Capacity: 4 MiB ENH
reading system.dtb
** Unable to read file system.dtb **
ZynqMP>

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
2,356 Views
Registered: ‎11-10-2017

Re: Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

hi @bmagnusen

 

Sorry , my fault, was not clear the first time :(

 

 

clean command will clean up the changes that are done and re-write the system default setting . You need to update these changes in system-user.dtsi file which will be :

 

petalinux_project/meta-user/recipes-bsp/device-tree/files 

 

similary in the u-boot system-top.h file as per the mentioned AR in the previous reply.

 

make use when you copy from the zynqmp.dtsi do this only :

/include/ "system-top.dtsi"
{
   choosen {
   };
};


&sdhci0 {
       status = "disabled";
};

&sdhci1 {
       status = "okay";
};

Keep the SDHCI0 and 1 outside the default node function

 

You can also have the look at my files shared in the other threads.. though those will be when i was getting issue .

 

Regards ,

 

Vishal

 

 

 

 

View solution in original post

4 Replies
Adventurer
Adventurer
1,853 Views
Registered: ‎11-10-2017

Re: Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

hi @bmagnusen

 

I got similar issues when i started to create SD boot for my device :

 

your boot is still goining with emmc: Device: sdhci@ff160000

 

i corrected that by switching it off in the device tree settings: find out sdhci0 and sdhci1 in the device tree

 

use this:

 

&sdhci0{

  status="disabled";

}

 

&sdhci1{

  status="okay";

}

 

also clean up the folder :

 

rm -rf /components/plnx_xlnx

rm -rf /build/tmp build/cache

 

petalinux-build -x cleanall 

petalinux-build -x mrproper

 

 

you also need to use the patches for the known issues , mainly : 32bit memory, there are four patches as given in the known issues of the petalinux2017.3 and 207.4 versions. (https://www.xilinx.com/support/answers/70277.html). Check AR# 70285, 69997, 70304, 69780

 

once that is all done:

 

petalinux-build -c device-tree

petalinux-build

 

may be my these threads will be able to help out:

 

https://forums.xilinx.com/t5/Embedded-Linux/Not-able-to-mount-root-fs-during-SD-boot-in-Ultrazed-MPSoC/td-p/831774

 

https://forums.xilinx.com/t5/Embedded-Linux/Ultrazed-FSBL-hangs-in-boot-up-process-petalinux-2017/m-p/824350#M23794

 

 

 

 

 

 

 

0 Kudos
Highlighted
Visitor bmagnusen
Visitor
1,830 Views
Registered: ‎03-16-2018

Re: Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

Hi @vish.bh30,

 

Really appreciate your help with this!

 

Just so you know, I'm somewhat familiar with working in Yocto, but not PetaLinux, so I'm still trying to figure out many of the basics.

 

In components/plnx_workspace/device-tree/device-tree-generation/zynqmp.dtsi my sdhci0 & sdhci1 sections look like this:

        sdhci0: sdhci@ff160000 {
            u-boot,dm-pre-reloc;
            compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
            status = "disabled";
            interrupt-parent = <&gic>;
            interrupts = <0 48 4>;
            reg = <0x0 0xff160000 0x0 0x1000>;
            clock-names = "clk_xin", "clk_ahb";
            xlnx,device_id = <0>;
            #stream-id-cells = <1>;
            iommus = <&smmu 0x870>;
            power-domains = <&pd_sd0>;
        };

        sdhci1: sdhci@ff170000 {
            u-boot,dm-pre-reloc;
            compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
            status = "disabled";
            interrupt-parent = <&gic>;
            interrupts = <0 49 4>;
            reg = <0x0 0xff170000 0x0 0x1000>;
            clock-names = "clk_xin", "clk_ahb";
            xlnx,device_id = <1>;
            #stream-id-cells = <1>;
            iommus = <&smmu 0x871>;
            power-domains = <&pd_sd1>;
        };

 

In the sdhci1 section, I tried changing the "status" line as I think you are recommending from:

  status = "disabled";

to:

  status = "okay";

But after doing the clean and build steps you mentioned the zynqmp.dtsi file reverted and that change was lost. Apparently that file is generated and I don't know where to change it at the proper source so that the change propagates through. Do you know where this change must be made?

 

Thanks also for pointing out the patches for known issues. I'll be sure to apply those as soon as I'm past this SD card boot issue.

0 Kudos
Adventurer
Adventurer
2,357 Views
Registered: ‎11-10-2017

Re: Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

hi @bmagnusen

 

Sorry , my fault, was not clear the first time :(

 

 

clean command will clean up the changes that are done and re-write the system default setting . You need to update these changes in system-user.dtsi file which will be :

 

petalinux_project/meta-user/recipes-bsp/device-tree/files 

 

similary in the u-boot system-top.h file as per the mentioned AR in the previous reply.

 

make use when you copy from the zynqmp.dtsi do this only :

/include/ "system-top.dtsi"
{
   choosen {
   };
};


&sdhci0 {
       status = "disabled";
};

&sdhci1 {
       status = "okay";
};

Keep the SDHCI0 and 1 outside the default node function

 

You can also have the look at my files shared in the other threads.. though those will be when i was getting issue .

 

Regards ,

 

Vishal

 

 

 

 

View solution in original post

Visitor bmagnusen
Visitor
1,780 Views
Registered: ‎03-16-2018

Re: Ultrazed-EG Starter Kit can't boot from SD card (Unable to read file system.dtb)

Jump to solution

Thanks @vish.bh30! Your suggested modification to the system-top.dts file fixed the "Unable to read file system.dtb" issue.

 

Now there's another issue during Linux boot, but I'll generate another thread for that one if I can't figure it out.

0 Kudos