element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Using Xilinx Tools Forum generate bootimage
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 3 replies
  • Subscribers 336 subscribers
  • Views 378 views
  • Users 0 members are here
Related

generate bootimage

starbright
starbright over 9 years ago

I successfully created a boot.mcs and boot.bin out of FSBL, bitstream and u-boot.elf. I can flash the mcs file to QSPI - works fine so far.
Board doesn't boot anymore after saving a changed environment (saveenv). Probably it is saved into an area, where boot.mcs is copied to.
So I tried to find out, where are to 3 files are located in flash. But I couldn't find the patterns in mcs file. How to find out (or to set) the addresses of this 3 parts of boot.mcs?

Once I know that, I suppose I have to change the
defines for
CONFIG_ENV_SECT_SIZE
CONFIG_ENV_SIZE
CONFIG_ENV_OFFSET

Is this correct? What are good values for this?

Shouldn't be adapted in devicetree the partitions of the qspi flash according the 4 parts (FSBL, bitstream, uboot, environment)?

---- Edit:

I think I know the answer. Files are appended without space, but with "offset"-param it can be separated (example:

the_ROM_image:
{
t[bootloader]D:XilinxprojectsMicroZedMicroZedsdkFSPLDebugFSPL.elf
t[offset = 0x020000]D:XilinxprojectsMicroZedMicroZed.sdkdesign_1_wrapper_hw_platform_0design_1_wrapper.bit
t[offset = 0x280000]D:u-boot.elf
}

Than at 0x30.0000 are free space.

---- Edit 2:

That doesn't work, environments overwrites important data:

Saving Environment to SPI Flash...
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Erasing SPI flash...Writing to SPI flash...done

Uboot was configured to:
#define CONFIG_ENV_SECT_SIZEtt0x1000
#define CONFIG_ENV_OFFSETttt0x3000000
#define CONFIG_CMD_SAVEENV

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 9 years ago

    Hi starbright,

    This is what I would have suggested and appears to be what you tried in your edits.  Curious that it did not work as expected.

    Can you confirm that your U-boot config shown is not a typo?

    I see you are planning to place U-boot at 0x28.0000 in flash and plan to place U-boot ENV partition at 0x30.0000 which gives 524288 bytes of space to fit U-boot image.  Hopefully if everything is fitting as expected, then 0x30.0000 in flash does not contain U-boot code.

    You show #define CONFIG_ENV_OFFSET 0x300.0000 (50,331,648 bytes) which is a bit larger than expected.  Is this number correct?

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • zedhed
    0 zedhed over 9 years ago

    Also, here is UG821 which has the bootgen command format documentation for anyone else who is following this:

    http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • starbright
    0 starbright over 9 years ago

    Thanks Kevin, indeed I had a simple type.
    The environement offset in u-boot 0x300.0000=48MB was far outside the flash (16MB)

    As I can't find the pattern of the origin files in mcs or bin files, I suppose they will be somewhat formatted (stripped?).
    The FSBL.elf is somewhat around 400k, the bitstream 2MB, an u-boot.elf 1.9MB.  This should give offsets of 512k=0x8.0000 and 3MB (512+2M+something) 0x30.0000. The environment than could start at 5MB=0x50.0000. With this values it works! Great!

    The mcs file is somewhat unreadable for me, but the bin file gives me back, that fsbl in boot.bin is much, much smaller, around 100kB. This is just a quarter of size of the elf file. Same for uboot (1.9MB vs 320k). It seems I can save a lot of space in flash. What does make the difference?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube