From: Marcus Cobden <lists@ma...> - 2007-09-27 09:32:13
Since the kernel position change at revision 1326 the instructions for
building a Qemu flash image on the wiki are a bit out of date.
We've been manually copying uImage back to build_arm_nofpu/root/boot as
a workaround, but does anyone what changes should be made to the script
to make the flash image?
On Sep 27, 2007, at 2:32 AM, Marcus Cobden wrote:
> Since the kernel position change at revision 1326 the instructions for
> building a Qemu flash image on the wiki are a bit out of date.
> We've been manually copying uImage back to build_arm_nofpu/root/
> boot as
> a workaround, but does anyone what changes should be made to the
> to make the flash image?
The Wiki says:
> rm flash
> dd of=flash bs=1k count=16k if=/dev/zero
> dd of=flash bs=1k conv=notrunc if=u-boot.bin
> dd of=flash bs=1k conv=notrunc seek=256 if=rootfs.arm_nofpu.jffs2
I tend to think of flash in 128k sectors rather than 1k chunks, so
I'd probably rewrite that as:
dd of=flash bs=128k count=128 if=/dev/zero
dd of=flash bs=128k conv=notrunk if=u-boot.bin
dd of=flash bs=128k conv=notrunk seek=2 if=rootfs.arm_nofpu.jffs2
dd of=flash bs=128k conv=notrunk seek=121 if=uImage
There's a minor problem with this recipe, which is that /dev/zero
means that the blank regions of "flash" will be filled with 0x00
instead of 0xff which is what it should have in it. Also, there
won't be JFFS2 headers on the fronts of all the sectors like there
ought to be. I have a script in http://svn.gumstix.com/gumstix-
creates one of the old-style flash images. You can create one of
those, and then overwrite the uImage onto the tail of flash at the end:
makeflash.sh u-boot.bin rootfs.arm_nofpu.jffs2 flash xm && dd
of=flash bs=128k conv=notrunk seek=121 if=uImage
The "jot" command used in that script might not be installed on your
system. On gentoo, it's in its own package called app-misc/jot --
probably similarly packaged on other distros.