Kernel hackers: upstream kernel for FP2 OpenOS?

Woa, that’s the same SoC, yeah! I was aware of the Sony Open Devices initiative (and useful docs), in fact. One of the most interesting thing for vendors to achieve kernels closest to mainline is the following:

Every new Android release comes with added requirements and continued development that essentially restarts the entire process. This process of re-implementing features and bug fixes to be able to upgrade devices is costly and does not scale, which makes it difficult to provide upgrades to older devices.

(Emphasis by me)

What’s even more, this upstream pushing clearly reflects the objectives of the Open Source movement started with Linux (among others) of universal collaboration that has being obscured by the vast amount of uncommon Linux devices (Android) launched in recent years (and which has generated a lot of dangerous non up-to-date devices with big security flaws).

6 Likes

FYI Snapdragon 835 devices are using kernel version 4.4.
Screenshots: https://www.reddit.com/r/Android/comments/6gabrz/comment/diq4y3j

2 Likes

Yep! There’s a tendency of forking off a longterm kernel release because they get the most important upstream fixes backported without meddling with internal APIs. Makes it easier to copy-paste non-upstream drivers in. I presume at the time of developing the Snapdragon 835, the latest longterm kernel was 4.4 first released January 2016. In December 2016, the 4.9 kernel was the next one to be labelled longterm. Both have been updated just last week with various fixes (whereas the 3.4 kernel shipped for Fairphone OS first released 20th of May 2012 hasn’t seen a new official release in 9 months now - just non-upstream backports that Google/Qualcomm cluncked on top with their monthly security updates).

Got something for you :wink:

https://pastebin.com/BjbcPZUB

4 Likes

You legend! That’s an excellent starting point there. When I get back I’ll turn the opening post into a wiki post (if I can). Can I ask you to share what you have (a github repo with fleshed out DTB, links to how you got the UART working, that sort of stuff)? :smiley:

UART stuff is in this thread: Information about the "debug connector" on the FP2
Source: https://github.com/z3ntu/linux

5 Likes

Updated OP with build instructions and more. Have fun :slight_smile:

Is there any progress with this project? As Linux 3.4 is EOL since April, a more recent Kernel with LTS would be interesting.

I don’t think we would ever use a mainline kernel for running Android just because of the incompatibilities and performance improvements made by Qualcomm.
But for other projects such as postmarketOS a mainline kernel would be great.

And no, I’m not working on it currently because apparently there will be some changes to how eg USB and display gets handled on mainline and without these changes, stuff won’t really work great.

1 Like

Doesn’t Google require a way more up to date kennel for oreo? Will this open up the possibility of a more modern kernel?

No, it isn’t a technical requirement but one set by Google and is probably just enforced by the Google CTS. (but yes they “require” a new kernel version for Oreo)

1 Like

Let me correct, 3.4.0 alone does not work with Oreo but 3.4 with backported patches works fine on several devices already. (eg “ambient capabilities” is needed with Oreo and other patches probably too)

It’s upstream :tada:

12 Likes

But isn’t this the device tree only? An upstream kernel alone still couldn’t address all of the Fairphone’s hardware as it still contains parts which work with closed source/out-of-tree drivers only, am I right?

And I’ve put build instructions on a repo on GitHub linked in the top post. Also if anyone could update that post (eg section “challenges left include” as it’s outdated a bit. Maybe also mention that some stuff is in torvalds’ repo already :slight_smile: ).

2 Likes

This is super cool!
Chris

1 Like

What are the advantages of having this upstream apart from the obvious one that no longer the FP2 specific code has to be backported? Did I understand correct that this means Oreo may officially run on the FP2?

Probably not. I alone will probably never get all hardware components of the FP2 working nicely and even if, getting Android to (smoothly) run on it is another challenge afaik.

1 Like

Not related to oreo. Oreo can be done with older kernels. I have not started oreo work as N is still not working properly and no other lineage device anyway has oreo nightly builds.

This is nevertheless super cool.

Chris

5 Likes

Google “requires” a 3.18 or 4.4+ kernel for Oreo depending on the device for Google Certification so that’s what I guess is meant with “officially”.
But yes, technically Oreo doesn’t need a new kernel version (except a buttload of backports)

2 Likes