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 U-boot environment variables not updating using Petalinux
  • 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 2 replies
  • Subscribers 335 subscribers
  • Views 2868 views
  • Users 0 members are here
Related

U-boot environment variables not updating using Petalinux

Former Member
Former Member over 9 years ago

I have a Linux image that is too large for the default 16MB memory size of the PicoZed board.  It's well documented that in order to increase the size allotted to unzip the image during boot you need to adjust a the netboot offset in petalinux-config as well as the CONFIG_SYS_BOOTM_LEN define in platform_top.h in the u-boot config file.
- https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-kernel-not-loading/m-p/502122#M10150
- http://www.xilinx.com/support/answers/61332.html

However, after making those changes and rebuilding my Petalinux project (resulting in a new BOOT.bin and image.ub) I still can't successfully boot from my SD card unless I manually change the u-boot environment variables at the U-Boot command line.

I'd like to avoid having to manually set the loadaddr and netstart variables from the u-boot command line for every device we produce.

Why aren't the environment variables being updated?  I've checked the platform-auto.h file that is generated by PetaLinux and I do see the correct changes to the loadaddr and netstart env variables but when I call 'printenv' from the U-boot cmd line they aren't the updated values.

I'm using PetaLinux 2014.4 (kernel 3.17) and the PicoZed board.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Hi Brett,

      My first guess is that your environment is being read from non-volatile memory on your PicoZed, instead of using the default values you have compiled into the u-boot executable.  I've been bitten by this a couple of times when pulling out a board I haven't used for a while, and I forgot that I saved the environment variables for whatever I was doing in the past.

    To elaborate, you can save environment variables in QSPI, and u-boot looks there first before using the default values compiled into the object code.  If you don't see a message indicating something like "CRC error, using default environment" when u-boot begins, it is reading the env vars from QSPI.   The fix is to simply erase the env sectors from QSPI from the u-boot command line with "run eraseenv".  Or you can force it to use the default environment from the command line as well, with "env default -a".

    Ron

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

    This was exactly my problem.  Thanks for pointing this out.

    • 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