Unified kernel for msm8974 devices
hi all
we are cooking 1 kernel for all msm8974 devices for all custom roms
Source
https://github.com/sonyxperiadev/kernel
feel free to fork, joyn and push back
XDA:DevDB Information
Unified kernel for msm8974 devices, Kernel for the Sony Xperia Z3 Compact
Contributors
jerpelea
Kernel Special Features:
Version Information
Status: Testing
Created 2014-10-31
Last Updated 2014-10-31
new guides published
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
kernel is rebased
z3 platform (shinano) added to kernel
https://github.com/sonyxperiadev/kernel/commits/aosp/LNX.LA.3.5.1-01110-8x74.0
status
z1 - bringup in progress
z2 - boots
z3 - boots
feel free to push fixes
Good news, thank you very much
Wow... Amazing now z3c is getting even better. Thanks
Does this mean we can plug the kernel into the Cyanogenmod ROM that already exists for the Z1C and use it in the Z3C?
No.
Jliax said:
Does this mean we can plug the kernel into the Cyanogenmod ROM that already exists for the Z1C and use it in the Z3C?
Click to expand...
Click to collapse
probably in cm12
and the ball continues rolling
http://developer.sonymobile.com/2014/11/06/android-5-0-xperia-z3-running-aosp/
br
J
jerpelea said:
and the ball continues rolling
http://developer.sonymobile.com/2014/11/06/android-5-0-xperia-z3-running-aosp/
br
J
Click to expand...
Click to collapse
Cheers! Is the Z3C also supported? I'm guessing yes, but it's not stated explicitly.
I am trying to follow the guide: How to build AOSP KitKat for unlocked Xperia devices
At - Initialise the AOSP tree, 4. Find the software binaries for the device you want to use on Sony’s AOSP for Xperia devices
There are no binaries for z3.
Can Software binaries for Xperia Z2, Xperia Z1 and Xperia Z be used?
Also, for unified kernel do we follow same steps as kernel-copyleft?
I.E. Replacing git clone https://github.com/sonyxperiadev/kernel-copyleft, [ branch 23.0.A.2.xxx], with https://github.com/sonyxperiadev/kernel, [ branch aosp/LNX.LA.3.5.1-01110-8x74.0 ]
And, do we use the same mkqcdtbootimg command offsets as the z2?
Found here - https://github.com/sonyxperiadev/kernel-copyleft/blob/23.0.A.2.xxx/README_Xperia:
Code:
$ mkbootimg --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0xb7 ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" \
--base 0x00000000 --kernel arch/arm/boot/zImage --ramdisk ramdisk.img \
--ramdisk_offset 0x02000000 -o boot.img --dt dt.img --tags_offset 0x01E00000
this thread is called unified kernel
not AOSP build !
please wait and stay on topic
ps.
there are not Z3 binaries yet
please stay tuned
br
J
https://github.com/sonyxperiadev/kernel, [ branch aosp/LNX.LA.3.5.2.2-03010-8x74.0]
which is default one is the branch that has all z1-z3 devices
Thank you for all the information and guides,
I found that a combination of both the guides and the readme files in github did the trick.
I successfully compiled the zImage and I was able to get the dt.img.
EDIT:
I was able to create boot.img after adding the generated ramdisk.img from successful compilation of AOSP
m0d said:
Thank you for all the information and guides,
I found that a combination of both the guides and the readme files in github did the trick.
I successfully compiled the zImage and I was able to get the dt.img.
EDIT:
I was able to create boot.img after adding the generated ramdisk.img from successful compilation of AOSP
Click to expand...
Click to collapse
is simple to copy dts and zimage in device folder before building aosp!
br
J
crash fixed
broadcom wifi crash fixed
Thank you.
jerpelea said:
is simple to copy dts and zimage in device folder before building aosp!
br
J
Click to expand...
Click to collapse
Do we have to add anything to any of the files in device folder, too?
And, should we remove kernel after we add dt.img and zImage to the device folder?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Also,
I tried using git init instead of clone for the kernel for easy sync of new changes, but I got
Code:
Checking out files: 100% (41715/41715), done.
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found
Will this affect anything in the build or can I continue with the same steps as before?
if you follow my kernel compile guide you will end up with both zimage and *.dts in arch/arm/boot/
copy them in device/sony/aries/
rename zImage as kernel
copy dts to dts folder
copy brcmdhd.ko to vendor/sony/aries/.....lib/modules/
replacing old files
recompile and you have new kernel in place
there is no need to make
dt.img or any other change !
br
J
m0d said:
Thank you.
Do we have to add anything to any of the files in device folder, too?
And, should we remove kernel after we add dt.img and zImage to the device folder?
Also,
I tried using git init instead of clone for the kernel for easy sync of new changes, but I got
Code:
Checking out files: 100% (41715/41715), done.
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found
Will this affect anything in the build or can I continue with the same steps as before?
Click to expand...
Click to collapse
Thank you for your time,
Just recompiled the kernel and i just want to clarify a few things:
jerpelea said:
if you follow my kernel compile guide you will end up with both zimage and *.dts in arch/arm/boot/
copy them in device/sony/aries/
Click to expand...
Click to collapse
You mean "*.dtb" as in "msm8974pro-ac-shinano_aries.dtb" ?
And I should copy it to "device/sony/aries/dtbs" folder replacing the "msm8974pro-ac-shinano_aries.dtb" with version gotten from kernel compilation
jerpelea said:
copy dts to dts folder
copy brcmdhd.ko to vendor/sony/aries/.....lib/modules/
replacing old files
recompile and you have new kernel in place
Click to expand...
Click to collapse
copy brcmdhd.ko from "kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko" and replace in "vendor/sony/aries/proprietary/lib/modules"
As for dts, there is only dtbs folder which contains "msm8974pro-ac-shinano_aries.dtb"
Do I create dts folder or copy all the contents of "kernel/arch/arm/boot/dts" to the dtbs folder?
m0d said:
Thank you for your time,
Just recompiled the kernel and i just want to clarify a few things:
You mean "*.dtb" as in "msm8974pro-ac-shinano_aries.dtb" ?
And I should copy it to "device/sony/aries/dtbs" folder replacing the "msm8974pro-ac-shinano_aries.dtb" with version gotten from kernel compilation
copy brcmdhd.ko from "kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko" and replace in "vendor/sony/aries/proprietary/lib/modules"
As for dts, there is only dtbs folder which contains "msm8974pro-ac-shinano_aries.dtb"
Do I create dts folder or copy all the contents of "kernel/arch/arm/boot/dts" to the dtbs folder?
Click to expand...
Click to collapse
replace old msm8974pro-ac-shinano_aries.dtb file , wifi module and kernel
br
J
Related
PS: No spam this topic please . Thanks !
I no write this ..
only redirect for galaxy y comunity .....
Full credits for http://forum.xda-developers.com/member.php?u=3544509
theard original http://forum.xda-developers.com/showthread.php?t=1877040
eagleeyetom said:
Pull request
If you feel that you have fixed a problem and want to help the developer to make his own ROM/kernel etc. you should consider to make a pull request. Pull request adds the changes you have made to the others repo.
First of all.
Fork and clone destined repo.
Check the previous post about forking and cloning.
Now make some changes and upload it to your own remote git.
Then, go to your forked repo using browser and click on Pull request.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then choose the account and branch to pull-request.
Click and wait for your request to be merged
Merging a pull request.
Sometimes someone wants to add something to your code.
You'll be notified by e-mail and also see the notification on your github website.
Go there and click Open
When the changes can't be merged you'll see such message:
But when it's green, you are ready to merge it
Don't forget to review the code. In other way you'll be forced to delete the commit.
You can also use text method:
Code:
git checkout master
[COLOR="DeepSkyBlue"]# Check out your master branch[/COLOR]
git remote add TeamFun git://github.com/TeamFun/android_packages_apps_Settings.git
[COLOR="deepskyblue"]# Add a new remote named 'TeamFun'[/COLOR]
git fetch TeamFun
[COLOR="deepskyblue"]# Pull in all the commits from the 'cameronmcefee' remote[/COLOR]
git merge TeamFun/gingerbread
[COLOR="deepskyblue"]# Merge your master branch into the 'gingerbread' branch from the 'TeamFun' remote[/COLOR]
git push [email protected]:eagleeyetom/android_packages_apps_Settings.git master
[COLOR="deepskyblue"]# Push your newly-merged branch back to GitHub[/COLOR]
or
Code:
git checkout master
[COLOR="DeepSkyBlue"]# Check out your master branch[/COLOR]
$ curl http://github.com/octocat/Spoon-Knife/pull/25.patch | git am
[COLOR="deepskyblue"]# Grab the patch generated by a pull request and feed it into a new commit[/COLOR]
$ git push [email protected]:eagleeyetom/android_packages_apps_Settings.git master
[COLOR="deepskyblue"]# Push your newly-updated commit back to GitHub[/COLOR]
TIPS AND TRICKS
REVERT CHANGES
To discard all unstaged changes e.g. failed merge etc. type:
Code:
git checkout .
# to delete all changes
git checkout path/to/file
# to discard changes for a specific file
You can also use:
Code:
rm -rf ./
[COLOR="Cyan"]# deletes all of the files in the directory[/COLOR]
git reset --hard
[COLOR="cyan"]#This is going to restore the git to the previous state[/COLOR]
HOW TO REMOVE COMMITTED CHANGES?
To remove committed changes you have to revert the commit. But how to do that? It's your answer
Code:
git reset HEAD --hard
HEAD is the previous commit. To revert to previous state use HEAD~1, HEAD~2 etc. you can also use the code taken from git log.
GIT PATCH AND GIT APPLY
Now I want to make a patch file to e.g. send an e-mail with my commited changes.
First I need to find a changes made by a commit. To do this I need to know commit ID.
Code:
git log --oneline #This would show the commit ID's
Now pick the commit for example 22a95d1 and use git show to make a patch
Code:
git show 22a95d1 > patchname.patch
And I got patch, but how to apply it?
The answer is easy. Use git apply.
Code:
git apply patchname.patch
# --check checks if the patch can be applied
FORCE PUSH
Sometimes github doesn't want to cooperate - just like some people
You can force it by adding --force or -f
Code:
git push -f [email protected]:eagleeyetom/android_packages_apps_Settings.git master
n00b method to add changes after failed push.
Clone the repo and delete everything but .git directory. Then copy modified content, commit and push
Click to expand...
Click to collapse
I no write this ..
only redirect for galaxy y comunity .....
Full credits for http://forum.xda-developers.com/member.php?u=3544509
theard original http://forum.xda-developers.com/showthread.php?t=1877040
Just noticed the post now ! gerat info
thanks !
Great Tutorial ...... :good::good:
Thanks
thanks sir
Sent from my GT-S5360 using Xparent ICS Tapatalk 2
can some one tell me how i merge the halo from PA ?
vladnosferatu said:
can some one tell me how i merge the halo from PA ?
Click to expand...
Click to collapse
:facepalm:
Check the commits
Download Resources of HALO App Implement them
I figured I'd post my sources to get the ROM development starting
Let's all share sources and post our fixes for bugs if we happen to fix one
device: https://github.com/JackpotClavin/android_device_moto_condor
vendor: https://github.com/JackpotClavin/android_vendor_moto_condor
kernel: https://github.com/JackpotClavin/kernel-msm
Shameless plug at my android blob utility: http://forum.xda-developers.com/showthread.php?t=2794413
Using those sources you should be able to build CM11, but I cannot say if it will work for other AOSP ROMs.
The only modifications you will have to make will to be to hardware/qcom/display/Android.mk just add "msm8610" as so:
-ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter msm8226 msm8610,$(TARGET_BOARD_PLATFORM)),)
Also, in hardware/qcom/media, git revert cf8408186605323a6797e5f431192ab434e79fff
How to build:
1. Type ". build/envsetup.sh
2. Type "brunch condor" and it should build!
I've only had the device for a little over a day, but what I have working so far:
Audio
Camera (video recording does not work yet)
Wifi
Sensors
May 25th: Video recording works now
May 26th: Bluetooth works now
I have the global device, but I live in the US so I cannot test whether the radio will work, but it appears that it *might* work, the baseband and everything shows, but I don't have a sim to test
I'm sure there are a lot of things in the ROM that aren't needed, like some daemons and services that I don't know are useless.
Hey, just released my trees as well. They're going to be useless if you try building mine, as you need to fetch the AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.020 display and media folders, call them caf-new, and patch them to build on cm.
https://github.com/cybojenix/android_device_motorola_msm8610-common
https://github.com/cybojenix/android_device_motorola_condor
https://github.com/cybojenix/vendor_motorola
Can I compile Carbon rom without the kernel sources? Can I follow steps in the 1st post for compiling any after market firmware?
aniket.lamba said:
Can I compile Carbon rom without the kernel sources? Can I follow steps in the 1st post for compiling any after market firmware?
Click to expand...
Click to collapse
No..! It won't work I think because it is CyanogenMod based ROM which cannot be built without a special kernel which supports 'clocking' and has many other special features that CM adds to it. I am not sure, but I have read this at some website.
Forever Alone said:
No..! It won't work I think because it is CyanogenMod based ROM which cannot be built without a special kernel which supports 'clocking' and has many other special features that CM adds to it. I am not sure, but I have read this at some website.
Click to expand...
Click to collapse
So can I build any ROM which doesn't require kernel sources? Need to build and post some ROMs before I get my Moto E.
aniket.lamba said:
So can I build any ROM which doesn't require kernel sources? Need to build and post some ROMs before I get my Moto E.
Click to expand...
Click to collapse
Yeah, MiUi and Chinese ROMs like that does not require custom kernel. However, try building the kernel. Just add some governors and some tweaks. Try yourself making the CM ROM without Kernel source, maybe it will boot! Best of Luck.
Forever Alone said:
Yeah, MiUi and Chinese ROMs like that does not require custom kernel. However, try building the kernel. Just add some governors and some tweaks. Try yourself making the CM ROM without Kernel source, maybe it will boot! Best of Luck.
Click to expand...
Click to collapse
Alright I'll see to it.
Forever Alone said:
No..! It won't work I think because it is CyanogenMod based ROM which cannot be built without a special kernel which supports 'clocking' and has many other special features that CM adds to it. I am not sure, but I have read this at some website.
Click to expand...
Click to collapse
The whole thread is based on CM with the prebuilt kernel and it boots fine. I'm using it right now. Every ROM should work using my sources.
Sent from my Moto E using XDA Free mobile app
JackpotClavin said:
I figured I'd post my sources to get the ROM development starting
Let's all share sources and post our fixes for bugs if we happen to fix one
device: https://github.com/JackpotClavin/android_device_moto_condor
vendor: https://github.com/JackpotClavin/android_vendor_moto_condor
Until we get kernel source, we will have to clone codeaurora.org/quic/la/kernel/msm in kernel/moto/condor and checkout the tag AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.020
Shameless plug for my android blob utility: https://github.com/JackpotClavin/Android-Blob-Utility
Using those sources you should be able to build CM11, but I cannot say if it will work for other AOSP ROMs.
The only modification you will have to make will to be to hardware/qcom/display/Android.mk just add "msm8610" as so:
-ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter msm8226 msm8610,$(TARGET_BOARD_PLATFORM)),)
How to build:
1. First, you must uncomment the TARGET_KERNEL_SOURCE and TARGET_KERNEL_CONFIG in the BoardConfig.mk
2. Then must first build any library that will export the kernel header, so after typing "lunch cm_condor-userdebug" type "make hwcomposer.msm8610"
3. hwcomposer.msm8610 should be built, as well as a bunch of other libraries, this may take about 10 mins
4. Now we comment out TARGET_KERNEL_SOURCE and TARGET_KERNEL_CONFIG in BoardConfig.mk. This will trick the build system into exporting our kernel headers (step 2 performed this) then we go back to the prebuilt kernel since we do not have sources to build from.
5. Type "brunch condor" and it should build!
I've only had the device for a little over a day, but what I have working so far:
Audio
Camera (video recording does not work yet)
Wifi
Sensors
May 25th: Video recording works now
May 26th: Bluetooth works now
I have the global device, but I live in the US so I cannot test whether the radio will work, but it appears that it *might* work, the baseband and everything shows, but I don't have a sim to test
I'm sure there are a lot of things in the ROM that aren't needed, like some daemons and services that I don't know are useless.
Also, since we have no kernel source yet, we have to copy the prebuilt modules into the ROM, and use the /module_hashes crap in order to insmod a kernel module (wlan particularly)
Click to expand...
Click to collapse
Bro please upload the kernel sources to devhost or mediafire .
Thanks in advance
Sent from my XT1022 using XDA Free mobile app
There are no kernel sources out yet for the Moto E
Just git clone the caf repository and checkout the correct tag mentioned in the OP
Looks like kernel sources are up! I'm gonna build with the kernel to ensure everything is working in my build tree
JackpotClavin said:
Looks like kernel sources are up! I'm gonna build with the kernel to ensure everything is working in my build tree
Click to expand...
Click to collapse
Bro can you give me the kernel source code download link ???
Sent from my XT1022 using XDA Free mobile app
https://github.com/MotorolaMobilityLLC/kernel-msm
Checkout the kitkat-mr1-rel-condor branch
Sent from my Moto E using XDA Free mobile app
JackpotClavin said:
https://github.com/MotorolaMobilityLLC/kernel-msm
Checkout the kitkat-mr1-rel-condor branch
Sent from my Moto E using XDA Free mobile app
Click to expand...
Click to collapse
Let's start compiling a kernel with features packed in!
So anyone compiled the kernel sources??
If you use the github repositories from the OP you can compile an entire CM ROM with all of the things working in the OP
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Oh wow.... Let's begin the party...
Sent from my XT1022 using XDA Free mobile app
What fun! I've just rooted, xposed, added gravity box and xprivacy. What I'm dying to get working is call recording, but that's always a no go with Motorola phones
Sent from my XT1022 using XDA Free mobile app
Can anyone provide me with the stock kernel? The boot.img is what I'm asking for.
InfinityShooter said:
Can anyone provide me with the stock kernel? The boot.img is what I'm asking for.
Click to expand...
Click to collapse
Here You Go .......
boot.img Of Moto E......
Hello everyone,
I'm excited to announce my kernel for the P6000 Pro, whooohooo! It is basically stock with 1.5 Ghz for now but my tester @Nikolaosf is currently testing the DoubleTap2Wake build, so this will probably come soon as well to this device.
The usual disclaimer applies:
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications.breaks
*/
Changelog:
Code:
0.7:
* 1,5 GHz Overclocking!
Source: https://github.com/visi0nary/android_kernel_elephone_p8000
How to install:
Either use rashr or unlock fastboot and follow these steps:
1. Download kernel
2. Go to download directory.
3. Reboot device into fastboot mode.
4. Type "fastboot flash boot visi0narys_kernel_p6000_pro_vx.x.img"
Props fly out to to:
* carliv, I learned a lot from you!
* Eugen, for the Skype support and for being an awesome guy!
* showp, thanks for DT2W!
* @Nikolaosf for testing over and over again!
* everyone else I forgot
Q&A:
Can I still use 1.3 GHz as maximum frequency?
-> Yep, just limit it manually. A convenient way to do this is the app Trickster Mod for example.
I'm excited to get feedback so please report back if you find any issues but please let me also know if everything works
Please note that I don't own the device and am building blindly, so leave feedback if something is broken! The kernel is built from P8000 sources and I'd like to port my work to the P6000 Pro.
It is working perfectly the oc 0.7v...thanks thanks thanksss!!!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Testing DT2W
Nice one @BlueFlame4.
It would be great to see DoubleTap2Wake. The P6000 Pro also has the bug where the capacitive buttons will wake the phone (They don't wake the phone when it's been freshly booted, only after a certain period of up time). I believe you addressed that on the P8000 kernel?
Here is my test on my P6000 Pro running stock 5.1 ROM:
Trickster MOD reports max frequency of 1495MHz
AnTUTu Benchmark 5.7.1 64 bit
Stock kernel:
36157
35860
visi0nary's 0.7 kernel:
37452
37152
I will report back any other observations.
Try geekbench too
Nikolaosf said:
Try geekbench too
Click to expand...
Click to collapse
No need to duplicate your results everything is working OK and your results look good
How is your testing of DT2W going?
Martin
Just wanted to see if the dif of before and after is such as small like mine..
.
Not yet DT2W... Blue is working on cm at most this time
my p8000 port to p6000pro
http://forum.xda-developers.com/android/development/rom-18-11-eragon-v1-0-p6000-pro-android-t3251881
@BlueFlame4, There is commit 66de890a92e172155c54e860896e6fe03761a5da in visi0nary kernel repo on github.
Merge pull request #1 from Netmatrix/patch-1
Update gt9xx_driver.c to enable touch in recovery!
Click to expand...
Click to collapse
https://github.com/visi0nary/androi...mmit/66de890a92e172155c54e860896e6fe03761a5da
It's essential, because it enable touch in recovery mode, thus it would be possble to have working TWRP on P6000 Pro.
Can I kindly ask you to build a fresh version of visi0nary's kernel for P6000 Pro with this commit applied.
Thanks in advance.
lion567 said:
@BlueFlame4, There is commit 66de890a92e172155c54e860896e6fe03761a5da in visi0nary kernel repo on github.
https://github.com/visi0nary/androi...mmit/66de890a92e172155c54e860896e6fe03761a5da
It's essential, because it enable touch in recovery mode, thus it would be possble to have working TWRP on P6000 Pro.
Can I kindly ask you to build a fresh version of visi0nary's kernel for P6000 Pro with this commit applied.
Thanks in advance.
Click to expand...
Click to collapse
Don't have time for these things now but the defconfig is online so feel free to build it The OC is only visual btw so this kernel is basically useless now. Will add DT2W one day though BTW I am visi0nary on GitHub so I know what commit you're talking about, haha.
BlueFlame4 said:
Don't have time for these things now but the defconfig is online so feel free to build it The OC is only visual btw so this kernel is basically useless now. Will add DT2W one day though BTW I am visi0nary on GitHub so I know what commit you're talking about, haha.
Click to expand...
Click to collapse
Sorry for a newbie question, but what is the different between a P6000 Pro and P8000 boot.img file?
When you say 'build' - is it unpacking the P8000 boot.img you created, and repack for P6000 Pro? Or does it need to be compiled from the Github source for P6000 Pro?
blahmartinblah said:
Sorry for a newbie question, but what is the different between a P6000 Pro and P8000 boot.img file?
When you say 'build' - is it unpacking the P8000 boot.img you created, and repack for P6000 Pro? Or does it need to be compiled from the Github source for P6000 Pro?
Click to expand...
Click to collapse
No worries, asking questions is the best way to learn
The kernel has to be compiled again as the configs differ because of different hardware. Afterwards it is repacked into its own ramdisk, yep.
BlueFlame4 said:
No worries, asking questions is the best way to learn
Click to expand...
Click to collapse
:good:
Can you provide me with correct commands sequence for compiling kernel for P6000 Pro after I cloned your repo with git?
It seems, that
Code:
lunch k01ts_a
make bootimage
shouldn't work
lion567 said:
:good:
Can you provide me with correct commands sequence for compiling kernel for P6000 Pro after I cloned your repo with git?
It seems, that
Code:
lunch k01ts_a
make bootimage
shouldn't work
Click to expand...
Click to collapse
Well, I build the kernel standalone for now so without importing it into CMs build chain.
Code:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- xxxxxx_defconfig
Sets up your kernel config.
Code:
make -jX
Compiles with X cores. Defconfigs can be found unter arch/arm64/configs and the resulting image is under arch/arm64/boot (it's the dtb one). If it doesn't work right away you gotta set $ARCH to arm64.
Depending on what toolchain you use you have to add it to your $PATH.
Happy hacking!
Thanks @BlueFlame4
I was trying to get that to build last night too. Appreciate your help! I will try again later with thus new knowledge.
Martin
BlueFlame4 said:
Well, I build the kernel standalone for now so without importing it into CMs build chain.
Code:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- xxxxxx_defconfig
Sets up your kernel config.
Code:
make -jX
Compiles with X cores. Defconfigs can be found unter arch/arm64/configs and the resulting image is under arch/arm64/boot (it's the dtb one). If it doesn't work right away you gotta set $ARCH to arm64.
Depending on what toolchain you use you have to add it to your $PATH.
Happy hacking!
Click to expand...
Click to collapse
Thanks a lot!
k01ts_a_defconfig is correct defconfig for building P6000 Pro kernel isn't it?
lion567 said:
Thanks a lot!
k01ts_a_defconfig is correct defconfig for building P6000 Pro kernel isn't it?
Click to expand...
Click to collapse
Yes if I recall correctly. But you can easily find it out - e.g. in build.prop or just from the file name from original ROMS.
Thank you!
BlueFlame4 said:
Yes if I recall correctly. But you can easily find it out - e.g. in build.prop or just from the file name from original ROMS.
Click to expand...
Click to collapse
Yes P6000 Pro has k01ts_a name in stock build.prop
Code:
ro.product.device=k01ts_a
but there are several defconfig files with similar names, so I was in doubt.
Finally I've managed to buid fresh kernel for P6000 Pro from your repo succesfully! Thank you very much!
I've repacked PhilZ 6 image (which I've already used with hardware buttons only) with this fresh kernel and it became fully touchable!!! :good:
And AromaFM filemanager for recovery also works fine with touch now!
lion567 said:
Yes P6000 Pro has k01ts_a name in stock build.prop
Code:
ro.product.device=k01ts_a
but there are several defconfig files with similar names, so I was in doubt.
Finally I've managed to buid fresh kernel for P6000 Pro from your repo succesfully! Thank you very much!
I've repacked PhilZ 6 image (which I've already used with hardware buttons only) with this fresh kernel and it became fully touchable!!! :good:
And AromaFM filemanager for recovery also works fine with touch now!
Click to expand...
Click to collapse
can you please share your kernel with this touch recovery?
lion567 said:
Yes P6000 Pro has k01ts_a name in stock build.prop
Code:
ro.product.device=k01ts_a
but there are several defconfig files with similar names, so I was in doubt.
Finally I've managed to buid fresh kernel for P6000 Pro from your repo succesfully! Thank you very much!
I've repacked PhilZ 6 image (which I've already used with hardware buttons only) with this fresh kernel and it became fully touchable!!! :good:
And AromaFM filemanager for recovery also works fine with touch now!
Click to expand...
Click to collapse
\o/ Yay! Congrats!
jozsi76 said:
can you please share your kernel with this touch recovery?
Click to expand...
Click to collapse
Surely, but in another thread. Look here http://forum.xda-developers.com/showpost.php?p=64038183&postcount=52
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DragonTC is a build system for compiling custom clang toolchains. These toolchains contain some AOSP patches(where applicable) and things not included in AOSP clang, such as LTO and Gold plugins, and OpenMP, Polly compiled and automatically linked into tools, improved krait optimizations (-mcpu=krait2), and annoying flags such as -Werror, -Wfatal-errors, and -Weverything internally disabled for non-default parameters. DragonTC compilers are also built with -O3, -pthread, and -fopenmp in order to reduce compile time when used for ROMs. DragonTC has been around for a few months now, but now that some testers have helped me work out the bugs and make it close to stable, I've decided to make an XDA thread.
Why use custom Clang?
Google has been slowly moving away from GCC for a while now, so we believe that we should get ahead of the toolchain game and start now! Furthermore, AOSP modules that are compiled with clang can easily be optimized with the new LTO and Polly options.
How do I build DragonTC?
It's simple! Run the following commands in bash to get set up:
Code:
$ mkdir dtc
$ cd dtc
$ repo init -u https://github.com/dragon-tc/DragonTC -b master
$ repo sync -j(# of cores) -c -f
For Debian and Ubuntu:
Code:
sudo aptitude install build-essential git git-svn bc binfmt-support libllvm-3.6-ocaml-dev llvm-3.6 llvm-3.6-dev llvm-3.6-runtime cmake automake autogen autoconf autotools-dev libtool shtool python m4 gcc libtool zlib1g-dev
And run the following to build your desired toolchain:
Code:
$ cd build
$ ./version
Where "version" is 3.6. 3.7, 3.8, or 3.9.
To optimize the toolchain for your local system, run with the 'opt' argument. Example:
Code:
$ ./3.7 opt
How do use DragonTC in AOSP?
Either clone a prebuilt or build your own toolchain and place it in prebuilts/clang/linux-x86/host/your_version (3.7 is the prefered version)
Change the version in build/core/clang/config.mk to reflect the directory you placed it in.
Either clone ours, or cherry-pick our changes to prebuilts/ndk and frameworks/rs.
Cherry-pick our DragonTC support commit in build.
Edit build/core/clang/config.mk and set "TARGET_DRAGONTC_VERSION := " to the name of the folder you placed the toolchain in (your_version is the example used above)
How can I fix module issues when compiling with Polly?
It's simple. Just take the module name (ex. "target C++: module_name_here <= some/path/to/code") and add it to the DISABLE_POLLY list. You can also disable Clang all together, use AOSP clang, or force GCC modules to use Clang.
Why call it DragonTC?
The LLVM logo/mascot is a dragon, so in homage to the developers of LLVM and Clang, I used DragonTC as the name.
Credits
A huge thanks to all of the people who helped:
xboxfanj for recreating the Snapdragon Compiler optimizations
xanaxdroid for maintenance, bug fixes, and testing
The LLVM developers for the great work and continuous improvement
All of the great devs/rom builders that helped test
and anyone that I missed!
XDA:DevDB Information
DragonTC, Tool/Utility for the Android General
Contributors
frap129, xanaxdroid
Source Code: https://github.com/dragon-tc
Version Information
Status: Beta
Created 2016-02-19
Last Updated 2016-05-21
Reserved
Reserved
Great....
Minions_Army said:
Great....
Click to expand...
Click to collapse
Thanks?
This sounds interesting. Thanks for sharing your work. I might try it, but as a bloody beginner, can you maybe give a bit more detail on how it affects building / the result?
Adromir said:
This sounds interesting. Thanks for sharing your work. I might try it, but as a bloody beginner, can you maybe give a bit more detail on how it affects building / the result?
Click to expand...
Click to collapse
Once I get a bit more time, I'll edit the op to have more information. In short, Clang is a compiler (like GCC) that is rapidly growing. Google is currently using Clang 3.6 which produces binaries that perform slower than GCC compiled binaries, but they choose to use Clang because it takes less time to compile overall. DragonTC allows you to use the latest Clang toolchains (3.6, 3.7, 3.8, or 3.9) with extra functionality that Google doesn't have, such as LTO, Polly, OpenMP, and Snapdragon Krait optimizations. These make your rom (or anything you compile with it) perform better than if you were to use the stock AOSP clang.
Thanks for clarification. I will try it in a few days and see how well it works
Thank you. just building dragon tc.
sub77 said:
Thank you. just building dragon tc.
Click to expand...
Click to collapse
Let me know how it goes!
http://pastebin.com/z9G5Pr0S using 3.7 and your sabernaro 4.9 rom/kernel tc. any ideas?
http://pastebin.com/z9G5Pr0S using your sabernaro 4.9 rom and kernel repos. Cloned ndk from op, and picked build/rs commits from op. Any ideas? Aosp source.
Edit; readding the triple flags and rebuilding c, same error.
edit: sry double post
Edit. Its handled. Ty, 1000% improvement.
so i'm getting this error http://pastebin.com/tBz7DcFQ
from the error log it seems the libRSCpuRef about ARM mode, so i try to disable it. but then i saw the arm modes is already whitelisted from arm mode.
did i miss something? thanks.
Why was arm mode disabled by default? Would like to give it a try, but I'm assuming there was a reason for disabling it.
brandonabandon said:
http://pastebin.com/z9G5Pr0S using your sabernaro 4.9 rom and kernel repos. Cloned ndk from op, and picked build/rs commits from op. Any ideas? Aosp source.
Edit; readding the triple flags and rebuilding c, same error.
edit: sry double post
Edit. Its handled. Ty, 1000% improvement.
Click to expand...
Click to collapse
can you share how do you fix the compiling error?
i got the same error
iskandar1023 said:
can you share how do you fix the compiling error?
i got the same error
Click to expand...
Click to collapse
Follow us https://github.com/ScrewdAOSP you will need dtc commits from build, fw/base, support and rs. Also ndk, llvm, and png. Gl
Got into https://gist.github.com/spezi77/9953b7a3ea25ee83baa1 when using 3.9 and using UBER GCC 5.3 for kernel. CM based ROM. Any ideas?
Edit: Got it solved. Was unrelated to dragon tc.
Big thanks to the dev for this evolutionary TC! In my device the rom feels much snappier now, even when Antutu does not reflect this observation in higher scoring. Benchmark is pretty much the same as before. But maybe I didn't understand the concepts well enough and this is how we should expect it.
DragonTC allows you to use the latest Clang toolchains (3.6, 3.7, 3.8, or 3.9) with extra functionality that Google doesn't have, such as LTO, Polly, OpenMP, and Snapdragon Krait optimizations. These make your rom (or anything you compile with it) perform better than if you were to use the stock AOSP clang.
Click to expand...
Click to collapse
@frap129 Did you or someone else do benchmarks to check whether a rom compiled with the latest Clang toolchains actually perform better than if we use one of the latest GCC tc, e.g. 5.3?
Hello @frap129 @brandonabandon after switching to dragonTC i get the following error:
Code:
build/core/dynamic_binary.mk:20: *** external/compiler-rt/lib/asan: LOCAL_MODULE not defined before call to local-intermediates-dir. Stop.
I am building for lollipop so the code is here
I am using prebuilt 3.7 and the patches to platform build which you can see here
Any help would be greatly appreciated.
iskandar1023 said:
so i'm getting this error http://pastebin.com/tBz7DcFQ
from the error log it seems the libRSCpuRef about ARM mode, so i try to disable it. but then i saw the arm modes is already whitelisted from arm mode.
did i miss something? thanks.
Click to expand...
Click to collapse
I have only had one tester get this error, and we were unable to find the origin. Seems to only happen on CM based Roms.
Hello to all. I hope someone can help me.
Background: I am a relatively experienced programmer. I have been programming with C/C++ (and other) in Linux for the last 6 years or so. However I have never dived in Linux Kernel development yet. So I would appreciate some help from anyone that can help me.
Goal: My goal is to learn more about Linux Kernel development. I want to start from my beloved G2, which is approaching its usage EOL. The device is fine, but I am planning on investing on a new one, so I will be able to squeeze it as much as I want.
I want to create a clean kernel for AOSP (CAF) based versions of Android. My vision is to start with a clean CAF base (without CM patches, etc) and bring it up-to-date till Linux 3.4.113 and manage it to boot. Then start backporting code, enhancements, etc. and making tests.
I searched in CAF repositories and I found them to be a mess. Can someone who is experienced with how things work point to the latest clean CAF source for msm8974?
I also want to hear anyone's thoughts on the attempt. Thanks ahead and regards.
Maybe @GalaticStryder, you can give me some guidelines. Deeply appreciated.
errikosd said:
Hello to all. I hope someone can help me.
Background: I am a relatively experienced programmer. I have been programming with C/C++ (and other) in Linux for the last 6 years or so. However I have never dived in Linux Kernel development yet. So I would appreciate some help from anyone that can help me.
Goal: My goal is to learn more about Linux Kernel development. I want to start from my beloved G2, which is approaching its usage EOL. The device is fine, but I am planning on investing on a new one, so I will be able to squeeze it as much as I want.
I want to create a clean kernel for AOSP (CAF) based versions of Android. My vision is to start with a clean CAF base (without CM patches, etc) and bring it up-to-date till Linux 3.4.113 and manage it to boot. Then start backporting code, enhancements, etc. and making tests.
I searched in CAF repositories and I found them to be a mess. Can someone who is experienced with how things work point to the latest clean CAF source for msm8974?
I also want to hear anyone's thoughts on the attempt. Thanks ahead and regards.
Click to expand...
Click to collapse
I think the pure branch in GalaticStryder's Github is pure caf kernel, I don't think he added anything.
shaneel1491 said:
I think the pure branch in GalaticStryder's Github is pure caf kernel, I don't think he added anything.
Click to expand...
Click to collapse
Unfortunately, I think that that branch does not exist anymore. Except if it is now called "marshmallow-caf".
errikosd said:
Unfortunately, I think that that branch does not exist anymore. Except if it is now called "marshmallow-caf".
Click to expand...
Click to collapse
It could be, not sure though.. I did download the source when he had it, I can zip and upload if you need?
Edit: nevermind, I forked his source a while back. Here https://github.com/shack-32/kernel_lge_msm8974/tree/pure
Also when I built it, as well as when he built, the mpdecision seems to be busted on boot, so the cores won't hotplug, you can enable it by looking in /sys directory and echo '1' for the mpdecision file.
shaneel1491 said:
It could be, not sure though.. I did download the source when he had it, I can zip and upload if you need?
Edit: nevermind, I forked his source a while back. Here https://github.com/shack-32/kernel_lge_msm8974/tree/pure
Also when I built it, as well as when he built, the mpdecision seems to be busted on boot, so the cores won't hotplug, you can enable it by looking in /sys directory and echo '1' for the mpdecision file.
Click to expand...
Click to collapse
Thanks a lot! I believe this would be a good start.
I will try and pair it with anykernel packager and enable mpdecision on boot.
errikosd said:
Thanks a lot! I believe this would be a good start.
I will try and pair it with anykernel packager and enable mpdecision on boot.
Click to expand...
Click to collapse
Cool, good luck with it!
Well, I'd first need to explain some other stuff first before you get started
The CAF release for MSM8974 Kernel is oddly one of the no longer maintained ones: LA.BF.1.1.1.x.
To initialize a brand new clean Kernel you'd need to pull the CAF source code and copy the plain LGE Kernel code from the latest release they pushed which is if I'm not mistaken D80230F, then diff it to see what has got replaced and get it back, adapting the code manually on top of the recently merged LGE source code.
This would basically be the first step, then you'd head over to compilation fixes, create the scripts and the tools to bump the image and flash it to see if it boots.
To support more devices you'd need to merge the other variants as well from LGE source code and then do the same as before...
This doesn't make sense since you'd be getting an old Kernel from CAF and yet an older one from LGE. The little updates made on top of the first CyanogenMod 12.1 (CAF Kernel) were very basic and were caught already either by CM itself on their Kernel tree or mine.
Then you'd go forward to merging the kernel-common updates for 3.4.y coming from Google source code and then head over to update the base Linux Kernel version, fix compilation and such...
Since all this is done already, all you'd need is forking the Kernel at 3.4.110 and cherry-pick the selected changes you'd like up to 3.4.113 and compile using my scripts and all that...
The HEAD for that is c8bd789d12f8299db2e5a319abeb4a95df9078b6 and you're set to freely modify it the way you think should be done...
This is the lazy way of course but a great start...
GalaticStryder said:
Well, I'd first need to explain some other stuff first before you get started
The CAF release for MSM8974 Kernel is oddly one of the no longer maintained ones: LA.BF.1.1.1.x.
To initialize a brand new clean Kernel you'd need to pull the CAF source code and copy the plain LGE Kernel code from the latest release they pushed which is if I'm not mistaken D80230F, then diff it to see what has got replaced and get it back, adapting the code manually on top of the recently merged LGE source code.
This would basically be the first step, then you'd head over to compilation fixes, create the scripts and the tools to bump the image and flash it to see if it boots.
To support more devices you'd need to merge the other variants as well from LGE source code and then do the same as before...
This doesn't make sense since you'd be getting an old Kernel from CAF and yet an older one from LGE. The little updates made on top of the first CyanogenMod 12.1 (CAF Kernel) were very basic and were caught already either by CM itself on their Kernel tree or mine.
Then you'd go forward to merging the kernel-common updates for 3.4.y coming from Google source code and then head over to update the base Linux Kernel version, fix compilation and such...
Since all this is done already, all you'd need is forking the Kernel at 3.4.110 and cherry-pick the selected changes you'd like up to 3.4.113 and compile using my scripts and all that...
The HEAD for that is c8bd789d12f8299db2e5a319abeb4a95df9078b6 and you're set to freely modify it the way you think should be done...
This is the lazy way of course but a great start...
Click to expand...
Click to collapse
So that HEAD has to be the cleanest "working" snapshot I can get, right?
Thanks a lot for outlining the procedure and giving me the boost I needed. It will be definitely easier to get started now.
errikosd said:
So that HEAD has to be the cleanest "working" snapshot I can get, right?
Thanks a lot for outlining the procedure and giving me the boost I needed. It will be definitely easier to get started now.
Click to expand...
Click to collapse
Yes, it's pretty clean. Make sure you clean anykernel too.
There's a lot of work for developing kernels! I would like to learn how to do step by step, but i think i have a lot of things that i must learn before starting developing a kernel... As languages i'm learning C, but i don't know other...
matteo0026 said:
There's a lot of work for developing kernels! I would like to learn how to do step by step, but i think i have a lot of things that i must learn before starting developing a kernel... As languages i'm learning C, but i don't know other...
Click to expand...
Click to collapse
Building a kernel is not too hard, adding stuff is a bit tougher. You should start but simply downloading the source of a kernel already found on GitHub. There are various guides on xda that teach you how to build. Once you are comfortable with building you can go on to adding governors and many other tweaks, that's where commits come into play as it makes everything easier to add stuff.
This is a simple tutorial, try look for some more as well http://forum.xda-developers.com/showthread.php?t=2152819
shaneel1491 said:
Building a kernel is not too hard, adding stuff is a bit tougher. You should start but simply downloading the source of a kernel already found on GitHub. There are various guides on xda that teach you how to build. Once you are comfortable with building you can go on to adding governors and many other tweaks, that's where commits come into play as it makes everything easier to add stuff.
This is a simple tutorial, try look for some more as well http://forum.xda-developers.com/showthread.php?t=2152819
Click to expand...
Click to collapse
I'm yet blocked on one step of guide... i can't find only one file g2_blablabla.deconfig...
matteo0026 said:
I'm yet blocked on one step of guide... i can't find only one file g2_blablabla.deconfig...
Click to expand...
Click to collapse
It's not actually named blablabla, the defconfig directory is basically the insturctions to build for all the different devices, so it should be g2_d802.defconfig or something along those lines for D802, as long as it has your device name, for example when Dorimanx builds, his file would be (https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/tree/LG-STOCK-KK/arch/arm/configs) -> dorimanx_d802_defconfig
The defconfig file is found in /arch/arm/configs directory
shaneel1491 said:
It's not actually named blablabla, the defconfig directory is basically the insturctions to build for all the different devices, so it should be g2_d802.defconfig or something along those lines for D802, as long as it has your device name, for example when Dorimanx builds, his file would be (https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/tree/LG-STOCK-KK/arch/arm/configs) -> dorimanx_d802_defconfig
The defconfig file is found in /arch/arm/configs directory
Click to expand...
Click to collapse
Ok, then there isn't nothing of d802_something_deconfig
See this too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
matteo0026 said:
Ok, then there isn't nothing of d802_something_deconfig
See this tooView attachment 3929508
Click to expand...
Click to collapse
Which repo did you download source from. You can use the d802 config one from my forked version of galatic's pure branch
https://github.com/shack-32/kernel_lge_msm8974/tree/pure/arch/arm/configs
Dori's config is named: dorimanx_d802_defconfig
shaneel1491 said:
Which repo did you download source from. You can use the d802 config one from my forked version of galatic's pure branch
https://github.com/shack-32/kernel_lge_msm8974/tree/pure/arch/arm/configs
Dori's config is named: dorimanx_d802_defconfig
Click to expand...
Click to collapse
Ok, maybe the problem is that i took full stock sources kernel from opensource.lge.com ... Then now i try to do the same thing with lambda sources...?
matteo0026 said:
Ok, maybe the problem is that i took full stock sources kernel from opensource.lge.com ... Then now i try to do the same thing with lambda sources...
Click to expand...
Click to collapse
Hmmm, as far as I know you might run into problems building LG provided ROM for an AOSP/CM rom, so if you follow the same process with caf kernel it should work.
shaneel1491 said:
Hmmm, as far as I know you might run into problems building LG provided ROM for an AOSP/CM rom, so if you follow the same process with caf kernel it should work.
Click to expand...
Click to collapse
Ok then must i take a CAF kernel? Can i take lambda kernel?
matteo0026 said:
Ok then must i take a CAF kernel? Can i take lambda kernel?
Click to expand...
Click to collapse
Either, lambda is a modified caf version