CM10 Nook Color Build Notes

Here are my notes regarding building CyanogenMod 10 for the Barnes & Noble Nook Color. This is not a , and most of this has already found its way to these build instructions.

Setup

This was done in using the stock and a few minimal tweaks.

As per the original AOSP instructions, I used a case-sensitive image:

hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android-jb-nook.dmg
hdiutil attach ~/android-jb-nook.dmg -mountpoint /Volumes/android

I then installed repo:

sudo mkdir -p /usr/local/bin
cd !$
sudo curl -O https://dl-ssl.google.com/dl/googlesource/git-repo/repo
sudo chmod +x repo

And got on with building:

cd /Volumes/android
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
# very long wait
tee system/.repo/local_manifest.xml
# paste http://pastebin.com/vuXbMz6D (used to be http://pastebin.com/vZFKdc8m) and hit Ctrl+D
# (there is now no need to run the extract_files script)
repo sync -j4
./setup_makefiles.sh
cd /Volumes/android/vendor/cm
./get-prebuilts
. build/envsetup.sh
export USE_CCACHE=1
export BUILD_MAC_SDK_EXPERIMENTAL=1
croot
brunch encore
# wait

And then transfer it to the Nook by using adb over Wi-Fi thusly:

adb connect 192.168.1.119
adb push out/target/product/encore/cm-10-20121014-UNOFFICIAL-encore.zip /sdcard

Other stuff of interest

Deprecated way of obtaining proprietary binaries:

cd system/device/bn/encore
# enable ADB debugging via network
adb connect _nookip_
./extract_files.sh

References:

Patches

Besides grabbing this header file and saving it as /usr/local/include/elf.h, you’ll probably want to install optipng from Homebrew and set up an md5sum equivalent like so:

sudo tee /usr/local/bin/md5sum
#!/bin/bash
md5 -r $*
^D
chmod +x !$

Another thing you should do (but which depends on your particular setup) is brew install gnu-sed and alias sed=gsed in your .bashrc.

Either that or go through the makefiles and replace every single invocation of sed -i foo with sed -i '' foo, since sed is used extensively in one-liners to update files like build.prop and whatnot, and it will break your build.

This page is referenced in: