Alright so I've built and modified both LOS and RR a bit and it went pretty well. Tutorials o'plenty when it comes to building those roms.
However I now want to try and build a rom from scratch and I'd like to base it on CAF.
I've *I think* correctly synced up with the latest msm8996 tag, but I may have ****ed that up as well.
My problem is is that I literally can not find any resource for building with CAF sources, and I can't even find my local_manifests/roomservice, so I have no idea where to start.
If any of you have any resources or want to share a bit of your knowledge it would be greatly appreciated.
Thanks.
Anyone?
Hey, check out AOSP-CAF(https://github.com/AOSP-CAF). This is all you'll ever need and it's updated regularly. The dev has already added all the necessary stuff(HALS) and also has CM's build system so all you need to do is fork some device tree , sync it's dependencies and you should be good to go.
INT3NSE07 said:
Hey, check out AOSP-CAF(https://github.com/AOSP-CAF). This is all you'll ever need and it's updated regularly. The dev has already added all the necessary stuff(HALS) and also has CM's build system so all you need to do is fork some device tree , sync it's dependencies and you should be good to go.
Click to expand...
Click to collapse
Thanks! I've synced up with it and also synced with the OnePlusOSS device tree. The builds are failing however because the pull_library.sh script they give doesn't work anymore. Is there another device tree you would recommend? And how could I go about finding the dependencies?
Thanks for your help
Related
What would it take to see a base AOSP ROM put together for the LG G4? I know there's some folks working hard at bringing CM to the G4, but what about an AOSP unmodified ROM with drivers, of course? I've always wondered if that is a better option than say a ROM like CM which has loads of known bugs and issues.
Maybe an AOSP super-stock setup which we could modify after via Xposed / Mods to add in what we want would be a better option?
CJ-Wylde said:
What would it take to see a base AOSP ROM put together for the LG G4? I know there's some folks working hard at bringing CM to the G4, but what about an AOSP unmodified ROM with drivers, of course? I've always wondered if that is a better option than say a ROM like CM which has loads of known bugs and issues.
Maybe an AOSP super-stock setup which we could modify after via Xposed / Mods to add in what we want would be a better option?
Click to expand...
Click to collapse
After we finish the device tree and everything is working, it can be then used to build whatever Rom you desire
You rock, thank you for the quick response! I'm not even sure what kind of rom I desire. I just know it would be neat to go full on basic AOSP and add from there without some of the clutter and bugs introduced with CM's stuff, although CM has always been an enjoyable experience. Whoot for guys like you!
I know this is old thread... but what source tree are we talking about here? Obviously not AOSP itself, i think... right?
CM source?
Maybe i'm missing something about branches of AOSP... and other trees..
many thanks
mythos234 said:
After we finish the device tree and everything is working, it can be then used to build whatever Rom you desire
Click to expand...
Click to collapse
thenextdon13 said:
I know this is old thread... but what source tree are we talking about here? Obviously not AOSP itself, i think... right?
CM source?
Maybe i'm missing something about branches of AOSP... and other trees..
many thanks
Click to expand...
Click to collapse
They talked about device tree here. An example for a pure AOSP one for the device LG H815 is here:
https://github.com/cile381/android_device_h815
See this for an explanation :
http://wp.me/p6ZeCY-3p
AOSP source contains the sources to build a ROM which are the same for all devices and a device tree is a device specific description on how to build or as the above link states:
“A device tree is a tree data structure with nodes that describe the physical devices in a system”
.
Sent from my LG-H815 using XDA Labs
Thank you, steadfasterX.
That provides some clarity, although I think there is still a bit missing for me--
Ugh, i can't post links because of spam rules.. :-/ makes describing things harder.
How did you find the github cile381/android_device_h815 as being the AOSP tree for that phone? My understanding was that the AOSP main repo is here:
android.googlesource.com
And so related to my question previously.. i guess i'm confused specifically who the 'we' is that mythos234 references, and where that source would be located...
many thanks!
Hi,
this is the development thread for LineageOS development. The first release is out and this thread is for developer collaboration!
Everyone who knows C, Java and strace is welcome to participate. Please send git formatted patches!
HELP NEEDED
mixer_paths_tasha.xml and audio_platform_info.xml need tweaking
VoIP needs testing
WifiDisplay support
VoLTE (I can't test this)
Device Trees
https://github.com/cryptomilk/android_kernel_sony_msm8998
https://github.com/cryptomilk/android_device_sony_common-treble
https://github.com/cryptomilk/android_device_sony_yoshino
https://github.com/cryptomilk/android_device_sony_lilac
What about the bootloader?
blackknightavalon said:
What about the bootloader?
Click to expand...
Click to collapse
Just unlock it and have fun. Hopefully someone will be able to figure out a way to backup the DRM keys.
android_fury said:
Just unlock it and have fun. Hopefully someone will be able to figure out a way to backup the DRM keys.
Click to expand...
Click to collapse
And where, exactly, is the tutorial for that? It's not officially supported by Sony yet.
I think I read somewhere that you can select the XZ Premium on the list and follow the steps. Once a DRM backup is available, I may try doing that. By then, the actual XZ1C may already be on the list.
android_fury said:
I think I read somewhere that you can select the XZ Premium on the list and follow the steps. Once a DRM backup is available, I may try doing that. By then, the actual XZ1C may already be on the list.
Click to expand...
Click to collapse
I just checked a few minutes ago. XZ1C's not on there.
Good news !
I've setup initial repositories, yoshino and lilac. yoshino is a common base shared between devices and I have a Kernel tree over the latest msm-4.0 kernel tree and already compiled it after fixing a log of build issues. I will create repositories in the next days and upload the sources once I have a recovery.
modpunk said:
I've setup initial repositories, yoshino and lilac. yoshino is a common base shared between devices and I have a Kernel tree over the latest msm-4.0 kernel tree and already compiled it after fixing a log of build issues. I will create repositories in the next days and upload the sources once I have a recovery.
Click to expand...
Click to collapse
Great news! Thank you so much for your efforts to bring us LOS for this really awesome compact beast.
Thank you so far, modpunk! Looking forward to it. The phone is great, but stock rom leaves some things to be desired...
Thanks bro, just do it!
Regarding unlocking: I selected X Compact and followed the instructions. Everything worked perfectly and I'm now running AOSP.
Code:
----- Made recovery image: recovery.img --------
#### make completed successfully (11:06 (mm:ss)) ####
modpunk said:
I've setup initial repositories, yoshino and lilac. yoshino is a common base shared between devices and I have a Kernel tree over the latest msm-4.0 kernel tree and already compiled it after fixing a log of build issues. I will create repositories in the next days and upload the sources once I have a recovery.
Click to expand...
Click to collapse
How much are you borrowing from Sony's AOSP repositories? They've been committing pretty heavily to their kernel in particular.
Gairtial said:
How much are you borrowing from Sony's AOSP repositories? They've been committing pretty heavily to their kernel in particular.
Click to expand...
Click to collapse
There was no Kernel release for msm8998 in kernel-copyleft, so I took the msm-4.4 Kernel tree and the tarball they dropped. I've fixed several bugs in the Kernel, I always wonder how the Smartphone manufacturers get their stuff compiled.
You can find the kernel source tree here: https://github.com/cryptomilk/android_kernel_sony_msm8998
I've also added exfat support already.
I've looked at the device repo for their AOSP trees, but started a yoshino and lilac device tree from scratch. I prefer clean repositories. I will push them in the next days, I did quite some cleanup today.
I haven't ordered the device yet. Need to wait till next week, I just came back from a long vacation
modpunk said:
There was no Kernel release for msm8998 in kernel-copyleft, so I took the msm-4.4 Kernel tree and the tarball they dropped. I've fixed several bugs in the Kernel, I always wonder how the Smartphone manufacturers get their stuff compiled.
You can find the kernel source tree here: https://github.com/cryptomilk/android_kernel_sony_msm8998
I've also added exfat support already.
I've looked at the device repo for their AOSP trees, but started a yoshino and lilac device tree from scratch. I prefer clean repositories. I will push them in the next days, I did quite some cleanup today.
I haven't ordered the device yet. Need to wait till next week, I just came back from a long vacation
Click to expand...
Click to collapse
Why the copyleft archive? It doesn't look like they've touched it since April while they touched the regular one 2 hours ago.
I had no issues compiling and running the kernel from https://github.com/sonyxperiadev/kernel, though that was integrated with their entire AOSP tree, which seems to package its own versions of gcc and clang. Perhaps LineageOS includes different prebuilt compilers and that's why you see issues.
Really curious to see how LOS runs though. AOSP has some annoying performance issues and crashes.
Gairtial said:
Why the copyleft archive? It doesn't look like they've touched it since April while they touched the regular one 2 hours ago.
I had no issues compiling and running the kernel from https://github.com/sonyxperiadev/kernel, though that was integrated with their entire AOSP tree, which seems to package its own versions of gcc and clang. Perhaps LineageOS includes different prebuilt compilers and that's why you see issues.
Really curious to see how LOS runs though. AOSP has some annoying performance issues and crashes.
Click to expand...
Click to collapse
I've just tried to build the aosp/LA.UM.5.7.r1 tree from the sony kernel repo. This one has a lot of compiler errors which need fixing first. However for me it looks like that the msm-4.4 tree is much cleaner in this regard so maybe also more advanced.
modpunk said:
I've just tried to build the aosp/LA.UM.5.7.r1 tree from the sony kernel repo. This one has a lot of compiler errors which need fixing first. However for me it looks like that the msm-4.4 tree is much cleaner in this regard so maybe also more advanced.
Click to expand...
Click to collapse
Also fellow LineageOS developers said that the sony 'kernel' repo is a Proof of Concept repo and not what they use in production. So I stick to the production release of MSM.
modpunk said:
I've just tried to build the aosp/LA.UM.5.7.r1 tree from the sony kernel repo. This one has a lot of compiler errors which need fixing first. However for me it looks like that the msm-4.4 tree is much cleaner in this regard so maybe also more advanced.
Click to expand...
Click to collapse
Huh, what kinds of errors are you seeing? I really suspect it must be something different between LOS and AOSP and I'm wondering what it is.
modpunk said:
Also fellow LineageOS developers said that the sony 'kernel' repo is a Proof of Concept repo and not what they use in production. So I stick to the production release of MSM.
Click to expand...
Click to collapse
This may be true but it's also the repo where the most work is done. We should at least pay attention to it in case they commit fixes that are useful.
Also probably getting ahead of myself but I wonder if we can merge EAS... It's in AOSP's common kernel, is it around in LOS anywhere yet?
Gairtial said:
Huh, what kinds of errors are you seeing? I really suspect it must be something different between LOS and AOSP and I'm wondering what it is.
This may be true but it's also the repo where the most work is done. We should at least pay attention to it in case they commit fixes that are useful.
Also probably getting ahead of myself but I wonder if we can merge EAS... It's in AOSP's common kernel, is it around in LOS anywhere yet?
Click to expand...
Click to collapse
You get the errors with -Wmaybe-uninitialized which is a relatively new gcc feature. The Sony 'kernel' repo is their Proof of Concept repository. Yes, sure they are working on it it makes totally sense to try things out there first!
I dunno what EAS is or means ...
I'm trying to build Stock AOSP (Not LineageOS) straight from Google for the OnePlus 3/3T?
I searched for a guide, but haven't found one.
Thanks in advance!
You can't
AOSP source is available for Pixel and Nexus devices
But you can build CAF for OnePlus 3, is clean and close to AOSP
Sent from my ONEPLUS A3003 using Tapatalk
Since you're doing it on your own I suggest using a rom here as a base GZR recently posted GZOSP a Oreo base for Developers to use as a base for their roms you should check it out it's a great start if you're new to development
liam_davenport said:
Since you're doing it on your own I suggest using a rom here as a base GZR recently posted GZOSP a Oreo base for Developers to use as a base for their roms you should check it out it's a great start if you're new to development
Click to expand...
Click to collapse
That would be doing him a great dis-service. Buy using anothers base you dont learn everything you need and rely on others code way too much. Not to mention if a cm/los issue happens (underlying bug in their base code so you are waiting for them to fix it) This is the reason that whole project will not work.
Starting from scratch is a great start and a place everyone should start
... If he's never built a rom before then starting from scratch is most definitely *not* the place to start. GZOSP would likely be the best place to start as at least you can sync all and it actually builds. Would learn a ton just by figuring out how to remove all the GroundZero naming to make it your "own" rom.
There aren't any default AOSP device tree's available for OP3(you'd *have* to use someone else's code and it would likely require manually fixing it to build) so can't start there really, and good luck trying to find which branch(s) of caf and which repo's you need to build.. Writing device trees from scratch by yourself for aosp is drunkeness unless you've done it before and *know* what you're doing.
--
TLDR: There's no guide because it's not a thing currently. Would start with GZOSP if I were you.
HolyAngel said:
... If he's never built a rom before then starting from scratch is most definitely *not* the place to start. GZOSP would likely be the best place to start as at least you can sync all and it actually builds. Would learn a ton just by figuring out how to remove all the GroundZero naming to make it your "own" rom.
There aren't any default AOSP device tree's available for OP3(you'd *have* to use someone else's code and it would likely require manually fixing it to build) so can't start there really, and good luck trying to find which branch(s) of caf and which repo's you need to build.. Writing device trees from scratch by yourself for aosp is drunkeness unless you've done it before and *know* what you're doing.
--
TLDR: There's no guide because it's not a thing currently. Would start with GZOSP if I were you.
Click to expand...
Click to collapse
I mean in Biology, you don't start at the organism, you start at the atom. You start at the base and build from there.
Introduction
Hello everyone, this is a thread to introduce both users and kernel developers to the concept of linux-stable as well as give developers some tips and a tree to either merge into their own, use as a base, or just as a reference. Feel free to ask questions and enjoy!
What is it?
linux-stable is, as the name implies, the stable branch of the Linux kernel, the base of Android. The phone could not run without the Linux kernel (at least not without reworking a lot of stuff). The Android kernels are based on the longterm stable trees:
Longterm
There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees.
Click to expand...
Click to collapse
Source: https://www.kernel.org/category/releases.html
All Linux development happens on the master branch, which is governed by Linus Torvalds. When issues are discovered there, the fixes are applied then backported to these various stable trees for consumption. It is not uncommon for a fix to need to go back a few years.
There is a LOT more information available in the notes repo in the android-linux-stable organization if you care to learn more in-depth: https://github.com/android-linux-stable/notes
What does this mean for me?
If you are a developer, this means you should be merging these changes into your own tree. These are vetted, stable fixes to real world problems and they are being handed out for free. It does not take long to get up to date (as you can just merge this tree directly into your own or do it yourself using the tree as a reference) and once you are up to date, there is usually a release once every two weeks, give or take. I provide a rebuttal to a lot of various complaints here. If you still feel like there is a good reason not to do this, please let me know, I'll be happy to try and debate on it!
If you are a user, it means that you should be looking for and using kernels that have these fixes, as it shows the developers care for your security and stability. The current version for this device is 4.4.78 on OOS and 4.4.100 on Lineage while the current version upstream is 4.4.162 so all you need to do is go into Settings > About phone and look at the kernel version to know if you are up to date.
How do I use?
If you are a developer, the reference tree is located in the android-linux-stable organization: https://github.com/android-linux-stable/op5
There are three branches, one for OxygenOS 8.0 stable, one for OyxgenOS 8.1 beta, and one for Lineage 15.1.
This can either be merged into your existing kernel tree if you have one or be used as a fresh base. You do not need my permission to use it nor do you need to give me credit (although it would be appreciated).
If you are a user, use a kernel that has the changes added in!
Getting notified about updates
There are a few ways to get notified of linux-stable updates:
The linux-kernel-announce mailing list: http://vger.kernel.org/vger-lists.html#linux-kernel-announce
The android-linux-stable Telegram channel: https://t.me/alsupdates
Subscribe to this thread
Follow me on Google+ or Twitter
Getting help
If you have any issues with getting these changes into your tree or want to ask a question, there are a few different ways to do it:
Post in this thread
Join the linux-stable support chat on Telegram: https://t.me/joinchat/C1UAJ1EMSX31PCFdwLnOSg
File an issue either in the android-linux-stable notes repo or the android-linux-stable repo for this device
When requesting help, please give some solid details as to what you are struggling with, as I am happy to provide assistant and clarity but not to do something for you (unless I screwed up).
From what I understand, you're creating a space where you're updating the stock Kernel to the latest Linux tags and creating a clean base that others can develop upon for a consistently updated kernel?
Seems to me like the epitome of a community project and in keeping with the heart behind open source.
Great work Nathan!!!
Sent from my OnePlus 5 using XDA Labs
rav101 said:
From what I understand, you're creating a space where you're updating the stock Kernel to the latest Linux tags and creating a clean base that others can develop upon for a consistently updated kernel?
Seems to me like the epitome of a community project and in keeping with the heart behind open source.
Great work Nathan!!!
Sent from my OnePlus 5 using XDA Labs
Click to expand...
Click to collapse
Exactly correct I have seen others grab my kernel and base their work upon (which I have zero issues with) but I know most do it because I've merged linux-stable as one of my first things. Figured I would make their lives easier (plus doing the conflict resolution summaries helped me validate my own work). I am mulling over posting these to the mailing lists so other mainline Linux developers with these devices can easily test new builds and get the latest fixes without needing to do the work themselves (even if they are fully capable).
nathanchance said:
Exactly correct I have seen others grab my kernel and base their work upon (which I have zero issues with) but I know most do it because I've merged linux-stable as one of my first things. Figured I would make their lives easier (plus doing the conflict resolution summaries helped me validate my own work). I am mulling over posting these to the mailing lists so other mainline Linux developers with these devices can easily test new builds and get the latest fixes without needing to do the work themselves (even if they are fully capable).
Click to expand...
Click to collapse
If you're doing the work anyway and it's just a simple push to mailing list then might as well. Others can choose whether to use it or not but at least it's there. :good:
Sent from my OnePlus 5 using XDA Labs
where to download the link?
Gayrat1999 said:
where to download the link?
Click to expand...
Click to collapse
This isn't a kernel you flash, this is something for developers to use in their own work. For example, my kernel Flash already has all of this, which you can flash.
Nice. How about GCC error fixes and wifi stack driver in this base?
neobuddy89 said:
Nice. How about GCC error fixes and wifi stack driver in this base?
Click to expand...
Click to collapse
I toyed with the idea of doing two branches (one for building, one for usability) but decided against it as 1. I want this source to be as plain as possible and 2. It doesn't fully fit with the idea of this project. This purely to help developers get up and running with linux-stable, not a fully fledged custom kernel. I will consider adding the GCC fixes to the usability README though, that could be useful.
You are a true asset to this community!
4.4.103 has been merged in, with conflict notes updated accordingly.
Oh boy oh boy it might be time for a rebase for me
4.4.104 has been merged in, with conflict notes updated accordingly.
I truly apologize to anyone who was tracking the tree because I just force pushed. I decided to update the location and branch name and wanted everything to be consistent. It is now up to date with 4.4.105.
I have updated the OP with the notes and tree location. The new notes are on the staging branch right now, they will be merged into master once everything is finalized.
I'm sorry being out off topic, but can i use this https://github.com/android-linux-stable/msm-3.18 kernel source as base for my soc (msm8937) sir?
zainifame said:
I'm sorry being out off topic, but can i use this https://github.com/android-linux-stable/msm-3.18 kernel source as base for my soc (msm8937) sir?
Click to expand...
Click to collapse
Most likely yes. For the future, this thread is geared towards the generic CAF trees (msm-3.18 and msm-4.4). Feel free to ask me anything over there.
4.4.106 has been merged in (conflict notes).
4.4.107 has been merged in.
4.4.108 has been merged in.
4.4.109 has been merged in (conflict notes).
4.4.110 has been merged in (conflict notes).
I'm trying to build for a device that has no known Android 10 device trees that I can find. I think I fleshed out the trees pretty well by following some sister/cousin devices and extracting a lot of stuff from the rooted phone itself, but my build fails at 2% due to a missing output file. The missing libdss.so file should be built as part of the kernel (whose source I have), but the build clearly isn't happening (or isn't happening in time to be recognized by the build system.)
I tried to build the kernel as a standalone module to see what might be wrong, and in trying to do that I can't seem to resolve all the issues with dependencies for cross-compilation to arm64. I've built for devices with existing trees by cherry-picking what I needed, but I've never built for something from the ground-up like this. I don't want to make the ROM with a pre-built kernel as the end-goal would be to become official. The attached image is the exact error I'm receiving, and the following links are to all of my source repositories that I'm using in addition to the Lineage17.1 base. Any help would be appreciated. I work as a full-time dev by day, I don't mind slogging around in some code if that's what I takes, I've just reached the end of my troubleshooting knowledge here and am not sure what the next step might be.
https://github.com/polaarbear/android_device_motorola_troika_sprout
https://github.com/polaarbear/android_device_motorola_universal9610-common
https://github.com/polaarbear/android_vendor_motorola_universal9610-common
https://github.com/polaarbear/android_kernel_motorola_universal9610