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
Software Application Development Unable to read ramdisk
  • 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 9 replies
  • Subscribers 330 subscribers
  • Views 1230 views
  • Users 0 members are here
Related

Unable to read ramdisk

Former Member
Former Member over 12 years ago

With the Speedway tutorial lab2_3, I am facing issues with ramdisk creation. I am booting from the SD card and get the following error message:
zynq-uboot>

U-Boot 2012.10 (Mar 02 2013 - 13:11:18)

DRAM:  512 MiB
WARNING: Caches not enabled
MMC:   SDHCI: 0
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
SF: Warning - Only lower 16MB is accessible in 3 byte addressing mode
In:    serial
Out:   serial
Err:   serial
Net:   zynq_gem
Hit any key to stop autoboot:  0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 12
OEM: 3456
Name: SMI
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading uImage

2883984 bytes read
reading devicetree.dtb

7284 bytes read
reading ramdisk32M.image.gz

** Unable to read "ramdisk32M.image.gz" from mmc 0:1 **
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.6.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2883920 Bytes = 2.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

------------------------------------------
If I print the environment variables this is what I see:
zynq-uboot>
zynq-uboot> printenv
baudrate=115200
bootcmd=run modeboot
bootdelay=3
devicetree_image=devicetree.dtb
devicetree_size=0x20000
ethact=zynq_gem
ethaddr=00:0a:35:00:01:22
fdt_high=0x20000000
filesize=88C08C
initrd_high=0x20000000
ipaddr=192.168.0.99
jtagboot=echo TFTPing Linux to RAM...;tftp 0x3000000 ${kernel_image};tftp 0x2A00000 ${devicetree_image};tftp 0x2000000 ${ramdisk_image};bootm 0x3000000 0x2000000 0x2A00000
kernel_image=uImage
kernel_size=0x500000
modeboot=run sdboot
nandboot=echo Copying Linux from NAND flash to RAM...;nand read 0x3000000 0x100000 ${kernel_size};nand read 0x2A00000 0x600000 ${devicetree_size};echo Copying ramdisk...;nand read 0x2000000 0x620000 ${ramdisk_size};bootm 0x3000000 0x2000000 0x2A00000
norboot=echo Copying Linux from NOR flash to RAM...;cp 0xE2100000 0x3000000 ${kernel_size};cp 0xE2600000 0x2A00000 ${devicetree_size};echo Copying ramdisk...;cp 0xE2620000 0x2000000 ${ramdisk_size};bootm 0x3000000 0x2000000 0x2A00000
qspiboot=echo Copying Linux from QSPI flash to RAM...;sf probe 0 0 0;sf read 0x3000000 0x100000 ${kernel_size};sf read 0x2A00000 0x600000 ${devicetree_size};echo Copying ramdisk...;sf read 0x2000000 0x620000 ${ramdisk_size};bootm 0x3000000 0x2000000 0x2A00000
ramdisk_image=ramdisk32M.image.gz
ramdisk_size=0x2000000
sdboot=echo Copying Linux from SD to RAM...;mmcinfo;fatload mmc 0 0x3000000 ${kernel_image};fatload mmc 0 0x2A00000 ${devicetree_image};fatload mmc 0 0x2000000 ${ramdisk_image};bootm 0x3000000 0x2000000 0x2A00000
serverip=192.168.0.101
stderr=serial
stdin=serial
stdout=serial

Environment size: 1589/131068 bytes

I am a newbie to linux and will appreciate some help with this.

Thanks

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

    Hi

    Are you using the patched version of u-boot from Lab 1.2?  The line "SF: Warning - Only lower 16MB is accessible in 3 byte addressing mode" indicates that 32MB ramdisks won't be accessible, which is what the patch is meant to fix.

    Matthew

    • 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 russel,
    I am not applying the patch. Actually, I am working of the 'master' branch and not on the 14.2 branch. I compared the patch and the changes are already present in the 'master' branch

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

    I doubt if the only change between master and the 14.2 branch is that file, so Xilinx may have broken the 32MB ramdisk in another way.  Have you tried using the pre-built version of u-boot that comes with the lab, just to make sure it is a problem with u-boot?

    Matthew

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

    Please confirm two basic things..
    1) in your partition does ramdisk32M.image.gz is properly copied on host
    2) ramdisk32M.image.gz is uimaged?

    Thanks,
    Jagan.

    • 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

    What do you mean uimaged?

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

    Hi zackshef,

    What Jagan is talking about is the uimage wrapper that should be applied to any kernel and ram disk image being booted with a U-Boot version after the 14.2 release tag.

    See this Xilinx Wiki page in the section labeled "Linux for Zynq AP SoC":

    http://www.wiki.xilinx.com/Build+kernel

    U-Boot is expecting that uimage wrapper to be around both the kernel and the RAM disk or else it will assume that the files are corrupt.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100padudle
    0 100padudle over 11 years ago

    Hello All,

    I am trying to boot linux on a MicroZed board.  When I boot from the SD Card I get the following errors.

    zynq-uboot> boot
    Device: zynq_sdhci
    Manufacturer ID: 2
    OEM: 544d
    Name: SA04G
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 3.7 GiB
    Bus Width: 4-bit
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    Copying Linux from SD to RAM...
    reading uImage
    ** Unable to read file uImage **
    zynq-uboot>

    I am compiling from the source on the Xilinx github

    Here is my bootgen .bif file:

    image : {
            [bootloader]fsbl_uzed.elf
            u-boot.elf
            [load=0x2a00000]zynq-zed.dtb
            [load=0x2000000]uramdisk.image.gz
            [load=0x3000000]uImage.bin   // currently bootgen requires a file extension. this is just a renamed uImage
    }

    I do have the mkimage utility available so I believe the linux make command creates the u-boot wrapped kernel image uImage.  I rename it to uImage.bin to make bootgen happy.

    When I run the file command on uImage.bin I get this output:

    uImage.bin: u-boot legacy uImage, Linux-3.14.0-xilinx, Linux/ARM, OS Kernel Image (Not compressed), 3334192 bytes, Wed Jun 18 10:14:31 2014, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0x24A5CF28, Data CRC: 0x8E1040F6


    Can anyone tell me what I am doing wrong or what to try?

    Thanks,

        Pete

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100padudle
    0 100padudle over 11 years ago

    Hello,

    I should report that I solved my problem.  I changed over to booting from the SD card to save time. The sd card can be written much faster than programming the QSPI and I don't need the download cable.

    My problem was that I did not match the names of the the files with the environment variables that were saved in u-boot.

    These variable are:

    devicetree_image=devicetree.dtb
    kernel_image=uImage
    ramdisk_image=uramdisk.image.gz

    They are used in this sdboot command.

    sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && fatload mmc 0 0x2000000 ${ramdisk_i
    zynq-uboot>


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

    Hello,

    I am trying to boot the Linux image from QSPI flash on zedboard and i face the following error:

     Copying Linux from QSPI flash to RAM...

    SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
    device 0 offset 0x100000, size 0x500000
    SF: 5242880 bytes @ 0x100000 Read: OK
    device 0 offset 0x600000, size 0x20000
    SF: 131072 bytes @ 0x600000 Read: OK
    Copying ramdisk...
    device 0 offset 0x620000, size 0x5e0000
    SF: 6160384 bytes @ 0x620000 Read: OK
    ## Booting kernel from Legacy Image at 02080000 ...
       Image Name:   Linux-4.4.0-xilinx
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3732624 Bytes = 3.6 MiB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    Wrong Ramdisk Image Format
    Ramdisk image is corrupt or invalid
     
    I am using the pre-built files from http://www.wiki.xilinx.com/Zynq+2016.2+Release. Kindly, let me know th solution to the same.
    • 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