element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Avnet Boards General U-boot won't boot
  • 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 Not Answered
  • Replies 11 replies
  • Subscribers 353 subscribers
  • Views 2938 views
  • Users 0 members are here
Related

U-boot won't boot

Former Member
Former Member over 12 years ago

I am not able to get U-boot up and running on my MicroZed board. I tried to have it loaded by Xilinx first stage bootloader (FSBL) and I have tried starting it from the XMD shell over JTAG.


I do not get any output from U-boot in the shell (connector J17 - USB UART).


When loaded by FSBL, it seems that U-boot crashes. Some times FSBL is restarted a couple of times (its output to the UART is repeated). Some times the FSBL exception handlers is invoked after handoff:


In FsblHookBeforeHandoff function                                              
SUCCESSFUL_HANDOFF                                                             
FSBL Status = 0x1                                                              
DATA_ABORT_HANDLER                                                             
FSBL Status = 0xA304


I have build FSBL using Release 14.6 Build SDK_P.68d and with the flags "-DFSBL_DEBUG -DFSBL_DEBUG_INFO". I have also tried without these flags.


I have made the U-boot image using:


$ git clone git://git.xilinx.com/u-boot-xlnx.git
$ cd u-boot-xlnx
$ PATH=$PATH:/opt/Xilinx/SDK/2013.2/gnu/arm/lin/bin
$ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
$ make zynq_zed_config && make


The boot.bin file was created using:


$ cat zed_boot.bif
zed_boot_image:
{
t[bootloader]zed_fsbl.elf
tzed_u-boot.elf
}
$ bootgen -image zed_boot.bif -o boot.bin -w on


This is the output I get in the shell:


Xilinx First Stage Boot Loader
Release 14.6/2013.2     Sep 27 2013-09:39:00
Devcfg driver initialized
Silicon Version 3.1
Boot mode is SD
SD: rc= 0
SD Init Done
Flash Base Address: 0xE0100000
Reboot status register: 0x60600000
Multiboot Register: 0x0000C000
Image Start Address: 0x00000000
Partition Header Offset:0x00000980
Partition Count: 2
Partition Number: 1
Header Dump
Image Word Len: 0x00010174
Data Word Len: 0x00010174
Partition Word Len:0x00010174
Load Addr: 0x04000000
Exec Addr: 0x04000000
Partition Start: 0x000062A0
Partition Attr: 0x00000010
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xF7FC96A2
Application
Handoff Address: 0x04000000
In FsblHookBeforeHandoff function
SUCCESSFUL_HANDOFF
FSBL Status = 0x1


When starting U-boot from the XMD shell, I do the following, which produces no output in the J17 USB UART shell:


$ /opt/Xilinx/14.6/ISE_DS/EDK/bin/lin/xmd
XMD% connect arm hw
XMD% source /opt/Xilinx/14.6/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.tcl
XMD% ps7_init
XMD% dow zed_u-boot.elf
XMD% con


I read a post stating the Xilinx U-boot image for the ZC702 board could be used on the MicroZed board to. I tried that with the same result.


Using the XMD shell I read the memory at location 0x04000000:
XMD% mrd 0x04000000 30
4000000:   00000000
4000004:   E59FF014
4000008:   E59FF014
400000C:   E59FF014
4000010:   E59FF014
4000014:   E59FF014
4000018:   E59F7BDD
400001C:   E59FDDC8
4000020:   04F1E934
4000024:   04007D23
4000028:   0400B956
400002C:   0400EDFB
4000030:   04007F6B
4000034:   0400DFAF
4000038:   0400F357
400003C:   1234D563


It seems to be the same image as zed_u-boot.elf from 0x8000 bytes into the zed_u-boot.elf. I expect this is because the elf header was removed.


I have run out of ideas of what to try, so any hints will be appreciated.

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

    I tried to start U-boot from GDB and first instruction (which is a branch instruction) caused GDB to output: "Cannot access memory at address 0x9fa90ddc", which is an address within the PL domain (M_AXI_GP1).

    First shell:
    $ /opt/Xilinx/SDK/2013.2/bin/lin/xmd
    XMD% connect arm hw
    XMD% source /opt/Xilinx/14.6/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.tcl
    XMD% ps7_init

    Second shell:
    $ /opt/Xilinx/SDK/2013.2/gnu/arm/lin/bin/arm-xilinx-eabi-gdb u-boot.elf
    (gdb) target remote localhost:1234
    (gdb) load
    (gdb) step

    The last command produced this output:
    (gdb) step
    Cannot access memory at address 0x9fa90ddc
    reset () at start.S:131
    131ttbltsave_boot_params

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

    Are you using MizroZed or Zedboard? They have different hardware, and so (slightly, but still) different MIO pinout and different FSBL (if you are using Xilinx tools).
    If you use MicroZed board, you may try alternative software, configuration files so far exist for MicroZed only. For debugging it allows you to control LED and UART output during the initial stages of booting, before U-boot prompt,
    http://sourceforge.net/p/elphel/ezynq/ - standalone version
    http://sourceforge.net/p/elphel/meta-ezynq - OpenEmbedded meta

    Andrey

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

    I'm using MicroZed.

    1) Are you saying that the Xilinx U-boot repository does not have support for the MicroZed board?
    Quite annoying Avnet hasn't pushed their MicroZed files upstream yet (a working U-boot is shipped with the board in its NOR flash)...

    2) Do you know whether there are any issues using "zed_hw_platform" in the Xilinx SDK for making an FSBL for MicroZed?
    Enabling debug in the FSBL, it seems to work fine, but I don't know if there are something it might not have configured or configured wrong.

    3) Is there some official MicroZed tutorial or guide I have overlooked, which produce a working version of U-boot for MicroZed?

    I tried to build from you reference (standalone version), but the build fails:
    make[1]: Entering directory `elphel-ezynq/u-boot-xlnx/arch/arm/cpu/armv7/zynq'
    make[1]: *** No rule to make target `.depend', needed by `all'.  Stop.

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

    Hi Kian,

    can you please post here or (to save bandwidth) email it to me at andrey_at_elphel.com the full output install_uboot.sh and makeuboot? I just tried in on a fresh computer w/o any problems.

    1) When we got MicroZed in August, there was none.
    2) Zedboard and Microzed have different connections, but we were able to make a working image with Xilinx tools, carefully entering data from the MicroZed documentation. MIO pins are different for 2 boards
    3) Circuit diagram+documentation that are available for the board are sufficient to produce a working version. I can not send you our files produceds by Xilinx tools because Xilinx license does not allow such distribution.

    Andrey

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

    Hi Kian,

    You need to run provided scripts, not just manual make commands.
    First you need to run install_uboot.sh (seems you have done that), then follow instructions that that script outputs in the very end:
    - modify initenv file to match you path to arm toolchain,
    - cd to the u-boot directory and
    - run ./makeuboot.
    ezynqcfg.py program runs twice - first before 'make' to create C file (that was missing in your case), second - in the very end (to provide u-boot.bin length to the header). You can just read that makeuboot script to see what it does.

    Andrey

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

    FSBL:
    I found the necessary tutorials for building a working FSBL for MicroZed here: www.microzed.org -> Reference Designs/Tutorials -> MicroZed
    - Tutorial 01 Build the Zynq Hardware Platform
    - Tutorial 02 First Application - Hello World
    - Tutorial 04 FSBL and Boot from QSPI and SD Card

    U-boot:
    The U-boot for ZC70x seems to work - I only need it to launch the Linux kernel. See http://www.wiki.xilinx.com/Build+U-Boot
    Use the "zynq_zc70x_config" target.

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

    Kharas, "The U-boot for ZC70x seems to work" is not a real solution. U-Boot is licensed under GNU GPL, so it is illegal to distribute binaries without the source code. Source code for the u-boot.bin for Microzed, not the source for zynq_zc70x.

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

    We plan to migrate to a proprietary bootloader in a later phase anyway. At the moment, it is just a matter of getting our OS's up and running at early stages of the project.

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

    I see, KKaras, so you plan to use you house-built bootloader not based on U-Boot and the rest of the software not based on GNU/Linux. Correct?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 12 years ago

    Hi kkaras,

    After looking into this further, I found that the U-Boot binary which is shipping on MicroZed and distributed in the "MicroZed Linux microSD Card Image Archive 10.Aug.13" found on this page: http://www.microzed.org/documentation/1519 is publicly available from Xilinx from their GIT repository located here:

    https://github.com/Xilinx/u-boot-xlnx

    That binary provided in the MicroZed Linux microSD Archive was built directly from the xilinx-v14.5 release tag on that repository using the zynq_zed configuration since it is part of the Zed family of boards and is very similar to ZedBoard hardware configuration as far as U-Boot is concerned.

    The dirty tag on the build is from the result of modification to the one of the configuration files for the default U-Boot environment.  This modification was made to support the MTD partitioning that was selected and to allow the second stage boot loader (U-Boot) to perform the PL configuration rather than have this task performed by the FSBL.

    In particular, these extra environment variables are used to support these features of MicroZed.

    #define CONFIG_EXTRA_ENV_SETTINGSt
    t"ethaddr=00:0a:35:00:01:220"t
    t"kernel_image=uImage0"t
    t"ramdisk_image=uramdisk.image.gz0"t
    t"devicetree_image=devicetree.dtb0"t
    t"bitstream_image=system.bit.bin0"t
    t"bitstream_size=0x3DBAFC0"t
    t"loadbit_addr=0x1000000"t
    t"kernel_size=0x5000000"t
    t"devicetree_size=0x200000"t
    t"ramdisk_size=0x5E00000"t
    t"fdt_high=0x200000000"t
    t"initrd_high=0x200000000"t
    t"mmc_loadbit_fat=echo Loading bitstream from SD/MMC/eMMC to RAM.. && "
    tt"mmcinfo && "
    tt"fatload mmc 0 ${loadbit_addr} ${bitstream_image} && "
    tt"fpga load 0 ${loadbit_addr} ${filesize}0"
    t"norboot=echo Copying Linux from NOR flash to RAM... && "
    tt"cp 0xE2100000 0x3000000 ${kernel_size} && "
    tt"cp 0xE2600000 0x2A00000 ${devicetree_size} && "
    tt"echo Copying ramdisk... && "
    tt"cp 0xE2620000 0x2000000 ${ramdisk_size} && "
    tt"bootm 0x3000000 0x2000000 0x2A000000"
    t"qspiboot=echo Copying Linux from QSPI flash to RAM... && "
    tt"sf probe 0 0 0 && "
    tt"sf read ${loadbit_addr} 0xC00000 ${bitstream_size} && "
    tt"mw 0xF8007080 0x30800100 0x4 && "
    tt"fpga load 0 ${loadbit_addr} ${bitstream_size} && "
    tt"sf read 0x3000000 0x100000 ${kernel_size} && "
    tt"sf read 0x2A00000 0x600000 ${devicetree_size} && "
    tt"echo Copying ramdisk... && "
    tt"sf read 0x2000000 0x620000 ${ramdisk_size} && "
    tt"bootm 0x3000000 0x2000000 0x2A000000"
    t"sdboot=echo Copying Linux from SD to RAM... && "
    tt"mmcinfo && "
    tt"run mmc_loadbit_fat && "
    tt"fatload mmc 0 0x3000000 ${kernel_image} && "
    tt"fatload mmc 0 0x2A00000 ${devicetree_image} && "
    tt"fatload mmc 0 0x2000000 ${ramdisk_image} && "
    tt"bootm 0x3000000 0x2000000 0x2A000000"
    t"nandboot=echo Copying Linux from NAND flash to RAM... && "
    tt"nand read 0x3000000 0x100000 ${kernel_size} && "
    tt"nand read 0x2A00000 0x600000 ${devicetree_size} && "
    tt"echo Copying ramdisk... && "
    tt"nand read 0x2000000 0x620000 ${ramdisk_size} && "
    tt"bootm 0x3000000 0x2000000 0x2A000000"
    t"jtagboot=echo TFTPing Linux to RAM... && "
    tt"tftp 0x3000000 ${kernel_image} && "
    tt"tftp 0x2A00000 ${devicetree_image} && "
    tt"tftp 0x2000000 ${ramdisk_image} && "
    tt"bootm 0x3000000 0x2000000 0x2A000000"

    I apologize that these details have not been placed into a tutorial yet.  I plan to do this shortly or replace these MicroZed binaries with a newer release tag which can be supported longer (with tutorials also).

    Regards,

    -Kevin

    • 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