Recent Posts

Pages: [1] 2 3 ... 10
1
Hi,

I want to boot the Linux from the SD card, so I have to do some additional research on how I modify the "boot.scr". I have checked "/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr" and found the file "boot.cmd.default" which consist the plaintext script:

Code: [Select]
# This is a boot script for U-Boot
# Generate boot.scr:
# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
#
################
## Please change the kernel_offset and kernel_size if the kernel image size more than
## the 100MB and BOOT.BIN size more than the 30MB
## kernel_offset --> is the address of qspi which you want load the kernel image
## kernel_size --> size of the kernel image in hex
###############
fdt_addr=0x1000
imageub_addr=0x10000000
kernel_addr=0x80000
kernel_offset=0x1E00200
kernel_size=0x7800000
kernel_type=image.ub

for boot_target in ${boot_targets};
do
if test "${boot_target}" = "jtag" ; then
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then
if test -e ${devtype} ${devnum}:${distro_bootpart} /image.ub; then
fatload ${devtype} ${devnum}:${distro_bootpart} ${imageub_addr} image.ub;
bootm ${imageub_addr};
exit;
fi
if test -e ${devtype} ${devnum}:${distro_bootpart} /Image; then
fatload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr} Image;
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
if test "${boot_target}" = "xspi0"; then
sf probe 0 0 0;
if test "${kernel_type}" = "image.ub"; then
sf read ${imageub_addr} ${kernel_offset} ${kernel_size};
bootm ${imageub_addr};
exit;
fi
if test "${kernel_type}" = "Image"; then
sf read ${kernel_addr} ${kernel_offset} ${kernel_size};
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
exit;
fi
done

I think you are right with your mention that the build system doesn´t use the changes, because the guy from Tux Engineering wrote the same:

"...
Now somewhat redundantly, we need to inform u-boot again, where to find the bootscr partition offset, by modifying the following lines in recipes-bsp/u-boot/u-boot-zynq-scr.bbappend:
..."
2
Hi, thanks for your note. "boot.scr" is new for me, I will check it.

To your problem. You did not put linux into  flash, you must check and modify "boot.scr" maybe. Did you want to boot linux from flash or from SD? We put image.ub normally on SD (flash is also possible, but you has limit space only), so check boot.scr is set to SD  card for image search.

PS: I think "petalinux-config -c u-boot"  changes will not be used by petalinux build at the moment, because this changes are in the developer space. Export receipt must be done --> that was the problem I've (Which I wrote in a older post). In your case you has done the same changes on platform-top.h with "CONFIG_BOOT_SCRIPT_OFFSET=0xFA000" that's the same like modify on uboot config menu, so you has done 2 times the same changes and I think this  one from platform-top is used and this one from uboot config is ignored during build.

br
John
3
Okay, I got stuck now...

I followed these two guides:

https://tuxengineering.com/blog/2020/09/03/U-Boot-changes-to-distro-boot.html
https://forums.xilinx.com/t5/Embedded-Development-Tools/Unable-to-boot-from-QSPI-using-Petalinux-2020-1-Upgrading-from/td-p/1145107

First I have created a new partition for the "boot.scr" (see screenshot). Then I modify "recipes-bsp/u-boot/files/platform-top.h" with the address

Code: [Select]
CONFIG_BOOT_SCRIPT_OFFSET=0xFA0000

and run

Code: [Select]
petalinux-config -c u-boot

I change the boot script offset to 0xFA0000 (see screenshot) and finish the build

Code: [Select]
petalinux-build

In the next step I try to write the "boot.scr" file into the flash memory by using the following TCL command:

Code: [Select]
program_flash -f .../ZynqBerry/MinimalLinux/flash/boot.scr -offset 0xFA0000 -fsbl .../ZynqBerry/fsbl_flash/fsbl_flash.elf -flash_type qspi-x4-single -verify -target_name jsn-JTAG-ONB4-251633001BB2A -url tcp:localhost:3121

The command exit with the error (but why?)

Code: [Select]
ERROR: Given target do not exist

So I try another way. I use the "zynq_fsbl", "u-boot.elf", "boot.scr" and my bitstream to generate a new "BOOT.bin" with Vitis:

Code: [Select]
//arch = zynq; split = false; format = BIN
the_ROM_image:
{
[bootloader]...\ZynqBerry\MinimalLinux\zynq_fsbl.elf
...\ZynqBerry\MinimalLinux\application\MinimalLinux\hw\System_wrapper.bit
...\ZynqBerry\MinimalLinux\u-boot.elf
[offset = 0xFA0000]...\ZynqBerry\MinimalLinux\boot.scr
}

The resulting file is written into the flash and the ZynqBerry was bootet, but throw this error:

Code: [Select]
U-Boot 2020.01 (Jan 17 2021 - 22:20:11 +0000)

CPU:   Zynq 7z010
Silicon: v3.1
DRAM:  ECC disabled 512 MiB
Flash: 0 Bytes
NAND:  0 MiB
MMC:   mmc@e0101000: 0
Loading Environment from SPI Flash... SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0xfa0000, size 0x40000
SF: 262144 bytes @ 0xfa0000 Read: OK
QSPI: Trying to boot script at 0x3000000
## Executing script at 03000000
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Offset exceeds device limit
sf - SPI flash sub-system

Usage:
sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
                                  and chip select
sf read addr offset|partition len       - read `len' bytes starting at
                                          `offset' or from start of mtd
                                          `partition'to memory at `addr'
sf write addr offset|partition len      - write `len' bytes from memory
                                          at `addr' to flash at `offset'
                                          or to start of mtd `partition'
sf erase offset|partition [+]len        - erase `len' bytes from `offset'
                                          or from start of mtd `partition'
                                         `+len' round up `len' to block size
sf update addr offset|partition len     - erase and write `len' bytes from memory
                                          at `addr' to flash at `offset'
                                          or to start of mtd `partition'
sf protect lock/unlock sector len       - protect/unprotect 'len' bytes starting
                                          at address 'sector'

Wrong Image Format for bootm command
ERROR: can't get kernel image!
QSPI: SCRIPT FAILED: continuing...
JTAG: Trying to boot script at 0x3000000
## Executing script at 03000000
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Offset exceeds device limit
sf - SPI flash sub-system

So why does u-boot print out this:

Code: [Select]
Trying to boot script at 0x3000000

This is the wrong address for the boot script.
4
Trenz Electronic FPGA Modules / Re: Building u-boot with PetaLinux for ZynqBerry
« Last post by kampi on January 17, 2021, 08:12:57 PM »
Hi,

I think I found the "problem":

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/749142017/Using+Distro+Boot+With+Xilinx+U-Boot

PetaLinux 2020.1+ uses something that is called "Distro boot" with the "boot.scr" method. So I have to place "boot.scr" in the flash memory of the ZynqBerry.
5
The design has timing violations in DVI2RGB on the input side decoding TMDS at 800 Mhz+ .. but I see no timing violations on the output. I see no input artifacts and I see the same output issue with input on and off..

Yes, I get a clean 148.5mhz out of the clocking wiz (200mhz in from DDR3). Output is not central to my design (only for debugging) and I'm ok with 50hz frames for now.. just unexpected.. 

The only think I can think of is some timing issue in the conversion from 148.5mhz to DDR at half the rate. I'm using your IP which I took from your zynq reference design. I made one change.. I skip swapping Red and Green (or whatever you do for Linux FB compatibility). I can take another look if that might change timing.. 
6
Hi!
Are you see any timing problems in the report?
Also which clock is showing your clocking wizard block in the "Actual" column?

BR
Oleksandr Kiyenko
7
My setup is simple on the 701:

VDMA -> AXI to Video (with timing control) -> Video to HDMI IP (from Trenz) -> AD chipset.

Rock solid at 1080P @ 50 Hz (timing clock / IP clock set to 123.75.
But - dancing pixels at edges of high contrast lines when I up the clock to 148.5mhz (1080p@60)

I don't see how any of the code violates max timing of the Artix-7 module. (speed grade 2) and the AD chipset can handle up to 220mhz. Also not a cable or display issue.
AXI running at 180mhz, DDR3 is 32bit and has 256 bit AXI at 100mhz. There should be no bandwidth issues.. but I'm open to questions here.

Ideas?
8
Trenz Electronic FPGA Modules / Re: Building u-boot with PetaLinux for ZynqBerry
« Last post by kampi on January 14, 2021, 06:19:23 PM »
Ok. Let me know when you have a solution. Until then  I will use the pre-compiled u-boot from your reference project.
9
Trenz Electronic FPGA Modules / Re: Building u-boot with PetaLinux for ZynqBerry
« Last post by JH on January 14, 2021, 04:47:44 PM »
Hi,
no problem.
Quote
so I don´t know exactly what this command is doing. But maybe I can repeat the question in the Xilinx Forum.
Is not needed, I can do the same in case I didn't find a solution.

Note 2019.2 works. I would recommend to use Vivado/Vitis/Petalinux 2019.2 at the moment. I will publish 20.2 version, when I get it running.
br
John
10
Trenz Electronic FPGA Modules / Re: Building u-boot with PetaLinux for ZynqBerry
« Last post by kampi on January 14, 2021, 04:15:31 PM »
Hello,

sorry, but I´m not so experienced with PetaLinux for now. So I don´t know how to do it...
I checked the documentation for the function of this command but I didn´t found the parameter "finish" in the documentation of PetaLinux 2019.1 (unfortunately I didn´t found the command-line documentation for 2019.2),

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1157-petalinux-tools-command-line-guide.pdf

so I don´t know exactly what this command is doing. But maybe I can repeat the question in the Xilinx Forum.
Pages: [1] 2 3 ... 10