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 How to modify the RamDisk image that comes with release 14.5
  • 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 7 replies
  • Subscribers 327 subscribers
  • Views 1103 views
  • Users 0 members are here
Related

How to modify the RamDisk image that comes with release 14.5

Former Member
Former Member over 12 years ago

I want to modify the RamDisk image file inside the archive 14.5-qemu-ramdisk.image.gz and include my own custom program in it. This version of RamDisk came with the latest version of linux released for zed board as downloaded from http://www.wiki.xilinx.com/Zynq+14.5+-+2013.1+Release

I tried following the instructions on http://zedboard.org/content/zedboard-modifying-your-ram-disk-image

But the command mount -o loop ramdisk.image mnt does not work for this particular RamDisk image (version 14.5). I get the error "invalid argument".

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

    Strip the mkimage header...no problem
    gunzip, ok...
    mount -o loop ramdisk.image fails...
    with "invalid arguement" ...
    Any help?

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

    What you're doing is mounting the image like it's a filesystem, so you have to create a folder ("mount point") and mount the image on that folder. Here's me doing it, notice how I create the folder, mount the image on it, ls to see what's in it (here is where you would add your program), then unmount and do another ls to show the folder is empty now.

    chris2@lindev:~/rd_test$ ls
    ramdisk.image.gz
    chris2@lindev:~/rd_test$ gunzip ramdisk.image.gz
    chris2@lindev:~/rd_test$ ls
    ramdisk.image
    chris2@lindev:~/rd_test$ mkdir tmp_mnt
    chris2@lindev:~/rd_test$ sudo mount -o loop ramdisk.image tmp_mnt
    [sudo] password for chris2:
    chris2@lindev:~/rd_test$ cd tmp_mnt/
    chris2@lindev:~/rd_test/tmp_mnt$ ls
    bin  dev  etc  home  lib  linuxrc  lost+found  media  mnt  opt  proc  root  run  sbin  sys  tmp  usr  var
    chris2@lindev:~/rd_test/tmp_mnt$ cd ..
    chris2@lindev:~/rd_test$ sudo umount tmp_mnt
    chris2@lindev:~/rd_test$ ls tmp_mnt/
    chris2@lindev:~/rd_test$ gzip ramdisk.image
    chris2@lindev:~/rd_test$

    Then do your u-boot wrap and you should be good to go. Hope that helps.

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

    Hi,
    I'm trying to do the same as farseer but i can't gunzip the uramdisk.image.gz.

    ******
    /arm-devel/ramdisk/sdcard# gunzip uramdisk.image.gz

    gzip: uramdisk.image.gz: not in gzip format
    ******

    The file I downloaded is different as yours:
    mine: uramdisk.image.gz
    yours: ramdisk.image.gz

    could that be the reason? how could I gunzip that file ramdisk image?

    Thanks!!!

    • 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 ,
    did you solve it ?

    • 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

    In case you still need this:
    That uramdisk file is wrapped with a u-boot header that you need to strip off, before feeding it into gunzip:

    # dd if=./uramdisk.image.gz of=./ramdisk.image.gz skip=16 bs=4

    More info here: http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs

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

    This doesn't work for me, after going from uramdisk.image.gz to ramdisk.image.gz to ramdisk.image, I cannot mount it:

    $ sudo mount -o loop ramdisk.image zed
    mount: you must specify the filesystem type

    $ file ramdisk.image
    ramdisk.image: ASCII cpio archive (SVR4 with no CRC)

    $ /sbin/fdisk -l ramdisk.image
    last_lba(): I don't know how to handle files with mode 81a4
    Disk ramdisk.image: 0 MB, 0 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk ramdisk.image doesn't contain a valid partition table

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

    Apparently I had to follow the instructions as a CPIO archive... Which they say is _not_ for the zedboard, but nevermind.

    • 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