[Atrix 4G Android Development] sendust7:
Welcome to… Project Stable Boot for ICSROM!​

It all started on 05 Feb 2013 when an xda member reported that the ICSROM boot images featured in Atrix Boot Emporium V3.0: http://xdaforums.com/showthread.php?t=2124668

did not work: Dreaded Big-M followed by blank screen. No boot animation, even after several minutes, and no matter where the ROM was hosted, whether EMMC (standard) or SD (custom).

I started to wonder if “Dual Boot Atrix: Simplified and Standalone” was morphing into “Complicated and Co-dependent”.

So I duplicated the problem and documented my findings here: http://xdaforums.com/showthread.php?t=2124668&page=2

Then I unpacked the ICSROM 146 boot image and tore into the /ramdisk directory. Ramdisk is that part of the Android boot image that initializes your ROM at boot time via multiple “init*.rc” (run command) scripts written in the Android “init” language.

Then, several days later, it happened:

I experienced a significant breakthrough with ICSROM on my AT&T Atrix

​

I discovered mainly that:

Ramdisk references approximately twenty different components (functions and services) that do not exist

Ramdisk does not reference several other components that DO exist

Memory allocations in the ICSROM 146 kernel command string differ significantly from default

Perhaps some or all of the missing components are (or were) available via legacy Motorola OTA updates. But if Motorola is done with ICS for Atrix 4g, then I think we’re done with the OTA updates.

So I decided to yank most of the init*.rc code containing broken references.

Also, I noticed that init.olympus.rc launches some encryption-related functions at boot time, whereas MROM ICS does not. So I yanked these as well. Then I quickly repacked the boot image and voila… ICSROM came up. Then I put my phone (and myself) to sleep.

09 Feb, 0430 PST: Disconnected charger, woke the phone and observed battery at 99%. Put phone back to sleep. Fifteen minutes later, woke the phone and observed battery at 98% --- only a 1% drop. Repeated the same test multiple times and got the same results.

I began to dream of 24 hour battery life again, lol.

I also noticed something related --- my phone was running much cooler, even when not in sleep mode. So later in the morning, I conducted several more experiments:

CWM factory reset (wipe /data and /cache), re-flash ICSROM-146-Rebuild.zip and reboot. Big-M followed by blank screen, as expected.

Next, unpack and repack ICSROM 146 boot image. Here’s the effect: Since my “modify-boot” tool set does not include a kernel command line, it effectively wipes any pre-existing command line in boot.img. So the only functional difference between the “stock” ICSROM 146 boot.img and the repacked one is the absence of the following command string:

Command line: mem=384M@0M nvmem=128M@384M mem=512M@512M vmalloc=256M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:d00:100:800,kpanic:2100:400:800 security=tomoyo mot_prod=1 androidboot.serialno=TA20703SX2

By contrast, the kernel command line built into my ROM is:

root@olympus:/ # more /proc/cmdline
more /proc/cmdline
mem=320M@0M nvmem=192M@320M mem=512M@512M vmalloc=320M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=s
dmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=TA2070GKY6
root@olympus:/ #

Please correct me if I am wrong, but I think that if no kernel command line is present in boot.img, the ramdisk “init” function reads the ROM default /proc/cmdline string after the kernel boots.

Note that the ICSROM 146 memory allocations differ significantly from those in /proc/cmdline.

Anyway, I repeated my previous experiment: CWM wipe /cache and /data, re-flash 146, power down and fastboot the custom ICSROM 146 boot image --- the only change being the absence of a kernel command line.

Results: ICSROM came up. Power up to Welcome screen was less than 3 minutes on first boot, and 50-55 seconds on subsequent boots.

But my phone ran very warm --- even at idle.

So I decided to incorporate all the ramdisk changes I had made the previous night and to repack (again, no kernel command line) and repeated the previous experiment: CWM wipe /data and /cache, re-flash ICSROM 146, power down and fastboot the repacked image (with no kernel command line).

Results: ICSROM came up in 3 minutes (expected), but THIS time, my phone was running cool.

Subsequent to these results, I ran CF Bench (free) many times. Scores generally hovered around 5000 --- slightly below the HTC Sensation, but still quite respectable for 1.0GHz --- though I think there's a wee bit of overclockin' here.

And now, I share these initial results in the form of an image to boot ICSROM 1.4.6 on EMMC. See links and instructions below.

[UPDATE 10 Feb 2013]: I did fastboot flash Rev00 directly after another failed boot with stock 146 boot.img --- and ICSROM came up. I did not need to wipe /data or /cache.

Fastboot image: http://www.mediafire.com/?bu604jfdm2axfsv

Flashable zip: http://www.mediafire.com/?5qndqe429eu3ltu

Preliminaries:

Rooted phone with unlocked bootloader

CWM Recovery 5.0.2.0 installed (or latest version of TWRP)

Fully charged, healthy battery​

Instructions:

CWM Nandroid backup of current ROM (if you want to save /data and /cache)

CWM "wipe data/factory reset" (leaves existing ROM in place but clears /data and /cache)

CWM flash ICSROM-1.4.6-Rebuild.zip (takes a few minutes)

Do NOT reboot. Power down instead.

Fastboot method: Power up to fastboot and "fastboot flash boot boot-icsrom-146-Rev00.img"

CWM flash method: Power up to Android Recovery and flash boot-icsrom-146-Rev00.zip
​

[UPDATE 22 Feb 2013]: I received the go-ahead from ICSROM author upndwn4par to roll my Rev00 boot image into ICSROM 1.4.6

Link: http://www.mediafire.com/?5lbdhga26azhmd7

Instructions:

Already on ICSROM 146 with Rev00 boot image? Nothing to do.

Already on ICSROM 146 with original boot image? Simply flash zip... OR flash my Rev00 boot zip linked in OP (faster)

Coming from different ROM? Nandroid backup (unless you don't mind losing /data), then CWM wipe data/factory reset and flash zip

I cannot guarantee this boot image will work for you. And because of the complexity of ramdisk, I cannot simply provide a tweak configuration file.

All I can say is that with it, my AT&T Atrix runs much cooler, battery life is dramatically improved, and touch screen issues (like a home screen app ceremoniously launching when Power button is pressed) have disappeared.

Pending success of follow-on experiments, I will make an equivalent image available to boot ICSROM on SD card (for dual boot).

Some future planned work:

Continue scouring ICSROM boot.img /ramdisk, and remove “bad actors” as necessary

Study the init memory allocations and tweak if necessary

Try to reduce boot time

Given enough positive responses to boot-icsrom-146-Rev00.img, I will consider rolling it into my next release of Atrix Boot Emporium (presently V3.0)

Blessings.

Credits: upndwn4par (ICSROM).