Making qemu images

From Gumstix User Wiki
Revision as of 03:17, 31 July 2008 by MatthieuHerrb (Talk | contribs) (Intructions on building a flash image for gumstix)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Preparing flash / disk images for qemu

Flash images

The flash image emulates the flash memory on the Gumstix motherboard. It's a single file that has the size of the emulated flash memory (32MB in the case of the verdex board emulated by qemu). It will contain the same images as the real flash, at the same offsets:

  • The u-boot image at offset 0
  • The root file system image at offset 256kB
  • The kernel image at the end of the image offset 31MB

The following 3 files are needed

  • u-boot-verdex-400-r1587.bin - u-boot
  • gumstix-basic-image-gumstix-custom-verdex.jffs2 - root file system
  • uImage-2.6.21-r1-gumstix-custom-verdex.bin - kernel.

Except for the u-boot image which is not yet built by openembedded, those files can be found in the tmp/deploy/glibc/images/ sub-directory of gumstix-oe after running bitbake.

To assemble the image flash.img run the following commands:

dd of=flash.img bs=128k count=256 if=/dev/zero
dd of=flash.img bs=128k conv=notrunc if=u-boot-verdex-400-r1587.bin
dd of=flash.img bs=128k conv=notrunc seek=2 if=gumstix-basic-image-gumstix-custom-verdex.jffs2
dd of=flash.img bs=128k conv=notrunc seek=248 if=uImage-2.6.21-r1-gumstix-custom-verdex.bin