yashsingh1/xdaforums huggingface dataset:
[Android] neonkat:
i tried to run..my default config is 'cyanogen_ms013g_defconfig' with appropriate commands but it ends up in error :(
[Android] akhilnarang:
What error?
[Android] zeeshanhussain12:
You defined path to toolchain?
[Android] neonkat:
not on my pc right now..will provide tomorrow.

yup..defined path for toolchain first then 'make cyan....defconfig' but ended up in some errors(will provide screenshot tomorrow)

*using linaro 4.9.4 for A7.
[Android] neonkat:
here is the screenshot (attachment)

using this guide http://xdaforums.com/showthread.php?t=2486098
[Android] zeeshanhussain12:
Check whether audio.conf file is there or not
[Android] neonkat:
its auto.conf

btw its not in there..(infact the whole folder is empty ?)
[Android] akhilnarang:
Make sure you downloaded the source properly
[Android] zeeshanhussain12:
Git clone cm sources , I guess you downloaded source in zip format
[Android] neonkat:
yes i downloaded in zip format...so what to do now??
[Android] akhilnarang:
Do git clone. Its better as it also keeps full commit history
[Android] zeeshanhussain12:
Git clone sources as akhil said, downloading in zip reduce source size nd hence delete some imp files
[Android] neonkat:
okay,cloning with git clone command,looks like it will take ages for me to download(seems 1gb+)...

so does that mean i have to start everything from beginning?
[Android] akhilnarang:
It'll be 550-650 mb, % shown isn't proportional to size
[Android] neonkat:
[MENTION=5854483]akhilnarang[/MENTION] [MENTION=6777054]zeeshanhussain12[/MENTION]

i can't clone because it always end up with errors..i also checked the github page from where i downloaded my sources and found that there is no include/config folder.. :eek:

followed this guide to get .config null-byte.wonderhowto.com/how-to/an...android-device-with-wireless-adapter-0162943/

and followed guide for compiling from this guide but.....
[Android] akhilnarang:
Ask whoever uploaded the kernel sources lol, maybe he made some mistake

First try to compile the kernel normally. Then add stuff :) else its hard to figure out what causes errors
[Android] neonkat:
yup,i didn't added any feature and tried to compile first and ended up with error..
[Android] zeeshanhussain12:
Raw intelliactive.c file from any kernel and paste it in drivers/cpufreq and recompile it shud work
[Android] neonkat:
was getting error with interactive governer,so removed that ****ing thing :mad: and recompiling now... :fingerscrossed:
[Android] zeeshanhussain12:
Lol actually a .c file is missing, you cud have downloaded tat file from any kernel xD
[Android] neonkat:
i checked, the .c and .h file were present and the governer works well in the rom(compiled by the developer)but always got error with it..btw again got that error,forgot to make changes in makefile:p..changed and checking now...i will make this kernel work at any cost:D
[Android] neonkat:
got image but
[Android] zeeshanhussain12:
A file is missing raw that from any kernel
[Android] neonkat:
you mean selecting missing files from other kernel?btw googled and got some help in page 15 of this thread..and the compiling story continues..

will thank you later(limited to 8 thanks a day):p
[Android] zeeshanhussain12:
Haha yup tats what I mean , I have too downloaded the kernel in zip format and I was getting 1000+ errors , and what I did was tat I just raw tat files from other kernel and it works lol
[Android] neonkat:
:highfive:
[Android] zeeshanhussain12:
xD I knew that's gonna work , btw good work
[Android] erwara:
great tutorial mate ! will try it later:)
[Android] iB4STiD:
ah, having a bit of an issue! anyone? :cyclops:

ib4stid@ib4stid-K54C:~/note4$ make mrproper
/home/ib4stid/note4/drivers/gpu/gpu_sysfs/Kbuild:29: **** Make sure target file is defined. Check the TARGET and GPU configs in Makefile and Kernel Config. Module won't work without target file. ****
scripts/Makefile.clean:17: /home/ib4stid/note4/drivers/media/isdbt/fc8150/Makefile: No such file or directory
make[4]: *** No rule to make target `/home/ib4stid/note4/drivers/media/isdbt/fc8150/Makefile'. Stop.
make[3]: *** [drivers/media/isdbt/fc8150] Error 2
make[2]: *** [drivers/media/isdbt] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [_clean_drivers] Error 2

thanks guys :good:
[Android] blazingwolf:
You need to install lzop. A search with your specific OS version should get you install instructions if your not sure how.
[Android] hell_lock:
HOW TO compile governors as modules and not inbuilt?
[Android] thewadegeek:
Run make menuconfig and there will be a option in there.
[Android] kairi_zeroblade:
thanks i was able to compile successfully i installed lzop via apt-get command.. :D

now can someone teach us how to update kernel version to upstream latest version.. :D
[Android] thewadegeek:
Google "git tutorial".
[Android] kairi_zeroblade:
tried that one last night instead of helping the more i got confused and as a result i landed in too many errors..the solution was to patch stuff manually..i dl'd patches from kernel.org..and read through the lines..now if someone can just help me automate that stuff since i have a lot of catching to do..currently on base 3.0.8..

and BTW can you help me setup GCC 4.6.3??i dunno what/how to setup this toolchain..i just grabbed a 4.4.3 toolchain available here on xda..or if someone can link me to a compressed prepped toolchain already i will be much happy..

thanks!!
[Android] thewadegeek:
There isn't really a way to automate it, you are going to have to patch manually. What do you need help setting up? You'd set it up like you would any other toolchain.
[Android] Roqu3:
git apply --check patchfile.diff

this helps a lot to apply the patch without errors
[Android] thewadegeek:
That applies a patch yes, but I don't think I've ever applied a patch that doesn't break something in my kernel. Any way he does it he is still going to have to do a fair amount of debugging.
[Android] kairi_zeroblade:
ok so it booted up..patched and cleaned a few stuff.. :D

thanks wade!!am trying now a different tool chain from a respectful dev here Showp1984..also would grab the opportunity to mention Thanks to him for allowing to use his sources and for being a patient guy to guide me all the way..i now get the hang of it.. :D
[Android] thewadegeek:
Glad it helped.
[Android] kairi_zeroblade:
BTW Wade would like to suggest if you can do a bit of pep talk with IO schedulers..i mean a guide on how to add or delete one..since you mentioned on OP on how to add Governors..what i did was just reverse each step when i tried deleting a few Governors unused..also if you can add tips on Compression and more stuff..

Merging patches BTW is PITA and time consuming..
[Android] Dreamboxuser:
This may sound weird but does anyone have any suggestions on how to remove all the radios from the kernel? I have tried various different approaches and nothing seems to compile. Bluetooth errors and stuff not being defined. Its becoming rather annoying.
[Android] b00tbu9:
Hi

is there any idea how much the size of filler for a kernel.... I tried fillers of 128kb 500+kb for my neo L.. nothing seems work... any once can help...

I am compiling kernel for Neo L (MT25i)
[Android] dany547:
do you guys know that screen then the kernel is loaded and booting, that black screen with white android written? my question is, where is that information stored, and how can i change that?A developer from our branch TASS, has manager to change that screen, but i cannot contact him.
[Android] Striatum_bdr:
If I'm right it's in the ramdisk, so you must uncompress it, find and change the images then recompress it. You should find some tuto to do this.
[Android] dany547:
in the ramdisk is the .rle, but im not talking about that file...when the phone boots, after the .rle shows on the screen there is another one witch says Android ...that one i want to change. And i made an experiment, replanced the ramdisk with the Cyanmobile one, and it says Indonasia cyanmobile Squadzone...but i dunno where its stored.
[Android] :
Could someone out there give a clue how to fix this error?

LD arch/arm/mach-msm/built-in.o

arch/arm/mach-msm/socinfo.o: In function `smem_alloc':

/home/dave/android/kernel/msm/arch/arm/mach-msm/smd_private.h:83: multiple definition of `smem_alloc'

arch/arm/mach-msm/proc_comm.o:/home/dave/android/kernel/msm/arch/arm/mach-msm/smd_private.h:83: first defined here

make[2]: *** [arch/arm/mach-msm/built-in.o] Error 1

make[1]: *** [arch/arm/mach-msm] Error 2

Compile fails it claims because smem_alloc is defined twice. it then tells the location line 83 of smd_private.h, it then tells me the first place that smem_alloc was defined, in line 83 of smd_private.h
[Android] thewadegeek:
Read up on C and how to handle multiple declarations.
[Android] triptosyll:
Great guide bud! Awesome!

K I get this when running make menuconfig:

http://pastebin.com/hx2J98w5

Do I have to run make menuconfig? Or can I just go on to building?

I'm only building this to implement into a ROM I'm building. Its a cm kernel, so I'm not worried about changing anything right now. I just downloaded the source, the tool chains, and now I wanna build. What's the make menuconfig all about anyways?

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] zeeshanhussain12:
Check whether makefile is there or not, and please git clone sources , never download source in zip format
[Android] iB4STiD:
ah, thanks for ther reply! will d/l source as u said! first time kernel attempt for me :cyclops:
[Android] zeeshanhussain12:
Git clone is always better .
[Android] neonkat:
this thing is really irritating...i stopped previous project and thought to make one with the official sources..but still i am playing with error and fixing them just for compiling without any addition of any feature.:mad:
[Android] zeeshanhussain12:
You can post the errors here
[Android] neonkat:
some new error right here..

net/bluetooth/hci_conn.c:407:28: warning: argument to 'sizeof'
in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length
[-Wsizeof-pointer-memaccess] error, forbidden warning: hci_conn.c:407

....................................
warning: argument to 'sizeof' in 'strncmp' call is the
same expression as the second source; did you mean to provide an explicit length?
[-Wsizeof-pointer-memaccess]

i read somewhere to add (-Wno-sizeof-pointer-memaccess)..but no idea where to add it..
[Android] neonkat:
*deleted*

EDIT: figured it out..first

git add .

then gir commit -u

sorry:p..i am a big noob...

btw one question,how to remove commit?
[Android] _that:
To remove the last commit:

git reset --hard HEAD~1

Or using gitk: right-click the previous commit, choose "reset master branch here".
[Android] neonkat:
whenever i try to commit my changes,it shows the file twice in untracked files..for ex:-

modified:arch/arm/configs/xxx_defconfig
modified:arch/arm/configs/xxx_defconfig~

if i do "git add ." and then commit,both files are there on github(i made no changes in the config~,even i don't know if this file exists or not, this happens with all the files).

any fix?because i have to git add file and it takes very long if there are multiple files :(
[Android] zeeshanhussain12:
You are missing this command -- git add -u
[Android] neonkat:
you mean

git add .

git add -u

then move further..

?
[Android] zeeshanhussain12:
Yeah one is used to add modified files and other is used to add new files then run commit command and finally git push
[Android] _that:
I guess the "~" file is a backup file created by your editor or some script. The fix is to not add these files. :)
[Android] neonkat:
but when i am adding multiple files,i have to choose files one by one and that is too irritating:p
[Android] _that:
man gitignore
[Android] neonkat:
tried to compile my build,stuck with alucard hotplug,tried to google but on help.

arch/arm/mach-msm/alucard_hotplug.c: In function ‘hotplug_work_fn’:
arch/arm/mach-msm/alucard_hotplug.c:208:3: error: implicit declaration of function ‘get_cpu_idle_time’ [-Werror=implicit-function-declaration]
cur_idle_time = get_cpu_idle_time(cpu, &cur_wall_time, io_busy);
^
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-msm/alucard_hotplug.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
[Android] zeeshanhussain12:
I got the same error before , what I did is I just download alucard.c from alucard github
[Android] neonkat:
you mean alucard governer?i added it but still no luck..
[Android] brymaster5000:
This kind of question has been answered before with in this thread... I'm guessing the problem is you don't know what to Google or look up. Implicit declaration means that function is defined in another file. The function inside alucard needs to match the other file's function in order to build. I'm guessing the function is located in hotplug.h or hotplug.c

See what you find...
[Android] neonkat:
thanks for your answer but before posting here,i google my issues first..i first got same error for mako hotplug,googled and got a fix but no help for alucard..sorry but i am a noob.:D
[Android] zeeshanhussain12:
What fix? I tried Google , but still mako giving me same erors
[Android] neonkat:
copy pasted my full error to google(like i did for alucard above)and got a link to franco kernel's xda page.(my sources got messed up again:p and hence can't give you a link)
[Android] brymaster5000:
Are you guys just copying the hotplug files and trying to build or are you looking at all of the commit history for those files?
[Android] zeeshanhussain12:
I m adding hotplug, after picking each commit regarding that hotplug
[Android] neonkat:
looking at all files which need to be edited.
[Android] zeeshanhussain12:
Need help in patching patches to git

i m getting this error whenever i tried to patch any .patch file:crying:

patch <0369-fs-dyn_sync_cntrl-dynamic-sync-control.patch
patching file Kconfig
Hunk #1 FAILED at 280.
1 out of 1 hunk FAILED -- saving rejects to file Kconfig.rej
patching file Makefile
Hunk #1 FAILED at 128.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file dyn_sync_cntrl.c
can't find file to patch at input line 270
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/fs/sync.c b/fs/sync.c
|index e4bcc06..f928409 100644
|--- a/fs/sync.c
|+++ b/fs/sync.c
--------------------------
File to patch:

A help would be appreciated:o:D
[Android] bsmitty83:
Try "patch -p1 <0369-fs-dyn_sync_cntrl-dynamic-sync-control.patch"
[Android] zeeshanhussain12:
Tried getting same error
[Android] bsmitty83:
OK sorry , usually I run patches at -p1 but that's not the issue . looking at your errors , your kconfig needs to be fixed , not a big deal , and I don't think you have all the patches that go with dynamic fsync cause its trying to patch a file that isn't there .

Git commits are a much easier tool to use than patches IMHO. But your definitely missing dynamic_sync_control.c or whatever that filename is.
[Android] zeeshanhussain12:
That file is already there and I know git commits are much easier, but patches are good for people like me with low bandwidth
[Android] brymaster5000:
Look at the reject file from the patch to see where it went wrong and you'll have to manually edit your code to accept the change.
[Android] zeeshanhussain12:
Okay and I m getting the same error whenever I try to patch updates from kernel.org
[Android] neonkat:
little confused..

i read somewhere that caf kernel can only be flashed on caf based roms and aosp kernel can only be flashed on aosp based roms..the caf kernel cannot be used with the aosp rom and similarly for aosp kernel..

is this true?
[Android] fizbanrapper:
Generally I have found that you can use them interchangeably, but this HEAVILY depends on the device in question.
[Android] rockinroyle:
Hello all. Did a quick search and didn't see an answer to my question so I hope I didn't just miss it? I'm trying to compile stock shamu msm marshmallow kernel and have done so successfully with stock and uber 4.8 toolchains. Anything higher than 4.8 and kernel will not compile? I've looked around through some kernel devs commits but have to admit I didn't find anything and am so new at this that I wouldn't be surprised if I had seen something and didn't realize that I had found the answer? If there is a commit that allows to use something other than 4.8 toolchain I would be grateful for someone pointing it out to me? If its not that easy some direction for me to research myself would also be appreciated. Great thread thanks for putting it together!
[Android] _that:
What's your problem with a 4.8 toolchain?
[Android] brymaster5000:
You could try and start with a commit like this one: https://github.com/Elite-Kernels/elite_shamu/commit/7d5c559f060d25173c2abea869f41a3ca38ae6b4 [emoji6]

Now it doesn't end there and obviously there's other stuff in that commit, but it'll give you a sense of what to look for. We also have other commits in our repo for linaro and gcc tool chains. Good luck. These are difficult when first starting out.
[Android] rockinroyle:
No problem. Just want to try a few different toolchains to see the results.

---------- Post added at 10:01 PM ---------- Previous post was at 10:01 PM ----------

Thanks for the help. I'll start reading up.
[Android] desalesouche:
Hi all, may i request some help about that usb otg kernel error?

kernel/huawei/msm8916/drivers/usb/core/hub.c: In function 'usb_enumerate_device_otg':

/home/desalesouche/cm12.1/kernel/huawei/msm8916/drivers/usb/core/hub.c:2257:3: warning: passing argument 1 of 'otg_send_event' makes pointer from integer without a cast [enabled by default]

error, forbidden warning: hub.c:2257

Thank you
[Android] neonkat:
need some help here

LD .tmp_vmlinux1
drivers/built-in.o: In function `iris_fops_open':
/home/neonkat/android/kernel/1s/drivers/media/radio/radio-iris.c:5101: undefined reference to `radio_hci_smd_init'
make: *** [.tmp_vmlinux1] Error 1

i tried this even edited all the files needed,yet stuck in there..please help.
[Android] desalesouche:
I guess you need that commit https://github.com/Blefish/android_...mmit/1cabfb1f7e0a161165784e7293709806cb0f37fe
[Android] brymaster5000:
Can you link me your repo or the file?
[Android] desalesouche:
https://github.com/surdupetru/android_kernel_huawei_msm8916

thank you, if you need more information sir, just ask.
[Android] brymaster5000:
Are you using the hw8916_defconfig? And what toolchain are you using?
[Android] desalesouche:
Hi sir, no , i am using the g620s_defconfig .

i would ike to enable CONFIG_USB_OTG but it gives error.

I am using normal toolchain from cm12.1, i made nno change about that.

Thank you sir.
[Android] ponnex:
Hi guys! :D

I have a quick question, how do you "upgrade" a kernel, let's say from KK it's 3.4.67 to LP 3.10.x?
[Android] brymaster5000:
Are you sure the g620s is the right defconfig? Seems to me you want the one I asked about.

With lots of painstaking patches to each of the drivers that either are depreciated or updated, then all of the files that call on those drivers...
[Android] neonkat:
but i saw that people upgrade their kernel version like 3.4.109->3.4.110 by cherry-picking commits from someone who updated those manually...will cherry-picking those commits work for all devices?
[Android] matt9z9:
Thanks for the useful thread.
[Android] zeeshanhussain12:
Cherry picking works fine for the same Linux version like 3.4.x to 3.4.x , but still its recommended to have a backup or create a new branch for the updated one [emoji6]
[Android] neonkat:
sorry but i am happy with 3.4.x,no need for 3.10.x:p.
[Android] neonkat:
i am still a learning and like to play with new stuffs,i am thinking of using the uber tc as it is updated and most people are using it...i found that there are 2 versions,

*arm-eabi 6.0

*arm-linux-androideabi 5.2

can anyone tell me which one i should use?

(i read somewhere that for kernel development,you should use eabi-6.0)
[Android] judas1977:
arm-eabi is for kernel, androideabi is for ROM.

toolchain version is up to you... I use self compiled gcc 5.2 with optimizations for my phone
[Android] neonkat:
oh thanks,btw i am still a noob and don't know how to build my own toolchain..btw i have seen Gcc 5.2 toolchain gives good performance.
[Android] judas1977:
So use any toolchain you find. 5.2 should be good, but it may need some changes in kernel code. Safest for first try would be 4.8 i think...
[Android] burduli:
Gonna try to build kernel for i9082. Thanks for this amazing tutorial.
[Android] rajit:
help me... i have added faux sound control. then when i tryed to flash and boot the kernel its perfect. then if i tried to unlock its get restart .. last kmsg log -http://hastebin.com/uritesoruw.md
[Android] irfanjunaid:
Greetings Friends,

Can you help me with the following errors:

Info

: Trying to compile Samsung J2 kernel. It is 5.1.1 Lollipop.

Currently I am compiling Samsung kernel using 4.8 toolchain from CM 12.1 source. Also tried NDK - 4.8/4.9 toolchain but with same result.

This is the kernel readme:

1. How to Build

- get Toolchain

From android git server , codesourcery and etc ..

- edit Makefile

edit "CROSS_COMPILE" to right toolchain path(You downloaded).

Ex) CROSS_COMPILE=/*/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- // You have to check.

- make

$ make ARCH=arm exynos3475-j2lteswa_defconfig

$ make ARCH=arm

2. Output files

- Kernel : arch/arm/boot/zImage

- module : drivers/*/built-in.o

3. How to Clean

$ make ARCH=arm clean

$ make ARCH=arm distclean

Not sure why getting this Warning:

user@user-pc:~/Kernel$ make ARCH=arm exynos3475-j2lteswa_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
drivers/media/mtv/sms3230/Kconfig:51:warning: type of 'SMS_USB_DRV' redefined from 'tristate' to 'boolean'
drivers/media/mtv/sms3230/Kconfig:58:warning: type of 'SMS_SDIO_DRV' redefined from 'tristate' to 'boolean'
#
# configuration written to .config
#

Compilation then terminates with the following error:

scripts/link-vmlinux.sh: line 44: ~/Android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: No such file or directory
make: *** [vmlinux] Error 1

But the arm-eabi-ld is there as a link with link target as arm-eabi-ld.bfd

I followed exactly as per procedure. Could someone kindly help??? :( :crying:
[Android] brymaster5000:
What happens when you do what I edited above?

$ make ARCH=arm exynos3475-j2lteswa_defconfig

$ make SUBARCH=arm

Here's another post like yours:

http://xdaforums.com/showthread.php?p=57818309
[Android] desalesouche:
hi. May i request some help to fix those warnings ?

http://pastebin.com/4CKm0wWs

kernel source: https://github.com/G620S-HUAWEI/android_kernel_huawei_msm8916/commits/nvidia
[Android] fizbanrapper:
Revert this?

https://github.com/G620S-HUAWEI/and...mmit/5542b56278e0b8b5ce7024f07e039d10d1a5a078