News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0720 Boot from QSPI

Started by nturner, January 24, 2019, 02:54:48 AM

Previous topic - Next topic

nturner

I'm pretty new to the Xilinx tool chain so this might be a simple request, but I don't seem able to correctly program my TE0720 to boot Linux from QSPI with no SD card. I followed UG1144 and UG980 for setup. I exported the HDF from the Trenz test_board reference design for the Petalinux setup. Then I tried to program the device as described in this forum post|. Instead of getting the u-boot prompt as seen in the forum I am simply unable to connect to the device over serial.

If I follow the standard SD card boot tutorial from Trenz I can boot successfully. However I'd like to run the device on a custom host board without an SD card slot.

The TE0720 is connected via a TE0701 host board. I'm using Xilinx 2016.4 tools on Ubuntu 16.04. I also have the tool chain configured on a Windows 10 computer if that's easier.

JH

Hi,
when you try to boot from QSPI, you removed the SD, correct? TE0701 selects boot mode automatically, depending on SD detect.

Can you show me the *.bif, which you used to generate your boot.bin?
Which FSBL and uboot did you used? The prebuilt ones, which boots from SD? If not can you try out with these files?

br
John

PS: if you start new project, you should switch to a newer version of vivado. We have reference designs for vivado 2018.2 available.

nturner

John,

First of all, thank you for taking the time to read my post. I appreciate it.
Yes, I remove the SD card before trying to boot from QSPI.

The *.bif file is as follows:
the_ROM_image:
{
[bootloader] /tmp/tmp.BsrenFB6M1/zynq_fsbl.elf
/tmp/tmp.BsrenFB6M1/u-boot.elf
[, load=0x520000, partition_owner=uboot] /tmp/tmp.BsrenFB6M1/image.ub
}


I used the FSBL and uboot that are generated by the Petalinux setup. They are located at
<PROJECT>/images/linux/zynq_fsbl.elf

and
<PROJECT>/images/linux/u-boot.elf

respectively. I am using the same packaging command from the forum post I linked previously:
$ petalinux-package --boot --fsbl /path/to/petalinux-project/images/linux/zynq_fsbl.elf --uboot --kernel

I will try using the prebuilt ones that come with the test_board project and respond with the results.

The reason I am using 2016.4 is I have my own IP that I am planning to use that was developed on that version and I did not want to deal with updating it to 2018.2. I have not done that before so I do not know how hard it actually is. I was just trying to take on one issue at a time. If you think my main problem will be resolved with updated tools I can make the switch.

-Nick

nturner

#3
John,

I went ahead and tried with the prebuilt files from Trenz:

$ petalinux-package --boot --fsbl ~/Documents/test_board/prebuilt/software/te0720_2if/zynq_fsbl.elf --uboot ~/Documents/test_board/prebuilt/os/petalinux/default/u-boot.elf --kernel

I load the BOOT.bin by opening XSDK and selecting "Xilinx Tools -> Program Flash". I've attached an image of the settings I use to program the flash.

The flash log reports the following:
Quoteprogram_flash -f /home/nturner/QSPIBoot/BOOT.BIN -offset 0 -flash_type qspi_single -verify \
-cable type xilinx_tcf url TCP:127.0.0.1:3121
awk: symbol lookup error: awk: undefined symbol: mpfr_z_sub

****** Xilinx Program Flash
****** Program Flash v2016.4 (64-bit)
  **** SW Build 1756540 on Mon Jan 23 19:11:19 MST 2017
    ** Copyright 1986-2016 Xilinx, Inc. All Rights Reserved.

Connecting to hw_server @ TCP:127.0.0.1:3121

Connected to hw_server @ TCP:127.0.0.1:3121
Available targets and devices:
Target 0 : jsn-JTAG-ONB4-251633000415A
   Device 0: jsn-JTAG-ONB4-251633000415A-4ba00477-0

Retrieving Flash info...

Initialization done, programming the memory
BOOT_MODE REG = 0x00000001
WARNING: [Xicom 50-100] The current boot mode is QSPI.
If flash programming fails, configure device for JTAG boot mode and try again.
f probe 0 0 0
Performing Erase Operation...
Erase Operation successful.
INFO: [Xicom 50-44] Elapsed time = 19 sec.
Performing Program Operation...
0%...20%...30%...40%...50%...70%...80%...90%...100%
Program Operation successful.
INFO: [Xicom 50-44] Elapsed time = 50 sec.
Performing Verify Operation...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO: [Xicom 50-44] Elapsed time = 58 sec.
Verify Operation successful.

Flash Operation Successful

I still cannot connect over serial. However, the LED pattern has changed. After earlier flash attempts I would get the following LED pattern:





LEDStatus
D4ON
D2OFF
D5Flash, 4Hz
Currently I get this LED pattern:





LEDStatus
D4ON
D2Flash, irregular
D5OFF

-Nick

P.S.
I tried packaging petalinux slightly differently, using the prebuilt image.ub from Trenz:

$ petalinux-package --boot --fsbl ~/Documents/test_board/prebuilt/software/te0720_2if/zynq_fsbl.elf --uboot ~/Documents/test_board/prebuilt/os/petalinux/default/u-boot.elf --kernel ~/Documents/test_board/prebuilt/os/petalinux/default/image.ub
But I ended with the same results.

nturner

In the interest of ruling out simple problems, I also want to provide details about the serial connection I am using.

I am connecting with the program PuTTY using the settings 115200, 8N1. The program also has a setting called "Flow control" and it is set at the default value of "XON/XOFF". I have attempted to communicate on both /dev/ttyUSB0 and /dev/ttyUSB1, although I remember reading somewhere that the latter is correct.

JH

Hi,
please step by step.
On your first post, your wrote
QuoteIf I follow the standard SD card boot tutorial from Trenz I can boot successfully.
This means it boots from SD and UART is available, correct?

So, use the same Boot.bin from which you used on SD and configure the QSPI flash and try again, it should start and UART should be available and it stops on the U-Boot -Console. Does it?

On your own uboot, did you check that Uboot used the correct UART? On some older petalinux version there were some problems, check petalinux config and platform-auto.h and if needed change it in platfrom-top.h.

PS: Xilinx has start to change petalinux in 16.4 It's not the best version to work when you start a new project. I would recommend to use newer on. 18.2 is available but we will also update to 18.3 They have done a lot of changes (in a good direction).
We have also some notes for different Linux versions:
We add also some petalinux templates to the reference designs, check this configuration with yours.

But we can't give much help for older version, you must do it by yourself.

So if your IP is only HDL code with a little bit GUI, maybe you should try one time tu update. Maybe you must check some constrains. But to fix your own code is much easier than find solutions for problems which are solved in newer Vivado versions.
Here are also links to Xilinx release notes and known issues:

br
John

nturner

John,

Sorry for the late response, I'm juggling a couple of projects at the same time. I went ahead and updated all my Xilinx tools to the 18.2 version.

Yes, I when I say boot successfully using the standard tutorial I meant that I boot from SD and get the Petalinux login prompt over UART. To be clear, this is booting with the instructions under Programming -> Launch -> SD. The files I copied to the SD card were "test_board/prebuilt/boot_images/2if/u-boot/BOOT.bin" and "test_board/prebuilt/os/petalinux/default/image.ub". One thing I discovered while trying to verify this most recently was that on Ubuntu there were permission problems accessing /dev/ttyUSB1. Previously I had been using Windows where that isn't an issue. It could turn out that this was the only problem the whole time, but I'd like to continue down the path we're on to make sure it's not something bigger.

Following that, I try to boot from the same guide, using the instructions under Programming -> Launch -> QSPI. I used the same image.ub as in the previous example. At this point I can open the serial connection, but there is no prompt in the window. Hitting "Enter" in the window does not cause a prompt to appear.

The only places where I find platform-auto.h and platform-top.h are in "[Petalinux Project Dir]/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/" and "[Petalinux Project Dir]/project-spec/meta-user/recipes-bsp/u-boot/files/", respectively. Are those the correct locations? I'm not familiar with what the UART section in platform-auto.h *should* be, so I don't know if this is correct:
/* uart - ps7_uart_1 */
#define CONFIG_ZYNQ_SERIAL
#define CONFIG_ZYNQ_SERIAL_UART1
#define PSSERIAL0 "psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0\0"
#define SERIAL_MULTI "serial=setenv stdout serial;setenv stdin serial\0"
#define CONSOLE_ARG "console=console=ttyPS0,115200\0"
#define SERIAL_MULTI  "serial=setenv stdout serial;setenv stdin serial\0"
#define CONFIG_BAUDRATE 115200

JH

Hi,
QuoteSorry for the late response, I'm juggling a couple of projects at the same time.
No problem it's everywhere the same... :-)

QuoteFollowing that, I try to boot from the same guide, using the instructions under Programming -> Launch -> QSPI. I used the same image.ub as in the previous example. At this point I can open the serial connection, but there is no prompt in the window. Hitting "Enter" in the window does not cause a prompt to appear.
Why image.ub? Use the prebuilt boot.bin only, which you has used on SD. On TE0701 boot mode will be select automatically with SD Card detect. So remove SD Card and restart.
If you get UART console on SD boot, this should also appears on QSPI boot otherwhise system does not boot.
br
John

nturner

John,

I used image.ub on the SD card because I was following the instructions from the tutorial. I know the TE0701 selects boot mode based on the presence on the SD card, I had just forgotten about it. When I remove the SD card and restart I get the U-boot console:

Zynq>
Zynq> boot
Card did not respond to voltage select!
mmc_init: -95, time 24
** Bad device mmc 0 **
no mmc device at slot 0
Zynq>

JH

Ok good, it starts know.
If you want to use QSPI Boot and SD, you can changes TE0701 CPLD Firmware. Source Code is available on the download area.  Or insert SD after it start's to boot(not relay suitable but should works also).  Or you put image.ub into to Boot.bin. In this case you must  change image.ub location in petalinux. Or use eMMC from TE0720 there are many different option possible.

From our wiki, you are right, that can be misunderstand in content with TE0701. Sorry for that but at the moment I can't write a unique documentation for all module carrier combinations. It's generic text and for QSPI you has to change boot mode  to QSPI and this means for TE0701 remove SD

br
John