You are on page 1of 6

How to Build/Install CyanogenMod 9 (Ice Cream Sandwich) from source for Nook Color/encore (a WIP by fattire) (BTW: Im @fat__tire

on Twitter) (This is the LINUX edition-- OS X users: see chfrasers notes to the right (if viewing w/a web browser)!). Update Feb 5: Broken build? See IF THE BUILD BREAKS below.. FOR DEVELOPER TYPES AND THOSE WHO WANT TO LEARN/EXPERIMENT ONLY. These instructions assume you already have a recent CyanogenMod 7 (CM7) and ClockworkMod (cwm) recovery installed on your Nook Colors internal storage, the emmc (embedded multimedia card). If you dont, CM7 is a free download and you can install it yourself. See here: http://kan.gd/1cx0 Or, if you want to use it as a bootable SD-card, see here: http://kan.gd/1cx1 READ THESE INSTRUCTIONS CAREFULLY BEFORE YOU BEGIN AS IT REFERS TO THE REGULAR HOW-TO-BUILD CYANOGENMOD INSTRUCTIONS. ALSO, UNDERSTAND THAT YOU ARE DOING THIS ENTIRELY AT YOUR OWN RISK AND ASSUME ALL RESPONSIBILITY FOR ANY NEGATIVE CONSEQUENCES, INCLUDING DAMAGE TO YOU, YOUR EQUIPMENT, YOUR DATA, YOUR FAMILY, AND/OR YOUR PETS. As with CM7, these instructions are for installation to the built-in emmc storage, not the SD card. If you want help, youll have to turn to the development community. See below for how to do that. ALSO- Youre discouraged from romming or kanging at this point. Theres no reason to do so as cm9 is in a rapid state of change. Please contribute to the wider effort before kanging. Otherwise people will get confused. This is NOT a complete, fully-functioning OS yet. It is a project in motion. HOW TO BUILD 1. Linux users: Set up the Android SDK, the build packages, and create the directories as described in http://wiki.cyanogenmod.com/wiki/Barnes_%26_Noble_Nook_Color:_Compile_CyanogenMod_(Linux) . When you get to the instruction that says to enter... repo init -u git://github.com/CyanogenMod/android.git -b gingerbread ...use -b ics instead of -b gingerbread at the end for the ice cream sandwich branch. 2. BEFORE you repo sync per the next instruction, youll need to add the encore (nook) device folder for ice cream sandwich, which is temporarily hosted on github by me, fat-tire. To do this, create a file in ~/android/system/.repo/local_manifest.xml and add the pasted contents of this page into it: http://pastebin.com/FrFJmVtJ

What is this file? The local_manifest.xml file supplements the regular manifest, adding this needed repository to those provided by the main cyanogenmod ones so that a regular repo sync command will update changes from there as well. Helpful tip! If youre using Ubuntu (or the GNOME desktop in general) you can create/edit this text file with the following command: gedit ~/android/system/.repo/local_manifest.xml 3. Now you can repo sync -j16 per the regular instructions. the -j16 part means that there will be 16 individual threads/connections. If you experience problems syncing, you can lower this to -j5 or -j3 or even just repo sync by itself. Prepare to wait a long time while the source code downloads. Helpful Tip! The repo sync command is used to download the latest source code from CyanogenMod and Google. Remember it, as you can do it every few days to keep your code base fresh and up-to-date. 4. Next, install the proprietary files per the original instructions and run the ./setup-makefiles.sh script in android/system/device/bn/encore. (if that doesnt work for some reason, try typing add_lunch_combo cm_encore-userdebug manually.) 5. Another change from the regular instructions-- Youll need to cd vendor/cm, then enter ./getprebuilts in vendor/cm instead of ./get-rommanager. This is because there are now two prebuilt apps in CM9 instead of just the one. 6. If you want to speed up subsequent builds after this one, type export USE_CCACHE=1 7. Helpful Tip! Instead of typing cd ~/android/system every time you want to return back to the root of the source code, heres a short command that will do it for you: croot . To use this command, as with brunch, you must first do . build/envsetup.sh from ~/android/system. So next, type: croot brunch encore The build should begin. If that doesnt work, first, type lunch. You should see a list of devices, including something like cm-encore-userdebug Select it by typing its number. Then... mka bacon

or, if that doesnt work... make -j[#ofcpus] bacon ...so if you have a quad core cpu, type make -j4 bacon. Helpful Tip! If you get a command not found error for croot or brunch or lunch, be sure youve done the . build/envsetup.sh command as described in the regular instructions.

IF THE BUILD BREAKS... make[1]: *** No rule to make target `out/target/product/encore/obj/lib/libaudio.so', needed by `out/target/product/encore/obj/SHARED_LIBRARIES/audio.primary.encore_interme diates/LINKED/audio.primary.encore.so'. Stop. Update Jan 7: Starting today, youll need some new audio-related files installed in vendor/bn/encore/prebuilt or you will receive errors when building. These files can be extracted by running the extract-files.sh with cm7 (or sneakpeak2, which probably doesnt exist) installed on your Nook Color. You have done this process before in step 4 of the installation instructions. If you're using Ubuntu 11.10, the build may break. Until its fixed, in external/mesa3d/src/glsl/linker.cpp, up near the top around line 67 where the other #include <whatever.h> looking things are-- just add this line to the group: #include <stddef.h> Thats it! (Note that the # above is not a prompt. Its part of what you want to add.) When youve changed the file, save it, then resume the build with the brunch or mka or make -j[#] command. You can read about this bug here: http://kan.gd/1d10 Hopefully this will be fixed soon so you dont have to do anything special. If you experience this not-enough-memory-related error...
ERROR: signapk.jar failed: return code 1 make: *** [out/target/product/encore/cm_encore-ota-eng.root.zip] Error 1

...you may want to make the following change to:

system/build/tools/releasetools/common.py Change: java -Xmx2048m to java -Xmx1024m or java -Xmx512m

Then start the build again (with brunch). If the build breaks with a missing boot.img file error, cd ~/android/system/build and type git revert d892e1c903f0e050723bce09000a222853f53bb9 and it should build.

HOW TO INSTALL After the build completes, type cd $OUT in the same terminal window that you did the build. Here youll find all the files that were created. The stuff that will go in /system is in a folder called system. The stuff that will become your ramdisk (uRamdisk) is in a folder called root. And your kernel (uImage) is called... kernel. But thats all just background info. Because you have an update.zip file that you can flash with clockworkmod recovery. 1. So now, connect your Nook Color to the computer and push that update.zip file to your nook colors SD card as follows: adb push update-cm-9.0.0-RC0-NookColor-KANG-signed.zip /sdcard/ or, possibly adb push update-cm-nightly-signed.zip /sdcard/ 2. On the nook color, boot into clockworkmod recovery and do a nandroid backup of your current installation. 3. Now you can flash the update.zip file above as usual via clockworkmods menu. Linux Mint users: If you have problems with adb (file not found) and youre using 64-bit linux (I dont know much about Mint, so maybe its all 64-bit?) try doing this to see if adb works better: sudo apt-get install ia32-libs

HOW TO UPDATE TO THE LATEST SOURCE CODE To pull recent changes and bring your repository up-to-date, just use the repo sync command from ~/android/system. Update Jan 7: Starting today, youll need some new audio-related files installed in vendor/bn/encore/prebuilt or you will receive errors when building. These files can be extracted by

running the extract-files.sh with cm7 (or sneakpeak2, which may or may not exist) installed on your Nook Color. You have done this process before in step 5 of the installation instructions. At some point, the encore device repository will be merged into CyanogenMods repository, and it will no longer be necessary to use the local_manifest.xml file (or manually clone the repository).

HOW TO GO BACK TO USING CM7 1. Simply boot into ClockworkMod and use the nandroid backup/restore feature to restore your nook back to how it was.

HOW TO GET HELP Seek assistance here: http://forum.xda-developers.com/showthread.php?t=1370873 The ics thread on xda-developers forum http://rootzwiki.com/topic/10848- discussion-cm9ics-work-in-progress The ics thread on rootzwikis forum
http://webchat.freenode.net?channels=nookcolor

A helpful, real-time chat room (or channel) on IRC- the Internet Relay Chat. THATS IT! CONGRATS AND GOOD LUCK... (see also the CM9 for HP Touchpad build walkthrough http://kan.gd/1esb ) BONUS GRAPHIC! HOW A NOOK COLOR BOOTS: For those who are interested in learning the boot process from power on, heres a confusing-looking graph to take you through the first few moments...

You might also like