cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rwillis
Adventurer
Adventurer
1,956 Views
Registered: ‎08-23-2018

ZCU102 - Failure in getting an SDCard to boot (Vivado & Petalinux 2018.3)

Jump to solution

So I am supporting a set of 3 zcu102 boards for the ZYNQ Ultrascale+ series MPSocs. 2 of these boards were purchased earlier last year (2018) and the last one was purchased this month (Feb 2019). I am having problems getting our FPGA+Linux project to boot via SDCard on *both* types of boards now, after switching the toolchain (Vivado+Petalinux) to 2018.3 due to the know issue (below).

I am aware of existing limitations of the new zcu102 boards, being maufacured as of late 2018, 

ref. https://www.xilinx.com/support/answers/71961.html

With a fresh 2018.3 Vivado synthesis build generating .hdf and .bit files and integrating these into a new Petalinux 2018.3 project, I am unable to use the new SDCard image (BOOT.BIN and image.ub on a fat32 partition, same partition settings as used with 2018.2 SD Cards) on either the old boards or the new boards.

Symptoms are noted here:

(old board) 

 - boots FSBL ok
 - loads FPGA ok
 - u-boot .. ok
 - linux - fails to mount emmc0 --> "mmc0: Timeout waiting for hardware cmd interrupt." then repeatedly dumps the mmc0 registers.

(new board)

 - never gets out of FSBL
 - large red INIT_B led remains lit.

 

I think there are multiple factors at play here, any advice on them would be appreciated…

  1. Hardware changes between board manufacturing dates (known issue, resolve by using 2018.3 toolchains for Vivado, Petalinux)(not successful due to other reasons?)
  2. Odd change on the mmc0:
    1. U-boot and linux, for 2018.3, is referring to mmc0 as [u-boot]“mmc@ff170000: 0 (SD)”, [linux]” ff170000.mmc [ff170000.mmc] using ADMA 64-bit” whereas in 2018.2 they use: [u-boot]” sdhci@ff170000: 0 (SD)”, [linux]” ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit”.
    2. Failure in 2018.3 Linux on the older zcu102 hangs with inability to mount SDCard driver on mmc0
    3. (why is software referring to mmc0 and Vivado Block Diagram’s ZYNQ configuration referring to SD 1 / eMMC) are they related?
  3. The 2018.3 FSBL is supposed to support both the old and new variants of the ZCU102 board. Old board boots but the new one does not.
  4. We use the zcu102 board reference as a starting point to the FPGA project (setup in Vivado 2018.2):
    1. Board Part Name: xilinx.com:zcu102:part0:3.2 – does this part need to be changed for Vivado 2018.3 and the new zcu102 board (with new DRAM)?
    2. Does Vivado need to be aware of the hardware change on the zcu102 board (DDR RAM change)?

I will post more here as I keep testing further. I would say that the FSBL problem is not at fault, only I cannot get the new FSBL to boot the new zcu102 board...

As a further observation, note that the new zcu102 board does "boot", when switched over to the QSPI wit hthe default (shipped) image. I have not modified the QSPI image, I want to keep it there to validate that the board is still operational.

 

 - Richard

 

 

 

0 Kudos
1 Solution

Accepted Solutions
rwillis
Adventurer
Adventurer
1,344 Views
Registered: ‎08-23-2018

Sorry to not conclude on this post.

Yes I fixed the issue. It was to do with Xilinx changing the RAM type on newly manufactured boards without doing a version change on the board's part number which I think was a mistake.

My problem was a failure to correctly patch and compile the FSBL due to critical missing work steps, see below (A), (B)

The older FSBL was not capable of initializing the new RAM and it's source code had to be patched.
Petalinux 2019.1 has the FSBL source pre-patched. At least I had no issues with it yet.
My workflow for patching the FSBL is included here below, taken from some email correspondance from Xilinx support.

IMPORTANT - Missing info was the requirement to:
A) edit the petalinuxbsp.conf file as shown below
B) run: petalinux-config -c bootloader to pull the FSBL source code

---

To clarify, this is my workflow for Petalinux 2018.3:

Added patch to this directory.
*MODIFIED EXISTING* <project>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend, see clip 1 below.
*MODIFIED EXISTING* petalinuxbsp.conf file and added lines as shown in clip 2 below
Confirmed that the recipe is part of the project build, see clip 3 below.
Run this to get the FSBL source code so that it can be patched: petalinux-config -c bootloader
Built the petalinux project.  'petalinux-build'
Created the BOOT.BIN. This combines a FPGA bitfile, the fsbl (zynqmp_fsbl.elf) the u-boot and pmufw petalinux-package --boot ...
Put the BOOT.BIN into the BOOT partition on an SDCard (fat32 partition) along with the Linux package (uimage)

<clip-1 fsbl.bbappend> - add/edit the following lines

SRC_URI_append = " file://0001-sw_apps-zynqmp_fsbl-Fix-for-Boot-Issues-with-new-DIM.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
YAML_COMPILER_FLAGS_append = " -DXPS_BOARD_ZCU102"

 

<clip-2 petalinuxbsp.conf> - add the following lines

RM_WORK_EXCLUDE += "fsbl"
RM_WORK_EXCLUDE += "bootloader"

 

<clip-3 bblayers.conf> - confirm

# WARNING: this configuration has been automatically generated and in
# most cases should not be edited. If you need more flexibility than
# this configuration provides, it is strongly suggested that you set
# up a proper instance of the full build system and use that instead.

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
SDKBASEMETAPATH = "/opt/xilinx/petalinux/2018.3/components/yocto/source/aarch64"
BBLAYERS := " \
  ${SDKBASEMETAPATH}/layers/core/meta \
  ${SDKBASEMETAPATH}/layers/core/meta-poky \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-perl \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-python \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-filesystems \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-gnome \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-multimedia \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-networking \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-webserver \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-xfce \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-initramfs \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-oe \
  ${SDKBASEMETAPATH}/layers/meta-browser \
  ${SDKBASEMETAPATH}/layers/meta-qt5 \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-bsp \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-contrib \
  ${SDKBASEMETAPATH}/layers/meta-xilinx-tools \
  ${SDKBASEMETAPATH}/layers/meta-petalinux \
  ${SDKBASEMETAPATH}/layers/meta-virtualization \
  ${SDKBASEMETAPATH}/layers/meta-openamp \
  ${SDKBASEMETAPATH}/workspace \
  <project-path>/project-spec/meta-plnx-generated \
  <project-path>/project-spec/meta-user \
"

 

 - Richard

 

View solution in original post

0 Kudos
6 Replies
rwillis
Adventurer
Adventurer
1,946 Views
Registered: ‎08-23-2018

Note attaching boot logs here for reference...

Boot-001.txt : this log show a new 2018.3 Petalinux project failing to complete booting on the older zcu102 reference board (early 2018 manufacture). This also fails to boot on the newer zcu102 (2018/2019) with RAM changes, this is unexpected... RED INIT_B LED remains lit.

Boot-Normal-001.txt : this log shows what 2018.2 looks like booting up on the older zcu102 boards. As expected, it fails to boot past FSBL on the newer zcu102.

 

0 Kudos
rwillis
Adventurer
Adventurer
1,893 Views
Registered: ‎08-23-2018

Update #2 More testing

Tested and confirmed:

 - not the SDCard (fixed issue with partitions and offsets, note error in UG1144 (2018.2)(2018.3) Chapt. 6 "Configuring SD Card ext filesystems" - The initial fat32 partition should be offset 2048 sectors, eg. gparted default. If documentation is followed (4 MBytes) then the card does not boot).

 

Testing on the new zcu102 board:

 - I can compile, load an SDCard and boot from the "default" Petalinux Project (xilinx-zcu102-2018.3). I made some slight modifications to petalinux-config (removing hard-coded MAC address), loaded the BOOT.BIN and image.ub onto the SDCard and it boots. This is WITHOUT a FPGA image. Note: Changes to the petalinux-config command! New switch in the example (ug1144 2018.3) "--format BIN". Adding this to the custom prohject does not fix it.

 - If I use our BSP (.hdf file) and our FPGA bitfile, building as before and integrating into the BOOT.BIN, nothing appears on the serial console after a power up (this is on the same programmed SDCard, replacing the default BOOT.BIN and image.ub and observing that sdcard finishes writing by using the "sync" linux command). Not even the initial banner appears.

 

Latest Conclusions:

The new evidence points to an issue still within the FSBL. Somehow when the project BSP is changed from the default to the Vivado .hdf, using the command: petalinux-config --get-hw-description=<path/to/hdf-file/directory>
,the FSBL is affected to the extent that not even boot text appears in the serial console. I have to assume the SDCard is booting as no changes were made to the partitions only the 2 files in the fat32 partition were (fully!) deleted and replaced.

 - there are binary differences between the zynqmp_fsbl.elf files, generated in the default project and in our custom bsp. The default projects's FSBL builds to a size of 131032 bytes and the one built in our custom bsp project builds to 126936 bytes.

(!) When I use the default project's FSBL instead of the one built in the custom BSP project, the board boots with our FPGA and our AXI interfaces are intact (we have an issue using i2c-tools with the u20 external clock however, attempts to modify registers return with "device is busy")

...

So why is our project's FSBL different from the one built in the default project? 

(default project is created by using: petalinux-create -t project -s <path/to/bsp>, where the BSP used is: xilinx-zcu102-v2018.3-final.bsp)
(our project modifies the above initial project by using petalinux-config --get-hw-description, as already mentioned above)

 

 

 

 

0 Kudos
tejaallani
Observer
Observer
1,560 Views
Registered: ‎05-08-2018

Hi,

Have you solved your issue as we are also facing same issue on zc7020 board. I have enabled debug prints FSBL and found out that the problem was with FPGA bitstream programming by fsbl. I was waiting for FPGA done bit for a long time.

I see considerable amount of posts about and each post has different solutions none of which worked for me. They may work for you.

https://forums.xilinx.com/t5/Embedded-Processor-System-Design/ZYNQ-PL-Configration-problem/td-p/602785

0 Kudos
tejaallani
Observer
Observer
1,533 Views
Registered: ‎05-08-2018
0 Kudos
maju42
Adventurer
Adventurer
1,370 Views
Registered: ‎05-31-2019

Hi @rwillis @tejaallani , I am having issues in booting from an SD card on ZCU104. can you guys take a look at this: https://forums.xilinx.com/t5/Xilinx-Evaluation-Boards/SD-card-does-not-boot-in-ZCU104/m-p/1029784 and provide any suggestions? It will be really helpful. Thanks.

0 Kudos
rwillis
Adventurer
Adventurer
1,345 Views
Registered: ‎08-23-2018

Sorry to not conclude on this post.

Yes I fixed the issue. It was to do with Xilinx changing the RAM type on newly manufactured boards without doing a version change on the board's part number which I think was a mistake.

My problem was a failure to correctly patch and compile the FSBL due to critical missing work steps, see below (A), (B)

The older FSBL was not capable of initializing the new RAM and it's source code had to be patched.
Petalinux 2019.1 has the FSBL source pre-patched. At least I had no issues with it yet.
My workflow for patching the FSBL is included here below, taken from some email correspondance from Xilinx support.

IMPORTANT - Missing info was the requirement to:
A) edit the petalinuxbsp.conf file as shown below
B) run: petalinux-config -c bootloader to pull the FSBL source code

---

To clarify, this is my workflow for Petalinux 2018.3:

Added patch to this directory.
*MODIFIED EXISTING* <project>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend, see clip 1 below.
*MODIFIED EXISTING* petalinuxbsp.conf file and added lines as shown in clip 2 below
Confirmed that the recipe is part of the project build, see clip 3 below.
Run this to get the FSBL source code so that it can be patched: petalinux-config -c bootloader
Built the petalinux project.  'petalinux-build'
Created the BOOT.BIN. This combines a FPGA bitfile, the fsbl (zynqmp_fsbl.elf) the u-boot and pmufw petalinux-package --boot ...
Put the BOOT.BIN into the BOOT partition on an SDCard (fat32 partition) along with the Linux package (uimage)

<clip-1 fsbl.bbappend> - add/edit the following lines

SRC_URI_append = " file://0001-sw_apps-zynqmp_fsbl-Fix-for-Boot-Issues-with-new-DIM.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
YAML_COMPILER_FLAGS_append = " -DXPS_BOARD_ZCU102"

 

<clip-2 petalinuxbsp.conf> - add the following lines

RM_WORK_EXCLUDE += "fsbl"
RM_WORK_EXCLUDE += "bootloader"

 

<clip-3 bblayers.conf> - confirm

# WARNING: this configuration has been automatically generated and in
# most cases should not be edited. If you need more flexibility than
# this configuration provides, it is strongly suggested that you set
# up a proper instance of the full build system and use that instead.

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
SDKBASEMETAPATH = "/opt/xilinx/petalinux/2018.3/components/yocto/source/aarch64"
BBLAYERS := " \
  ${SDKBASEMETAPATH}/layers/core/meta \
  ${SDKBASEMETAPATH}/layers/core/meta-poky \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-perl \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-python \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-filesystems \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-gnome \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-multimedia \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-networking \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-webserver \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-xfce \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-initramfs \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-oe \
  ${SDKBASEMETAPATH}/layers/meta-browser \
  ${SDKBASEMETAPATH}/layers/meta-qt5 \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-bsp \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-contrib \
  ${SDKBASEMETAPATH}/layers/meta-xilinx-tools \
  ${SDKBASEMETAPATH}/layers/meta-petalinux \
  ${SDKBASEMETAPATH}/layers/meta-virtualization \
  ${SDKBASEMETAPATH}/layers/meta-openamp \
  ${SDKBASEMETAPATH}/workspace \
  <project-path>/project-spec/meta-plnx-generated \
  <project-path>/project-spec/meta-user \
"

 

 - Richard

 

View solution in original post

0 Kudos