Following the standard build instructions for Firefox OS will leave the ZTE Open in a boot loop. Here are the steps I took to get Firefox OS v1.4 bootable and working well on my ZTE Open. The boot image made in Phase 1 worked on v1.3 as well.
I assume you already have CWM as your recovery and know how to compile B2G.
Generate the newboot.img first. This is the boot image that will let you get past the boot loop. We will use the process described here while making the changes recommended in the comments on Bug 965180. Note that this should all happen outside your B2G build directory.
- Pull the boot.img file out of the ZTE-supplied v1.1. Download it from the ZTE site here (assuming you have the US version) if you don't have it. It is in the .zip file they have you use to update to v1.1. Note that I was already on v1.1 when I ran the steps in Phase 2. Your mileage may vary if you are in other versions.
Explode the boot image and initrd.img.
abootimg -x boot.img mkdir a_dir; cd a_dir gunzip -c ../initrd.img | cpio -
- Follow Ginn Chen's recommendations for updating three files in boot.img. I wasn't sure where to put the init.rc code and chose to put it after line 280. Even though it seems to work, I welcome any feedback on a better place to put these changes.
Go back to edu's comments to repack the boot.img into a file called newboot.img.
/out/host/linux-x86/bin/mkbootfs . | gzip > ../newinitramfs.cpio.gz cd .. /out/host/linux-x86/bin/mkbootimg --kernel zImage --ramdisk newinitramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=roamer2' -o newboot.img
This phase required three binaries I didn't have on my system. I had to Google around to find them. They are abootimg, mkbootfs, and mkbootimg. It might be better to build these yourself, but I found copies online that worked.
Compile, flash, get out of the boot loop, and enjoy v1.4.
- Run the normal config and build scripts from B2G. Use BRANCH=v1.4 and inari as the device.
- Copy the newboot.img you made in Phase 1 to B2G/out/target/product/inari/ as boot.img (thanks to Roland in the comments for pointing out this would work)
- Run ./flash.sh to get your device flashed an updated
- If you end up in a boot loop, continue through the following steps. If no boot loop, you are done!
- During one of the boot loops, hold the volume up button to load CWM.
Return to where you saved newboot.img during Phase 1. Run this code to put the new boot image on your phone and flash it.
sudo adb push newboot.img /sdcard/boot.img sudo adb shell flash_image boot /sdcard/boot.img
Reboot the phone using the CWM menu. The screen may go blank for a while, but it should boot up into a relatively stable v1.4.
As mentioned above, here are links to the sites I used to figure out this process:
Much thanks to the commenters on those threads for figuring all of this out for me. I hope this consolidation helps.