This is for a build in ~/work/android/system rather than the usually quoted ~/android/system.
Start off in the usual way…
sudo apt-get install gcc-multilib
sudo apt-get install bison flex schedtool
cd work
mkdir bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > bin/repo
chmod a+x bin/repo
mkdir android/system
cd android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
Before starting the long first sync, we need to add some extra repositories to the build as presently the Desire HD isn’t included “out of the box”.
Create a file, .repo/local_manifest.xml with the following contents
< ?xml version="1.0" encoding="UTF-8"?>
path="device/htc/ace" remote="github" />
path="device/htc/common"
revision="refs/heads/gingerbread"/>
path="device/htc/msm7x30-common" remote="github" />
path="vendor/htc" />
Next step is to start the initial sync, then go do something else for a few hours while it grabs a lot of code for you…
repo sync -j16
Now we need to get some prebuilt files from the CyanogenMod Project.
cd vendor/cm/
./get-prebuilts
cd ../..
At this point the codebase will build but will not boot. To fix this, you need to edit the file device/htc/ace/media_profiles.xml as follows. [Patch submitted here http://review.cyanogenmod.com/13069)].
Insert @ line 77:
< !ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
Change line 250 from
maxOutputFrameHeight="720"/>
to
maxOutputFrameHeight="720" maxPrefetchYUVFrames="10"/>
Once all that has been done you can start building!
. build/envsetup.sh
brunch ace
It will take a while, so sit back and wait…
NB
The build results in a ROM that runs and is stable enough for everyday use, but there is no camera support! Neither picture nor video work in the current build