Enter the bootloader and prepare the phone to be flashed:
./boot_usb setflag usb
./boot_usb gen-blob 0
Backup your existing kernel:
./boot_usb read 0xA0000 1048576 backup-of-kernel-partition
# Then remove the famous 2048 bytes offset:
dd if=backup-of-kernel-partition bs=1k skip=2 of=24-kernel-backup
Keep these two backups, we will use them both later:
Now copy and rename this "24-kernel-backup" file to "default" on the /boot/ folder of the (micro) SD card. Make also sure the file /boot/menu.lst is in the (micro) Sd as well and point to that "default" kernel too.
Check gen-blob's size (must not exceed 128KiB)
ls -l gen-blob
Flash gen-blob WARNING: For gen2 phones only! :
dd if=/dev/zero bs=1 count=2048 of=needed-offset
cat needed-offset gen-blob > gen-blob-to-be-flashed-to-0xA0000
#flash using boot_usb/gen-blob, example: boot_usb flash <addr> <file>
./boot_usb flash 0xA0000 gen-blob-to-be-flashed-to-0xA0000
[edit]After the flash
•Boot with vol- (next song on E2) pressed for the boot menu or with vol+ (previous song on E2) for the usb mode.
•You can power off on usb mode with "boot_usb off".
•You can still have access to the MBM flash mode with the usual combo.
[edit]Re-flashing the original kernel, after genblob, in the device (optional)
Re-flashing a (prepared) 2.4 original kernel require you a few minuts more, but bring some advantages...(the ability to boot the motorola kernel, and even charge the battery without a (micro)SD in the phone).
But:
•You should always do a backup (possibly, a full backup) before replacing anything on the phone...
•A little mistake could erase the partiton next to the kernel one ("resource partition"), etc...
Gen-blob always search at offset 0xC0000 and if it find a special 'magic' flag, then it will boot this kernel by default.
[edit]Prepare the 2.4 kernel to be re-flashed
You remember? Sooner, we did a backup of the kernel partition (third command described on this page):
So, hopefully, you kept that backup file...
Now you need to remove the 2048 bytes offset, and resize the file:
dd if=backup-of-kernel-partition bs=1 skip=2048 count=917500 of=kernel-with-no-extra-bytes
Download and add the magic flag to the kernel for genblob to recognize it:
# download a flag to put at the beggining of the kernel before flashing it.
wget
http://people.openezx.org/wyrm/gen-b...oot-from-flash
cat magic-boot-from-flash kernel-with-no-extra-bytes > kernel-to-be-flashed-to-0xC0000
[edit]Checks before re-flashing the 2.4 kernel on the phone
Then you need to assert the resulting 'kernel-to-be-flashed-to-0xC0000' file is exactly 917504 bytes big:
ls -l kernel-to-be-flashed-to-0xC0000
# If the result is bigger than 917504 bytes, then don't flash it! You made a mistake somewhere...
Then you can also check if the file hasn't been cut at its end: EXAMPLE 1:
hexdump kernel-to-be-flashed-to-0xC0000 | tail
[...]
[...]
[...]
hexdump kernel-to-be-flashed-to-0xC0000 | tail
00d8e80 ffff ffff ffff ffff ffff ffff ffff ffff
*
00e0000
EXAMPLE 2:
hexdump kernel-to-be-flashed-to-0xC0000 | tail
[...]
[...]
[...]
00d5970 5911 000d 2c6c 0000 ddb8 000d 0000 0000
00d5980 0000 0000 0000 0000 0000 0000 0000 0000
*
00e0000
One of these line (the last!) must end with at least a few ' f f f f ' or ' 0 0 0 0 '...
[edit]Reflash
If your checks has passed successfully, then you can flash the kernel
WARNING: For gen2 phones only! :
#(Re-)Flash the original kernel
./boot_usb flash 0xC0000 kernel-to-be-flashed-to-0xC0000