[ROM][SGH-I777][4.0.4] CyanogenMod 9 nightly builds | DEVELOPMENT THREAD

Search This thread

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Can you clarify - I take it discussion about build issues that are because script fixups are necessary in github sources is also off-limits ? ie where the root issue is in the repo not the person trying to compile. (Previous post removal implies this.)

If someone can't massage whatever comes out of github in order to get it to compile then it's unlikely they would be posting patches even if the build worked. However, on the other hand, I would argue it's also useful to identify, discuss and fix any build related issues for the benefit of all (separate thread perhaps?)
See atinm's previous post - if you find that the build scripts are wrong and fix them, please either post a patch here or (even better) read up on gerrit and submit. :)

http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
 
  • Like
Reactions: mi9xer

atinm

Retired Recognized Developer
Jul 16, 2010
2,189
3,681
Can you clarify - I take it discussion about build issues that are because script fixups are necessary in github sources is also off-limits ? ie where the root issue is in the repo not the person trying to compile. (Previous post removal implies this.)

If someone can't massage whatever comes out of github in order to get it to compile then it's unlikely they would be posting patches even if the build worked. However, on the other hand, I would argue it's also useful to identify, discuss and fix any build related issues for the benefit of all (separate thread perhaps?)

Anything source/github/gerrit related is fine here -- basically if there is something a developer can use, it should go here. This includes things like logcat output etc for bugs too. Questions, asking for help etc that can be done by other users is for the discussion thread.
 

sam3000

Senior Member
Jul 11, 2009
365
421
Seattle
Si4709_driver.ko is not necessary in i777, right ?

If atin / entropy can confirm this is the case I'll gerrit changes to tidy this up.

It was removed from kernel config a while ago but is still in github sources so nothing complains (unless you explicitly clean things out). Fixes I think necessary are to i777 i777.mk and kernel build.sh. I was thinking of refactoring "MODULES" in the kernel build.sh to allow a per target module list (targets are currently galaxys2 galaxynote and i777).

Ok, I lie. I have the aforementioned fixes / refactoring already done in my tree. Does this approach sound sensible ?
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Si4709_driver.ko is not necessary in i777, right ?

If atin / entropy can confirm this is the case I'll gerrit changes to tidy this up.

It was removed from kernel config a while ago but is still in github sources so nothing complains (unless you explicitly clean things out). Fixes I think necessary are to i777 i777.mk and kernel build.sh. I was thinking of refactoring "MODULES" in the kernel build.sh to allow a per target module list (targets are currently galaxys2 galaxynote and i777).

Ok, I lie. I have the aforementioned fixes / refactoring already done in my tree. Does this approach sound sensible ?

You are correct - that's the driver for the FM radio which we don't have.

Sounds good - that's been a minor annoyance I let go, but cleaning it up is good. :)
 
  • Like
Reactions: mi9xer

iXNyNe

Senior Member
Dec 26, 2010
1,133
473
37
nemchik.com
ok, so im following this guide
http://teamhacksung.org/wiki/index.php/CyanogenMod9:SGH-I777:How_to_build
to try and get started, and im on the "repo sync -j16" command
just wondering, is this supposed to take bloody ages? it seems like im downloading ALL cm sources for ALL devices and ALL versions (and ALL... ALL... ALL... etc)

just wondering if all of this is necessary or if i'm doing something wrong?

side note
im wondering how much data this is downloading, i'm trying to beat a tethering record of 77gb lol
 

tmckenn2

Senior Member
Nov 9, 2010
345
73
ok, so im following this guide
http://teamhacksung.org/wiki/index.php/CyanogenMod9:SGH-I777:How_to_build
to try and get started, and im on the "repo sync -j16" command
just wondering, is this supposed to take bloody ages? it seems like im downloading ALL cm sources for ALL devices and ALL versions (and ALL... ALL... ALL... etc)

just wondering if all of this is necessary or if i'm doing something wrong?

side note
im wondering how much data this is downloading, i'm trying to beat a tethering record of 77gb lol

there is a number for aosp. If i remember correctly its 10gb source? Its a lot more than gb thats for sure. Anuways the cm9 source will take ages. im not sure that -j16 helps in this instance bc there is very little compression being done. Just downloading.
generally it takes a few hours to download.
And it might be pulling tools and pre compiled tool chains from the other branches but i cant say for sure. The -b ics should make it download only the ics branch

Here are the specs:
http://www.androidpolice.com/2011/10/21/want-to-build-ice-cream-sandwich-from-aosp-bring-out-the-heavy-artillery-this-is-what-it-will-take/

6gb source
25gb to compile... As it is i have 50gb set aside for ccache...

My own side note. Im aware that brunch is the preferred way of building noe instead of lunch, make. Does brunch also add -j16 inherently because this is one thing that could benefit from more processing power.
Sent from my SGH-I777 using XDA
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
CM recently reworked things so you don't download all of the device-specific trees until you request one (such as device/samsung/i777) - but 90%+ of Cyanogenmod is common code, and the AOSP source tree is pushing on the order of 10GB.
 
  • Like
Reactions: mi9xer

sam3000

Senior Member
Jul 11, 2009
365
421
Seattle
atinm or anyone else with high familiarity with CM's build system - Any ideas on why nfc.exynos4.so won't build after trying to implement NFC changes?

http://review.cyanogenmod.com/#change,14470

This is an interesting exercise in understanding the CM build system.

It builds with this small change to i777/Android.mk:

diff --git a/Android.mk b/Android.mk
index 262dbfc..d59ce4c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -54,12 +54,12 @@ $(LOCAL_BUILT_MODULE):
# ) \
# )

+include $(call all-makefiles-under,$(LOCAL_PATH))
+
include device/samsung/galaxys2/camera/Android.mk
include device/samsung/galaxys2/DeviceSettings/Android.mk
include device/samsung/galaxys2/gpswrapper/Android.mk
include device/samsung/galaxys2/tvout/Android.mk
include device/samsung/galaxys2/tvouthack/Android.mk

-include $(call all-makefiles-under,$(LOCAL_PATH))
-
endif


I'm sufficiently clueless at this point to know what the most appropriate fix is but you are probably already several steps ahead :)

(I'm assuming that the galaxys2 includes are stomping LOCAL_PATH.)
 

ktoonsez

Inactive Recognized Developer
Nov 3, 2011
16,265
43,223
Tempe
I am trying to build cm9 with Ubuntu 11.10. It gets almost done and then I keep getting this error (the 3rd line):

Aidl: framework <= frameworks/base/core/java/android/content/IIntentSender.aidl
Aidl: framework <= frameworks/base/core/java/android/content/IOnPrimaryClipChangedListener.aidl
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
make: *** Waiting for unfinished jobs....
Aidl: framework <= frameworks/base/core/java/android/content/ISyncContext.aidl
Aidl: framework <= frameworks/base/core/java/android/content/ISyncAdapter.aidl


Anyone know what is going on?????
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I am trying to build cm9 with Ubuntu 11.10. It gets almost done and then I keep getting this error (the 3rd line):

Aidl: framework <= frameworks/base/core/java/android/content/IIntentSender.aidl
Aidl: framework <= frameworks/base/core/java/android/content/IOnPrimaryClipChangedListener.aidl
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
make: *** Waiting for unfinished jobs....
Aidl: framework <= frameworks/base/core/java/android/content/ISyncContext.aidl
Aidl: framework <= frameworks/base/core/java/android/content/ISyncAdapter.aidl


Anyone know what is going on?????
Looks like you forgot the "install build packages" step of the instructions - http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II_(AT&T):_Compile_CyanogenMod_(Linux) - it can't find zlib

sam3000 - thanks for the tip, that fixed building nfc.exynos4.so, no clue why. At this point I can get NFC to seem to turn on, no errors in logcat, but Market still thinks I don't have NFC and tapping a tag or card does nothing.
 
  • Like
Reactions: mi9xer

ktoonsez

Inactive Recognized Developer
Nov 3, 2011
16,265
43,223
Tempe
Looks like you forgot the "install build packages" step of the instructions - http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II_(AT&T):_Compile_CyanogenMod_(Linux) - it can't find zlib

sam3000 - thanks for the tip, that fixed building nfc.exynos4.so, no clue why. At this point I can get NFC to seem to turn on, no errors in logcat, but Market still thinks I don't have NFC and tapping a tag or card does nothing.

I did do them except the last one (think I talked myself out of it since it said the 10.10 part),I will execute that 3rd part and see what happens:

NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk: add-apt-repository "deb http://archive.canonical.com/ maverick partner"


Also Part #2 just dies, which I think it is going to on 11.10 according to the note:
For 64-bit only systems:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.


EDIT:
Still doesn't work, just a side note my current active android-tools is 4.4.6. Dont know if that has anything to do with it.
 
Last edited:

drakester09

Senior Member
Jan 10, 2012
1,292
876
I have been able to compile CM9 using this guide as reference:
http://teamhacksung.org/wiki/index.php/CyanogenMod9:GT-I9100:How_to_build

I first followed this guide up to Copy propietary files
http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)

Then continued on Team Hacksung's. The main difference is that on the local_manifest.xml you need to add a reference to the i777 project:
Code:
<project name="CyanogenMod/android_device_samsung_i777" path="device/samsung/i777" remote="github" />

Better double check on the Install the Build Packages part, as Entropy said you are missing some binaries.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I have been able to compile CM9 using this guide as reference:
http://teamhacksung.org/wiki/index.php/CyanogenMod9:GT-I9100:How_to_build

I first followed this guide up to Copy propietary files
http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)

Then continued on Team Hacksung's. The main difference is that on the local_manifest.xml you need to add a reference to the i777 project:
Code:
<project name="CyanogenMod/android_device_samsung_i777" path="device/samsung/i777" remote="github" />

Better double check on the Install the Build Packages part, as Entropy said you are missing some binaries.
Should not need to manually add that to local_manifest - lunch/brunch should automagically grab the i777 repo for you.

You MIGHT need to also lunch galaxys2 - not sure - it would be beneficial to know what happens for those that lunch/brunch i777 without galaxys2
 

drakester09

Senior Member
Jan 10, 2012
1,292
876
Should not need to manually add that to local_manifest - lunch/brunch should automagically grab the i777 repo for you.

You MIGHT need to also lunch galaxys2 - not sure - it would be beneficial to know what happens for those that lunch/brunch i777 without galaxys2

Teamhacksung's guide mentions creating and populating the local_manifest manually, that's why I added that part.

If you don't have the galaxys2 in your local_manifest and try to repo sync then it detects the dependency and adds it automatically.
 

atinm

Retired Recognized Developer
Jul 16, 2010
2,189
3,681
atinm or anyone else with high familiarity with CM's build system - Any ideas on why nfc.exynos4.so won't build after trying to implement NFC changes?

http://review.cyanogenmod.com/#change,14470

I'd taken out the $LOCAL_PATH includes because i777 didn't have any local src left that wasn't shared with galaxys2. If Nfc is shared between them, then it should be in the galaxys2 as well, otherwise what you did to add it just to i777 is correct and will need the includes under $LOCAL_PATH
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I'd taken out the $LOCAL_PATH includes because i777 didn't have any local src left that wasn't shared with galaxys2. If Nfc is shared between them, then it should be in the galaxys2 as well, otherwise what you did to add it just to i777 is correct and will need the includes under $LOCAL_PATH

NFC is only in the I777 and the I9100P (not sure how we want to handle the P... it's a semi-rare variant, I think only sold on Orange in UK and France, starting later than the I777 went on the market.) - most I9100 units do not have it.

I need to figure out why it now enables with no errors but seems to sit there and do nothing.

I may need to instrument the kernel to dump all of the eedata fields on Gingerbread.

Any idea why the LOCAL_PATH includes are order-sensitive? (see sam3000's patch)
 

atinm

Retired Recognized Developer
Jul 16, 2010
2,189
3,681
NFC is only in the I777 and the I9100P (not sure how we want to handle the P... it's a semi-rare variant, I think only sold on Orange in UK and France, starting later than the I777 went on the market.) - most I9100 units do not have it.

I need to figure out why it now enables with no errors but seems to sit there and do nothing.

I may need to instrument the kernel to dump all of the eedata fields on Gingerbread.

Any idea why the LOCAL_PATH includes are order-sensitive? (see sam3000's patch)

They shouldn't be order sensitive . . . I don't think they're inter-dependent. But just purely on gut feel, I'd always put the LOCAL_PATH last under the rule of "general before specific" and so am surprised it doesn't work!

Also, if the NFC needs to be in the general I9100 anyway even if not all versions have it (we're not going to create an I9100P device tree separately), then we should just move it up into galaxys2 and add a specific build line for it in the i777 Android.mk like I did for the other common stuff from galaxys2. Still have to figure out why I couldn't make it so that all-makefiles-under with galaxys2 as the path works without having to specify the paths individually in the i777 tree's Android.mk.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
They shouldn't be order sensitive . . . I don't think they're inter-dependent. But just purely on gut feel, I'd always put the LOCAL_PATH last under the rule of "general before specific" and so am surprised it doesn't work!

Also, if the NFC needs to be in the general I9100 anyway even if not all versions have it (we're not going to create an I9100P device tree separately), then we should just move it up into galaxys2 and add a specific build line for it in the i777 Android.mk like I did for the other common stuff from galaxys2. Still have to figure out why I couldn't make it so that all-makefiles-under with galaxys2 as the path works without having to specify the paths individually in the i777 tree's Android.mk.

I guess the question is - if the support is present in CM but the hardware isn't, what will happen? I worry it might cause chain-crashing like that issue where NFC kept crashing and eating battery in CM7.
 

sam3000

Senior Member
Jul 11, 2009
365
421
Seattle
Any idea why the LOCAL_PATH includes are order-sensitive? (see sam3000's patch)

I've checked and it is indeed because the galaxys2 includes are resetting LOCAL_PATH (which appears to be typical for most Android.mk files).

If I add these warnings to i777/Android.mk:

+$(warning LOCAL_PATH is $(LOCAL_PATH))
include $(call all-makefiles-under,$(LOCAL_PATH))

include device/samsung/galaxys2/camera/Android.mk
include device/samsung/galaxys2/DeviceSettings/Android.mk
include device/samsung/galaxys2/gpswrapper/Android.mk
include device/samsung/galaxys2/tvout/Android.mk
include device/samsung/galaxys2/tvouthack/Android.mk

+$(warning LOCAL_PATH is $(LOCAL_PATH))


And rebuild I see in the output:

device/samsung/i777/Android.mk:57: LOCAL_PATH is device/samsung/i777
device/samsung/i777/Android.mk:67: LOCAL_PATH is device/samsung/galaxys2/tvouthack

====

As an aside, replacing all the above with simply:
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(call all-makefiles-under,device/samsung/galaxys2)

Looks to work (I deleted a few of the out files and they got rebuilt). I note all-makefiles-under excludes Android.mk within the directory specified itself so it should be identical behaviour.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    DEVELOPMENT THREAD
    FOR DEVELOPERS ONLY

    DISCUSSION THREAD FOR USERS:
    http://xdaforums.com/showthread.php?t=1568848



    CyanogenMod is a free, community built, aftermarket firmware distribution of Android 4.0 (ICS), which is designed to increase performance and reliability over stock Android for your device.

    Code:
    #include <std_disclaimer.h>
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     *
     * Submitting bug reports on nightly builds is the leading 
     * cause of male impotence.
     */

    CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for CyanogenMod is available in the CyanogenMod Github repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.



    General:
    http://github.com/CyanogenMod

    Device (you need both):
    http://github.com/CyanogenMod/android_device_samsung_galaxys2
    http://github.com/CyanogenMod/android_device_samsung_i777

    Kernel:
    https://github.com/teamhacksung/android_kernel_samsung_smdk4210

    Build:
    http://teamhacksung.org/wiki/index.php/CyanogenMod9:SGH-I777:How_to_build

    Getting Started:
    http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit

    Example:
    - cd ~/android/system
    - repo start branchname CyanogenMod/android_device_samsung_i777 (or android_device_galaxys2 depending on whether your work is in common galaxys2 or i777)
    -- Make your changes at device/samsung/i777 (or galaxys2)
    - cd device/samsung/i777 (or galaxys2)
    - git add -A
    - git commit -a
    - cd ~/android/system
    - repo upload CyanogenMod/android_device_samsung_i777 (or android_device_samsung_galaxys2 if your changes are to galaxys2)

    Many of your changes will actually be in the android_device_samsung_galaxys2 repo as well as the code is shared between the galaxys2 and i777 so you will also need to work in that repo.

    Navigate to http://review.cyanogenmod.com , click your commit and add atinm for i777, atinm, codeworkx and xplodwild for galaxys2, as reviewers.
    5
    Can you clarify - I take it discussion about build issues that are because script fixups are necessary in github sources is also off-limits ? ie where the root issue is in the repo not the person trying to compile. (Previous post removal implies this.)

    If someone can't massage whatever comes out of github in order to get it to compile then it's unlikely they would be posting patches even if the build worked. However, on the other hand, I would argue it's also useful to identify, discuss and fix any build related issues for the benefit of all (separate thread perhaps?)

    Anything source/github/gerrit related is fine here -- basically if there is something a developer can use, it should go here. This includes things like logcat output etc for bugs too. Questions, asking for help etc that can be done by other users is for the discussion thread.
    4
    atinm - don't know if you saw, but there's a pending gerrit submission for an updated kernel.

    The current set of kernels has ondemand as default but interactive governor enabled - this combo can cause hung task freezes in LPM and recovery.

    http://review.cyanogenmod.com/#change,14072

    (I tried to add you as a reviewer but I'm not sure if that's the correct atinm. The system is full of "use the other atinm" users. :) )
    2
    Saved for later.
    2
    you didn't do extract-files

    Not sure if looking for galaxys2 will cut it... Most likely a bunch of people are coming from Touchwiz-based firmwares.

    I admit I am partially at fault - I didn't implement sed scripts in Hellraiser to change the model, partly to minimize the chances that something would break. (The rule was to change as little as possible to make things work in order to maximize compatibility.)