[R&D] [910F] porting CM12

Status
Not open for further replies.

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
*EDIT* This thread is now based upon the work by @fattire and @slayher, who got it up on the 910T. For that phone see this thread: http://forum.xda-developers.com/not...nt/unoffcial-cm-12-0-t-mobile-note-4-t2964887

This thread is for dev's interested to help out porting CM12 to our device. I've researched for info regarding CM ports and good information is actually quit scarce. A dev might post something like 'hmm stuck at boot anim' and then the next day 'got it, booting now !' without explaining what he did to solve it. I want to change that, so this thread can serve as a guide for other first time porters too (this is also my first porting project), documenting every step as in much detail as possible.

For ROMS: http://forum.xda-developers.com/not...official-cm-12-0-910f-note-4-trltexx-t2987412

Please use this thread for R&D/development ONLY !!!
 
Last edited:

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
Ok, I'm really starting from scratch and never done any phone ROM porting. I've just made a new virtual disk running ubuntu and am currently downloading the CM12 repo. I figured, how to get even started here. I figured that the goals we need to attain in this order:

1) compile the kernel samsung supplied
2) make sure we can boot into kernel
3) get ADB up and running
4) get CM12 starting up, even the bootanim alone would be a nice goal to reach
5) Booting into homescreen
6) Fixing all stuff like modem, wifi etc etc etc

Anyway, I'm currently downloading CM12 sources as we speak ...
 
Last edited:

KaptKeefmenneke

Senior Member
Apr 26, 2013
84
85
0
Good luck this is a long project. I build carbonrom for another phone where everything for cm was allready fixed. I would start with a phone that allready has support to learn how the process goes. You can brick your phone and it's a process of trail and error... But I hope you manage good luck!
 

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
Good luck this is a long project. I build carbonrom for another phone where everything for cm was allready fixed. I would start with a phone that allready has support to learn how the process goes. You can brick your phone and it's a process of trail and error... But I hope you manage good luck!
I'm not sure I understand what you mean ? If the phone already has support, then what's there to port ? Or do you mean building CM itself ? That I've done quite a few times already, did quite a bit of work on the i9500, fixing RILD issue's, kernel issue's and other stuff.
 
  • Like
Reactions: pctv007

spleef

Senior Member
Jul 6, 2009
4,272
4,408
0
41
port arthur, texas
goo.im
soo...maybe m wrong (has been a while snce ive ported) but im goin to drop a few lines anyhow......
porting is very different from source building.....the only reason you would need to dl the cm sources would be to compile the rom using sources...and right now the note 4 has none we would need device,kernel,common,vendor sources for that....so... we cant source build right now only port....sp what we need to do is research which device officially or unofficially that has cm with same specs as the note4 things like screen size, board, things of that nature....and would highly recommend using the same carrier as well.....but once we have that info....dl that phones cm rom zip....dl one of our phones rom zips.....now for the fun....ill lay out a way i did it maybe is the same still ...
place both cm zip and note 4 zip on desktop..
create a new folder call it new
drag all files from the cm zip into the new
open the new and open the note 4 zip have them side by side
now your going to drag pretty much all folders/files from the note 4 system folder into the new sytsem folder one folder at a time excluding:
app,priv-app,etc,fonts,media,framework,xbin (im probably forgetting one or two but has been a long time)
now the fun begins....time to edit some xmls and trial and error on pretty much everything until it is working right
you are also going to want to change out the kernel and have to edit the updater-script in the meta-inf....
im positive im forgetting a few things but this is pretty much what i can remember......from off the top of my head...some of the guides ill link in a bit will go into greater detail and explain things more in depth

a few links ive had bookmarked that will help ya

http://forum.xda-developers.com/showthread.php?t=1908008

http://forum.xda-developers.com/showthread.php?t=732957

http://forum.xda-developers.com/showthread.php?t=1957219

http://forum.xda-developers.com/showthread.php?t=1272270

http://forum.xda-developers.com/showthread.php?t=2113479

http://forum.xda-developers.com/showthread.php?t=1801690

http://forum.xda-developers.com/showthread.php?t=2251719

http://forum.xda-developers.com/showthread.php?t=1941239

http://forum.xda-developers.com/showthread.php?t=1805408

http://forum.xda-developers.com/showthread.php?t=2058850

all of these links in one way or another have helped me during my porting phase hope they do the same for you ...like ive said before im more of a source builder so thats what imgoing to be trying to do is getting a working tree... but if you need help just hit me up ill do what i can
 
Last edited:
  • Like
Reactions: Herk718 and jdidtht

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
yes it really should being as there is no development only discussion...but thats the moderators job not mine
Threads regarding R&D belong in development, so I guess it really belongs here. Even more so cause if it's moved to general, tons of n00bs will join in and destroy the thread. please keep this developers only.

Anyway thanks to see you join in Spleef, much appreciated !! Still setting up my environment myself ...
 
  • Like
Reactions: Jamboozlez

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
soo...maybe m wrong (has been a while snce ive ported) but im goin to drop a few lines anyhow......
porting is very different from source building.....the only reason you would need to dl the cm sources would be to compile the rom using sources...and right now the note 4 has none we would need device,kernel,common,vendor sources for that....so... we cant source build right now only port....sp what we need to do is research which device officially or unofficially that has cm with same specs as the note4 things like screen size, board, things of that nature....and would highly recommend using the same carrier as well.....but once we have that info....dl that phones cm rom zip....dl one of our phones rom zips.....now for the fun....ill lay out a way i did it maybe is the same still ...
place both cm zip and note 4 zip on desktop..
create a new folder call it new
drag all files from the cm zip into the new
open the new and open the note 4 zip have them side by side
now your going to drag pretty much all folders/files from the note 4 system folder into the new sytsem folder one folder at a time excluding:
app,priv-app,etc,fonts,media,framework,xbin (im probably forgetting one or two but has been a long time)
now the fun begins....time to edit some xmls and trial and error on pretty much everything until it is working right
you are also going to want to change out the kernel and have to edit the updater-script in the meta-inf....
im positive im forgetting a few things but this is pretty much what i can remember......from off the top of my head...some of the guides ill link in a bit will go into greater detail and explain things more in depth

a few links ive had bookmarked that will help ya

http://forum.xda-developers.com/showthread.php?t=1908008

http://forum.xda-developers.com/showthread.php?t=732957

http://forum.xda-developers.com/showthread.php?t=1957219

http://forum.xda-developers.com/showthread.php?t=1272270

http://forum.xda-developers.com/showthread.php?t=2113479

http://forum.xda-developers.com/showthread.php?t=1801690

http://forum.xda-developers.com/showthread.php?t=2251719

http://forum.xda-developers.com/showthread.php?t=1941239

http://forum.xda-developers.com/showthread.php?t=1805408

http://forum.xda-developers.com/showthread.php?t=2058850

all of these links in one way or another have helped me during my porting phase hope they do the same for you ...like ive said before im more of a source builder so thats what imgoing to be trying to do is getting a working tree... but if you need help just hit me up ill do what i can
Great addition to the thread ! Hmm I haven't done any porting myself. I figured once we have a kernel up (compiling it should be easy), then what's stopping us from booting CM ? I mean of course RILD won't work if we don't have a JNI (or what's it called on ART, ANI ? :) ) interface to the modem. Of course we won't have NFC, internet, telephony, all that. But merely booting a graphical interface that should be doable with Nexus 6 source code, right ? I mean all we need is SoC sources so we have cpu & graphics working, right ? So That was what I had in mind myself but your approach actually is quite the same now I think of it :)
 
Last edited:

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
Thread is moved to general AGAIN. Hehe. Starting a development thread ON XDA and have it in the developer section seems harder than porting CM12 :) Anyway I guess it doesn't matter in which section it is, as long as n00bs and trolls stay out and we can focus on development only.

Anyway, downloading kernel sources as we speak ...
 
Last edited:
  • Like
Reactions: erispimp

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
And yes, as expected, build breaks:

drivers/scsi/ufs/ufs_test.c:25:19: fatal error: ../sd.h: No such file or directory
compilation terminated.
make[3]: *** [drivers/scsi/ufs/ufs_test.o] Error 1
make[2]: *** [drivers/scsi/ufs] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

Hehe, Samsung wouldn't be Samsung if they would supply a kernel that actually builds from the start :) Going to investigate ...
 

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
And a new break:

In file included from drivers/gud/MobiCoreDriver/logging.c:21:0:
drivers/gud/MobiCoreDriver/main.h:24:22: fatal error: platform.h: No such file or directory

I'd say it's looking for the file in platforms/MSM8960_SURF_STD, going to link it correctly ...

And building again ...
 

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
n file included from drivers/video/msm/mdss/mdss_mdp_trace.h:255:0,
from drivers/video/msm/mdss/mdss_mdp.c:61:
include/trace/define_trace.h:79:43: fatal error: ./mdss_mdp_trace.h: No such file or directory

Include should point to kernel includes, fixing it again

And building again ...
 

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
Code:
  OBJCOPY arch/arm/boot/Image
  Kernel: arch/arm/boot/Image is ready
  LZO     arch/arm/boot/compressed/piggy.lzo
  AS      arch/arm/boot/compressed/piggy.lzo.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
Kernel ready :) Of course that was the easy part, hehe, but still, progress. Tomorrow going to start with the difficult part, getting CM up :)
 
S

sawdoctor

Guest
I've ported before but only tw where it was mainly framework edits. Never worked with cm before but like the op I'm keen to learn. If i can help at all just let me know, I use linux mint myself rather than Ubuntu but they're very similar
 

gekkehenkie11

Inactive Recognized Developer
Dec 9, 2010
2,767
5,582
0
So, just downloaded Nexus 6 sources. It seems that directory /device/moto/shamu contains the device hardware stuff we need ! Going to research some more today ...

*EDIT* also mind the propietary-blobs.txt in that directory. I'm still waiting for my Note 4 myself (hopefully friday), but this needs to be compared with the files on the device, cause if they exist, they will be blobs of course and we need them.
 
Last edited:
Status
Not open for further replies.