Quote:
Originally Posted by l33tlinuxh4x0r View Post
Once you flash U0 you can flash from sdcard but you need U0 first Also you need to make the sdcard with burn tool but the good news is that it is a new version of burn tool.

EDIT: anyone have any ideas on how to extract the ius file so that we can grab the img files from it?
Use a hex editor to search for gzip headers (0x1F8B08). That way, you will find the compressed ramdisk.cpio image and system.img. E.g. dd if=<thefile.ius> bs=<the offset of the gzip header> skip=1 | gzip -cd - > imagefile

If gzip produces the file and only warns about garbage at the end, you've found the proper location!

If found:

You can create ramdisk image like this:

Code:
Select Code
{ cat uboot_header ; dd if=file.ius bs=<offset> skip=1 | gzip -cd - | gzip ; } > ramdisk.img
The uboot_header is the first 64 bytes from the ramdisk.img of older firmwares, you can grab it from there (again, dd!)

And system.img:

Code:
Select Code
dd if=file.ius bs=<offset> skip=1 | gzip -cd - > system.img
uImage (kernel + u-boot header) is a little trickier. You have to search in the hex editor for 0x27051956, and then look if you see a Linux kernel version following it in the next 128 or so bytes. I'm not sure how to tell exactly how many bytes the uImage in the .ius file is though, but you can look at the supplied burn tool to see how many KB it reports the kernel to be. Round that up and use that as size to extract. So if it returns 2600.5 KB:

Code:
Select Code
dd if=file.ius bs=1 seek=<offset> count=$((2601* 1024)) of=uImage
A few extra bytes in the uImage won't hurt.

I'll have a go at it later if no one has beat me to it