HTCMagicBuild » History » Version 1
Paul Kocialkowski, 02/05/2012 03:02 PM
| 1 | 1 | Paul Kocialkowski | h1. HTC Magic Build |
|---|---|---|---|
| 2 | |||
| 3 | This explains how to build Replicant for the HTC Magic. |
||
| 4 | |||
| 5 | h2. Prerequisites |
||
| 6 | |||
| 7 | Before building, you must make sure: |
||
| 8 | * You have installed the [[BuildDependencies]] |
||
| 9 | * You have downloaded Replicant 2.2 sources: [[GettingReplicantSources]] |
||
| 10 | * Your sources are up to date: [[GettingReplicantSources#DownloadingUpdating-the-source-from-the-repos|Downloading/Updating the source from the repos]] |
||
| 11 | * You are in the directory where the sources were downloaded |
||
| 12 | * Know if your HTC Magic is 32B or 32A: see "CyanogenMod wiki":http://wiki.cyanogenmod.com/wiki/How_to_determine_if_you_have_32A_or_32B |
||
| 13 | |||
| 14 | h2. Warning |
||
| 15 | |||
| 16 | *Do not build as root, always build as user.* |
||
| 17 | |||
| 18 | h2. Building |
||
| 19 | |||
| 20 | h3. 32B devices |
||
| 21 | |||
| 22 | Setup the build environment: |
||
| 23 | <pre> |
||
| 24 | source build/envsetup.sh |
||
| 25 | lunch replicant_dream_sapphire-eng |
||
| 26 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
| 27 | </pre> |
||
| 28 | |||
| 29 | Start the build: |
||
| 30 | <pre> |
||
| 31 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 32 | make -j$parallel_tasks distimages |
||
| 33 | </pre> |
||
| 34 | |||
| 35 | The -jn argument is to indicate the number of parallel tasks during the build. |
||
| 36 | You can remove it from the command line to have only one task at a time. With fast hardware, best results will come with @-j9@, @-j16@ and @-j32@. |
||
| 37 | |||
| 38 | h3. 32A/EBI1 devices |
||
| 39 | |||
| 40 | Setup the build environment: |
||
| 41 | <pre> |
||
| 42 | source build/envsetup.sh |
||
| 43 | lunch replicant_dream_sapphire_ebi1-eng |
||
| 44 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
| 45 | </pre> |
||
| 46 | |||
| 47 | Start the build: |
||
| 48 | <pre> |
||
| 49 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 50 | make -j$parallel_tasks distimages |
||
| 51 | </pre> |
||
| 52 | |||
| 53 | The -jn argument is to indicate the number of parallel tasks during the build. |
||
| 54 | You can remove it from the command line to have only one task at a time. With fast hardware, best results will come with @-j9@, @-j16@ and @-j32@. |
||
| 55 | |||
| 56 | h2. Output files |
||
| 57 | |||
| 58 | Find the produced files: |
||
| 59 | * built target images: @out/target/product/dream_sapphire/@ |
||
| 60 | * built host tools: @out/host/linux-x86/bin/@ |
||
| 61 | |||
| 62 | For 32A/EBI1 devices, the images to use have the @-ebi1@ prefix. |