UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ngrubaugh
Observer
8,889 Views
Registered: ‎07-30-2015

Petalinux-package creating download.bit file?

I am currently trying to build the final boot.bin file to run petalinux on an FPGA and I have successfully run through petalinux-build. Now I just need to run the petalinux-package command to generate the boot.bin and uImage right? I ran:

 

petalinux-package --boot --format MCS --fpga path/to/bit --u-boot --kernel

WARNING: Auto detecting MMI file with HDF

INFO: Creating download.bit

....

INFO: Output download.bit: /home/folder/Petalinux_Proj2/images/linux/download.bit

ERROR: offset of bitstream "/home/folder/Petalinux_Proj2/images/linux/download.bit" is not specified.

 

2 questions:

 

1. Why is it creating a .bit file and not the specified .mcs file?

2. What is the offset of bitstream error message refering to?

0 Kudos
9 Replies
Xilinx Employee
Xilinx Employee
8,875 Views
Registered: ‎07-01-2010

Re: Petalinux-package creating download.bit file?

@ngrubaugh

 

 

What version of petalinux are you using?

Are you trying to generate MCS file or boot.bin file?

 

Generate Boot Image for MicroBlaze
1. Execute the following command to generate MCS boot file for MicroBlaze.
$ petalinux-package --boot --fpga <FPGA bitstream> --u-boot --kernel
It will generate boot.mcs in your working directory and it will be copied to the <proj>/images/linux/
directory. With the above command, the MCS file contains fpga bit, fs-boot, u-boot and kernel image image.ub.
2. Command to generate .mcs file with fs-boot and fpga only:
$ petalinux-package --boot --fpga <FPGA bitstream>
3. Command to generate .mcs file with fpga, fs-boot and u-boot:
$ petalinux-package --boot --fpga <FPGA bitstream> --u-boot

 

If you would like to generate the boot.bin for Zynq  use the below command

$ petalinux-package --boot --fsbl <FSBL image> --fpga <FPGA bitstream> --u-boot

 

-Achutha

---------------------------------------------------------------------------------------------
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
Observer ngrubaugh
Observer
8,866 Views
Registered: ‎07-30-2015

Re: Petalinux-package creating download.bit file?

@achutha,

 

I am using Petalinux 2015.2 along with Vivado 2015.2 tools. I have followed the steps outlined in UG1144 exactly in regards to the petalinux-package command to create the MCS file for a Microblaze, as you outlined as well, but still receive the error in my original message.

0 Kudos
Xilinx Employee
Xilinx Employee
8,863 Views
Registered: ‎07-01-2010

Re: Petalinux-package creating download.bit file?

@ngrubaugh

 

Please share the hdf file so that i can verify the details.

 

-Achutha

---------------------------------------------------------------------------------------------
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
Observer ngrubaugh
Observer
8,858 Views
Registered: ‎07-30-2015

Re: Petalinux-package creating download.bit file?

@achutha,

 

I included both .hdf files that were located in the SDK folder. I did try running through the petalinux tools with both but received the same error both times.

0 Kudos
Visitor andrei_hres
Visitor
7,033 Views
Registered: ‎06-18-2015

Re: Petalinux-package creating download.bit file?

Hi ngrubaugh!

I have same problem, have you resolved it?

0 Kudos
Observer ngrubaugh
Observer
7,029 Views
Registered: ‎07-30-2015

Re: Petalinux-package creating download.bit file?

@andrei_hres :

 

If I recall correctly the .MCS file wasn't being generated because of the bitstream error I was getting, so they were related to each other. The petalinux-package command requries you to specify the flash size if you are going to be writing to the flash because it can't correctly figure out the size itself. So you just need to add the "--flash-size" command with the correct MB specified.

0 Kudos
Visitor andrei_hres
Visitor
7,007 Views
Registered: ‎06-18-2015

Re: Petalinux-package creating download.bit file?

Hi.

I have found that need define correct offset for files and every thing works. Like this:

petalinux-package --boot \
--format MCS \
--force \
--fpga images/linux/htg_v7_g3.bit \
--offset 0x000000 \
--fsbl images/linux/fs-boot.elf \
--u-boot images/linux/u-boot.elf \
--offset 0x800000 \
--kernel images/linux/image.elf \
--offset 0xA00000 \
--flash-size 128 \
--flash-intf BPIx16 \
--output firmware_test_01.mcs

Without offset definition I get error like in the first post.

0 Kudos
Observer ngrubaugh
Observer
6,999 Views
Registered: ‎07-30-2015

Re: Petalinux-package creating download.bit file?

@andrei_hres

 

Ah, yeah that would do it as well. I remember defining those within the petalinux tools themselves.

 

Glad you figured it out!

0 Kudos
Highlighted
Observer adrian.n
Observer
2,158 Views
Registered: ‎12-12-2017

Re: Petalinux-package creating download.bit file?

Hi andrei_hres,

Where did you find documentation for the correct offsets? I have the same problem as ngrubaugh when trying to build a bootable .bit file for a Genesys2 board. When I try explicitly defining the petalinux-package commands as in your post, I get the following error:

 

ERROR: [Writecfgmem 68-3] Bitstream at address 0x00800000 conflicts with bitstream at address 0x00000000.

 

I am guessing this is because the offsets are wrong, but I can't find information in either UG1144 or UG1157 on what these offsets should be.

 

0 Kudos