[ROM] CM10 port to I317

Search This thread

madmack

Senior Member
Hello everyone.

I've been working on the last few days on porting CM10 (or any AOSP rom really) to our device. I think I got the basics working for now so I'd like to share that with all of you.


1. download the attached file.
2. reboot into twrp
3. factory reset
4. wipe "system"
4. flash the file
5. flash gapps (find it in google).
6. reboot

What's been tested:

-Radio: phone calls work and 4G LTE speeds are intact.
-Audio: Bluetooth audio, A2DP, speaker, headphones and in call audio all work.
-GPS: no problemo.
-Camera: works without a problem if you use a third party app like Pudding Camera, Zoom FX.
What else?

Known issues:
- The stylus doesn't work. Need to investigate.
- Radio crashes every now and then.
- Audio in phone calls requires an initiation phase: make 2 phone calls to any number when you boot up to get audio functional on the 3rd call.


This ROM is tested and should work fine on the following devices:
1. AT&T Note 2
2. T-mobile Note 2
3. International LTE Note 2

Dev talk: The device tree was forked from N7100. Most of the board share the same peripherals so it was a matter of getting the correct defconfig and the correct initramfs. I'm uploading the stuff to my github now so you guys can have a look and perhaps fix the remaining bugs ;) Hopefully this will facilitate getting official support by CM10.


Download link:

initial release: http://www.mediafire.com/?n4occ5rwv2nra7p

Dec 08 update: http://www.mediafire.com/?h1h4658y5555k58 (note. this update is compressed using 7z. Use 7-zip to decompress the archive first and then flash the resulting zip file in TWRP)

Dec 13 update: http://www.mediafire.com/?a6hl8qlv5v261q1

Dec 26 update: http://www.mediafire.com/?lubkf4c7c4h4lzc

Jan 13 update: http://www.mediafire.com/?vafgo52b353pep9 Laggy UI? flash this kernel after flashing this rom
 
Last edited:

madmack

Senior Member
Sources:

you'll need to get my sources to build this copy yourself:

1. vendor blobs. Yes I was nice and added the necessary binaries here. You don't need to adb pull em. Please also note that I did some changes to the smdk4412-common directory as well.
2. smdk4412-common device tree changes.
3. The device tree.
4. RILJ implementation

1. goes to ./vendor/samsung/
2. goes to ./device/samsung/smdk4412-common
3. goes to ./device/samsung/i317
4. apply the patch manually to frameworks/base

To compile, after sourcing the envsetup.sh file: "breakfast i317 & make"
 
Last edited:

jetrii

Senior Member
Oct 8, 2010
313
37
Awesome! Currently downloading it, and will report back with my results.

SMS: Works
Calling: Connects, but no audio
Wifi: Works
4G: Works
GPS: Having a few problems...

Problems:
-AOSP keyboard crashes on boot and won't show up at all. Seems to be the only problem so far.
-Phone randomly froze once while opening the notification panel for around 50 seconds. (trebuchet FC afterwards)
-Unable to access Play store (Server Error messages) -- Flashing an older version of GApps fixed this (October version)


Going to try an earlier version of Gapps. I used the newest one.
 
Last edited:

madmack

Senior Member
To the guys trying to compile the sources with their own custom vendor/device tree, did you run into an issue with the kernel compiling with an error due to not finding firmware/SlimISP_ZK.bin ? The kernel compiles just fine when you cd to that directory and run make but it refuses to do it correctly with a full CM make.

If you guys figured it out , lemme know ! it's the last step I need before publishing my code. That part of the kernel needs to compile correctly otherwise the camera just FCs. I tried changing the toolchain from 4.6 to 4.4.3 but that threw some other errors.

Awesome! Currently downloading it, and will report back with my results.

SMS: Works
Calling: Works
Wifi: Works
4G: Works

Problems:
-AOSP keyboard crashes on boot and won't show up at all. Seems to be the only problem so far. Could be from the GApps package that I flashed.
-Phone randomly froze while opening the notification panel for around 50 seconds. (trebuchet FC afterwards)

awesome. are you with t-mo btw? are you using the same exact device (i317) ?
 

jetrii

Senior Member
Oct 8, 2010
313
37
To the guys trying to compile the sources with their own custom vendor/device tree, did you run into an issue with the kernel compiling with an error due to not finding firmware/SlimISP_ZK.bin ? The kernel compiles just fine when you cd to that directory and run make but it refuses to do it correctly with a full CM make.

If you guys figured it out , lemme know ! it's the last step I need before publishing my code. That part of the kernel needs to compile correctly otherwise the camera just FCs. I tried changing the toolchain from 4.6 to 4.4.3 but that threw some other errors.



awesome. are you with t-mo btw? are you using the same exact device (i317) ?

I am on AT&T with the same device. I should probably update my carrier :D

EDIT: Flashed an older version of Gapps (October 2012) and the play store now works!
 
Last edited:

DarthPiggie

Senior Member
Jul 31, 2010
173
41
To the guys trying to compile the sources with their own custom vendor/device tree, did you run into an issue with the kernel compiling with an error due to not finding firmware/SlimISP_ZK.bin ? The kernel compiles just fine when you cd to that directory and run make but it refuses to do it correctly with a full CM make.

If you guys figured it out , lemme know ! it's the last step I need before publishing my code. That part of the kernel needs to compile correctly otherwise the camera just FCs. I tried changing the toolchain from 4.6 to 4.4.3 but that threw some other errors.



awesome. are you with t-mo btw? are you using the same exact device (i317) ?

Yes i did bro. You needed to edit the makefil in the kernel's firmware directory. I recommend that you take a look at the stock Makefile for the stock Kernel to see the difference. The SMDK4412 kernel makes certain assumptions about child devices that it shouldn't.

Sent from my SGH-T889 using xda app-developers app
 

deeznutz1977

Senior Member
Jul 4, 2010
4,455
3,391
44
cHARMcity,MD
Flashed on my tmo note2 and our modem . And it worked data, calls didnt check messages I must have had a bad gapps cuz it wasnt playing nice awesome work
Like above the keyboard wasnt working.. edit: dieu about posting about another device in this thread . Just excited
Sent from my SGH-T889 using xda premium
 
Last edited:

jetrii

Senior Member
Oct 8, 2010
313
37
GPS doesn't seem to be working. According to GPS test, it is able to see a few stateliness, and occasionally connects to them, but it's unable to provide a location in Google Maps.
 

DarthPiggie

Senior Member
Jul 31, 2010
173
41
Can you please show me your edits?

Towards the beggining of firmware/Makefile:

Code:
ifdef CONFIG_MACH_T0
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZK.bin \
				      SlimISP_GK.bin
else
ifdef CONFIG_MACH_BAFFIN
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZK.bin \
				      SlimISP_GK.bin
else
ifdef CONFIG_MACH_GRANDE
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_GJ.bin
else
ifdef CONFIG_MACH_IRON
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_GJ.bin
else
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZD.bin \
				      SlimISP_GD.bin
endif
endif
endif
endif

Just comment that out. It's hacky, but last I checked, our devices did not need those binaries. They weren't in there to begin with.
 
  • Like
Reactions: enzyne

deeznutz1977

Senior Member
Jul 4, 2010
4,455
3,391
44
cHARMcity,MD
GPS doesn't seem to be working. According to GPS test, it is able to see a few stateliness, and occasionally connects to them, but it's unable to provide a location in Google Maps.

Cm had a setting for which gps to use ie: internal bluetooth ect.... check that I knew that but over liked many times edit: noob mistake didn't read the whole post b4 comment my bad

Sent from my SGH-T889 using xda premium
 
Last edited:

madmack

Senior Member
Towards the beggining of firmware/Makefile:

Code:
ifdef CONFIG_MACH_T0
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZK.bin \
				      SlimISP_GK.bin
else
ifdef CONFIG_MACH_BAFFIN
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZK.bin \
				      SlimISP_GK.bin
else
ifdef CONFIG_MACH_GRANDE
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_GJ.bin
else
ifdef CONFIG_MACH_IRON
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_GJ.bin
else
fw-shipped-$(CONFIG_VIDEO_S5C73M3) += SlimISP_ZD.bin \
				      SlimISP_GD.bin
endif
endif
endif
endif

Just comment that out. It's hacky, but last I checked, our devices did not need those binaries. They weren't in there to begin with.

I tried that you see but the Camera FCs. These binaries are necessary. Do you actually have a functional camera?

It's really strange because if you just go to kernel/samsung/smdk4112 and make defconfig & make. You won't run into that issue. Seems like it's a path setup failure somewhere.
 

DarthPiggie

Senior Member
Jul 31, 2010
173
41
In addendum, once we get a nice proper defconfig for the kernel we won't have to worry about such edits.

cmenard look at the defconfig:

Code:
#
# EXYNOS4 Machines
#
CONFIG_TARGET_LOCALE_USA=y
CONFIG_MACH_T0_USA_TMO=y
CONFIG_MACH_MIDAS=y
CONFIG_MACH_T0=y
CONFIG_T0_04_BD=y
CONFIG_EXYNOS_SOUND_PLATFORM_DATA=y
CONFIG_SAMSUNG_ANALOG_UART_SWITCH=1

That is what I have in mine. I borrowed that from the stock kernel. I don't get the build issues, however at runtime something is still trying to load that binary. At least that's what I see in the logcat.

---------- Post added at 06:03 PM ---------- Previous post was at 06:02 PM ----------

I tried that you see but the Camera FCs. These binaries are necessary. Do you actually have a functional camera?

It's really strange because if you just go to kernel/samsung/smdk4112 and make defconfig & make. You won't run into that issue. Seems like it's a path setup failure somewhere.

Post the exact error here so I can help. I had the same issues too.
 

DarthPiggie

Senior Member
Jul 31, 2010
173
41
I tried that you see but the Camera FCs. These binaries are necessary. Do you actually have a functional camera?

It's really strange because if you just go to kernel/samsung/smdk4112 and make defconfig & make. You won't run into that issue. Seems like it's a path setup failure somewhere.

If these binaries are necessary, then why aren't they present in the stock ROM? I can't figure that part out, but perhaps you're correct.

EDIT:
You're right! They are on phone. They are just in strange place: /data/cfw
I am not sure why they are not in /system/vendor/firmware like the others but that's what it is. That binary will load the camera.

---------- Post added at 06:11 PM ---------- Previous post was at 06:05 PM ----------

We'll have to edit the proprietary-files.sh script.

Sent from my SGH-T889 using xda app-developers app
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 68
    Hello everyone.

    I've been working on the last few days on porting CM10 (or any AOSP rom really) to our device. I think I got the basics working for now so I'd like to share that with all of you.


    1. download the attached file.
    2. reboot into twrp
    3. factory reset
    4. wipe "system"
    4. flash the file
    5. flash gapps (find it in google).
    6. reboot

    What's been tested:

    -Radio: phone calls work and 4G LTE speeds are intact.
    -Audio: Bluetooth audio, A2DP, speaker, headphones and in call audio all work.
    -GPS: no problemo.
    -Camera: works without a problem if you use a third party app like Pudding Camera, Zoom FX.
    What else?

    Known issues:
    - The stylus doesn't work. Need to investigate.
    - Radio crashes every now and then.
    - Audio in phone calls requires an initiation phase: make 2 phone calls to any number when you boot up to get audio functional on the 3rd call.


    This ROM is tested and should work fine on the following devices:
    1. AT&T Note 2
    2. T-mobile Note 2
    3. International LTE Note 2

    Dev talk: The device tree was forked from N7100. Most of the board share the same peripherals so it was a matter of getting the correct defconfig and the correct initramfs. I'm uploading the stuff to my github now so you guys can have a look and perhaps fix the remaining bugs ;) Hopefully this will facilitate getting official support by CM10.


    Download link:

    initial release: http://www.mediafire.com/?n4occ5rwv2nra7p

    Dec 08 update: http://www.mediafire.com/?h1h4658y5555k58 (note. this update is compressed using 7z. Use 7-zip to decompress the archive first and then flash the resulting zip file in TWRP)

    Dec 13 update: http://www.mediafire.com/?a6hl8qlv5v261q1

    Dec 26 update: http://www.mediafire.com/?lubkf4c7c4h4lzc

    Jan 13 update: http://www.mediafire.com/?vafgo52b353pep9 Laggy UI? flash this kernel after flashing this rom
    22
    @Madmach

    From discussions ive had with different Sprint Note 2 users it appears that they do not suffer from the same bluetooth reception issue we are facing. I am not sure but i "think" we have the same bluetooth module as the cdma model? Idk. If so it would probably be worth the time to see what they did to get a2dp working on there phone.

    The discussion got a little heated here :| I understand some of your frustration. I have been using cm on a bunch of exynos devices for a while and some stuff kept me off it and I just wanted things to happen so badly and they didn't. so here is my official stance on things, hopefully we won't have these heated exchanges anymore: I program and develop only what interests me personally. at the moment, the challenge and fun part for me is cm10.1. I'm not paid by CM nor do I owe working full time for this to anyone. Honestly I think you guys are lucky to get a working copy of aosp running on these exynos + lte devices. The big challenge for me here was to get audio, ril, hw composition, gps and bluetooth working for me personally and I did. So the motivation is not exactly there for any more work in cm10. I think if I have in call audio working for cm10.1 then I'd be happy to fix these other (what I consider minor) things. At the moment it makes no sense for me to fix cm10 when a) am very happy with it and b) in call audio is broken in 4.2.

    You guys are free to suggest fixes and think of solutions. This doesn't bother me at all. I've mostly been working solo on this so far so any contribution or help is actually very welcome. Just don't expect much from me. Something doesn't work for you? fix it. As for me personally, I'm not going to touch cm10 because the little time that I do have for android nowadays I spend working on audio in cm10.1 (a nice little personal challenge for me, hence my interest).

    Sorry if this disappoints some, but that's the way it is.

    Sent from my SAMSUNG-SGH-I317 using xda app-developers app
    18
    OMFG. It worked today and I was able to replicate the case where it worked:

    1. If we start a call in 4G. The RILD switches to 3G correctly but we don't hear anything. (perhaps it's routing through voip which doesn't work).
    2. If we start a call in 3G. BOOM ! audio works ! I got something to work with now at least so that's great.

    just a heads up to everyone. I think I've narrowed down the issue to.. surprise surprise.. RILJ.
    13
    Sources:

    you'll need to get my sources to build this copy yourself:

    1. vendor blobs. Yes I was nice and added the necessary binaries here. You don't need to adb pull em. Please also note that I did some changes to the smdk4412-common directory as well.
    2. smdk4412-common device tree changes.
    3. The device tree.
    4. RILJ implementation

    1. goes to ./vendor/samsung/
    2. goes to ./device/samsung/smdk4412-common
    3. goes to ./device/samsung/i317
    4. apply the patch manually to frameworks/base

    To compile, after sourcing the envsetup.sh file: "breakfast i317 & make"
    13
    To me this ROM is good enough as a daily driver as it is. That's why we're not actively developing here. Everything I need in a ROM works for me.

    CM 10 isn't getting that many patches/updates so that's why the last build you see in the OP is dated two weeks ago. If there is an important patch and a good reason for an update, you'll see it reflected in the OP. I haven't abandoned this.