[meta-xilinx] Address location for binaries...

Elvis Dowson elvis.dowson at gmail.com
Wed Feb 19 01:17:17 PST 2014


Hi Alan,

On Feb 19, 2014, at 13:04, Alan DuBoff <aland at softorchestra.com> wrote:

> 4) this looks like the device tree for the ramdisk. But where is my ramdisk? I
> think it is the rootfs.cpio but not certain about that.

I think you have to create your own ramdisk. I haven’t attempted to get the ramdisk
built automatically using yocto yet. I initially try to get yocto to build the root filesystem
and kernel, and use the contents of the core-image-minimal root filesystem to build
a ramdisk.

Here are the commands that I’ve used in the past, to manually create a ramdisk for zynq-7.

To create a new ramdisk.image.gz file, type the following commands.

Make an 8MB ramdisk.

$ dd if=/dev/zero of=initrd.img bs=1M count=8

8+0 records in
8+0 records out
8388608 bytes (8.4 MB) copied, 0.00831607 s, 1.0 GB/s

Format new ramdisk(initrd.img).

$ mke2fs -F -v -m0 initrd.img

mke2fs 1.42 (29-Nov-2011)
fs_types for mke2fs.conf resolution: 'ext2', 'small'
Discarding device blocks: done                            
Discard succeeded and will return 0s  - skipping inode table wipe
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
2048 inodes, 8192 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=8388608
1 block group
8192 blocks per group, 8192 fragments per group
2048 inodes per group

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

Mount initrd.img to /mnt/new-disk.

$ sudo mkdir -p /media/ramdisk
$ sudo mount -o loop initrd.img /media/ramdisk

Copy core-image-minimal root filesystem files to new ramdisk.

$ cd /media/ramdisk
$ sudo tar xvf '/tool/yocto/poky/build/tmp/deploy/images/core-image-minimal.tar.gz' .
$ sudo chown -R root:root *

Umount the ramdisks.

$ sudo umount /media/ramdisk

Gzip new ramdisk.

$ gzip -9 initrd.img
$ mv initrd.img.gz ramdisk.image.gz

Note that the Linux kernel configuration parameter BLK_DEV_RAM_SIZE needs to be changed accordingly to reflect the new ramdisk size before building a new kernel image.

CONFIG_BLK_DEV_RAM_SIZE=8192

Step 09.02: To modify an existing ramdisk file, type the following commands:

Uncompress the ramdisk image.

$ gunzip ramdisk.image.gz

Mount it (needs superuser priviliges) to a directory that already exists.

$ sudo mkdir /media/ramdisk
$ sudo mount -o loop ramdisk.image /media/ramdisk

You can now add or remove files from the ramdisk image, and add any of your programs - take a browse at /mnt/image, or wherever you mounted the files


When you have finished, unmount the filesystem.

$ sudo umount /media/ramdisk

Re-compress the image

$ gzip -9 ramdisk.image

Copy the ramdisk to the kernel folder.

$ cp ramdisk.image.gz /project/linux-xilinx/arch/arm/boot

To make the ramdisk bootable using image, type the following commands:

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

cp uramdisk.image.gz '/media/elvis/boot'

Best regards,

Elvis Dowson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1536 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20140219/f9d8984b/attachment.pgp>


More information about the meta-xilinx mailing list