MediaTek driver sourcecode (want custom ROMs? read this!)

Search This thread

Unrelashade

Senior Member
Sep 7, 2009
156
47
Even though it was said that the Fairphone will be completely open, the sourcecode of the MediaTek chip (MT6589M) is still not available (update: that was true for the time of writing. Luckily as of now, sourcecode is available and a custom ROM is in the making, see Developtment and Original Development Subforums). The link to the linux sourcecode except for the MediaTek part is here:

Here's our next step in providing developer resources. Happy to present to XDA: Fairphone OS Linux kernel source code package. Please let us know issues, problems, questions!

We've put together this package with all our downloads of Fairphone OS and stock Android 4.2.2.

We're eager to see what you all can do with it. Thanks for your patience as we got it up. Enjoy!

Great to see that. However, we need MediaTek sourcecode for custom ROMs if we don't want to reverse engineer (which is a lot of hard work and may even be considered a gray area on legality, I think)

Thanks to @dbrgn for bringing this up:

@joemier any plans to release the mediatek sources? Without them, not much will happen here...

If I'm not mistaken the mediatek kernel modules were written explicitly for Linux/Android. In which case, according to Linus Torvalds, they would have to be licensed under the GPL license:

That doesn't mean that I would accept just any kind of binary-only module: there are cases where something would be so obviously Linux-specific that it simply wouldn't make sense without the Linux kernel. In those cases, it would also obviously be a derived work, and as such the above excuses don't really apply any more, and it falls under the GPL license.
(source linuxmafia.com/faq/Kernel/proprietary-kernel-modules.html)

So
  1. Petition for MediaTek to release the sourcecode
    http://www.ipetitions.com/petition/aosp-support-for-mediatek-devices/
  2. Does anyone know if it's possible to persuade MediaTek to release the code, because they use Linux (GPL)?
  3. Why don't they release the code? Can it be exploited or do they think there is a risk this can be used against them by other companies? Or do they just not care to do a little work?

Sony has managed to release the sourcecode of the MediaTek inside the Xperia C
http://developer.sonymobile.com/dow...es/open-source-archive-for-build-16-0-a-0-36/
So we and Fairphone can do it too!

(Mistake by me, it's just the kernel. Thanks chrmhoffmann for pointing it out)
 
Last edited:

dbrgn

Member
Aug 13, 2010
24
10
dbrgn.ch
Yes, we definitely need the full sources. One of the reasons why I bought the Fairphone was its alleged openness. If we can't get the Mediatek sources, the promise of a "completely open phone" is nothing but empty words.
 
  • Like
Reactions: buckofive

chrmhoffmann

Inactive Recognized Developer
Nov 11, 2006
928
3,149
That Sony code is just the kernel. It's clearly stated on that page you link to.

Chris

Sent from my Nexus 7 using xda app-developers app
 
  • Like
Reactions: Unrelashade

JY-G3

Member
Dec 6, 2013
30
20
index_logo.png


More threads about this:

  1. Operation RMD - To Support & Reward our MTK SoC Developers: http://forum.xda-developers.com/showthread.php?t=2164959
  2. OmniROM For MTK Devices: http://forum.xda-developers.com/showthread.php?t=2483238
  3. MTK 6577 Sources [Complete]: http://forum.xda-developers.com/showthread.php?t=2560714

 
  • Like
Reactions: Unrelashade

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Yes, we definitely need the full sources. One of the reasons why I bought the Fairphone was its alleged openness. If we can't get the Mediatek sources, the promise of a "completely open phone" is nothing but empty words.

Promising openness and choosing an MTK chip are completely conflicting right now.

MTK is one of the least open source friendly chipset providers out there.
1) Their kernel is often full of binary blob modules. Sadly, in many cases, blob modules ARE legal. See the infamous Samsung FSR driver on the GalaxyS family.
2) Their kernel source code is a disorganized mess
3) If you have a friendly OEM that will leak MTK's complete Android build tree to you:
a) They will only build as-is with an oddball and VASTLY outdated Ubuntu configuration
b) They're an even more disorganized mess than the kernel sources and will cause severe brain damage if you try to read/understand them without taking breaks to work with a less screwed up source tree
c) Even their OEMs only get statically linked binaries for many components. For example their hwcomposer "source" is just a wrapper around a blob
d) They have yet to support an Android release newer than 4.2 - partly because it looks like they initially wrote stuff for Android 1.x and have never updated their sources properly to fit in with newer versions of Android. (They have been hacking Android sources to be compatible with their junk instead of the other way around). For example, they still don't use device trees.

Even with an OEM that is cooperating significantly with developers (like Oppo), working with MTK devices is slow and extremely agonizing.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
There are new sources posted on the Fairphone website. See the thread with technical details.

Hope it is complete now, as the first compilation attempt failed...

Kernel source is better than many MTK OEMs, but it'll still at best get you custom kernels. AOSP-derivative builds (CM, Omni, etc.) are right now far away.

(In case you haven't figured out - some of the Omni developers have a "complete" MT6589 source tree. I use "complete" in quotes because while it will build 4.2 on a properly configured machine, it is a mix and match of tons of blobs and all sorts of horrible hacks that result in it being a nightmare to integrate into any 4.3/4.4 AOSP-based project. Yes, even with an OEM giving us everything they have access to we're barely able to get 4.4 to boot on MT6589.)

https://gerrit.omnirom.org/#/q/status:open+branch:android-4.4+topic:mt6589,n,z for an example of the terribad hacks required to get it even to boot
 
  • Like
Reactions: FlamingoKid

FlamingoKid

Member
May 12, 2012
5
2
Utrecht
...

(In case you haven't figured out - some of the Omni developers have a "complete" MT6589 source tree. I use "complete" in quotes because while it will build 4.2 on a properly configured machine, it is a mix and match of tons of blobs and all sorts of horrible hacks that result in it being a nightmare to integrate into any 4.3/4.4 AOSP-based project. Yes, even with an OEM giving us everything they have access to we're barely able to get 4.4 to boot on MT6589.)

...

Ah, so this is more a Mediatek issue (provided with full 'sources' it still is a lot of work)? I'm an enterprise developer (JEE) so kerneldeveloping is new to me. Will check the links in your signature though :good:
 
I just don't understand the ChiCom's thinking here .... You have a small army of intelligent motivated developers willing and able to extend your code AND your hardware for free ..... and you just sh-- all over them? There is nothing going on inside a Mediatek processor that's unique, groundbreaking or proprietary that's worth protecting. I say that as someone who has been in the field of Industrial and Commercial Process Controls since 1997

It's like they don't really want to make money and I'm afraid they've picked up a bad habit that's plagued the US business community for decades

Penny wise and Dollar foolish .... Save a couple of pennies now and throw way several dollars in the future (For instance it is ALWAYS ALWAYS ALWAYS cheaper to mitigate Pollution at the source than it is to clean up the environmental and health degradation it causes, I've yet to find a single exception to this Rule and the ChiComs are going to learn it real quick the hard way in the very near future)

Can't they see why the Nexus 7 was such a hit? Can't they see how Google took a device that's Margin was so low it was obviously never meant to make real money but since it was so Open it was embraced by the WORLDWIDE community and became a money making best seller. Cripes the biggest downside to a Nexus 7 is that there are so many ROMs and Kernels out there it's hard to choose and takes a week or more of research to cull your way through them

My only conclusion that they are Thieves at heart and thus think everyone else is out to steal from them like the steal from others .... Another bad habit they picked up from US "Corporate-think" .... Or maybe they do such shoddy coding that they are embarrassed to have anyone see it ... nothing pisses off a so-called Professional more than a bunch of 'amateurs' laughing at them and showing them up ....

Plus like any Corporation it's not the better educated engineers and scientists that call the shots but the poorly educated MBA's who don't know a resistor from a capacitor and couldn't even fix a broken flashlight or change their own oil ....
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I just don't understand the ChiCom's thinking here .... You have a small army of intelligent motivated developers willing and able to extend your code AND your hardware for free ..... and you just sh-- all over them? There is nothing going on inside a Mediatek processor that's unique, groundbreaking or proprietary that's worth protecting. I say that as someone who has been in the field of Industrial and Commercial Process Controls since 1997

It's like they don't really want to make money and I'm afraid they've picked up a bad habit that's plagued the US business community for decades

Penny wise and Dollar foolish .... Save a couple of pennies now and throw way several dollars in the future (For instance it is ALWAYS ALWAYS ALWAYS cheaper to mitigate Pollution at the source than it is to clean up the environmental and health degradation it causes, I've yet to find a single exception to this Rule and the ChiComs are going to learn it real quick the hard way in the very near future)

Can't they see why the Nexus 7 was such a hit? Can't they see how Google took a device that's Margin was so low it was obviously never meant to make real money but since it was so Open it was embraced by the WORLDWIDE community and became a money making best seller. Cripes the biggest downside to a Nexus 7 is that there are so many ROMs and Kernels out there it's hard to choose and takes a week or more of research to cull your way through them

My only conclusion that they are Thieves at heart and thus think everyone else is out to steal from them like the steal from others .... Another bad habit they picked up from US "Corporate-think" .... Or maybe they do such shoddy coding that they are embarrassed to have anyone see it ... nothing pisses off a so-called Professional more than a bunch of 'amateurs' laughing at them and showing them up ....

Plus like any Corporation it's not the better educated engineers and scientists that call the shots but the poorly educated MBA's who don't know a resistor from a capacitor and couldn't even fix a broken flashlight or change their own oil ....
Yup. This is why Oppo has done so well in the West compared to other Chinese manufacturers despite almost no international marketing efforts outside of social media - Instead of crapping on community developers, they embraced them and we became their evangelists.
 

[email protected]

New member
Feb 27, 2014
1
0
A little bit desappointed

My first fairphone is about to arrive and I've been looking for sofware news for weeks. Disappointedly, I've found FairphoneOS is not being Open Source and customizable... Is it true my research conclusion?

Thanks in advance
Lupin
 

fredflegel

Member
Apr 15, 2013
27
30
Ubuntu Phone and Fairphone

If have read this article on omgubuntu.co.uk http://www.omgubuntu.co.uk/2014/02/bq-aquaris-ubuntu-phone-specs and if i read this correctly, the Ubuntu Phone by manufacturer bq will use a MT6589 (without M). This is essentially the same chipset as the fairphone but with a higher clocked gpu. This should ease porting ubuntu for phones to Fairphone i guess. It will be interessting how (and if) Canonical publishes Ubuntufor that phone. It might actually include sources to help porting Ubuntu to Fairphone.

What do you think?
 

supersn0b

New member
Mar 15, 2014
2
0
Copenhagen
Hi all,

anybody seen/tried this: gizmochina.com/2014/03/10/finally-android-4-4-kitkat-is-available-for-mediatek-mt6589-chipset

Could that be good news?
 
Last edited:

superdragonpt

Recognized Developer
Apr 27, 2013
4,951
19,330
Lisbon / Taiwan / USA
www.caixamagica.pt
Hi all,

anybody seen/tried this: gizmochina.com/2014/03/10/finally-android-4-4-kitkat-is-available-for-mediatek-mt6589-chipset

Could that be good news?

What's new? ;)

Search right here on xda.

There are currently two cyanogenmod builds (CM 10.2 - jb 4.3) and (CM11 - KK 4.4) for the wiko stairway MT6589.

Check the miscellaneous android development forums ;)

Regards
 
  • Like
Reactions: JY-G3

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    build and boot a custom kernel

    Hi all,

    I was able to build and boot a custom kernel. The problem is that the Fairphone kernel sources are in fact not configured for the Fairphone.

    The ringbuffer and/or ram console are quite small, so I don't really get much output. Looks like some problem with the dsi/display.

    The display configuration in mediatek/config/ahong89_wet_jb2/ProjectConfig.mk is obviously wrong. So I changed CUSTOM_KERNEL_LCM in this file to nt35516_qhd_dsi_cmd_ipsboe (one can guess this by looking at /proc/cmdline and browsing through mediatek/custom/common/kernel/lcm). There are many more CUSTOM_KERNEL_* settings in this file and I have no idea what to put there. Therefore I excluded as many MediaTek drivers as possible from my kernel build, just to increase the chances that it boots properly.

    The kernel was building fine and so far I tried to put my custom kernel on a recovery image. And finally it boots! :) The recovery menu is (almost) usable, the only problem is that the volume up button is recognized as volume down and the volume down button does not work at all.

    The bottom line is that the configuration for the Fairphone board is not included in the kernel source. There are just the ahong folders with some generic configuration and customized source code, but I would expect to see also corresponding Fairphone folders. (So parts of the source code customized for the Fairphone are most likely missing, too.) I would not consider the current kernel source as complete. Let's hope that the guys from Fairphone are able to get the complete sources soon. However, it should be possible to start some development with the current sources already.
    11
    Yes, we definitely need the full sources. One of the reasons why I bought the Fairphone was its alleged openness. If we can't get the Mediatek sources, the promise of a "completely open phone" is nothing but empty words.

    Promising openness and choosing an MTK chip are completely conflicting right now.

    MTK is one of the least open source friendly chipset providers out there.
    1) Their kernel is often full of binary blob modules. Sadly, in many cases, blob modules ARE legal. See the infamous Samsung FSR driver on the GalaxyS family.
    2) Their kernel source code is a disorganized mess
    3) If you have a friendly OEM that will leak MTK's complete Android build tree to you:
    a) They will only build as-is with an oddball and VASTLY outdated Ubuntu configuration
    b) They're an even more disorganized mess than the kernel sources and will cause severe brain damage if you try to read/understand them without taking breaks to work with a less screwed up source tree
    c) Even their OEMs only get statically linked binaries for many components. For example their hwcomposer "source" is just a wrapper around a blob
    d) They have yet to support an Android release newer than 4.2 - partly because it looks like they initially wrote stuff for Android 1.x and have never updated their sources properly to fit in with newer versions of Android. (They have been hacking Android sources to be compatible with their junk instead of the other way around). For example, they still don't use device trees.

    Even with an OEM that is cooperating significantly with developers (like Oppo), working with MTK devices is slow and extremely agonizing.
    10
    I can imagine it being difficult to know what questions to pass on to the technical team and how to formulate them, so I think it'd be useful to state them explicitly.

    OK, I'll give it a try. :)

    The problem is not only the file ProjectConfig.mk. I think the following folders are missing:
    • mediatek/config/FP1
    • mediatek/custom/FP1
    Of course, I don't know if the name of the folders would be FP1 or fairphone or whatever. There are only the ahong89_wet_jb2 folders, which seem to contain some generic template (or maybe are for a development board). Alternatively, it might be that the phone-specific files should actually be in ahong89_wet_jb2. Whatever is the case, either some folders are missing or it is not the kernel source for the Fairphone.

    AFAIK makefiles like ProjectConfig.mk are also covered by the GPL. I think this is concrete evidence that the current kernel package does not comply with the GPL. Not to mention the issue with the volume buttons.

    So the people at Fairphone should ask again for the kernel sources and point out the probable violation of the GPL.

    If one of you is in direct contact with the person responsible for the kernel sources at Fairphone, then please pass on this information.
    9
    Thanks to fixes inspired by @_tmp's work the https://github.com/keesj/alps-fairphone-gpl repository now builds a working kernel

    Find the instrutions here https://github.com/keesj/alps-fairphone-gpl/wiki/Building

    enjoy
    8
    Even though it was said that the Fairphone will be completely open, the sourcecode of the MediaTek chip (MT6589M) is still not available (update: that was true for the time of writing. Luckily as of now, sourcecode is available and a custom ROM is in the making, see Developtment and Original Development Subforums). The link to the linux sourcecode except for the MediaTek part is here:

    Here's our next step in providing developer resources. Happy to present to XDA: Fairphone OS Linux kernel source code package. Please let us know issues, problems, questions!

    We've put together this package with all our downloads of Fairphone OS and stock Android 4.2.2.

    We're eager to see what you all can do with it. Thanks for your patience as we got it up. Enjoy!

    Great to see that. However, we need MediaTek sourcecode for custom ROMs if we don't want to reverse engineer (which is a lot of hard work and may even be considered a gray area on legality, I think)

    Thanks to @dbrgn for bringing this up:

    @joemier any plans to release the mediatek sources? Without them, not much will happen here...

    If I'm not mistaken the mediatek kernel modules were written explicitly for Linux/Android. In which case, according to Linus Torvalds, they would have to be licensed under the GPL license:

    That doesn't mean that I would accept just any kind of binary-only module: there are cases where something would be so obviously Linux-specific that it simply wouldn't make sense without the Linux kernel. In those cases, it would also obviously be a derived work, and as such the above excuses don't really apply any more, and it falls under the GPL license.
    (source linuxmafia.com/faq/Kernel/proprietary-kernel-modules.html)

    So
    1. Petition for MediaTek to release the sourcecode
      http://www.ipetitions.com/petition/aosp-support-for-mediatek-devices/
    2. Does anyone know if it's possible to persuade MediaTek to release the code, because they use Linux (GPL)?
    3. Why don't they release the code? Can it be exploited or do they think there is a risk this can be used against them by other companies? Or do they just not care to do a little work?

    Sony has managed to release the sourcecode of the MediaTek inside the Xperia C
    http://developer.sonymobile.com/dow...es/open-source-archive-for-build-16-0-a-0-36/
    So we and Fairphone can do it too!

    (Mistake by me, it's just the kernel. Thanks chrmhoffmann for pointing it out)