Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I've seen a lot about how to convert a zImage to a uImage but how do you do the opposite -- convert a uImage to a zImage?
Offline
Is this possible?
I have been googling all over and have not seen any reference to this direction.
Offline
puterboy, have you figured it out yet?
I'm curious, too ...
Thanx!
Offline
yeah it's pretty simple
dd if=uImage bs=64 skip=1 of=zImage
or directly from the NAND:
dd if=/dev/mtdblock2 of=zImage bs=64 skip=1
Offline
Actually, /dev/mtdblock2 is in general bigger than zImage (although the above will still generally work)
If you want to extract just the uImage or zImage directly from /dev/mtdblock2 without any trailing garbage, try the following (though it will be much slower)
For the uImage
uImageSrc=/dev/mtd2; dd if=$uImageSrc of=zImage-$(uname -r) bs=1 count=$((64 + $(dd if=$uImageSrc ibs=4 skip=27 count=1 2>/dev/null | hexdump -v -e '1/4 "%02d"')))
For the zImage either trim the first 64 bytes using as above: dd if=uImage of=zImage bs=64 skip=1
or directly try:
uImageSrc=/dev/mtd2; dd if=$uImageSrc of=zImage-$(uname -r) bs=1 skip=64 count=$(dd if=$uImageSrc ibs=4 skip=27 count=1 2>/dev/null | hexdump -v -e '1/4 "%02d"')
Note the operation is relatively slow since we use bs=1 since there is no guarantee that the uImage or the zImage are divisible by any standard block size factor
Note this works by reading the size of the zImage (and hence uImage) from bytes 28-31 of the zImage.
Offline