yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 General] gekkehenkie11:
As I'm waiting for the build I was looking at the GNU makefile manual and at least I now understand what the macro does. Actually it's the same macro as this one, just different last variable name (pathmap_INCL instead of pathmap_PROJ)

define include-path-for
$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
endef

And then pathmap_INCL is defined as:

pathmap_INCL := \
bootloader:bootable/bootloader/legacy/include \
camera:system/media/camera/include \
frameworks-base:frameworks/base/include \
frameworks-native:frameworks/native/include \
libc:bionic/libc/include \
libhardware:hardware/libhardware/include \
libhardware_legacy:hardware/libhardware_legacy/include \
libhost:build/libs/host/include \
libm:bionic/libm/include \
libnativehelper:libnativehelper/include \
libpagemap:system/extras/libpagemap/include \
libril:hardware/ril/include \
libstdc++:bionic/libstdc++/include \
mkbootimg:system/core/mkbootimg \
opengl-tests-includes:frameworks/native/opengl/tests/include \
system-core:system/core/include \
audio-effects:system/media/audio_effects/include \
audio-utils:system/media/audio_utils/include \
audio-route:system/media/audio_route/include \
wilhelm:frameworks/wilhelm/include \
wilhelm-ut:frameworks/wilhelm/src/ut \
mediandk:frameworks/av/media/ndk/ \
speex:external/speex/include

So what that macro does is lookup the value before the ":" and then return the path. That makes a lot of sense. However the thing I don't understand is that in that 'project-path-for' function pathmap_PROJ is used which I don't see defined !?!?! But it must be a list, just like the one above, returning indeed the path for a search value (qcom-display here).

The functions are commented differently. The one with pathmap_INCL:

#

# Returns the path to the requested module's include directory,

# relative to the root of the source tree. Does not handle external

# modules.

#

# $(1): a list of modules (or other named entities) to find the includes for

#

and the one with patmap_PROJ:

# Returns the path to the requested module's include directory,

# relative to the root of the source tree.

#

# $(1): a list of modules (or other named entities) to find the projects for

So the only difference supposedly is that pathmap_PROJ also contains external modules ... But where is pathmap_PROJ defined, I don't get it ... I also grepped, it wasn't defined outside this .mk file !?!
[Galaxy Note 4 General] gekkehenkie11:
Anyway the way I'm bypassing that whole damn issue is by pointing the makefile directly to the 8084 directory. So I'm replacing in the makefile for frameworks/native/lib/gui for example:

the original: LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc

with: LOCAL_C_INCLUDES +=$(LOCAL_PATH)/../../../../hardware/qcom/display/msm8084/libgralloc

That works. Not the most beautiful 'solution', but at this point I just want a CM12 up and running :)
[Galaxy Note 4 General] PearsonDKA:
All this dev talk has me excited. It's like watching a beautiful flower grow. Love the work y'all are doing.:p

Sent from the Galaxy Note 4
[Galaxy Note 4 General] suzook:
When you get it booting, will you share it??? Or will you wait till its bug free?
[Galaxy Note 4 General] gekkehenkie11:
Once I will get to bootanim screen I will upload the sources for the devs. Once it reaches the UI I'd have no problem sharing a flashable image so anyone who wants to mess around with it can try. But without even reaching the GUI, I don't think there's much point in sharing.
[Galaxy Note 4 General] suzook:
Sure, that makes sense.
[Galaxy Note 4 General] vogli:
I think you will come back to the msm8084 issue again. I have the feeling that it has to be apq8084 though. Have you done the extract files script already? That seems to be another hurdle, I don't that the boot will get very far without the binary blobs from that step.
[Galaxy Note 4 General] gekkehenkie11:
I'm currently using msm8084, I didnt see any refs to apq8084, although fattire thinks it should be that. I can always try that if I run into problems again.

Anyway yeah binary blobs are the next problem for sure, not even sure how to find out which ones are blobs ? Going to look into that once I can compile it ...
[Galaxy Note 4 General] gekkehenkie11:
I've found where qcom-display can be defined :) It's in build/core/qcom-target.mk. Explanation why I didnt find it before when I grepped the hlte source is simply because on CM11 they used other definitions :) It also solves the question whether TARGET_BOARD_PLATFORM should be apq8084 or msm8084: [MENTION=3041959]fattire[/MENTION] was wrong, it should be msm8084, cause that's how the directories are named and referenced to via this file.
[Galaxy Note 4 General] gekkehenkie11:
You were right [MENTION=4748177]vogli[/MENTION] ! In qcom_target.mk it selects like this:

$(call project-set-path,qcom-audio,hardware/qcom/audio-caf/$(TARGET_BOARD_PLATFORM))

$(call qcom-set-path-variant,CAMERA,camera)

$(call project-set-path,qcom-display,hardware/qcom/display-caf/$(TARGET_BOARD_PLATFORM))

$(call qcom-set-path-variant,GPS,gps)

$(call project-set-path,qcom-media,hardware/qcom/media-caf/$(TARGET_BOARD_PLATFORM))

$(call qcom-set-path-variant,SENSORS,sensors)

So it's using caf. However the problem now is, those caf directories are missing 8084 dirs ... You were talking about syncing them, any idea how to do that ?
[Galaxy Note 4 General] utopiate:
won't the devs that already have it booting just share? seems a bit meh when its all open source anyway. Surely the more working on it the quicker the pace no?

e2a: I don't mean publically share, just with gekkehenkie11 ;)
[Galaxy Note 4 General] suzook:
Unfortunately a lot of people out there take someone else's work, and claim they did all the work. Its unfortunate, but I understand why revs won't release till its at least an alpha.
[Galaxy Note 4 General] utopiate:
Sure I understand that, but if they shared with the OP I'm sure this wouldn't be the case.
[Galaxy Note 4 General] vogli:
Caf stands for Code Aurora Forum. I think that is where this stuff comes from. Here is a link to a git repo for 8x84. Maybe that helps.

https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/msm8x84/

Edit: This one might be what we need. It does not use the msm subdirectory, but that might be what the cm guys are adding. It does however have some special handling for apq8084.
[Galaxy Note 4 General] gekkehenkie11:
Thanks vogli very interesting going to look into it when I am at home
[Galaxy Note 4 General] vogli:
I forgot the link in my previous post

https://www.codeaurora.org/cgit/qui.../qcom/media/tree/?h=aosp-new/lollipop-release

Here it is using msm8x84 in Android.mk I have no idea what the difference is. Unfortunately I am no dev, I am just on a similar level as you are.

---------- Post added at 06:37 PM ---------- Previous post was at 05:51 PM ----------

I just read that apq means that the SoC does not have an integrated modem. I hope this is not true as I would expect trouble due to that. But I might be wrong.
[Galaxy Note 4 General] gekkehenkie11:
I just tried:

git clone git://codeaurora.org/quic/la/platform/hardware/qcom/msm8x84

It downloads but then says: "warning: remote HEAD refers to nonexistent ref, unable to checkout." and the created dir contains no files ... Not sure what's happening maybe I should specify a branch !? Any idea's ?
[Galaxy Note 4 General] gekkehenkie11:
Yeah this specific lib (the 'media' directory) is good already in the CM12 rep. We're missing that other one (video) and specifically the 'libgralloc' directory.

'That in general sucks for CM. Since the modem is not from QCOM, the sources aren't open and therefor the specific library (libril) is a blob. CM uses an interface library open source to that closed lib.
[Galaxy Note 4 General] gekkehenkie11:
This should help: https://www.codeaurora.org/xwiki/bin/QAEP/ :)

So we should use:

repo init -u git://codeaurora.org/platform/manifest.git -b release -m [manifest] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable

(that branch contains 8084). But what manifest to use ? Going to see what happens without specifying a manifest ...
[Galaxy Note 4 General] vogli:
.You did actually clone the repo with the above command. It just could not checkout the branch as there is no master branch. You can go into msm8x84 and run git checkout branch -a to lost all branches and then 'git checkout aosp-new/lollipop-release'
[Galaxy Note 4 General] gekkehenkie11:
I now did:

git checkout aosp-new/lollipop-release

and then

git checkout

that works thx ! :)
[Galaxy Note 4 General] gekkehenkie11:
Ok what we did is clone the msm8x84 directory. That directory already exists. This is the contents of the hardware/qcom dir in CM12:

rwxrwxr-x 17 x x 4096 nov 24 18:14 .

drwxrwxr-x 13 x x 4096 nov 24 18:14 ..

drwxrwxr-x 3 x x 4096 nov 24 18:14 audio

drwxrwxr-x 5 x x 4096 nov 24 18:14 audio-caf

drwxrwxr-x 4 x x 4096 nov 24 18:14 bt

drwxrwxr-x 7 x x 4096 nov 24 18:14 display

drwxrwxr-x 5 x x 4096 nov 24 18:14 display-caf

drwxrwxr-x 9 x x 4096 nov 24 18:14 gps

drwxrwxr-x 3 x x 4096 nov 24 18:14 keymaster

drwxrwxr-x 3 x x 4096 nov 24 18:14 media

drwxrwxr-x 5 x x 4096 nov 24 18:14 media-caf

drwxrwxr-x 5 x x 4096 nov 24 18:14 msm8960

drwxrwxr-x 5 x x 4096 nov 24 18:14 msm8x26

drwxrwxr-x 5 x x 4096 nov 24 18:14 msm8x27

drwxrwxr-x 5 x x 4096 nov 24 18:14 msm8x74

drwxrwxr-x 5 x x 4096 nov 24 18:14 msm8x84

drwxrwxr-x 5 x x 4096 nov 24 18:14 wlan

So there's that msm8x84 directory. What we need is the directory called display-caf. Its contents on CM12 are: 3 dirs, msm8226, msm8960 en msm8974. Each of these directorys contains several libraries, including libgralloc.

Ok that should be this: https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/display/ trying now :)
[Galaxy Note 4 General] gekkehenkie11:
Success !!! Got the directory now :) Thanks Vogli !!! Directory msm8084 contains all we need :)
[Galaxy Note 4 General] suzook:
Wow!!! This is a learning experience for all! Good luck!
[Galaxy Note 4 General] vogli:
I just found out that Google has it as well. That is probably better for next time. The Nexus 6 (shamu) has the same SoC. That repo has the subdirs already.

https://android.googlesource.com/platform/hardware/qcom/display/+/android-5.0.0_r7

Btw this is the best thread I have seen on XDA so far. Thank you for your great work. I am learning a lot here.
[Galaxy Note 4 General] gekkehenkie11:
Thanks again vogli ! Your help is very much appreciated, great contribution you've made !

Ok I was looking at the qcom_target.mk again. We need 3 -caf dirs:

display-caf

media-caf

audio-caf

I think I've said media-caf was already up to date; that was false. I just synced media-caf. It didnt contain a specific msm8084 dir but there is a 8084 dir in a source sub dir. I copied the whole dir into media-caf. Now going to try audio-caf and then going to try to rebuild the whole thing (6 hours)
[Galaxy Note 4 General] gekkehenkie11:
Ok going to use that shamu dir for the audio
[Galaxy Note 4 General] jm6001:
I dont know if it would be helpful for you but I have a powerful computer at my disposal if that will help build times.. Just have to host whatever you need built
[Galaxy Note 4 General] vogli:
I am not sure if mixing caf and none-caf is a good idea, but I somehow have the feeling that the aosp-new/lollipop-release is the same as the one from google. Here it is also using msm8084 whereas in the master branch at codeaurora it uses apq8084.

Will be interesting to see what your build will do.
[Galaxy Note 4 General] gekkehenkie11:
in 6-7 hours we'll know but my prediction is a build break somewhere again ;)
[Galaxy Note 4 General] gekkehenkie11:
Yeah I need to buy a big speedy SSD for this :)
[Galaxy Note 4 General] jm6001:
Yup :) I have a nice i7-5820K with 32GB DDR4 and a SSD to boot.. Very speedy
[Galaxy Note 4 General] gekkehenkie11:
(still building) ;)
[Galaxy Note 4 General] suzook:
Wow! 3 hrs in....keeping fingers crossed.
[Galaxy Note 4 General] Batfink33:
:-0 it's looking good!
[Galaxy Note 4 General] gekkehenkie11:
Still building :) I'd say 1-2 hours more and we'll know :)
[Galaxy Note 4 General] allenjthomsen:
Thats a good thing keep your fingers crossed
[Galaxy Note 4 General] PewPewK:
Just poking my head in here for the first time. It sounds like you're doing a test build of CM12 on the Note 4 now? Sounds great! Can't wait to try stock Lollipop on the Note.
[Galaxy Note 4 General] ChrisJ951:
Doing a download of the cyanogenmod sources right now to hopefully start looking into it and helping out.

One thing I found online when googling the kernel source code link was this:

https://github.com/StarKissed/Note_4_SM-N910T

I'm unsure if it will be of any use until I finish pulling everything down.
[Galaxy Note 4 General] vogli:
I think we are having an issue now that in some places it uses caf and in others it is not and then we end up with a double import.

---------- Post added at 07:09 AM ---------- Previous post was at 06:19 AM ----------

You previously copied gralloc_priv.h to fix an issue with these header files. Did you revert this?

---------- Post added at 07:11 AM ---------- Previous post was at 07:09 AM ----------

All the errors seem to cores pond to these header files and come from the directory where you copied it to.
[Galaxy Note 4 General] gekkehenkie11:
Yeah I reverted that... Weird thing is that the Metadata.h is loaded by AudioPlayer.cpp without an 'ifdef' and then that media-caf dir is loaded based on an ifdef on QCOM hardware and that dir contains that QCMetadata.h which has the same definitions as in Metadata.h causing problems...

Anyway what I've just done is create another media-caf dir, without that QCMetadata.h file and have changed the makefile to use that dir instead ... I did clean up everyhthing though, so need to build again :( 7 hours again ... But this time added some more ram to my virtualbox (6 gb now, previously had 4 gb dedicated and my virtualbox always ran out of ram when compiling), hopefully that helps. And going to the shop today anyway to buy a big SSD to put my files on and 8gb more ram...
[Galaxy Note 4 General] slayher:
I'm at work right now but i will try to get you the info you need. For starters CM doesnt offically support any 805 devices yet. I have worked with the main group to get some of the foundation laid for it. If you look at the android_hardware_qcom_{audio,display,media} repos you will see there are new branches for different platforms. Cm-12.0-caf-8084 is the branch you want. There are also a couple patches on gerrit for media.

You do need to set the platform to be apq8084 though. My kernel source is public already.

Take a look at that and those branches.
[Galaxy Note 4 General] gekkehenkie11:
Thanks Slayher, sounds wonderful !
[Galaxy Note 4 General] notegalaxy:
Don't know if this is of help but a dev called Temasek has 5.0 running on the note 3. It's a very stable build at the moment so would recommend speaking to him for advice. He's on Twitter and xda.
[Galaxy Note 4 General] jdidtht:
Lol yea, but slayher was the developer who got 5.0 up and running for the note 3, temasak makes that glaringly clear..
[Galaxy Note 4 General] ChrisJ951:
I'm unsure if you figured it out or not yet but to get the caf sources for apq8084 you would use this repo command

repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.BF.2.1-01080-8084.0.xml --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable

then

repo sync

Just started trying to get everything finished downloading so I can hopefully try to start a build today.
[Galaxy Note 4 General] gekkehenkie11:
Thanks ! repo stuff is indeed giving me headaches, how did you find that manifest for example ? Anyway I just downloaded the 8084 files from slayer as zips directly from within my browser (like this: https://github.com/CyanogenMod/android_hardware_qcom_display/tree/cm-12.0-caf-8084 and then clone zip and then for the other 2 dirs as well), that works too ;) Anyway I installed 8 more gb ram, bought a 240 gb ssd just for my virtualbox CM12 partition, just finished resizing it (to have size for 50 gb cache), just copied the 8084 files from Slayher and now building again, hopefully this time much quicker than 7 hours :)
[Galaxy Note 4 General] gekkehenkie11:
Ok I now use:

TARGET_BOARD_PLATFORM := apq8084
TARGET_BOOTLOADER_BOARD_NAME := APQ8084
TARGET_BOARD_PLATFORM_GPU := qcom-adreno420

Furthermore I've changed the directory names into hardware\qcom\media-caf\apq-8084, to match that platform name, same for audio-caf and display-caf

Now building again...
[Galaxy Note 4 General] ChrisJ951:
This link has them all: https://www.codeaurora.org/xwiki/bin/QAEP/release

Also you'll get an extremely large speed increase (at least I did) not using a virtual box. Just install linux or osx onto the drive directly instead.

I also might use Slayher's files since it's taking forever to sync the whole repo (been going for over an hour)
[Galaxy Note 4 General] gekkehenkie11:
Ah yeah but these are from CAF directly. I tried that before, didn't work, still had some conflicts going on. I'm using them from Slayher now, hopefully that solves those problems ...
[Galaxy Note 4 General] gekkehenkie11:
Hmmm actually I doubt it will make a difference, even in Slayher's directory that mm-core/inc/QCMetaData.h is present, containing confliciting definitions from frameworks/av/include/media/stagefright/MetaData.h ...
[Galaxy Note 4 General] gekkehenkie11:
BTW, if anyone wonders, here is Slayher's kernel: https://github.com/slayher/android_kernel_samsung_trlte/tree/cm-12.0
[Galaxy Note 4 General] gekkehenkie11:
Gerrit is an enigma, I have really no clue how to operate it, even after reading the syntax tutorials. It seems a simple keyword search doesnt even exist. God I hate Gerrit. Do you have some links to those patches ? I assume these patches correct the issue's I had (double declarations) ?

*EDIT* found it after manually going through the patches: https://gerrit.omnirom.org/#/q/project:android_hardware_qcom_media
[Galaxy Note 4 General] fattire:
If you're building cm it's easier to get the cm-12-caf-8084 builds of display/media/audio. I can't remember offhand if there are others that have that branch, but check the various android_hardware_qcom_* and if they exist use them. As I mentioned previously, make sure you're using apq8084 not msm8084 for TARGET_BOARD_PLATFORM as the whole build system in CM is set up to use that. Finally, there were a lot of path issues in CAF .mk files that had to be adjusted for CM, so if you're using stock CAF w/CM, and get missing headers and such, be sure to check for commits that mention "Fix Pathmap" and apply them. But probably easier to use CM's versions.

Great progress btw is being made daily... I don't want to speak out of turn, but I'd say very close to "daily driver" status, though I have a high tolerance for stuff not working. Anyhoo, stay tuned.
[Galaxy Note 4 General] gekkehenkie11:
Yeah I didnt understand why you said it had to be apq8084 before, because everywhere msm8084 is used. But in Slayher´s 8084 he uses apq8084, so if you´re using that version, it should be apq8084 indeed :) Anyway still building, had hoped more ram and SSD would at least cut build time in half but that's not the case ...
[Galaxy Note 4 General] Er. Aditya:
hoping for some love for 910G as well dev :D
[Galaxy Note 4 General] ChrisJ951:
Hey Slayher,

Thanks for posting the kernel source online before release. When I go to build it though I get the following error:

make[2]: *** No rule to make target `/Volumes/OSX_Case/cm/device/samsung/trlte/kernel/out/include/config/hz.h', needed by `kernel/hz.bc'. Stop.

I'm looking into fixing it but was just curious if you get it as well or if it's something I'm doing specifically.
[Galaxy Note 4 General] gekkehenkie11:
That's odd. I have replaced my kernel with Slayher's one as well and didn't have any problems ... Maybe a boardconfig thing ? And are you building it as standalone or as part of CM12's build process ?
[Galaxy Note 4 General] ChrisJ951:
I was just trying to build the kernel stand-alone first. Maybe it'll work as part of the CM build process.
[Galaxy Note 4 General] gekkehenkie11:
Yeah try that. When I first played around with this, my kernel would build fine stand alone but when part of the CM build process I ran into errors so there's definitely a difference there.
[Galaxy Note 4 General] gekkehenkie11:
And btw, great to see you're messing around with this too man ! Hopefully with Slayher's kernel + 8084 code we can now get it up :)
[Galaxy Note 4 General] shadowsami4:
thanks !

Hey i would like just to say thanks for ur amazing work, all i can say is that we need people like u !!! I'm learning developpement at this moment, i hope i'll be like u one day and i could help u !

sorry for my english, i'm french
[Galaxy Note 4 General] suzook:
Any possibility of an alpha release??? We are dying here!!! Lol.
[Galaxy Note 4 General] gekkehenkie11:
Build breaks after 6:33 hours:

target thumb C++: libstagefright <= frameworks/av/media/libstagefright/ACodec.cpp
frameworks/av/media/libstagefright/ACodec.cpp:62:25: fatal error: QCMediaDefs.h: No such file or directory
#include <QCMediaDefs.h>

Copied this file from the media-caf directory into this dir and now building again ...

*EDIT* now breaks on missing QCMetadata.h, copying too and building again ...

*EDIT2* actually, this isn't supposed to happen at all ... I think I've messed up using some old modified stuff, going to investigate ... yeah I was using a modified version, now deleted that dir and now using original files
[Galaxy Note 4 General] gekkehenkie11:
OK and now it breaks again where I was from the beginning, the double definitions:

In file included from frameworks/av/media/libstagefright/AudioPlayer.cpp:44:0:
./hardware/qcom/media-caf/apq8084/mm-core/inc/QCMetaData.h:86:5: error: redeclaration of 'kTypeWMALossLess'
kTypeWMALossLess,
^
In file included from frameworks/av/media/libstagefright/AudioPlayer.cpp:37:0:
frameworks/av/include/media/stagefright/MetaData.h:223:5: note: previous declaration 'android::<anonymous enum> kTypeWMALossLess'
kTypeWMALossLess,
^

etc etc etc

I probably need those 'media patches' on Gerrit but can't seem to find them ...

[MENTION=2457777]slayher[/MENTION]: any idea's ?
[Galaxy Note 4 General] fattire:
check it out.
[Galaxy Note 4 General] ChrisJ951:
Awesome. Downloading now! Thanks for all the hard work and releasing :D
[Galaxy Note 4 General] pbedard:
Tmobile gets it all
[Galaxy Note 4 General] fattire:
Sorry for the delay-- it was only about 2 weeks of development to get it semi-usable. We are still releasing very very early. Lots of issues are still here to be fixed, but we want everyone helping and learning together now :)

I also want to say, this thread has been super inspiring... love the spirit of learning and hope it's been valuable for everyone. So let's keep it going, now that everyone can catch up and at least have a semi-working and usable base to go off of.

onward, ho!
[Galaxy Note 4 General] pbedard:
Not to to derail the thread is it easy to port it to cdma
[Galaxy Note 4 General] Mortify1:
Could we have support for n910w8? It's very similar to the T Mobile device.
[Galaxy Note 4 General] gekkehenkie11:
Sounds great :) But I can't find any download links to the source code ?

*EDIT* Ah probably my bad: https://github.com/slayher/android_device_samsung_trlte-common :)

Thanks guys !!
[Galaxy Note 4 General] fattire:
Also see my post in the thread.. it has a roomservice.xml that should help too :)
[Galaxy Note 4 General] gekkehenkie11:
So I'm thinking to just delete what I've got and go with your stuff. What's the best way to proceed ? Just sync CM12 and then edit that xml file you explained and sync again ?