cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Participant
Participant
4,563 Views
Registered: ‎03-04-2016

Building custom BOOT.BIN without PetaLinux?

I am trying to build my own BOOT.BIN without having to depend on PetaLinux, since I currently building a lot of components (devicetree, ramdisk, etc) without using PetaLinux. Here are my boot.bif file and bootgen coomand which I used to generate BOOT.BIN file.

boot.bif file:

Image : {
   [bootloader]zynq_fsbl.elf
   system_top.bit
u-boot.elf [load=0x5a00000]devicetree.dtb [load=0x1000000]uramdisk.image.gz [load=0x6000000]uImage.bin // currently bootgen requires a file extens$ }


Command to generate BOOT.BIN:

bootgen -image boot.bif -o i BOOT.BIN -w -log


Once BOOT.BIN is generated, I am loading it into memory via JTAG with xmd commands. However, when I am trying to boot the system from u-boot, it fails with error that it can't get kernel image. Below is the u-boot error and the xmd script used to write BOOT.BIN into the memory to boot via JTAG.

Error:

zynq-uboot> bootm                              
Wrong Image Format for bootm command
ERROR: can't get kernel image!
zynq-uboot> bootm 0x6000000 0x1000000 0x5A00000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
zynq-uboot> 


Script:

connect arm hw
source fpga/ps7_init.tcl
ps7_post_config
ps7_init
#fpga -f fpga/system_top.bit
after 1000
dow -data "BOOT.BIN" 0x6000000
after 1000
dow "u-boot.elf"
con
0 Kudos
Reply
2 Replies
Observer
Observer
4,509 Views
Registered: ‎11-25-2015

Hi,

 

Partition mismatch or partition ordering between u-boot and kernel may be one of the reasons. Can you also try verifying with the offsets and partitions ordering used in petalinux default configuration settings? 

 

Thanks,

Naveen

0 Kudos
Reply
Community Manager
Community Manager
4,490 Views
Registered: ‎07-23-2012

It might be because of your bootm arguments. Check the definition of the "bootcmd" environment variable in u-boot.
-----------------------------------------------------------------------------------------------
Please mark the post as "Accept as solution" if the information provided answers your query/resolves your issue.

Give Kudos to a post which you think is helpful.
0 Kudos
Reply