You have the uramdisk.image.gz file of the Linux for ZYNQ and you want to make modifications to it.

1- Copy it some where

2- strip out the first 64 bytes (which are mainly of u-boot) to obtain the compressed ramdisk

dd bs=1 skip=64 if=uramdisk.image.gz of=uramdisk_no_header.image.gz

3- unzip the ramdisk

gunzip uramdisk_no_header.image.gz

4- mount it some where

sudo mount -o loop uramdisk_no_header.image a

5- go to the a/ folder and make what ever modification you want and unmount it.

sudo umount a

6- compress it

gzip uramdisk_no_header.image

7- make the final uramdisk again

mkimage -A arm -T ramdisk -C gzip -d ramdisk_no_header.image.gz uramdisk.image.gz

The important point :

mkimage is located inside the tools folder of u-boot: /u-boot-xlnx/tools/mkimage

it should be either in the PATH or you should use its absolute path when calling.

 

References:

http://boundarydevices.com/hacking-ram-disks/

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