cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
414 Views
Registered: ‎10-18-2019

Issue to run Petalinux application - 2

Jump to solution

Hi, 

I have some problem in the previous post and am not able to reply. 


Here is my script. When I run this script in XSCT, I get an error that petalinux commands are only supported in Linux platform. Therefore, I just source the tcl script.

# XSCT script for zybo-7z-20-project-1
# source C:/XilinxProjects/zybo-7z-20-project-1/scripts/xsct_tcl_petalinux_script.tcl
# petalinux-boot --jtag --prebuild 3 --tcl C:/XilinxProjects/zybo-7z-20-project-1/scripts/xsct_tcl_petalinux_script.tcl
connect
targets
targets 2
dow C:/XilinxProjects/zybo-7z-20-project-1/scripts/zynq_fsbl.elf
con
dow C:/XilinxProjects/zybo-7z-20-project-1/scripts/u-boot.elf
fpga -f C:/XilinxProjects/zybo-7z-20-project-1/scripts/system.bit
con
stop
dow -data C:/XilinxProjects/zybo-7z-20-project-1/scripts/image.ub 0x10000000
con 


The response from ZYBO is as under. It is not able to find or read the file “image.ub” although it is placed in the same directory. I am not sure why ZC702 is returned from ZYBO.

U-Boot 2018.01 (Nov 23 2020 - 16:28:05 +0000) Xilinx Zynq ZC702

Board: Xilinx Zynq
Silicon: v3.1
DRAM: ECC disabled 1 GiB
MMC: mmc@e0100000: 0 (SD)
SF: Detected s25fl128s_64k 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
Board: Xilinx Zynq
Silicon: v3.1
Net: ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000
U-BOOT for zynq-os

ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Hit any key to stop autoboot: 4 3 2 1 0 
Device: mmc@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SU04G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
** Unable to read file image.ub **
Zynq>

How to find and run the hello application ?

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Moderator
Moderator
263 Views
Registered: ‎09-12-2007

bootm is a uboot command:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot

 

Boot uboot from jtag (remove the bootm command) and stop in uboot coomand prompt, and call the bootm command (bootm 0x10000000)

View solution in original post

0 Kudos
Reply
8 Replies
Moderator
Moderator
398 Views
Registered: ‎12-04-2016

Hi @peterjohn 

Why don't you run "petalinux-boot --jtag --kernel" if you already have a petalinux project built at your end?

 

Regards

Shabbir

0 Kudos
Reply
Adventurer
Adventurer
393 Views
Registered: ‎10-18-2019

@shabbirk 

I need to run the script in XSCT in Vivado SDK in Windows 10 host operating system. I have transferred the petalinux image files (zynq_fsbl.elf, u-boot.elf, system.bit, image.ub) from virtual machine to host machine. The virtual machine has connectivity issue with FTDI USB to serial. It detect multiple serial ports for the connected board and also did not did the bit file although it as placed in the directory. 

Now I would like to boot petalinux from XSCT in Vivado SDK in Windows 10 host operating system. Can you please check my script and let me know the problem ? 

0 Kudos
Reply
Moderator
Moderator
304 Views
Registered: ‎09-12-2007

You are loading the image.ub here


dow -data C:/XilinxProjects/zybo-7z-20-project-1/scripts/image.ub 0x10000000

However, is this the location uboot expects this image? I guess not.

 

Just stop in uboot and use the command below to boot

bootm 0x10000000

0 Kudos
Reply
Adventurer
Adventurer
272 Views
Registered: ‎10-18-2019

@stephenm 

I have transferred all the boot image files (zynq_fsbl.elf, system.bit, u-boot-elf, image.ub) from the virtual machine to Window 10 host machine as I need to load the files through XSCT in Vivado SDK from Windows 10 host machine. I just have put all these files in the directory of existing hello world zynq program but i can be placed at some other location.

Here is my script. 

# XSCT script for zybo-7z-20-project-1
# source C:/XilinxProjects/zybo-7z-20-project-1/scripts/xsct_tcl_petalinux_script.tcl

connect
targets
targets 2
dow C:/XilinxProjects/zybo-7z-20-project-1/scripts/zynq_fsbl.elf
con
dow C:/XilinxProjects/zybo-7z-20-project-1/scripts/u-boot.elf
fpga -f C:/XilinxProjects/zybo-7z-20-project-1/scripts/system.bit
con
stop
dow -data C:/XilinxProjects/zybo-7z-20-project-1/scripts/image.ub 0x10000000
con
stop
bootm 0x10000000

I am not able to run the last command "bootm 0x10000000" in the tcl script. The command reply from TeraTerm is the same as in the earlier reply in this post. I have an application which I have included in the petalinux program. How to find the run the application through TeraTerm serial commands. 

0 Kudos
Reply
Moderator
Moderator
264 Views
Registered: ‎09-12-2007

bootm is a uboot command:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot

 

Boot uboot from jtag (remove the bootm command) and stop in uboot coomand prompt, and call the bootm command (bootm 0x10000000)

View solution in original post

0 Kudos
Reply
Adventurer
Adventurer
249 Views
Registered: ‎10-18-2019

@stephenm 

Yes it works. I just run last command in serial terminal instead of XSCT. It ask me login and password in serial terminal TeraTerm. I also able to run my application under 

root@zynq-os:/usr/bin# 

Not sure how "Xilinx Zynq ZC702" returned from ZYBO. I have posted earlier. 

 

0 Kudos
Reply
Adventurer
Adventurer
246 Views
Registered: ‎10-18-2019

@stephenm 

How to find the USB drive connected to ZYBO ? In which directory it is mounted ? 

0 Kudos
Reply
Moderator
Moderator
228 Views
Registered: ‎09-12-2007

Ok, Great. Can you mark this as solved to help others. 

0 Kudos
Reply