[UTILITY][1/8] Build CM10.1 or AOKP on OS X - OS X Build Set Up 1.2

Search This thread

Wisemath

Senior Member
Jan 14, 2012
58
19
Code:
---This is where you choose your device config---

You're building on Darwin

Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_mips-eng
     5. full_grouper-userdebug
     6. full_tilapia-userdebug
     7. mini_armv7a_neon-userdebug
     8. mini_armv7a-userdebug
     9. mini_mips-userdebug
     10. mini_x86-userdebug
     11. full_mako-userdebug
     12. full_maguro-userdebug
     13. full_manta-userdebug
     14. full_toro-userdebug
     15. full_toroplus-userdebug
     16. full_panda-userdebug
     17. aokp_d2att-userdebug
     18. aokp_d2tmo-userdebug
     19. aokp_d2usc-userdebug
     20. aokp_d2vzw-userdebug
     21. aokp_maguro-userdebug
     22. aokp_mako-userdebug
     23. aokp_manta-userdebug
     24. aokp_toro-userdebug
     25. aokp_grouper-userdebug

Which would you like? [full-eng] 21
build/core/combo/HOST_darwin-x86.mk:62: *****************************************************
build/core/combo/HOST_darwin-x86.mk:63: * Cannot find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, 
build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before 
build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command 
build/core/combo/HOST_darwin-x86.mk:69: *****************************************************
build/core/combo/HOST_darwin-x86.mk:70: *** Stop..  Stop.

** Don't have a product spec for: 'aokp_maguro'
** Do you have the right repo manifest?


build/core/combo/HOST_darwin-x86.mk:62: *****************************************************
build/core/combo/HOST_darwin-x86.mk:63: * Cannot find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, 
build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before 
build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command 
build/core/combo/HOST_darwin-x86.mk:69: *****************************************************
build/core/combo/HOST_darwin-x86.mk:70: *** Stop..  Stop.

cp: /Volumes/Android/OUT/target/product/maguro/aokp_maguro-ota-eng.XXXXXXX.zip: No such file or directory

Same error as reported before.

Mac OS X Lion 10.7.5
lastest macports and xcode

---------- Post added at 01:57 AM ---------- Previous post was at 01:27 AM ----------

After some searching, Xcode 4.4+ doesn't include Osx 10.6 sdk.

So we need to download Xcode 4.3.2 and copy the 10.6 sdk to the current version of xcode /SDKs path.

Code:
1. Download Xcode 4.3.2
2. Mount IMG 
3. Copy /Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
4. Paste /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

Downloading now, i will report later !!!
 
Last edited:

frostincredible

Retired Recognized Developer
Nov 21, 2010
602
160
Florida
Remount it. It is located in your home directory.

---------- Post added at 07:54 PM ---------- Previous post was at 07:38 PM ----------

Trying to compile for the SGS2 i777 and I get the following error:

Code:
---This is where you choose your device config---

You're building on Darwin
  (ohai, koush!)

Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_mips-eng
     5. mini_armv7a_neon-userdebug
     6. mini_armv7a-userdebug
     7. mini_mips-userdebug
     8. mini_x86-userdebug
     9. full_panda-userdebug

Which would you like? [full-eng] 6
build/core/combo/HOST_darwin-x86.mk:62: *****************************************************
build/core/combo/HOST_darwin-x86.mk:63: * Cannot find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, 
build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before 
build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command 
build/core/combo/HOST_darwin-x86.mk:69: *****************************************************
build/core/combo/HOST_darwin-x86.mk:70: *** Stop..  Stop.
Device armv7a not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for armv7a not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/combo/HOST_darwin-x86.mk:62: *****************************************************
build/core/combo/HOST_darwin-x86.mk:63: * Cannot find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, 
build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before 
build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command 
build/core/combo/HOST_darwin-x86.mk:69: *****************************************************
build/core/combo/HOST_darwin-x86.mk:70: *** Stop..  Stop.

** Don't have a product spec for: 'mini_armv7a'
** Do you have the right repo manifest?


build/core/combo/HOST_darwin-x86.mk:62: *****************************************************
build/core/combo/HOST_darwin-x86.mk:63: * Cannot find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, 
build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before 
build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command 
build/core/combo/HOST_darwin-x86.mk:69: *****************************************************
build/core/combo/HOST_darwin-x86.mk:70: *** Stop..  Stop.

cp: /Volumes/Android/OUT/target/product/i777/cm_i777-ota-eng.xxxxxxx.zip: No such file or directory

Followed the instructions to the letter, but Im not sure whats wrong.

Same here compiling for grouper and tried 5 and 6.


Updated OP with a "NOTE" near the end, check it out.
 
  • Like
Reactions: DinoSoup
D

DinoSoup

Guest
I let it build for my device, which I setup exactly how I was told in the OP. All the files are downloaded from CM. Yet still, when I build, it never builds an actual zip file to put in my Android DMG.

---This is where you choose your device config---

You're building on Darwin
(ohai, koush!)

Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_mips-eng
5. mini_armv7a_neon-userdebug
6. mini_armv7a-userdebug
7. mini_mips-userdebug
8. mini_x86-userdebug
9. full_panda-userdebug

Which would you like? [full-eng] 1
Trying dependencies-only mode on a non-existing device tree?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-12.2.1-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=JOP40D
OUT_DIR=/Volumes/Android/OUT
============================================


============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-12.2.1-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=JOP40D
OUT_DIR=/Volumes/Android/OUT
============================================
Checking build tools versions...
build/core/main.mk:163: ****************************************
build/core/main.mk:164: * gcc is linked to llvm-gcc which will *
build/core/main.mk:165: * not create a useable emulator. *
build/core/main.mk:166: ****************************************
grep: build/target/board/generic/recovery.fstab: No such file or directory
external/bluetooth/bluedroid/Android.mk:8: NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR, using only generic configuration
find: src: No such file or directory
build/core/base_rules.mk:525: system/core/mkbootimg/Android.mk: Module "unpackbootimg" has useless module tags: eng. It will be installed anyway.
build/core/tasks/kernel.mk:82: **********************************************************
build/core/tasks/kernel.mk:83: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:84: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:85: * BoardConfig.mk file *
build/core/tasks/kernel.mk:86: **********************************************************
make: *** No rule to make target `otapackage'. Stop.

cp: /Volumes/Android/OUT/target/product/*wingray*/cm_*wingray*-ota-eng.myname.zip: No such file or directory
I've even tried other options besides full-eng.
 
Last edited by a moderator:

frostincredible

Retired Recognized Developer
Nov 21, 2010
602
160
Florida
I let it build for my device, which I setup exactly how I was told in the OP. All the files are downloaded from CM. Yet still, when I build, it never builds an actual zip file to put in my Android DMG.


I've even tried other options besides full-eng.

full-eng is the simulator. I personally don't build for the simulator on OS X so have not gone about circumventing those errors. There are missing steps I need to add to the CM script. Check back soon.
 

dipole

Senior Member
Sep 1, 2010
410
74
Google Pixel 7 Pro
No build zip either with AOKP.

build/core/tasks/kernel.mk:68: **********************************************************
build/core/tasks/kernel.mk:69: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:70: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:71: * BoardConfig.mk file *
build/core/tasks/kernel.mk:72: **********************************************************
build/core/tasks/kernel.mk:73: *** "NO KERNEL CONFIG". Stop.

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
 

sada23

Senior Member
Nov 30, 2010
907
943
Sunnyvale, CA
Is anybody able to build CM10.1 or AOKP as of yet with this script?

I am not able to. I am choosing to build option 5&6 for CM10.1.
 
L

LastStandingDroid

Guest
Great tool for Mac Users, I myself use a macbook Pro so it would be an ease to not being forced to switch :)
 

truehybridx

Member
Mar 1, 2012
16
0
Austin
leimobile.com
Could you state the manual steps?

Thanks


Sorry for the late reply, havent been signed in lately :p

Well what i meant by manually is opened the scripts in a text editior and run them one at a time. That way you can see exactly which line screwed up... It depends on how far you have gotten with using the scripts already

Scripts are located in the OSX_Setup folder, have a look, they are usefully named as to what the script actually does :D
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    OS X Build Set Up 1.2 - By Kyle Frost (frostincredible)

    So you want to build AOKP or CM10.1 on OS X? Well worry no longer my friends,
    it is about to get a whole lot easier. Why is that? Because this script I've written will do pretty
    much everything for you, from creating the case sensitive DMG to installing the required files,
    to setting up all the folders. The best part? It also will initialize the AOKP or CM repo (depending
    on your choice) and you can also build them straight from the script! How fantastic is that?!
    Simply read on to see how! Make sure to follow all the instructions (there aren't many)!

    Follow these steps:

    1. Go here and download OS X Build Set Up 1.2 (OSX_Setup-1.2.zip) - DOWNLOAD
    2. Place the ZIP file on your Desktop.
    3. Extract the ZIP to your Desktop.
    4. Here comes the only tricky part. Open the file located at OSX_Setup/scripts/advanced_scripts/build_cm or build_aokp, whichever you're going to build.
    5. Find this line -
      Code:
      # BELOW IS THE ONLY LINE YOU SHOULD BE EDITING. REPLACE *YOUR DEVICE* WHITH YOUR DEVICE'S CODE NAME. EX - NEXUS 7 = "grouper"
    6. Just below that, edit this line with the instructions in the one I just posted -
      Code:
      cp /Volumes/Android/OUT/target/product/*YOUR DEVICE*/aokp_*YOUR DEVICE*-ota-eng.$ME.zip /Volumes/Android/Builds/AOKP_$ME.$NOW.zip
    7. IT IS IMPORTANT THAT YOU DON'T EDIT ANYTHING ELSE.
    8. Open your favorite Terminal application (the default on is Terminal located at /Applications/Utilities/Terminal).
    9. cd to the OSX_Setup folder on your Desktop.
      Code:
      cd /Users/YOUR NAME/OSX_Setup
    10. Run the following -
      Code:
      ./runme
    11. After running this, you will be presented with the following menu -
      Code:
      ============================================================
              OS X Build Set Up 1.2 - by Kyle Frost
      ============================================================
      
                           ---Main Menu---
      
        1 - Create DMG
        2 - Install required files (MUST install MacPorts first)
               MacPorts available free at www.macports.org
        3 - Set up folders
      
        WARNING: DO NOT RUN ADVANCED MENU UNTIL
        YOU HAVE RUN ALL 3 ABOVE, OR HAVE DONE
        THEM ALL MANUALLY. THANK YOU.
      
        0 - Advanced Menu
      
        x - Exit
      
      Enter option:
    12. As you can see, you need to go here and install MacPorts before proceeding - MacPorts
    13. After installing MacPorts you can go ahead and run everything.
    14. Create DMG will give you the options of creating a 25GB, 30GB, 40GB, 50GB, or 60GB DMG. 25GB is the lowest recommended by the Android Team.
    15. Install required files will simply do just that, it will install the files needed as specified in the AOSP documents. This can take a while, so go take a nap while it runs.
    16. Set up folders will give you the option of setting up the folders for AOKP or CM10.1. Simply choose which you want and the folders will be created.
    17. Choosing Advanced Menu will give you this -
      Code:
      ============================================================
              OS X Build Set Up 1.2 - by Kyle Frost
      ============================================================
      
                          ---Advanced Menu---
      
                  MUST INSTALL XCODE BEFORE BUILDING!
                  XCODE IS FREE IN THE MAC APP STORE!
      
        1 - Initialize AOKP Repo
        2 - Initialize CM10.1 Repo
      
        When building, it will give you a list
        of devices. Enter the number for your device
        configuration and the build will continue.
        It will take a while the first time, as the
        source must first completely download.
      
        3 - Build AOKP
        4 - Build CM10.1
      
        Note: When the build is complete, you can
              find the finished ZIP in the Builds
              folder on your Android disk image.
      
        0 - Go to Main Menu
      
      Enter option:
    18. There you can see you need to install Xcode, if you haven't already. It is free in the Mac App Store (this script is for OS X, you know).
    19. All the options are pretty self explanatory. Make sure you have run the folder set up for the ROM which you wish to build first. Run the initialize option for your desired ROM before running the build option.
    20. That is it! After the build has done (takes a while the first time you set all this up, much faster the next few times) you will be able to build your own nightly's, or whatever you so desire! Have fun!

    NOTE: If you have an error regarding "Xcode" and the "10.6 SDK" when trying to build, download the MacOSX10.6.sdk.zip, decompress it, and place it in "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/".

    Disclaimer: This will only work with devices that are officially supported by AOKP or CM10.1. If your device is not supported by their official repos, either wait to see if it is, try to edit my script to get the repo your device's tree is on, or wait until I get around to writing a tutorial on how to add custom repos.



    Please do not redistribute this without my permission,
    and feel free to hit that thanks button if you liked this.
    2
    Version 1.0 - Initial Release

    Version 1.1 - Bug Fixes

    Version 1.2 - Bug Fixes
    2
    Error in step 2 of main menu

    Hey,

    I am getting this error

    Code:
    Enter option: 2
    Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build.
    Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information.
    --->  Computing dependencies for gmakeError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?

    I have installed mac ports and xcode...and done step 1 (made the dmg...and its mounted)
    Dont exactly know what i am doing wrong..

    I am using a macbook pro running OS X 10.8

    Any help please
    Thanx
    1
    Reserved for future tips and tricks.
    1
    Hey,

    I am getting this error

    Code:
    Enter option: 2
    Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build.
    Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information.
    --->  Computing dependencies for gmakeError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?

    I have installed mac ports and xcode...and done step 1 (made the dmg...and its mounted)
    Dont exactly know what i am doing wrong..

    I am using a macbook pro running OS X 10.8

    Any help please
    Thanx

    Xcode Command Line Tools can be installed from Xcode Prefs, Downloads, Components.