cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
5,079 Views
Registered: ‎10-29-2018

U-Boot Scripting

Jump to solution

Hi,

 

I am trying to run U-Boot script (Petalinux v2017.1).
U-Boot allows to store commands or command sequences in a plain text file, so I wrote boot.txt file.

 

File boot.txt has only one command:
echo 12345

 

I use the mkimage tool to convert this file into a script image with this arguments:

 

mkimage -A arm -O linux -T script -C none -n "u-boot commands" -d boot.txt boot.scr

 

On the target, I downloaded this image (boot.scr) using "tftpboot" command.

 

Zynq> tftpboot 1000000 boot.scr

 

This is what u-boot says to me:
TFTP from server 10.0.2.41; our IP address is 10.0.0.185
Filename 'boot.scr'.
Load address: 0x1000000
Loading: #
0 Bytes/s
done
Bytes transferred = 83 (53 hex)

 

I executed script using U-Boot's source command.
Zynq> source 1000000

 

This is what u-boot says to me:
## Executing script at 10000000
Wrong image format for "source" command

 

I found an older version of u-boot.elf file - Petalinux v2013.4 (I downloaded file from: https://github.com/Trenz-Electronic/TE0720-GigaZee-Reference-Designs/blob/master/TE0720-01_Base_Vivado-2013.4/u-boot.elf) and I repeated all the steps.
The script is running successfully.

 

Is there any adjustment for Legacy script for u-boot in Petalinux v2017.1?
Did anyone have this issue and how to solve it?

 

Thanks.

 

0 Kudos
1 Solution

Accepted Solutions
5,017 Views
Registered: ‎10-29-2018

Thanks @aravindb,

 
The problem was in u-boot configuration.
In petalinux-config -c u-boot -> Boot images -> option "Enable signature verification of FIT uImages" was checked.
u-boot.png
I unchecked it and recompiled everything. After that I successfully ran the script.  
 

Regards,

Andjela

View solution in original post

0 Kudos
2 Replies
aravindb
Moderator
Moderator
5,064 Views
Registered: ‎02-07-2018

HI @andjela.stojanovic

 

 

It is working with source command itself. I just verified the same.

 


xhdaravindb40:/aravind_working_dir/source_code/linux-xlnx/linux-xlnx $ cat boot.txt
echo hello

 

xhdaravindb40:/aravind_working_dir/source_code/linux-xlnx/linux-xlnx $ mkimage -A arm -O linux -T script -C none -n "u-boot commands" -d boot.txt boot.scr
Image Name: u-boot commands
Created: Mon Oct 29 06:39:52 2018
Image Type: ARM Linux Script (uncompressed)
Data Size: 20 Bytes = 0.02 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 12 Bytes = 0.01 kB = 0.00 MB

 

Zynq> fatload mmc 0 1000000 boot.scr
reading boot.scr
84 bytes read in 13 ms (5.9 KiB/s)
Zynq> source 1000000
## Executing script at 01000000
hello
Zynq>

 

 

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
5,018 Views
Registered: ‎10-29-2018

Thanks @aravindb,

 
The problem was in u-boot configuration.
In petalinux-config -c u-boot -> Boot images -> option "Enable signature verification of FIT uImages" was checked.
u-boot.png
I unchecked it and recompiled everything. After that I successfully ran the script.  
 

Regards,

Andjela

View solution in original post

0 Kudos