[Kernel Source / Tutorial] Custom Kernel 101 - Galaxy Note 4 Unified Development

This thread is NOT for general Q & A about using the kernel or configuring a specific version.
This thread IS for sharing source code or attempting to apply debugging to code changes.
In English: This is what a development thread really looks like. No downloads, No user manual.
Note to Mods: OT is welcome, so long as it is relevant to the kernel developer experience
Building the kernel 101:
A clean branch with only the build tools, ramdisks, and MacOS updates is at:
https://github.com/StarKissed/starkissed-kernel-trlte/tree/master
The stockish branch adds Linux patches, mainline updates, and SELinux mods
The deported branch is the customized version described in the OP feature list
You are going to need a few things, especially if building this kernel for MacOS.
GCC 4.7 (This is the version Samsung's documentation listed)
An updated mkbootimg (Must have DTS support)
A dtbtool (Included in the source, but only for Linux)
Insomnia (Not a requirement, but it will help you in the long run)
For MacOS, the tools are available from the following repositories:
https://github.com/StarKissed/android-toolchain-eabi-4.7
https://github.com/StarKissed/starkissed-build-tools
Let's jump ahead a moment for those of you who have built kernels and notice your boot.img is only around 11 MB while the versions you see listed here are all roughly 14 MB. This is where the new mkbootimg and dtbtool are necessary.
Attempting to retrieve the commandline arguments from the boot.img will not tell you one important piece:
Code:
./dtbtool -o dt.img -s 4096 -p ../scripts/dtc/ ../arch/arm/boot/dts/
chmod a+r dt.img
mkbootfs (ramdisk creation)
mkbootimg (mkbootimg params) --dt dt.img
This takes the DTSI that was built into a dtb as one of the first steps in the compile process and turns it into an image that is appended to the end of the boot.img. The dt.img just happens to be about 3 MB. (11 MB + 3 MB = 14 MB)
If you grabbed the original Samsung kernel source, you may notice that their default compile script directs the build to an "out" folder in the root of the kernel directory.
The obvious advantage to this is that their clean command runs into some errors, so the clean process is simply deleting the "out" folder and making a new one.
This doesn't work for a lot of the custom components you may want to add to your kernel, though. Some modifications, such as intelli-thermal, rely on a subdirectory that is referenced in the Makefile.
Building to this out folder will result in an error because it cannot find the output of that component, but building in the tree, or actual source, will also result in an error. The lesser of two evils is to fix in-tree builds.
Code:
Instructions for TRACE_INCLUDE_FILE in include/trace/define_trace.h say
"the path is relative to define_trace.h, not the file including it".
Fix in-tree compilation by making the path relative to define_trace.h.
What this means is that when you have a line that refers to the TRACE_INCLUDE_PATH or an include reference to a file that uses a relative location instead of a global, these need to be updated
The only two files that currently require updates in the stock source code are
Code:
drivers/scsi/ufs/ufs_test.c
#include -> #include "../sd.h"
and
Code:
drivers/video/msm/mdss/mdss_mdp_trace.h
#define TRACE_INCLUDE_PATH . -> #define TRACE_INCLUDE_PATH ../../drivers/video/msm/mdss/
If you want to be able to debug your kernel, you will need to enable last_kmsg.
Open up the arch/arm/configs/apq8084_sec_defconfig and add
Code:
CONFIG_SEC_DEBUG_NOCACHE_LOG_IN_LEVEL_LOW=y
CONFIG_PRINTK_PROCESS=y
CONFIG_SEC_DEBUG_LOW_LOG=y
More to come soon...

This is a great idea!
Looking fwd to seeing this thread take off...it will be very interesting for sure.
Sent from my SM-N910W8 using Tapatalk 2

@ktoonsez im back ready to play my man 
 @twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions

friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
I use git am -3 so that any issue defaults to a merge then git mergetool to resolve it.
Switching the index in the dtsi that was modified was the only change to show it that I remember needing.
https://github.com/StarKissed/stark...mmit/695abe187620acf513b33237042925d60a99f0c1

friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
Im back too.

ktoonsez said:
Im back too.
Click to expand...
Click to collapse
right on
any thoughts my man?

friedrich420 said:
right on
any thoughts my man?
Click to expand...
Click to collapse
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to

ktoonsez said:
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to
Click to expand...
Click to collapse
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..

friedrich420 said:
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..
Click to expand...
Click to collapse
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2

ktoonsez said:
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2
Click to expand...
Click to collapse
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)

I got lost in Freedom Wars for a bit. I need to figure out an issue with thermal then I'll be back

friedrich420 said:
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)
Click to expand...
Click to collapse
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip

ktoonsez said:
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip
Click to expand...
Click to collapse
Unfortunately same bahavior my man..

friedrich420 said:
Unfortunately same bahavior my man..
Click to expand...
Click to collapse
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
EDIT:
The guy I am testing with has the "G".

ktoonsez said:
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
Click to expand...
Click to collapse
the F...

friedrich420 said:
the F...
Click to expand...
Click to collapse
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!

ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.

ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?

twistedumbrella said:
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.
Click to expand...
Click to collapse
I started with stock N910F ramdisk in version "C", version "D" went back to my original universal ramdisk you can try the "C" and see if anything changes:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014C.zip

friedrich420 said:
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?
Click to expand...
Click to collapse
That is exactly what I just merged in so the "D" that wont boot for you is pretty much the same thing, lol. See what happens on the "C" version which is stock N910F ramdisk.

Related

[UNOFFICIAL] [ROM] CodeAuroraICS (Android 4.0.4 - .35 kernel - CAF-based)

Hello there,while working on OMFGB and CM6,I decided to take ICS CAF sources and build them since andy is working at AOSP,arjen is working at CM9 and now I'm working at CAF. I opened this since I can handle various projects at a time,infact I'm developing for other stuff also.
Current status: Fixing build errors
All d best little genius..
@Bytecode, maybe this small info can be helpful:
you need to change a lot of configs in CAF to build - its like the AOSP configs.
the most pro on this project is, its made for MSM devices, possible you can get more
things to function (if things are fixed by CAF) as in CM9 or AOSP ... good luck
Good luck bro!
OT: Mind I ask u why u changed ur name?
Sent from my LG-P500 using xda premium
andy572 said:
@Bytecode, maybe this small info can be helpful:
you need to change a lot of configs in CAF to build - its like the AOSP configs.
the most pro on this project is, its made for MSM devices, possible you can get more
things to function (if things are fixed by CAF) as in CM9 or AOSP ... good luck
Click to expand...
Click to collapse
So developing for AOSP is same configs **** to fix
One thing I always asked myself: There is no msm7227 manifest in every caf build,but there's msm7627a,which is basically the same. Doesnìt matter if i build msm7627a?
Keep doing your thing Bytecode. Maybe just make one board for everything. Then when all is final release them in individual posts.
mentalityx said:
Keep doing your thing Bytecode. Maybe just make one board for everything. Then when all is final release them in individual posts.
Click to expand...
Click to collapse
You're right. But now i've already created them,so for the next time.
Bytecode said:
So developing for AOSP is same configs **** to fix
One thing I always asked myself: There is no msm7227 manifest in every caf build,but there's msm7627a,which is basically the same. Doesnìt matter if i build msm7627a?
Click to expand...
Click to collapse
dont know, the hw specs are the same - at least the same cpu/gpu and memory.
maybe only another camera^^
Building now
sooo... any news here?
Bytecode said:
Building now
Click to expand...
Click to collapse
Ha ha little bytecode is going again
Enjoy your build procedure well be waiting
Sent from my LG-P500 using xda premium
So... libskia is giving me ****:
make: *** No rule to make target "out/target/product/thunderg/obj/STATIC_LIBRARIES/libqc-skia_intermediates/libqc-skia.a", needed for per "out/target/product/thunderg/obj/SHARED_LIBRARIES/libskia_intermediates/LINKED/libskia.so". Stop.
(BTW: Used andy's device and vendor folder as well as his kernel).
Bytecode said:
So... libskia is giving me ****:
make: *** No rule to make target "out/target/product/thunderg/obj/STATIC_LIBRARIES/libqc-skia_intermediates/libqc-skia.a", needed for per "out/target/product/thunderg/obj/SHARED_LIBRARIES/libskia_intermediates/LINKED/libskia.so". Stop.
(BTW: Used andy's device and vendor folder as well as his kernel).
Click to expand...
Click to collapse
Seems like it's a missing file our a target file.
Sent from my LG-P500 using xda premium
Bytecode said:
So... libskia is giving me ****:
make: *** No rule to make target "out/target/product/thunderg/obj/STATIC_LIBRARIES/libqc-skia_intermediates/libqc-skia.a", needed for per "out/target/product/thunderg/obj/SHARED_LIBRARIES/libskia_intermediates/LINKED/libskia.so". Stop.
(BTW: Used andy's device and vendor folder as well as his kernel).
Click to expand...
Click to collapse
edit the Android.mk and remove that lib, its proprietary **** only
SWEATTAIMI said:
Seems like it's a missing file our a target file.
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
I don't have that anymore
Wow,I can already smell CAF optimized code: Frameworks base is different for lots of stuff: Using AOSP andy's framework base was a bad idea: I'll check on his github what he changed on frameworks base.
@andy: Did you change stuff in framework base for making it boot or you did it later?
I guess he changed things for his Phoenix Android look
Also some fixes needed there for loading old adreno-drivers.
_Arjen_ said:
I guess he changed things for his Phoenix Android look
Also some fixes needed there for loading old adreno-drivers.
Click to expand...
Click to collapse
I'm getting really,really confused here
Adding vendor and device folder from andy gives me libskia ****,adding all from andy gives me framework ****,I don't know what to do here
Lemme basically explain: What files are needed for building/booting CAF ICS succesfully? Don't post stuff necessary for fixing bugs later
Thank you
Just one little question, what branch did you use from framework_base?
You took the master-branch?
Guess you won't need the msm and qcom repo's, but need evereything else.
I can't remember I had problems related to skia during build, I have taken a look if I did change anything there, but I did not...
Don't have CAF-sources synced yet, so can't take a look what is going wrong.
Perhaps Lupohirp has them and can take a look.
Bytecode said:
I don't have that anymore
Wow,I can already smell CAF optimized code: Frameworks base is different for lots of stuff: Using AOSP andy's framework base was a bad idea: I'll check on his github what he changed on frameworks base.
@andy: Did you change stuff in framework base for making it boot or you did it later?
Click to expand...
Click to collapse
AOSP is not CAF, AOSP is not CM - each framework has its own code, it
has nothing to do with my changes, as you can see in my patches, its nothing
to make it "feel me like a phoenix"
To help you a bit:
some makefile variables cant be used in CAF, CM or AOSP and vice versa,
you have to look in relevant config variables ad what its used for,
than look in the source code if the name has changed or the variable
cant be used (or what ever).
_Arjen_ said:
Just one little question, what branch did you use from framework_base?
You took the master-branch?
Guess you won't need the msm and qcom repo's, but need evereything else.
I can't remember I had problems related to skia during build, I have taken a look if I did change anything there, but I did not...
Don't have CAF-sources synced yet, so can't take a look what is going wrong.
Perhaps Lupohirp has them and can take a look.
Click to expand...
Click to collapse
qcom repos are very needed to compile qcom related changes like audio/media.

[OCT30] Custom kernel... [build3!]

Okay, I managed to fix the sources and got it compiled.
This is based on 4.06/4.08 sources with 4.08 ramdisk.
Use it at your own risk. If you brick your phone, it will be your fault, not mine.
I do not own a Dell Venue and therefore cannot test this.
zImage :
fastboot flash zimage zImage
fastboot reboot
boot.img :
fastboot flash boot boot.img
fastboot reboot
Download :
dell-venue-dbg1.zip
dell-venue-dbg2.zip
dell-venue-dbg3.zip
WiFi module :
dhd.ko-dbg1.zip
Thanks.
Yes, we would.
Cool, right now I have a hard time finding the right defconfig.
In case someone could point me to the right file :
https://github.com/adridu59/dell-venue-kernel/tree/master/arch/arm/configs
Edit :
It seems to be codenamed "toucan".
adridu59 said:
Cool, right now I have a hard time finding the right defconfig.
In case someone could point me to the right file :
https://github.com/adridu59/dell-venue-kernel/tree/master/arch/arm/configs
Edit :
It seems to be codenamed "toucan".
Click to expand...
Click to collapse
I think you'll try all of them, then test on your real device and.....
)
nguyen_vh said:
I think you'll try all of them, then test on your real device and.....
)
Click to expand...
Click to collapse
I made an overlap comparaison and I think that this is it.
Right now I am fixing the sources, they are crap tbh.
adridu59 said:
i made an overlap comparaison and i think that this is it.
Right now i am fixing the sources, they are crap tbh.
Click to expand...
Click to collapse
thanks for your effort :d
Yes
Venue have Custom Kernel! I have one
Kinda busy right now working on my own device but you can contribute if ya want. github.com/adridu59
I'm excited about this topic! Please keep me up to date with this. BTW, I also think that v4.06 source from Dell OpenSource is crappy. Could you please public your change list after you complete the work, it's very helpful to us.
chacona said:
I'm excited about this topic! Please keep me up to date with this. BTW, I also think that v4.06 source from Dell OpenSource is crappy. Could you please public your change list after you complete the work, it's very helpful to us.
Click to expand...
Click to collapse
Well check my github, I haven't worked on this for a while but I'm not letting it down.
First build on first post, follow instructions. Thanks.
406 and 408 apparently use the same kernel according to dell. Though we've had the suspicion that there were differences, apparently there isnt.
TheManii said:
406 and 408 apparently use the same kernel according to dell. Though we've had the suspicion that there were differences, apparently there isnt.
Click to expand...
Click to collapse
Yes, that's what I was thinking. And otherwise they would've published the sources.
I tried to flash your zImage, what I received is "Flashing Error -2", in red background in fast boot mode.
BTW, I would like to ask the way you build the kernel. Did you build directly from /kernel folder (with .config), or you build from ROM's source tree (/kernel folder's parent, using "build/envsetup", then "choosecombo")? I would like to get my hands dirty with this work too!
If my dev pc wasnt broken at the moment, I could glue it together with the stock ramdisk and make a flashable zip.
Here's the stock 408 kernel: boot-408.img
You can glue it together with that ram disk if desired, but shouldnt it also generate a ramdisk when building the kernel?
Just as much the ramdisk's contents arnt that unusual, you could prob guess at a few things and reconstruct it without issue.
chacona said:
I tried to flash your zImage, what I received is "Flashing Error -2", in red background in fast boot mode.
BTW, I would like to ask the way you build the kernel. Did you build directly from /kernel folder (with .config), or you build from ROM's source tree (/kernel folder's parent, using "build/envsetup", then "choosecombo")? I would like to get my hands dirty with this work too!
Click to expand...
Click to collapse
Thanks for testing.
I just use the corresponding defconfig, that is the usual way to do it.
I don't really see what you mean by ROM source tree...
TheManii said:
If my dev pc wasnt broken at the moment, I could glue it together with the stock ramdisk and make a flashable zip.
Here's the stock 408 kernel: boot-408.img
You can glue it together with that ram disk if desired, but shouldnt it also generate a ramdisk when building the kernel?
Just as much the ramdisk's contents arnt that unusual, you could prob guess at a few things and reconstruct it without issue.
Click to expand...
Click to collapse
Nao, the ramdisk isn't compiled code. Usually you extract it from the stock kernel and build with mkbootimg or any similar tool.
Thanks for the link BTW.
Okay, I built the boot.img. Offset is 0x20000000.
Check first post, thanks.
adridu59 said:
Thanks for testing.
I just use the corresponding defconfig, that is the usual way to do it.
I don't really see what you mean by ROM source tree...
Thanks for the link BTW.
Click to expand...
Click to collapse
Sorry for not making it clear. By saying "from ROM source tree", I mean the way below (ftp.dell.com/opensource/venue/v4.06/Venue-HOW-TO-BUILD.txt)
Code:
kernel
1) download source tree of android froyo from Qualcomm.
2) replace kernel
3) build kernel by
. build/envsetup.sh
choosecombo
...
5) make -j4 kernel
# update on 4/27/2012 - 23:18 GMT+7
I built an update.zip, with all the files including boot.img and system/lib/modules. What I got is, the Dell logo is hung there like being fallen into an infinite loop.
chacona said:
Sorry for not making it clear. By saying "from ROM source tree", I mean the way below (ftp.dell.com/opensource/venue/v4.06/Venue-HOW-TO-BUILD.txt)
Code:
kernel
1) download source tree of android froyo from Qualcomm.
2) replace kernel
3) build kernel by
. build/envsetup.sh
choosecombo
...
5) make -j4 kernel
Click to expand...
Click to collapse
First time I see this kind of instructions.
Code:
export ARCH=arm
export CROSS_COMPILE=~/toolchains/arm-eabi-4.4.3/prebuilt/linux-x86/bin/arm-eabi-
make toucan-perf_defconfig
make
chacona said:
# update on 4/27/2012 - 23:18 GMT+7
I built an update.zip, with all the files including boot.img and system/lib/modules. What I got is, the Dell logo is hung there like being fallen into an infinite loop.
Click to expand...
Click to collapse
Would you try again using fastboot please ? thanks.
@Adridu59: still fail, flashing boot.img using fastboot gives the same result as I described above. I will try to get your config files and build a copy myself to see what's going on!

build cm10.1 kernel

anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
ztotherad said:
anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
Click to expand...
Click to collapse
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
jt1134 said:
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
Click to expand...
Click to collapse
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
ztotherad said:
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
Click to expand...
Click to collapse
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
jt1134 said:
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
Click to expand...
Click to collapse
haha yeah, cause a few months back you said i had to sync the whole source.
it sounds like you've been working your ass off. lol
but that's definitely awesome. it makes it easier on us all.

N915F kernel with SeLinux Permissive - done

Hello,
This is a stock SeLinux permissive kernel and init.d activated for Samsung Galaxy Note Edge (N915F) for Lollipop 5.0.1.
There are inputs that is working also on N915FY.
The kernel was compiled from Samsung source LL_CIS kernel using Google toolcahin v4.8.
If you want to test it, please flash in cwm the attached file and report back. Please make a backup of your actual kernel (boot.img) befor flashing this one.
Special thanks to @Micky387 who advised me to update the source kernel (MH driverI), @Wuby986 for his support and guidance and @daxgirl for his advices.
My kernel source for N915F (N915FOXE1BOC6) is here.
Happy flashing.
PS. Kernel updated. Same functionality but some different info in "About".
Well you got further than I did .. Kept getting some driver file referenced so it would not complied.. Thanks for effort I hope you work it out soon.. Unfortunately I don't have time at the moment ..
starbucks2010 said:
Hello,
Since few days I struggle to build a SeLinux permissive kernel for Samsung Galaxy Note Edge with Lollipop 5.0.1 but without success. Or with partial success.
I followed several guides from xda and other sites but it seems that everyone has his different way of doing it.
What I have done so far:
- I installed Ubuntu 14.04 with all updates and apt-get xxx
- I installed the Google toolchain arm-eabi-4.8
- I Installed Samsung kernel source for N915F_CIS from here
- I changed the path to the toolchain in Makefile and build_kernel.sh
- I run from kernel source folder: ./build_kernel.sh
- After 10-15 min of compilation I get a zImage file in //output/arch/arm/boot of ~ 9.8 Mb
- Using Android Image Kitchen v2.2 I integrated the zImage into a boot.img to be flashed with cwm
I flashed this new boot.img but the phone is rebooting every minute and in about I have "unknown"as baseband.
Anyone have an idea how to fix this?
Thank you in advance.
Click to expand...
Click to collapse
hi man. How are you ?
So many thing are change in lollipop . the modem and firmware modem dont call same as KK ROM.
So be sure you are this commit https://github.com/CyanogenMod/andr...mmit/784aa9a84b77090fa591bff77045341c3e3c6293
and add MHI module into tblte_defconfig
https://github.com/CyanogenMod/andr...mmit/1dd44659ee26c2d8b313c1346192e2bfa2ac7bb9
dont delete 18 and 19 line if you build for TW rom .
Try and report
micky387 said:
hi man. How are you ?
So many thing are change in lollipop . the modem and firmware modem dont call same as KK ROM.
So be sure you are this commit https://github.com/CyanogenMod/andr...mmit/784aa9a84b77090fa591bff77045341c3e3c6293
and add MHI module into tblte_defconfig
https://github.com/CyanogenMod/andr...mmit/1dd44659ee26c2d8b313c1346192e2bfa2ac7bb9
dont delete 18 and 19 line if you build for TW rom .
Try and report
Click to expand...
Click to collapse
Bonjour Mickey,
Thank you for your advice. I'll try it and let you know how it goes. Do you know if I have to flash also the modules together with the new kernel or only the boot.img alone ?
Merci.
starbucks2010 said:
Bonjour Mickey,
Thank you for your advice. I'll try it and let you know how it goes. Do you know if I have to flash also the modules together with the new kernel or only the boot.img alone ?
Merci.
Click to expand...
Click to collapse
No need to flash module. The MHI module will be in the kernel so you have boot.img with all inside.
starbucks2010 said:
Hello,
Since few days I struggle to build a SeLinux permissive kernel for Samsung Galaxy Note Edge with Lollipop 5.0.1 but without success. Or with partial success.
I followed several guides from xda and other sites but it seems that everyone has his different way of doing it.
What I have done so far:
- I installed Ubuntu 14.04 with all updates and apt-get xxx
- I installed the Google toolchain arm-eabi-4.8
- I Installed Samsung kernel source for N915F_CIS from here
- I changed the path to the toolchain in Makefile and build_kernel.sh
- I run from kernel source folder: ./build_kernel.sh
- After 10-15 min of compilation I get a zImage file in //output/arch/arm/boot of ~ 9.8 Mb
- Using Android Image Kitchen v2.2 I integrated the zImage into a boot.img to be flashed with cwm
I flashed this new boot.img but the phone is rebooting every minute and in about I have "unknown"as baseband.
Anyone have an idea how to fix this?
Thank you in advance.
Click to expand...
Click to collapse
Wait one more day..
Or maybe earlier
Finally done.
Make backup of your actual kernel, flash the attached zip from post 1in cwm and please report back.I didn't check the init.d support but it should work.
Good, I'll try.
Dev.
Just a small request please.
If you could please make sure a link to YOUR kernel sources in OP.
Any Linux kernel publicly released must have source to compile the exact binary (zImage) as repacked into your distributed boot.img. This must be current at time of every released version.
This is not just a XDA rule, but a legal GPL requirement, applying to all, even if modification is only minor. This is open-source
I would suggest the use of a github repo that helps keep track of your changes (commits), promotes open transparency, sharing and colaboration
If you have any questions on how to go about this, i would be happy to help via pm (but currently away with work), but would suggest to contact our friendly forum Mod.
Best of luck with your project. :thumbup:
Cheers.
UITA
Any chance that you would be willing to make this kernel compatible with the Sprint variety? Man.... I need my viper4android bro. Please. Lol
UpInTheAir said:
Dev.
Just a small request please.
If you could please make sure a link to YOUR kernel sources in OP.
Any Linux kernel publicly released must have source to compile the exact binary (zImage) as repacked into your distributed boot.img. This must be current at time of every released version.
This is not just a XDA rule, but a legal GPL requirement, applying to all, even if modification is only minor. This is open-source
I would suggest the use of a github repo that helps keep track of your changes (commits), promotes open transparency, sharing and colaboration
If you have any questions on how to go about this, i would be happy to help via pm (but currently away with work), but would suggest to contact our friendly forum Mod.
Best of luck with your project. :thumbup:
Cheers.
UITA
Click to expand...
Click to collapse
Thank you for your advices.The link to Samsung kernel source was already there . Anyway, I added it one more time just to be sure that is more visible.
For the github repo, I have to create an account and then I'll upload the files.
Best regards.
Well done mate ..... Yea
---------- Post added at 08:32 AM ---------- Previous post was at 07:36 AM ----------
Boot and works fine , nice one
Can this be used on N915FY as well?
I don't have any reports from N915FY users. You can try and tell us
Don't forget to make a backup first.
starbucks2010 said:
Thank you for your advices.The link to Samsung kernel source was already there . Anyway, I added it one more time just to be sure that is more visible.
For the github repo, I have to create an account and then I'll upload the files.
Best regards.
Click to expand...
Click to collapse
Hey, no problem.
Just to clarify....
If you've made any (even minor) change to "Samsung" source, then you have to upload "your" complete source and link "your" source, not "Samsung" So if you've made the kernel permissive or even use a different toolchain or path, technically you have modified from original and is now "your" source If you use a custom defconfig, don't forget it too
github is well worth the pain I Google for answers all the time (how to do this and that), but still screw things up (sometimes majorly) now and then.
dubart said:
Can this be used on N915FY as well?
Click to expand...
Click to collapse
Using this kernel with a N915FY. Great job btw I can finally use viper audio which I've missed so much. Major props dude!
I'm gonna flash this on sprint variant either that or throw this device out my window
dinaps86 said:
I'm gonna flash this on sprint variant either that or throw this device out my window
Click to expand...
Click to collapse
Lol it booted just no data. Yaaayyy!!!
I see that there are other people who are interested in Selinux permissive kernels.
So, if you want, I can add selinux permissive to any samsung kernel as long as you provide me 2 files: your original kernel (boot.img) from the ROM you want to flash and the Kernel.tar.gz - source kernel from Samsung site. In order to get Kernel.tar.gz file you'll need to download the kernel source file (~ 1Gb) from Samsung site, open the archive and upload ONLY the Kernel.tar.gz (~ 100-150 Mb) and the readme file from the archive to some sharing site. Then, I'll try to compile that kernel for you.
There are also downsides. I cannot stay up to date will all new commits done to the kernel source so I'll compile your kernels only with info that I have at that date. If you fork the github and find kernel source updates, I can add them.
PS. I only set up a working PC with Ubuntu and Google toolchain v4.8. If you find any information that this setup is not suitable for compiling your kernel, then there is no point of providing me the above files.
Best regards.
OP updated with some Antutu screen shots.

For devs: Looking to play with the kernel sources?

The good stuff: https://github.com/jcadduono/android_kernel_lge_msm8996/commits/android-7.0
Fork it!
Update: CAF branch has some problems at the moment, use this one instead for now.
So this is currently the v10d release. It's compatible with V20 Nougat v10d and G5 v20a.
Place toolchain (pick one up from here) in ~/build/toolchain & tar xf.
git clone https://[email protected]/yourname/android_kernel_lge_msm8996.git
If you want to change any config options:
./menuconfig.sh (optional target, ex. twrp or lge)
Ready?
./build.sh h850/h830/h918/us996/any model you want
Models are applied onto the target base defconfig, so your V20 kernels will build for all V20 variants and for all variants of the G5 as well.
Create your own by copying arch/arm64/configs/lge_defconfig to arch/arm64/configs/your-awesome_defconfig!
Grab:
build/arch/arm64/boot/Image.lz4-dtb [or] build/arch/arm64/boot/Image.gz-dtb
build/lib/modules
Place in:
https://github.com/jcadduono/lazyflasher/tree/kernel-flasher
make
You got yourself a magical all-powerful custom kernel installer, complete with your own custom kernel!
Notice that there's a few branches:
opensource is where I merge LG changes, when it's updated, android-7.0 is rebased on it
android-7.0 is a starting off point closest to absolute stock, base off here
android-7.0-security adds security and bug fixes from CAF on top of android-7.0 branch
twrp-7.0 is for Team Win Recovery Project (yes, it's ready, come with an unlocked device and I'll give it to you)
nethunter-7.0 is for the Kali NetHunter project (if you dare, some fun there)
Another issue was their weird build system, I dropped that. Replaced tuxera's exFAT prebuilt downloader with Samsung's GPL'd exFAT drivers instead. Unsure how well it works replacing it like that, we'll have to see.
I also added Qualcomm's Core Control which they just released the sources to somewhat recently. I believe it's already included on the G5 and probably V20 as a kernel module. Their released version doesn't have module support yet but it's fairly easy to add I guess with the leaked proprietary module version out there to pick pieces from.
Have fun!
Great Man !
thanks for this..
I've been following the root process since the beginning and I'm amazed at the relatively short amount of time it took. Huge kudos to @jcadduono! I will purchase this phone. Now, since the kernel needed to have it's encryption support modifed, are the patches added to a branch on your Github fork? I would like to compile a custom kernel, along with patching it with SultanXDA's SafetyNet boot bypass. Which branch will be appropiate to fork to flash on the TWRP/Rooted V20?
Thanks much @jcadduono! I'm going to start poking around in here and see if I can find anything particularly interesting.
zabracks said:
Thanks much @jcadduono! I'm going to start poking around in here and see if I can find anything particularly interesting.
Click to expand...
Click to collapse
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
jcadduono said:
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
Click to expand...
Click to collapse
I've got an H918, if you need somebody to test a kernel.
jcadduono said:
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
Click to expand...
Click to collapse
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
albinoman887 said:
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
Click to expand...
Click to collapse
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
jcadduono said:
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
Click to expand...
Click to collapse
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
jcadduono said:
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
Click to expand...
Click to collapse
which branch/repo is the one that boots but messed up display?
albinoman887 said:
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
Click to expand...
Click to collapse
Would absolutely LOVE to see CM on our phones! Not that it'll make things move faster, but I'll throw 100 bucks your way if it's done before Christmas
lightninbug said:
Would absolutely LOVE to see CM on our phones! Not that it'll make things move faster, but I'll throw 100 bucks your way if it's done before Christmas
Click to expand...
Click to collapse
I want Nethunter too
I'll be around to test any of the stuff, usually at night.
The v20 kernel is available on the lg open-source site, at least the h990 one is.
Sent from my LG-H990 using Tapatalk
---------- Post added at 03:36 PM ---------- Previous post was at 03:25 PM ----------
Artcrime said:
The v20 kernel is available on the lg open-source site, at least the h990 one is.
Sent from my LG-H990 using Tapatalk
Click to expand...
Click to collapse
There is v10d version for 918. opensource.lge.com forgive me if this is old news. a|c
albinoman887 said:
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
Click to expand...
Click to collapse
slayerh4x said:
I want Nethunter too
I'll be around to test any of the stuff, usually at night.
Click to expand...
Click to collapse
albinoman887 said:
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
Click to expand...
Click to collapse
Sent from my LG-H990 using Tapatalk
I updated all the branches earlier today...should work fine now, so apparently was a source code issue that needed v10d update, not sure though no one's volunteered for testing (I don't do requests/testing over the forum, only on IRC)
Is a kernel the main thing stopping us from a CM rom?
what toolchain should we be using? got a link to a compiled one? i'm getting build errors I know are related to the toolchain but i've been out of the game for awhile. last i knew we needed gcc-4.9?
jcadduono said:
I updated all the branches earlier today...should work fine now, so apparently was a source code issue that needed v10d update, not sure though no one's volunteered for testing (I don't do requests/testing over the forum, only on IRC)
Click to expand...
Click to collapse
I'm there.
albinoman887 said:
what toolchain should we be using? got a link to a compiled one? i'm getting build errors I know are related to the toolchain but i've been out of the game for awhile. last i knew we needed gcc-4.9?
Click to expand...
Click to collapse
gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz .Be sure to change the PATH in menuconfig.sh
@jcadduono , thank you. You are truly an inspiration
Wondering if anyone can help me learn how to do this right...
So I was able to compile the kernel, but I didn't get an Image.gz (which im sure is fine). I did get an Image.lz4, Image.lz4-dtb, and Image (no extension). I figure only the .lz4* files are needed. I added all 3 to the lazyflasher, and ran make. The resulting zip flashed, but sent me straight to Bootloader. I then tried to fix by flashing the stock kernel, but this still did not boot. ReFlashed my ROM and it's booting now.
I used this toolchain gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu
Any guidance? My guess is it's flashing at the wrong point?
Here is the ZIP. DO NOT FLASH. This is only for someone who knows what they are looking at to tell me what is wrong with it. No modifications were done. Source was forked from OP, and compiled with default menuconfig, then build.sh h918

Categories

Resources