yashsingh1/xdaforums huggingface dataset:
[Android Software Development] neonkat:
i found something check this.

actually,check the comment part there,it is something releated to powersuspend.i am on my phone,will check it when i get on my pc,till then read and check,maybe you get some idea.

never tried that governer.
[Android Software Development] Venky18:
when i use "tar -xjvf Source Name" this command replacing the source name with

"SM-A800F_SEA_LL_Opensource.zip" it shows few errors the zip contains the kernel source code,let me type what the errors are

venky@myubuntu:~$ mkdir android

venky@myubuntu:~$ cd android

venky@myubuntu:~/android$ tar -xjvf Kernel.tar.gz

bzip2: (stdin) is not a bzip2 file.

tar: Child returned status 2

tar: Error is not recoverable: exiting now

i get these errors,and btw im noob please explain me how to fix this

Thanks :)
[Android Software Development] neonkat:
its a .zip file.-_-
[Android Software Development] Venky18:
nvm i found the solution xD sorry for noobie question
[Android Software Development] Venky18:
Guys I have one more query

What is this?

How can I fix it?
[Android Software Development] neonkat:
you have a samsung,right?

there will be a kernel.txt(or any name)file in the source.zip,check that.

it has the method to make defconfig.

for my device,it has the main device config,selinux config and one more.
[Android Software Development] Venky18:
Yes I do have a Samsung

Under the zip file I found README_Kernel.txt file

Please help me
[Android Software Development] neonkat:
where is your kernel source?i am directory?(in android/kernel/*here*?)(send a ss if you are confused)

possibilities for fix:

*cd to correct directory

*check if that file is there or not
[Android Software Development] Venky18:
The kernel source is in home/Android/kernel
[Android Software Development] DespairFactor:
I am here if anyone needs assistance, I build 3.4.y, 3.10.y, arm and arm64.
[Android Software Development] yarpiin:
Thats great :) what toolchain you use to build Nexus Kernels ?
[Android Software Development] DespairFactor:
I am part of the UBERTC team, I should have mentioned that, I use AOSP and UBER mostly, and sometimes I will run a linaro build from my own repos.
[Android Software Development] yarpiin:
Nice im using Uber 4.9 to build my kernel for oneplus 2 ( btw love despair gov ) anyway want to use toolchain higher than 4.9 but no luck at all hughe amount of errors, any advice how to start with for example with 5.3 or 6.0 ?
[Android Software Development] DespairFactor:
IIRC the source for msm8992/8994 needs some MPI patches, which I have in my source, I forget what the exact errors were, but I actually used to build 5.x for that device as well. Take a look here at my patches to get you started.

https://github.com/DespairFactor/OPT/commits/Oxy/lib/mpi
[Android Software Development] yarpiin:
Thank you a lot , do you think it might be a problem of unofficial source ? I have always get problems with camera when compiling (using CM13 source now its official) ? I will look into your patches thank you
[Android Software Development] DespairFactor:
Are you asking about ROM or what exactly? Kernel has some camera drivers, but then you also have your proprietary blobs and other stuff in device tree for camera. If it's kernel side you will need to see what drivers have been changed and where they have diverged from the Oxygen source. You may just find a couple commits that need to be reverted, but it is best to check with the maintainer's builds to see if camera works on those first before wasting time trying to figure out where you went wrong.
[Android Software Development] limjh16:
Just asking, which AOSP TC do you use? I'm very confused about the difference between arm eabi and ndk. Also, I read somewhere there's 4.9 AOSP tc out somewhere. Is this true?
[Android Software Development] yarpiin:
It is kernel side , story is long with CM13 ( marshmallow kernel source for op2) official source has been released yesterday we have been building cm13 based kernels from unofficial cm source with commits from mahdi and grarak they managed to get laf and fp scanner to work , i have managed to build my kernel only with uber 4.9 ( no errors) while higher than that no matter what changes i have done couldnt build with higher than 4.9 , thank you for advice :)
[Android Software Development] DespairFactor:
arm-eabi is for arm, you need aarch64(arm64) for OP2. You would sync the manifest from here: https://android.googlesource.com/platform/manifest -b gcc, and cd to toolchain/gcc and run python build.py
[Android Software Development] neonkat:
hey there,i am also using ubertc 4.9 and 5.3 and having issue with graphite flags.i always get internal compiler error(some nr_connectifier.c error)when using graphite flags.i checked for other kernels and they use graphite flags with uber with no issue.

do i need to make some change in my source or in the tc?
[Android Software Development] DespairFactor:
You are getting compilation errors? Or it builds and the camera doesn't work?
[Android Software Development] DespairFactor:
It could be that they are using an older build of the toolchain, it could also be another device. I would need to know the exact error, because if it is a seg fault, it is likely a combination of the code being compiled and the patches within the toolchain source. I am constantly updating the source so what may work one day, may not work the next. I try to keep us up to date with upstream changes from GNU at least once a week.
[Android Software Development] limjh16:
I'm on a arm, not arm64 device. I think i ran out of context here, I didn't read few posts before...... what is the difference THEN between ndk and arm eabi?
[Android Software Development] yarpiin:
Im getting compilation errors
[Android Software Development] DespairFactor:
When it comes to AOSP, I don't believe we have an arm-eabi, I can't recall ever finding it. Mind you, there could still be a way to build it. arm-eabi vs the NDK arm-linux-androideabi(I think that's the name, I can't recall right now, it's very early.) is for different targets, arm-eabi is a toolchain meant for kernels and the androideabi is made in general for building C/C++ android targets(sometimes works for kernels).
[Android Software Development] DespairFactor:
I would need to see your errors to give any suggestions.
[Android Software Development] limjh16:
I'm more confused than when I started.... ill go consult Google and come back. Thanks anyways! Ran out of thanks but yeah.
[Android Software Development] DespairFactor:
Another thing I could do is release a script to build the aosp toolchain from our source using uber components, but only the GCC from AOSP.
[Android Software Development] yarpiin:
Will post print screens when i will setup , thank you
[Android Software Development] DespairFactor:
Pastebin is preferable because it allows me to take a look at stuff easier.
[Android Software Development] yarpiin:
Will do
[Android Software Development] neonkat:
i always use the latest toolchains and error exist for both 5.x and 6.x based roms(both tw and aosp).

will provide you complete error log in a few days.Thanks!:)
[Android Software Development] DespairFactor:
If it is for ROMs, there are tons of patches needed across various repos, if it is kernel, it isn't as hard to fix
[Android Software Development] AndyPhoenix9879:
Hello,

I decided to "attempt" compiling a kernel for the Xperia M4 Aqua... but then unfortunately this happened:

...while compiling and therefore stopping the compilation. Google did no good here unfortunately. Anyone got any idea what happened? I'm still new to this kernel compilation. ...sforce.h :confused:

This were the commands I used before the compiling :

Any help will be very much appreciated, thanks.
[Android Software Development] limjh16:
Okay I've googled enough. What would be the benefit of this? Because ive used uber and linaro in the past, (I know you're in uber team this feedback is not to dis-encourage you) and they gave me bugs while not having any performance improvement at all. The battery life got worse in fact. So I've only used Google tc since then. Therefore, now I'm asking what this toolchain with aosp and uber will accomplish
[Android Software Development] insestito:
hi guys, i have this error, when i write: ARCH=arm CROSS_COMPILE=~/arm-eabi-4.4.3/bin/arm-eabi- make Piccolo <----my device name (bq aquaris M5) terminal say this:

ARCH=arm CROSS_COMPILE=~/arm-eabi-4.4.3/bin/arm-eabi- make piccolo

make: *** No hay ninguna regla para construir el objetivo "Piccolo". Alto.

help me please
[Android Software Development] Arvind7352:
You need to first find the defconfig file for your Device. If the Manufacturer has released the source, then they must have specified the name of the 'defconfig' aka Kernel Configuration for your Device.

Find it and then perform these commands separately

export ARCH=arm

export CROSS_COMPILE=~/arm-eabi-4.4.3/bin/arm-eabi-

make <defconfig-name>

make -j<no-of-jobs>

Commands 1 and 2 can be performed once, it will be persistent unless you close the terminal

Command 3 loads the defconfig file and stores it in .config

Command 4 Builds the Kernel
[Android Software Development] DespairFactor:
They will perform differently on different devices, the patches are not the same in UBER and AOSP. Linaro also has different patches too.
[Android Software Development] Eliminator79:
Thread will be updated soon

Stay tuned
[Android Software Development] Eliminator79:
Also I'd like to thank any XDA member who had answered the questions of people who asked for help while am not being there, I really appreciate this

Thanks!
[Android Software Development] limjh16:
What info will be added?
[Android Software Development] Eliminator79:
Some info which is missing from the guide
[Android Software Development] limjh16:
I am wishing for a custom kernel porting guide :) but any other info will be appreciated.
[Android Software Development] abhishekr700:
Hi, i have a new question,

Till now when I compiled the kernel i got an Image and Image.gz files, so I just used to use the Image file to create a boot.img and flash.

Now recently cm sources were updated, now while compiling kernel I also get Image.gz-dtb file.

Also just using the Image to create boot.img the device cannot boot.Any ideas?
[MENTION=5288056]yarpiin[/MENTION] [MENTION=7111568]say99[/MENTION] [MENTION=5991747]neonkat[/MENTION]
[Android Software Development] yarpiin:
on new sources you have to use image.gz-dtb instead of image file
[Android Software Development] neonkat:
dtb will also go in boot.img.(under split_img folder)
[Android Software Development] abhishekr700:
Do you mean I have to extract the Image file inside Image.gz and use it for making boot.img?

Also have you blocked me on telegram?
[Android Software Development] yarpiin:
nope my telegram.is inactive since new witcher dlc :D and i have family visitors for 2 weeks so no development stuff temporarly :p i think change image to image.dtb-gz in repacking script should do the job ( it does in anykernel )and rest of stuff as it was before
[Android Software Development] abhishekr700:
I use this for building boot.img

Github.com/xialou/mkbootimg_tools

On extracting boot.img I get the kernel as a file named kernel.

So I should extract the Image.gz-dtb and get Image from inside and use it?

I don't use it bro,I like doing it myself.so can u tell how to do via above link

??
[Android Software Development] neonkat:
when you extract a boot.img it splits into different files and folders,ramdisk,split_img bla bla.after you extract it,go to kernel folder(how can that be a file?).

you need to add imagedtb in split_img folder then repack it.

afaik,dtb image are important if you play with dtsi files,like for playing with cpu and gpu clock stuffs.

you can use anykernel2(most easiest stuff),just put the dtb and image,change boot.img location and done.
[Android Software Development] yarpiin:
i dont have acces to pc at the moment and not able to open biniary files on phone cant help at this time sorry , ( but you can try to unpack it if you want and see if not you need to dig in mkbootimg binary file )
[Android Software Development] abhishekr700:
When I unpack boot.img I get ramdisk(folder having ramdisk content),dt.img,img_info,kernel(the actual kernel) and ramdisk.packed
[Android Software Development] asiansaga:
Need more info

Hi guys, sorry if i'm asking some very basic question.

1. Will different TC give different result? not performance but working vs not working

2. If kernel build with different TC from ROM, can it make something not working?

3. Is there any documentation/link to learn android kernel folder trees? so we can troubleshoot error, for example, if i build kernel, and the simcard not working, which file should i looked

Thank you
[Android Software Development] neonkat:
1.nope,everything will work unless you mess up with your source.

2.tried different toolchain,all work fine for me.

3.nothing like that till now.idk if ril is releated with kernel also.

---------- Post added at 10:11 AM ---------- Previous post was at 10:11 AM ----------

sorry,idk about 64 bit structure.(sounds like they are different from 32)
[Android Software Development] Eliminator79:
Videos coming soon for each chapter!
[Android Software Development] abhishekr700:
I managed to do it finally,

Next question here,

When I flash cm13 everything is fine, but if I compile the same kernel myself on my PC , then headfone are not detected but still using an app like soundabout I can force sound to headfones .

Can you say something about this?
[Android Software Development] Hacker432:
Is it needed a modified bootloader for 64bit Kernel?

I heard that it's needed a 64bit Bootloader, is it true?
[Android Software Development] Eliminator79:
Videos are being uploaded and chapter 2 is up!

Please guys, If you are finding the guide helpful subscribe to my channel.

Thanks all
[Android Software Development] oF2pks:
SpeedBreaker

Thanks(3) for this limpid tuto; hope you'll dig until anykernel...

For speed breakers this can be helpy:

https://groups.google.com/forum/#!topic/taintdroid/vQm9Azp_Me0

and :http://freetz.org/ticket/2759
[Android Software Development] asiansaga:
Adding exfat support to kernel

I managed to build my first kernel from source.

Now, I want to add support to exfat FS. Try to integrate from dorimanx @ github and follow instructions there :

1. Add exfat folder

2. Edit Kconfig and makefile in fs folder

3. Edit defconfig with = y, build but got no exfat support

4. Edit defconfig with = m, get exfat.ko, include it in flashable zip, still no exfat support, even try insmod, but no luck

Are there any other step for adding new features, specially filesystem support to an existing kernel?

How is the correct way to include modules in newly build kernel instalation?

Thanks
[Android Software Development] zipperX:
Hey i want compile kernel from github and with uberTC but i got some problem

File "/home/pradipt_lix/Projects/android_kernel_oneplus_msm8974/scripts/gcc-wrapper.py", line 56
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
CHK include/linux/version.h
CC scripts/mod/empty.o
File "/home/pradipt_lix/Projects/android_kernel_oneplus_msm8974/scripts/gcc-wrapper.py", line 56
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
make[2]: *** [scripts/Makefile.build:308: scripts/mod/empty.o] Error 1
make[1]: *** [scripts/Makefile.build:443: scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:510: scripts] Error 2

Can you help me with this?
[Android Software Development] neonkat:
which gcc?4.9 or 5.3?
[Android Software Development] zipperX:
On 4.9, i got source from custom kernel not from official cm
[Android Software Development] neonkat:
try http://xdaforums.com/showthread.php?p=29958684
[Android Software Development] zipperX:
I'm tried but it doesnt work. I want ask something, if i clone kernel from some dev, how can i see the configuration of compiler(gcc) in his work? In my case, maybe it doesn't work because he make harder to someone else to change the gcc version. Is that possible?
[Android Software Development] neonkat:
once try http://xdaforums.com/showpost.php?p=53395437&postcount=584
[Android Software Development] zipperX:
Ok it's work, but i still have this error

make: /opt/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-UB-4.9/bin/arm-linux-androideabi-gcc-4.9.4-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: /opt/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-UB-4.9/bin/arm-linux-androideabi-gcc-4.9.4-gcc: Command not found
CHK include/linux/version.h
HOSTCC scripts/kallsyms
CC scripts/mod/empty.o
/bin/sh: /opt/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-UB-4.9/bin/arm-linux-androideabi-gcc-4.9.4-gcc: No such file or directory

Does my toolchain setup is wrong?

EDIT: Nevermind, i'm wrong in the toolchain setup. But i dont understand what's difference between arm-linux-androideabi-gcc and arm-linux-androideabi-gcc-4.9.4?
[Android Software Development] neonkat:
androideabi is for roms and armeabi is for for kernel.

send me screenshot of the location of toolchain(dir. name).
[Android Software Development] skulldreamz:
[MENTION=5991747]neonkat[/MENTION] my dude i just want to say thanks for all the patience and help you have shown to the community
[Android Software Development] zipperX:
This is my dir of uberTC. Thanks a lot my friend!
[Android Software Development] neonkat:
okay just modify the last path which you were using with this new one.

also you need to use arm-eabi-gcc.for the toolchain path,add till arm-eabi-.

Ex:-path/to/toolchain/bin/arm-eabi-

btw is that ubuntu 14.04?using a theme?how to get the ui?:p
[Android Software Development] Hacker432:
Yeah that theme is fantastic :D
[Android Software Development] zipperX:
Yeah, i was fixed that thanks!

The theme is Arc and i'm using it with gnome, but it's also available with unity. If you want it, take a look in here https://github.com/horst3180/arc-theme
[Android Software Development] neonkat:
having some error here. [MENTION=5169465]DespairFactor[/MENTION] need your help captain!

make[1]: *** No rule to make target `arch/arm64/boot/dts/msm8956-mtp.dtb', needed by `arch/arm64/boot/Image.gz-dtb'. Stop.
make[1]: *** Waiting for unfinished jobs....
OBJCOPY arch/arm64/boot/Image
make: *** [Image.gz-dtb] Error 2
make: *** Waiting for unfinished jobs....
[Android Software Development] DespairFactor:
You need to use dtbtool to make the dtb for that device and it looks like you are missing some dts files, mind messaging me on hangouts?
[Android Software Development] RogerF81:
I think I need some help....I'm always running into the same error :(

Makefile:798: *** Multiple target-patterns. Stop.

and I can't resolve it :crying:

EDIT:

or this one....

make: *** No rule to make target 'arch/arm64/kernel/vmlinux.lds', needed by 'vmlinux'. Stop.
[Android Software Development] DespairFactor:
I would need a link to the source to figure that out
[Android Software Development] RogerF81:
https://github.com/CyanogenMod/android_kernel_lge_msm8992/tree/cm-13.0

I only added some governors and I/O schedulers....
[Android Software Development] DespairFactor:
I would need link to your source, not the original source
[Android Software Development] RogerF81:
Have to create it on github first...

Only wanted to try it out and play around with the kernel from source, I'm doing this for the first time :o

EDIT: And now, it seemed to work till this error came:

make: *** No rule to make target 'arch/arm64/kernel/vmlinux.lds', needed by 'vmlinux'.

EDIT2: [MENTION=5169465]DespairFactor[/MENTION] Ok so this is my source https://github.com/RogerF81/elu-amanuensis (as of 06/25/2016)

EDIT3: No, I don't get it to work. There must be any issue with the compiler/toolchain or whatever... I don't know... It's not that eays trying this the first time it seems :D Could you please help me compiling the kernel and creating a flashable zip?:fingers-crossed::o
[Android Software Development] somadsul:
does anyone solve this?
[Android Software Development] neonkat:
toolchain directory error.which toolchain are you using?send a screenshot of toolchain's directory.
[Android Software Development] somadsul:
here it is
[Android Software Development] neonkat:
if you are using arm-eabi 4.4.3,then go to that folder-bin and find arm-eabi-gcc.

right click on it-properties.

copy the localtion of the file as i have done in ss and put it there after cross compile.
[Android Software Development] asiansaga:
Anyone can help me with this?
[Android Software Development] neonkat:
can you link me the commit you used?and your commit?(if any)
[Android Software Development] asiansaga:
I use this repository for exfat

github[dot]com/dorimanx/exfat-nofuse?files=1

And follow instructions in readme file.

This is the repository for the kernel I'm trying to add exfat support

github[dot]com/premaca/Xiaomi_Kernel_OpenSource/tree/miui?files=1

Sorry I don't have online repo, don't have stable connection.
[Android Software Development] asiansaga:
finally i can create my own repository.

here is my commit github[dot]com/asiansaga/Xiaomi_Kernel_OpenSource/commits/miui
[Android Software Development] diyar95:
This tutorial is for arm. What about arm64?
[Android Software Development] neonkat:
same,just need some modifications like arch64 toolchains and arch=arm64.

---------- Post added at 08:39 PM ---------- Previous post was at 08:39 PM ----------

okay i will se.
[Android Software Development] pranavmali:
showing me this!
[Android Software Development] somadsul:
This error is big but can you please look in to this?

might I get success but where is my output file?

or where i went wrong i have attached all steps & final no error found :confused:
[Android Software Development] somadsul:
Is anyone here to help?
[Android Software Development] neonkat:
first of all,make -j64?really,64?that is nearly equivalent to a supercomputer.better use -j4 or -j8(in case of qual core pc).higher no. can cause crash.ignore this incase you really have a super computer.

the error is with interactive error.will search for a fix.

if the build terminates at some point and you want to check the exact error,do a make -j1.this will only print the error.
[Android Software Development] somadsul:
ok thanks i will do as you instructed but in my kernel folder there is a readme file which contains little guide to make kernel there is mentioned use -j64 for compiling that is why I used,

any ways i will try as you guide and revert you.
[Android Software Development] Hacker432:
The number after -j depends on cores/threads of you're processor

Generally that number is decided so

Number of cores/threads x2
[Android Software Development] somadsul:
tried with -j4 but same error

what should i have to make for this - Intel® Core™ i3-3120M CPU @ 2.50GHz × 4
[Android Software Development] somadsul:
Happy... get success I have received Zimage !!!:cowboy:

Now what how can I use Zimage or any other parts yet to be done?

I am using samsung galaxy S5 G900H.
[Android Software Development] neonkat:
great! you can take existing rom's kernel(boot.img),extract that and add new zimage and repack it.

you can use android image kitchen by osmosis to make changes.

also check if you build modules or not.if yes,then you will also have to add all the modules generated to system/lib.
[Android Software Development] somadsul:
ok thanks a lot
[Android Software Development] somadsul:
Hi friend

I have added features like Governors and IOSCHED,

can you please guide me to make selinux to permissive?

add battery tweaks?

add init.d support?
[Android Software Development] neonkat:
which rom?aosp/cm or tw?
[Android Software Development] somadsul:
Mostly TW

Or for both
[Android Software Development] neonkat:
if tw,follow https://github.com/neonkat/tw_lp_kernel/commit/54f51de39d588ab6e7ef8453351fde2f9b549d9c to make your kernel fully permissive.

battery can be improved with different ways and tweaks.like for tw,you can try disabling samsung's DVFS and software crc for a little boost in perfromance+battery.

easiest method will be to choose a good governer(interactive preferred)and tweak it with your liking/preferable values.