[Ksummit-discuss] [CORE TOPIC] Mainline kernel on a cellphone

Krzysztof Kozlowski k.kozlowski at samsung.com
Wed Aug 26 01:22:11 UTC 2015


On 26.08.2015 03:59, Tim Bird wrote:
> On 07/29/2015 12:40 AM, Pavel Machek wrote:
>> Hi!
>>
>>>> There is now a wiki page at:
>>>> See http://elinux.org/Kernel_areas_of_focus_for_mainlining
>>>> In particular it has a table showing certain areas that tend to have
>>>> a lot of out-of-tree code (e.g. most phones have between 80K to
>>>> 100K of lines of wireless driver support out-of-mainline)
>>>
>>> Did anyone see successful attempts of mainlining such vendor code? I
>>> mean mainlining by individuals, not by vendor company itself.
>>
>> That is what is happening on Nokia N900. It took some time, but we
>> have almost usable phone at this point. We'll have usable one once
>> power management is working and once we get some more reasonable code
>> to control ofono.
> 
> Just an update on this thread.  We held a BOF at LinuxCon last week
> on this topic.  I gave a presentation with some background, and
> then we had a discussion.  Notes from the meeting (and a link to the
> presentation) are at: 
> http://elinux.org/LCNA_2015_Device_Mainlining_BOF_meeting_notes

Thanks for updated numbers. Interesting that for the same SoC vendor
(MSM) the difference between phone vendors is significant, e.g. 3.1M of
Samsung/MSM insertions, 2.6M of LG insertions and only 1.8M of Sony and
Motorola.

In the same time number of mainline contributors from LG, Sony and
Motorola is similar... so why LG and Samsung/MSM need more than 1M of
additional code out of tree?


I made also a diff with Tizen (developer) kernel source code. These are
kernel trees not used directly by end-market products, but for devices
released to developers. Sometimes these are the same as market-products,
but the kernel is developed in a more open-source way:

1. 4.0 kernel (for Odroid XU3):
   https://review.tizen.org/git/?p=platform/kernel/linux-exynos.git
   1404 files changed,
   4566 insertions(+),
   162026 deletions(-),
   1761 hunks

2. 3.10 kernel (for Gear2, Trats2/Galaxy S3, Odroid U3):
   https://review.tizen.org/git/?p=platform/kernel/linux-3.10.git
   5804 files changed,
   84175 insertions(+),
   536798 deletions(-),
   17917 hunks

I think the numbers are reversed (insertions <-> deletions) because
adding only Mali 400 should give ~50 000 of insertions.


Mali GPU drivers are an interesting case:
1. They are open (I believe Linux version is entirely under GPLv2).

2. They are developed for many OS-es.

3. They are present on may end-user products (using SoCs from Allwinner,
Mediatek, Rockchip, Samsung and more).

4. Their coding style is so different that I can't imagine mainlining
them into staging area... Recently I was digging into Mali400 and it was
literally hurting my eyes to see that coding style. It's like opposite
of kernel.


Best regards,
Krzysztof



More information about the Ksummit-discuss mailing list