Author Topic: TE0726 Test board example in TE0726-02  (Read 935 times)

javier.reyes.g

  • Active Member
  • *
  • Posts: 19
TE0726 Test board example in TE0726-02
« on: February 22, 2018, 02:06:03 PM »
I am getting to understand the Zynqberry 0726-02M, and I have followed the guides (Xilinx and Trenz). I was able to run the Hello world example (standalone), I have played a little with the SDK, handling GPIO and UARTs.

Now I want to test the linux embedded, and I found the recently added example (Test Board, https://wiki.trenz-electronic.de/display/PD/TE0726+Test+Board). I was waiting for this as previously the examples where all for Vivado versions 2017.1 and 2017.3, and I happened to have downloaded the 2017.4 version (both Vivado and Petalinux). I just didn't want to re-install everything again.

But the information in the README and the Wiki, lists the board versions te0726-01 - te0726-03r - te0726-03m - te0726-03-07s-1c. Does that mean that the board version 02M is not able to work with the example?

If that is the case, is it possible to get an advice on a good guide for the process to build the linux image with Petalinx for the board in mention? I have seen so many different guides, that it gets kind of confusing.

Thanks in advance

Javier

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 312
Re: TE0726 Test board example in TE0726-02
« Reply #1 on: February 27, 2018, 12:02:31 PM »
Hello,


Vivado version is important for project creation from a script, as different Vivado versions have different parameters for Zynq core. You can try to run Vivado 2017.3 project example in Vivado 2017.4, it should be no major differences. You just have to change the version in the script. We will rebuild this projects for Vivado 2017.4 soon.
All examples should work on 02M board.
You can check https://wiki.trenz-electronic.de/display/PD/PetaLinux+KICKstart

Best regards
Oleksandr Kiyenko

JH

  • Sr. Member
  • ****
  • Posts: 469
Re: TE0726 Test board example in TE0726-02
« Reply #2 on: March 05, 2018, 09:08:33 AM »

javier.reyes.g

  • Active Member
  • *
  • Posts: 19
Re: TE0726 Test board example in TE0726-02
« Reply #3 on: March 08, 2018, 04:58:44 PM »
Dear all,

Thanks for the help. Following the PetaLinux KICKstart guide, I was able to build an image. But I have a doubt regardless which files axactly should be packed into the BOOT.BIN, and what exactly needs to be copied into the SD (as I read here in the forums, the board TE 726-02M can't boot from SD, so the BOOT.BIN needs to be programed in the flash, and the rest of the boot process is then read from the SD).

What I did is:
-Create the hardware description in Vivado
-Create the Petalinux template
-Import the hdf file into the petalinux template
-Config the petalinux to include the modules that I need (basically the USB Ethernet module)
-Build the image
-Package boot image containing the FSBL, FPGA bitstream, and U-Boot, with the petalinux command
-Format the SD (1 FAT32 - 1 EXT4)
-Copy the BOOT.BIN, kernel image image.ub and device tree system.dtb into the first partition
-Copy the root file system into the second part of the sd
-Insert SD into board
-Connect a serial terminal into usb uart port
-Program flash device with BOOT.BIN in SDK

I can actually see in the terminal the boot process start, but it gets stucked in a part where says: Press a key to stop autoboot: 3.

Any correction or comment?

Thanks in advance

Regards

JH

  • Sr. Member
  • ****
  • Posts: 469
Re: TE0726 Test board example in TE0726-02
« Reply #4 on: March 08, 2018, 05:21:38 PM »
Hi,

did you follow instructions from:
and?
Did you select correct assembly variant on the script? Did you use our petalinux template with correct device tree and so?

At first use generated file (they will be over write if you follow instructions above, so if you done this from the link, please download zip again)
This small Zynq package does not allow primary boot from SD. See:So primary boot is QSPI. boot.bin must be on QSPI. Uboot can be get access to SD as secondary boot and can load image.ub from SD. RAM disk on SD is also possible. At the moment we have only a 2017.1 debian demo for this. But you can change this also on 2017.4 test_board project.

br
John

javier.reyes.g

  • Active Member
  • *
  • Posts: 19
Re: TE0726 Test board example in TE0726-02
« Reply #5 on: March 31, 2018, 10:58:45 PM »
Dear John,

Thanks for the input.
I did not use the .sh scripts to create the vivado hardware project, but created it myself (as I need to enable CAN module), using a simple Zynq7 IP core, with the configuration presets applied from the TCL script available here https://eewiki.net/display/Motley/Getting+Started+with+the+ZynqBerry.

So after the hardware project was done, I followed the procedure in the already mentioned tutorial. I have tried to understand the procedures that are related to the Design Flow and Launch sections that you mentioned, as well as the Petalinux Kickstart, but honestly they are written quite confusing, really short sentences, and I can't really see a common procedure.

What exactly should be the flow for booting the pre-built image in the test_board reference design for 2017.4 in Znyberry TE 0726-02 M?

Thanks in advance

JH

  • Sr. Member
  • ****
  • Posts: 469
Re: TE0726 Test board example in TE0726-02
« Reply #6 on: April 10, 2018, 09:28:54 AM »
Hi,

your link seems not longer online, but no matter there are much ways to work with Vivado and Xilinx SoCs so it's not possible to help on all ways.

At first i would recommend to program ZynqBerry with our scripts and prebuilt files:
For more details how to program flash, you can use Xilinx documentation:To generate your design, you should generate at first our reference design without changes, if everything works, you can start to modify or generate your own design.
Steps are allways the same and also described in Xilinx Documentation:
  • Generate Vivado project (for Zynq configure PS with board part automation(manually is also possible, but if PS configuration, a specially DDR is not correct, system will not boot))
  • Export HDF
  • Generate SW Application (SDK/VPetalinux/...)
  • Generate Bootfile
  • Boot System(In case of ZynqBerry, configure Boot.bin into Flash and put image.ub on sd)
br
John



javier.reyes.g

  • Active Member
  • *
  • Posts: 19
Re: TE0726 Test board example in TE0726-02
« Reply #7 on: April 16, 2018, 09:26:31 PM »
Thanks JH for the reply.

Apparently, the link I referred was temporary down, but now is online again.

As mentioned, I followed the instructions in the Testboard example, using the scripts provided. The part that I am still confused is the programming part:

1. Generated the project with the vivado_create_project_guimode.sh, and TE::hw_build_design -export_prebuilt on Vivado TCL console.
2. Run init_congif.sh, and follow Petalinux Kickstart:
  a. petalinux-create --type project --template zynq --name <PROJECT_NAME>
  b. petalinux-config --get-hw-description=<PATH_TO_HDF>
  c. petalinux-config, petalinux-config -c kernel, petalinux-config -c rootfs

On this part, in Kickstart documentation does not say anything about the petalinux-config, but in the tutorial mentioned before, says one need to config SD options, and in the petalinux-config -c kernel, one needs to config the USB-to-ethernet driver. Is this correct? Or am I mixing things and creating problems?

3. petalinux-build

In this part, it is not clear for me if I should create the BOOT.BIN with SDK directly, or petalinux-package --boot command, or how exactly should I create it (considering the note about the Zynqberry 726 with Vivado 2017.4, which requires FSBL to create the BOOT.BIN). It is supposed to be a special FSLB precompiled in the Testboard files, but I found nothing, and I tried with SDK a BOOT.BIN using the command:
petalinux-package --boot --fsbl ./images/linux/zynq_fsbl.elf --fpga <path-to-bit-file>.bit --u-boot

4. I copied the image.ub in the first partition of SD card, with the system.dtb. In the second partition, copied the root file system (ubuntu), and created the fstab file (all accordingly with the tutorial mentioned above).

At the end, the SD card in the board, program the flash with the BOOT.BIN, and connect a serial terminal to the port that is created. I can see the first messages on the boot up, kernel version, hardware checking, and then it gets on hold forever. What could be the problem, or what am I doing wrong?

I appreciate any comment

JH

  • Sr. Member
  • ****
  • Posts: 469
Re: TE0726 Test board example in TE0726-02
« Reply #8 on: April 17, 2018, 10:13:44 AM »
Hi,

if you use our temple (os\petalinux), init_config.sh is used to set correct project path (there is a absolute variable on one petalinux config file, which must be changed)
If you use the template, you did not run the step to create an project (you have one), see:
Petalinux Config is xilinx documentation, we give only basic note. See also:So fastway:
  • 1 use our petalinux template
  • copy hdf into the petalinx template basfolder and run petalinux-config --get-hw-description
  • run petalinux-build
  • use Uboot.elf to generate Boot.bin with SDK (FSBL, bitfile and uboot.elf) --> like Hello World, only replace this elf file with the uboot.elf: https://wiki.trenz-electronic.de/display/PD/SDK+Projects#SDKProjects-Xilinx%22HelloWorld%22onZynq
  • Put image.ub on SD
  • On TE0726, you must put Boot.bin on QSPI, because  CLG225 package support no SD boot. See Zynq TRM from Xilinx
For newer Designs, we add Wiki Documentation with all changes, we have done on the petalinux project (on older project you must check the template file)
So normally only follow this steps:I would recommend to generate Boot.bin on with SDK. We include also bif file in the reference design.
To generate File system on SD, you must change rootfs location on petalinux config --> default also on our 2017.4 test_board it's included as RAMDisk on image.ub


We have a 2017.1 example design online, with debian desktop on SD (here currently with download page decription, wiki description follows on next update):
PS: Special FSBL for QSPI programming is only needed for 2017.3 and newer. And this is only used on GUI setup of Vivado/SDK, see also note: https://wiki.trenz-electronic.de/display/PD/TE0726+Test+Board#TE0726TestBoard-DesignFlow

br
John