yashsingh1/xdaforums huggingface dataset:
[Android] someone755:
Yes, you're posting in the incorect FORUM, what even section or thread!

But, otherwise, I do believe there should be some tweaks for the Explorer. If not, search it up on Play Store, there are some apps there...

Anyhoo, does anyone have any idea how to add zRAM to a kernel? I've searched high and low, but I can't find it.

Is this even a kernel feature (based on my knowledge, I'd say it must be...)? Or is it a ROM one?
[Android] desalesouche:
https://github.com/pier11/kernel_huawei_u8220/commit/b20eb9ef26c98634b7aa8aa3ae14daf98fb62732

adding zram
[Android] Heatshiver:
Patch Tutorial?

Does anyone know a good article or thread that explains how to create a patch?
[Android] bsmitty83:
Here you go man , BTW it was the 2nd site on Google after searching for " how to create a patch file "

http://docs.moodle.org/dev/How_to_create_a_patch
[Android] Heatshiver:
Thanks, that result didn't show up for me given that I get different results due to my location.
[Android] someone755:
Wait, so what do patches do?

Are these by any chance the things that people say I need for some governors to work?
[Android] dotafan:
You can use a patch to add governors.

They're not necessary as you can see the OP shows how to add individual governors without patch files too

Winter is Coming
[Android] someone755:
Yeah but some of my governors don't want to be added, since there are always errors (some of which I can't fix, one time there were even 3 mismatches!).

The OP shows the way I add governors, but not all will play that way.
[Android] Heatshiver:
HELP! I went through the tutorial, and after compiling, there was no zImage??? There were some random files with "zImage" as part of the name, but not the expected zImage in the stated location.

I got no errors. I followed the directions and only had deviations in two places: 1) Step1B: Some of the packages would not be installed because a Thunderbird package had replaced the intended packages and therefore was seen as unnecessary. 2) Step5PartBA: I would get an error (stating no rule to make) if I just wrote "make <your_config_name>_defconfig". I would first have to change the directory to the configs folder. I would then get a message that stated something like how there were no changes to that file so make was not needed.

Has anyone else run into the issue of not getting a zImage? What should I do? Thanks!
[Android] umberto1978:
Arch/arm/boot/

What do you have here at compilation terminated?

If you have a file image instead of zImage than change your toolchain.

The kernel you want to build must be specific for your architecture.

Inviato dal mio GT-N7100 usando Tapatalk 4
[Android] Heatshiver:
Thanks for the quick reply.

There is nothing in arch/arm/boot which is why I am worried.

The compilation finished without an issue, if you mean terminated as in error. The last line was something like wireless/net/...

I was building a kernel for my ZTE phone. The source is supposedly from ZTE, and the files inside seem to offer evidence of that.

Any other suggestions or advice is welcome.
[Android] dotafan:
Haveyou tried using governors from someone else's kernel for your device?

Winter is Coming
[Android] someone755:
Yes, that's the only thing I ever did.

Though I have to take from kernels for stock 4.1 while I'm building a 4.2 cm kernel. Could that be any reason for the errors?
[Android] g.man.7489:
[MENTION=3830475]thewadegeek[/MENTION] sorry for stupid my question, if the newest firmware contains kernel 3.4.0, hence i will only get 3.4.0 from kernel source code, right? Is there anyway to build a higher kernel (ie, kernel 3.4.5 or 3.4.10 etc)
[Android] Jaspervaneyck:
:D

Epic tutorial, thank you (:
[Android] N•X™:
Ok just to have an idea before setting up linux - how big should my partition be, if my aim is to just use it for building kernels?

I know how much space you need for one AOSP build (or a bunch of it) - but Kernels?

Great TUT btw ;)
[Android] mDroidd:
The size would be a bit smaller, but it's always safe to reserve enough, so you can build for multiple devices also.

I would use the same size
[Android] Roqu3:
I use a 10gb and works fine to build 4 different kernel sources with their branches
[Android] mDroidd:
Then use 10gb :P
[Android] thewadegeek:
Thanks glad it helps. There is no real required amount, just enough for your system, kernel, and the extra files generated during the compile.
[Android] N•X™:
just buyed a new HDD with 1TB :laugh:

BTW - first kernel build succeed - modded Recovery and chrging animation! :good:

Thx again
[Android] hell_lock:
How to add more governors??
[Android] thicklizard:
The drivers for the governor needs to go in the drivers directory then look for cpufreq. You will then need to edit the defconfig
[Android] hell_lock:
Any tutorials on dat??
[Android] Roqu3:
Need to do other little changes like the header, the makefile, check this commit from erasmux as an example, I learned from there

https://github.com/erasmux/hero-kernel-2.6.35/commit/2ade635b0607acc1ab0ec7f4d274855a9487af57

Also learn how to use git
[Android] hell_lock:
Another noob question, are the codes for a governor same in all phones? It would be beneficial for me
[Android] thicklizard:
It looks like they would be
[Android] mDroidd:
I included the "add governors" option in my tool, I'm sure it can be handy ;)

PM me and I'll send you some links
[Android] mDroidd:
yes they are,I think
[Android] thewadegeek:
The code for the governor will generally work on all devices, however developers will often tweak them as well.
[Android] hell_lock:
Any idea abt io schedulers?
[Android] Gammelgustav:
How do I change apart from username@machine-name the Kernel Info?

(LinuxVersion-Name-Version-Build)
[Android] Gammelgustav:
Only cpufreq_tables need to be changed ;)
[Android] thewadegeek:
Huh?
[Android] thewadegeek:
What about them?
[Android] someone755:
[MENTION=5191002]g.man.7489[/MENTION]: You'd need to patch and update your sources for that. Don't ask me how I know or how to do it, I have no friggin' idea...
[Android] Heatshiver:
It is possible that you cannot get one. When building a kernel, you have the option to not allow people to grab the config file from your kernel...
[Android] matrock47:
help

hmmm,,how to do that??? i already downloaded alcatel4011x from sourceforge....
[Android] jheller:
+1 thanks button from me, but could be helpful to give a bit more proza on the above. For HTC kernels from htcdev.com, the readme in it says to use google toolchains explicitly. It took quite some persistance to discover that using Doomlord's toolchain gave a lot of unexplained "Error 2" messages.
[Android] brymaster5000:
Having issues getting through my adreno.c file. I am using arm-eabi-4.6. Here is the error:

drivers/gpu/msm/adreno.c: In function 'adreno_iommu_setstate':
drivers/gpu/msm/adreno.c:399: warning: the frame size of 1064 bytes is larger than 1024 bytes; see http://go/big_stack_frame
error, forbidden warning: adreno.c:399
make[3]: *** [drivers/gpu/msm/adreno.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

I have attached the adreno.c file for reference. I searched, but couldn't find a good way to resolve the issue. Anyone know where to point me?
[Android] GideonX:
Raise the frame warning limit in your config.
[Android] someone755:
I had that same error.

Look for your Makefile and search for CFLAGS_KERNEL and add -w to it.

There's nothing wrong with your adreno.c file. :D
[Android] lozohcum:
So this is Linaro toolchain used in this guide?
[Android] Pons:
Read the OP one more time. I promise your answer is there (I just checked).
[Android] lozohcum:
Ok.

I took kernel source from CM repo, it gave me an error while it starded compiling drivers.

I had no such an error when I compiled kernel from Sony's source. When I used this guide to compile kernel from Sony source, everything went well
[Android] someone755:
^That.

I've been trying with the Linaro toolchain, but it doesn't compile, since it finds errors that the normal compiler doesn't.

Also, enabling -O3 (in the non-linaro compiler, ofcourse) gives me a black screen and won't boot. :I
[Android] azoller1:
If you want a toolchain that always works (well for me it does) use androids aosp arm-eabi-4.6 toolchain at https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
[Android] thicklizard:
If it's an HTC device. O3 yields a Zimage that it too large. It requires you to change the ramdisk.addr

Sent from my ONE
[Android] someone755:
It's a Sony. But nevertheless, that seems interesting, can you please tell me more?
[Android] thicklizard:
When you flash a kernel on a Sony is it a whole boot.img or is it the Zimage?

Sent from my ONE
[Android] someone755:
You combine the zimage and ramdisk and then flash that.

Do you really think I'd be asking if my kernel didn't even have a ramdisk? :P
[Android] thicklizard:
Well there are different ways to flash. You can flash the boot.img as a whole or use a kernel installer that flashes the Zimage and modules only. That's why I was asking for different devices I use different methods. So different methods different ways to change the ramdisk.addr. If you flash the boot.img as a whole you will need to hex edit the boot.img

Sent from my ONE
[Android] someone755:
Hmm, never thought of that, really.

Unpacking and editing (and repacking) a ramdisk is easy for 2012 Sonys, but where can I find this magical ramdisk.addr file? And when (and if) I do, what do I do with it?

I don't have it in my ramdisk, and the internet isn't being helpful about what teh file contains (maybe I do have it, but under a different name?).

Some hints I did get were that the file has things like this in it: ramdisk@0x41500000,ramdisk.

But, if that's true, there's a reason why there isn't a file like that in my ramdisk; because we use those numbers to merge the zImage and ramdisk into a boot.img.

If so, where could I get info on how should I change the command. If not so, where could I find the file (I looked everywhere, it's not there). And, what's inside it?

:::Lots of researching later:::

Okay, so it's indeed what I thought it is. Instead of having that file in the ramdisk, we use the info for making the boot.img.

BUT, how can I determine the new values? There's no other CM10.1 -O3 kernel for my device out there, so there's no way to check...

There are tools for checking on already-made kernels, but I don't have one. :/
[Android] thicklizard:
If your ramdisk.addr is 41500000 just make it a little larger like 41800000

Again I use a hex editor on the boot.img to change it before I flash. Every device is different I actually use the ramdisk.addr of 4200000 for my device.

Sent from my ONE
[Android] someone755:
Wait, I change the ramdisk address? Wouldn't it be more logical to change the zImage's, since it's the one that changed?

And what do you mean by a bit larger? I can't have all my work based off of guesses xD
[Android] thicklizard:
Well there is no exact math to it. It's trial and error. And yes I change the ramdisk.addr by hex edits to the boot.img. You can try the zImage s address, but the ramdisk.addr is what works for my past 2 devices.

Sent from my ONE
[Android] someone755:
I doubt hex editors would work here. Or they might, but I'm noob in them :I

Trying the 41800000 combo, then! :D

Dewd [MENTION=4165809]thicklizard[/MENTION], I CAN'T THANK YOU ENOUGH!! It works, but noone on our end knows why xD

Smoothness, here we COME!
[Android] thicklizard:
Glad you got it working. Who needs exact math when we have educated guesses :p

Sent from my ONE
[Android] brymaster5000:
All this talk about ramdidk.addr might be the thing I need as well...trying to port at&t kernel to the Verizon HTC one and having difficulties. After I try messing with the mount points I might try this...having a tough time getting it to boot.

Sent from my Oney Bone.
[Android] Charly1811:
I am building A kernel from source for Galaxy TAB 2 and i got the following errors

arm-eabi-ld: no machine record defined
arm-eabi-ld: no machine record defined
arm-eabi-ld: no machine record defined
arch/arm/mach-omap2/built-in.o: In function `usb_musb_init':
/home/charles/android/source/kernel/samsung/arch/arm/mach-omap2/usb-musb.c:143: undefined reference to `omap4430_phy_init'
/home/charles/android/source/kernel/samsung/arch/arm/mach-omap2/usb-musb.c:176: undefined reference to `omap4430_phy_init'
drivers/built-in.o: In function `ehci_hcd_omap_remove':
/home/charles/android/source/kernel/samsung/drivers/usb/host/ehci-omap.c:255: undefined reference to `omap_usbhs_disable'
drivers/built-in.o: In function `ehci_hcd_omap_probe':
/home/charles/android/source/kernel/samsung/drivers/usb/host/ehci-omap.c:181: undefined reference to `omap_usbhs_enable'
/home/charles/android/source/kernel/samsung/drivers/usb/host/ehci-omap.c:231: undefined reference to `omap_usbhs_disable'
make: *** [.tmp_vmlinux1] Error 1

Any ideas ?
[Android] someone755:
Check the two files that are listed (usb--musb.c and ehci-omap.c) and check for errors.

Try adding/removing text (logically, of course), you can help yourself with kernel sources from other people (for your device, that is).
[Android] Jasi2169:
i need linux ??

i have windows ,will it work if i install ubuntu ?

thanks
[Android] someone755:
Number one:

Never quote the entire OP, especially if it's long.

Number two:

No. You need Linux. Any distro will do.

You can run it in a VM (virtual machine), though. That way, you won't need to install it and it'll only eat as much resources as you allow it to. Though that comes with a price of degraded performance both on your machine as well as inside the VM.

Another way is to boot it off an USB key, but you'll need a big enough key with enough persistence. The faster the key, the faster the whole system will run, but you'll be bottlecapping your CPU and RAM performance with that.
[Android] Recognized Noob:
hey i tried to do execute this comand given in op

make <ur config name>_defconfig

I keep getting the error-

make: *** No rule to make target
[Android] someone755:
First, make sure you're in the correct directory. If you are;

Make sure you've specified your Architecture and Compiler path (ARCH=arm CROSS_COMPILER=path/to/compiler).
[Android] lozohcum:
how can I attach my kernel zImage to CM10 build from source?
[Android] someone755:
Create a kernel.elf, rename it to boot.img and replace the new one with the one from your cm10 build a
[Android] Pons:
If you yourself build CM10.x and kernel both from source, instead of compiling separately, and adding the kernel later for one flash, try....

Doc: integrated kernel building
[Android] Ghostfreak NB:
Hello experts,

I'm trying to build my first kernel based on cm 10.1 nAa source for my device(haida-codename)

The OS i'm trying it on is Ubuntu 13.04 64 bit version.

Part A i completed without errors (atleast i guess so)

Of this,

I could do the Step A

Step B is for editing i suppose which i'm not familiar with.so i'll move to Step C

When i type make -j3(as i've a dual core pc)

I get the following error

nishil@ubuntu:~/android/kernel/3.4$ make -j3
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
HOSTCC scripts/bin2c
make[1]: `include/generated/mach-types.h' is up to date.
as: unrecognized option '-EL'
CALL scripts/checksyscalls.sh
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
nishil@ubuntu:~/android/kernel/3.4$

Am i missing any installation of any packages?

Any help is appreciated.Thanks.
[Android] vishal_android freak:
You need to do

make menuconfig

before going towards

make -j(no. Of cores +1)

Regards,

vishal_android freak

---------- Post added at 11:41 AM ---------- Previous post was at 11:39 AM ----------

Also 3.4 kernel needs deletion of a line in make file to compile properly

Regards,

vishal_android freak
[Android] jioe:
damn usefull guide, thx alot:good:
[Android] Ghostfreak NB:
Made the changes in makefile..

But [MENTION=4910197]Attitude.SSJ[/MENTION] suggested you can skip that step..(menuconfig) Can you confirm?pls?

REgards,

Ghostfreak NB
[Android] Somcom3X:
http://pastebin.com/qNEtPaLv

Anyone think they know the answer? It's the 4.4 source I'm trying to build. I've merged omni's but that hasn't made much of a difference.
[Android] djayz111:
very useful Guide. thanks
[Android] vishal_android freak:
Your init.c file is having some missing stuff.. Can you upload your init.c file?
[Android] someone755:
Umm, are you sure that's a kernel compiling error? I don't havez a /system folder in my kernel source, and I think it's kinda a ROM compiling error...
[Android] brokeny:
i should try

Maybe i should try it. thanks dude.
[Android] Sefalexin:
try this

Is mtk6577 kernel support swapper ?
[Android] desalesouche:
hi all is there change to do to adapt the kernel from 4.3 to 4.4?

thank you
[Android] :
I get this issuse when i run make -j2

"make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found

scripts/kconfig/conf --silentoldconfig Kconfig

make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found

CHK include/linux/version.h

CHK include/generated/utsrelease.h

CC scripts/mod/empty.o

/bin/sh: 1: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: not found

make[2]: *** [scripts/mod/empty.o] Error 127

make[1]: *** [scripts/mod] Error 2

make: *** [scripts] Error 2

make: *** Waiting for unfinished jobs....

make[1]: `include/generated/mach-types.h' is up to date."

I've tried looking around but can't find the solution to this, can anyone help?
[Android] brymaster5000:
Did you set ARCH=arm?

Sent from my Oney Bone.
[Android] bsmitty83:
You have to set your path to toolchain with

export CROSS_COMPILE=~/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-

THEN

set your path to arm architecture with

export ARCH=arm

Then make -j2 , the error is it can't find your toolchain
[Android] someone755:
Also, first time building after adding a new tweak, working with -j1 stops right after an error happens, and you can read all about the error, which helps you fix it.
[Android] :
I'm still running into the same issue, I even added that into my path in .bashrc, and still get the same issue.

http://pastebin.com/xH39Bb1V

edit:

I added this in bashrc at the end:

"PATH=$PATH:~/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-" as well, as suggested by another tutorial (an xda university tutorial on compiling a stock kernel"
[Android] vishal_android freak:
I was having same issues on ubuntu 12.04.. Tried every damm thing.. Switched to 13.04 and all was fine

Regards,

vishal_android freak
[Android] :
I'm running ubuntu 13.04 currently.
[Android] vishal_android freak:
Did you try using other toolchain?

Edit : I see you haven't done

make your_device_name_defconfig

Defconfig are present in arch/arm/defconfigs

Find yours and write the make command for it

Regards,

vishal_android freak
[Android] :
Yes, I've tried using the android ndk toolchain as suggested by this tutorial:

http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source

but ran into the same issue, which lead me to seek another tutorial, and came across this more detailed and more helpful one.
[Android] vishal_android freak:
Read my above edited comment.. :)

Regards,

vishal_android freak
[Android] :
I've followed everything in the tutorial:

http://pastebin.com/jCSZXx5V
[Android] vishal_android freak:
I think you should change toolchain.. May be you can try linaro.. The links to doomlord's toolchain are given in this thread in step 2 I guess

Regards,

vishal_android freak
[Android] :
I was originally using linaro's toolchain:

http://pastebin.com/m3Up51n0

Somebody suggest that I change the EXPORT CROSS_COMPILE, which I did to no avail.
[Android] bsmitty83:
Where is your toolchain located ? , if you have it in /usr , try moving it to home .
[Android] someone755:
Are you pointing the toolchain to a path where your toolchain is? Like, exact to the letter?
[Android] PartyDroid:
thanks

thanks for every ones help here everybody's help and insight here has been very helpful to me a lot i wanted to say thank you to everybody for there insights.
[Android] :
Kernel compiling issues

Anybody can help me with this issue when compiling i keep getting this gcc-wrapper.py error and i put my path correctly but i keep getting this with phyton subprocess.py which i have no idea what is the error??

techix18@techix18-Inspiron-N5110:~/kernel$ make
Traceback (most recent call last):
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 106, in <module>
status = run_gcc()
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 96, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/power/Kconfig:318:warning: type of 'BQ27425_FUEL_GAUGE' redefined from 'boolean' to 'tristate'
drivers/usb/function/Kconfig:4:warning: type of 'USB_MSM_OTG' redefined from 'tristate' to 'boolean'
drivers/video/msm/Kconfig:352:warning: defaults for choice values not supported
drivers/video/msm/Kconfig:362:warning: defaults for choice values not supported
drivers/video/msm/Kconfig:372:warning: defaults for choice values not supported
drivers/video/msm/Kconfig:382:warning: defaults for choice values not supported
drivers/video/msm/Kconfig:392:warning: defaults for choice values not supported
drivers/usb/gadget/Kconfig:1284:warning: defaults for choice values not supported
warning: (ARCH_MSM7X27A && ARCH_MSM7X30 && ARCH_QSD8X50 && ARCH_MSM8X60) selects MSM_DALRPC which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM_SCORPION || ARCH_MSM_KRAIT))
warning: (ARCH_MSM7X27A && ARCH_MSM7X30 && ARCH_QSD8X50 && ARCH_MSM8X60) selects MSM_DALRPC which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM_SCORPION || ARCH_MSM_KRAIT))
Traceback (most recent call last):
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 106, in <module>
status = run_gcc()
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 96, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
include/config/auto.conf: line 534: KERNEL_LOCAL_VERSION: command not found
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
Traceback (most recent call last):
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 106, in <module>
status = run_gcc()
File "/home/techix18/kernel/scripts/gcc-wrapper.py", line 96, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
techix18@techix18-Inspiron-N5110:~/kernel$

Device:Galaxy Ace PLus

Toolchain:Linaro Toolchain 4.6.2
[Android] shadman0:
Can it possible in windows

Shadman0 If I help U Pls Give Thanks

My Work http://xdaforums.com/showthread.php?t=2521867
[Android] thicklizard:
No

Sent from my HTCONE
[Android] commencal661:
Actually, it is. You'll need CygWin (Linux terminal emulator for Windows), but it's actually too much hassle, it's way easier to install Linux on a physical/virtual machine and set up the build environment there.
[Android] hell_lock:
u have python installed on ur system??
[Android] :
I have Phyton 2.7 installed and i am not sure why this is causing the error so i planning to revert back to Ubuntu 12.10 because 13.10 seems to have lots of problem