yashsingh1/xdaforums huggingface dataset:
[Android] KOala888:
yup, I typed "-" instead of "~", now typed correctly and get such an error

make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
drivers/media/Kconfig:166:warning: defaults for choice values not supported
drivers/media/Kconfig:172:warning: defaults for choice values not supported
make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: 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
/bin/sh: 1: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2

Maybe you could upload your toolchains folder somewhere, so I would be able to use commands provided in guide withuot such a bugs?
[Android] Deadly:
Try this.. its my own repo of my kernel.. u can get that folder.. or read readme.md file to get from original link.. https://github.com/nitubhaskar/Compact/tree/4be08621b7947155bf448b89fbe571e32075d890/arm-2009q3

hit thanks button! If above post helps you..

Sent from my GT-S6102
[Android] thewadegeek:
How many cross-compilers do you have installed? Looks like a conflicting path issue to me.
[Android] ciscogee:
Your makefile need to point to your toolchain

id recomind using the toolchain specified in the source txts. (that arm-none-linux-gnueabi-gcc is specific, i havent seen a newer version [ggc4.4.1] i believe to be most current)

Make file line ~187

What device? That's the same toolchain I use. 2009q3 :)
[Android] anryl:
make shooter_u_CMOC_defconfig
make -j16 ARCH=arm CROSS_COMPILE=/home/anryl/GPL_toolchains/bin/arm-eabi-

u see my code from script

u dont have to use export or modify makefile

this line

/home/anryl/GPL_toolchains/bin/arm-eabi-

comes from the path where are the files stored

so if my toolchain extracted gcc is

/home/anryl/GPL_toolchains/bin/arm-eabi-gcc

so u see how it works now ?

for u toolchains u have to know where are the files stored and point the compiler to it

:good:
[Android] ciscogee:
do toolchains time expire?
[Android] umberto1978:
Until you dont restart the terminal.

Each time you close and restart terminal you must declare toolchain.

Inviato dal mio GT-I9100 con Tapatalk 2
[Android] ciscogee:
As in export= cmds etc?

I think that was my main problem :)
[Android] Adi_Pat:
Hey look!

All android Toolchains here: https://github.com/AdiPat/Android_Toolchains

And, if you want to spot any error, this is what I do.

make -jx > compile.log 2>&1 && cat compile.log | grep "error" > error.txt( This will give you a compile log)

Open out, error.txt and check for the errors. You wont need to sit constantly staring at your screen + It will save time :D

{x = no. of threads}
[Android] forumber2:
Include problem

Hi everyone!

I want to pass directly to the issue, because I haven't got enough time. I downloaded offical kernel source from manufactor (Huawei) site. But I encountered some problems. I don't apply any custom patch yet. I changed some values for fix compiling errors but I can't solve following problem;

I'm using this defconfig;https://github.com/forumber/kernel_u8800pro_3.0.8/blob/master/arch/arm/configs/hw7x30_defconfig

And here is my github source;https://github.com/forumber/kernel_u8800pro_3.0.8

Thanks in advance :)
[Android] anryl:
Get the config from u device /proc/config.gz this one should work

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] ciscogee:
Some devices do not include .config.gz

Might have to use /scripts/iextract.sh or whatever in kernel sources.

It may also not be there either.

(Which is the case for my device)

So then its gets fun building and rebuilding to get a successfull .config
[Android] anryl:
So use the one from another Huawei to compare it or other Huawei git,s or it will be really difficult

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] Adi_Pat:
Please upload an English log so that I can help you.
[Android] anryl:
To osgema wrong toolchain look in u device info what toolchain they used

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] anryl:
With cpuspy ul see the info

With systemtuner as well

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] osgema:
Cpu spy

Kernel info
Linux version 3.0.8+ (xmypf@server-34)(gcc version 4.4.0(GCC)#7 SMP PREEMPT thu Sep 6 09:52:38 CST 2012

CPU info

Freqs range 252Mhz-1608MHz
Scaling range: 252Mhz - 1608Mhz
Processor : ARMv7 Processor rev 0 (v7I)
processor :0
BogoMIPS : 3023.01

processor :1
BogoMIPS :3023.01

Features: swp half thump fastmult vfp edsp neon vfpv3
CPU implementer :0x41
CPU architecture: 7
CPU variant: 0x3
CPU part: 0xc09
CPU revision : 0

Hardware : RK30board
Revision :0000
Serial: 000000000000000

Is this what you want?
[Android] anryl:
So the source compile with toolchain 4.4.0 for linaro toolchain u have to fix it

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] _omegamoon_:
@osgema, could you please share a link to the kernel source you're using? It looks like you're the proud owner of the rockchip rk30xx kernel source, which is not widely available as far as I know. So please share!

Thanks in advance!
[Android] osgema:
And as I do?. I have no idea. Do any manual?

---------- Post added at 10:14 AM ---------- Previous post was at 10:09 AM ----------

not let me put link.

s3.amazonaws.com/tabletfirmwares/GPL/GPL_Edison.tar.gz

Add the missing w
[Android] thewadegeek:
If you are manually typing the export commands into the command line then the modification to the variable will only be held tell the Terminal session is closed.

A easy way to prevent this is to edit your .bashrc or modify your Makefile.

make -j1 works fine for this as well.

Precisly. I suggest finding another device with a similar chip-set and using their defconfig.

Guys if this is going to get device specific like sharing source and trying to get a booting kernel for it, you would be better off making your own thread. Also I would appreciate it because then I do not have to wade through all of your device specific posts.
[Android] thewadegeek:
Also I am a native English speaker, and while I understand a LITTLE Spanish, please post any and all logs in English.
[Android] anryl:
Ok unsubscribed :banghead::mad:

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] thewadegeek:
Ok...
[Android] osgema:
Sorry, my intention was not to soil the thread.
[Android] thewadegeek:
No problem, I'm just saying it will be easier and more organized for all involved if we separate the two subjects. Feel free to ask back here with any questions relating to the tutorial, but you'll get much better support if you create your own thread.
[Android] LEGOracer69:
In step 6 i have no zImage file, but the process was succesfull i think. There was no errors.
[Android] thewadegeek:
If there is no zImage then I'm guessing you have a problem. I would suggest re-examining your output or posting it here, but based off that post there isn't much I can do to assist you.
[Android] LEGOracer69:
Well, last lines of poind 5 D is

But I don't think it is useful.

I have kernel extracted in folder:

/home/root/android/kernel/kernel-3413268

My device is ASUS TF700 infinity.

Please tell me what file should I copy here. Should I restart whole process (point 5) ? It was first time so I have made 5A, 5B and 5D without 5C. Maybe I have changed somethink badly in second part of point 5B??
[Android] hell_lock:
What all mods can be done on ramdisk?
[Android] thewadegeek:
Ok you did 5D? If so that output looks fine, if you are typing "make modules" then you are telling the compiler not to worry about building the kernel, to just compile all the kernel modules. To build the kernel you need to type the "make -j<max num of jobs>".
[Android] thewadegeek:
Totally depends on your device and ramdisk, plus that is beyond the scope of this thread. I suggest reading this link http://www.ibm.com/developerworks/linux/library/l-initrd/index.html to get a idea of how the ramdisk works so you can come up with your own modifications.
[Android] KOala888:
Okay, I have set path to arm folder inside makefile as nitubhaskar advised me and compiled from source without any changes in kernel. I gt such an error:

In file included from drivers/gpu/pvr/osfunc.c:39:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
drivers/gpu/pvr/osfunc.c: In function 'OSAccessOK':
drivers/gpu/pvr/osfunc.c:2144:13: error: variable 'linuxType' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[3]: *** [drivers/gpu/pvr/osfunc.o] Error 1
make[2]: *** [drivers/gpu/pvr] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
koala888@koala888-VirtualBox:~/android/kernel/AMBRICES$

any idea?
[Android] Adi_Pat:
Open your Makefile,

Search for 'KBUILD_CFLAGS' under any of those if there is -Werror , remove it.
[Android] thewadegeek:
Or you could actually go in and fix the error you know. Guys if you don't eve have a elementary knowledge of C then you probably shouldn't be screwing around with kernels.
[Android] Adi_Pat:
Who me?

I know C,

The -Werror flag causes gcc to make all warnings into errors, thus stopping Compilation. :)
[Android] Deadly:
yup.. i think thats what causing it too.

@adi_pat.. i think thewadegeek meant in general for others.. not you..
[Android] thewadegeek:
I wasn't precisely referencing you my friend. Yep and it is used to try and remove warnings from your code by just that method. What I'm saying there is if the guy doesn't know enough about C to figure that one out, he has no business trying to build kernels.
[Android] triptosyll:
Or at least he has no business building kernels if won't take that info and realize he needs to do some learning. Even tho you may not modify the source of the kernel, if your going to compile source, you need to learn a language or two. Do yourself that favor. Things get a lot easier after that. :thumbup:

___________________

Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
[Android] hell_lock:
I dont know c but I hav compiled 3 kernels for different phones from source already! So I wouldn't say that knowing any programming language is mandatory. I understand things by browsing on github n makin sense out of codes..
[Android] Adi_Pat:
Knowing C is important for Kernels because if you don't know C you would just be randomly pasting code into the source which doesn't make sense, Governers, IO Schedulers and defconfig changes do not need know-how of C.

And, one cannot simply make sense out of code without knowing its syntax
[Android] hell_lock:
Well I can xD m unique.. Uc, uv n adding frequencies doesnt need c also!

Press thanks if it helps
[Android] sakindia123:
Well even a chimp can learn a few things if u teach it,but it doesn't understand what it is doing

Spend some time learning the language,u don't want to speak Chinese without knowing what exactly u r speaking

Also adding oc and UV - I bet u kanged the code from somewhere, and u don't need to know any programming language to copy paste

Sent from my GT-I9100
[Android] hell_lock:
Copy paste is the wrong word. Same tricks dont work on all phones.. Btw wats the best source for c?

Press thanks if it helps
[Android] Deadly:
PM ed you about it..
[Android] KOala888:
thanks for advice, done but same error :(

As some people above me said, exacly, I just want to make some copy paste work with kernel and start witrh at least this ;)

no C knowledge at all
[Android] LEGOracer69:
I have similliar problem:

My makefile is here:
[Android] Deadly:
similar problem?? the one you quoted doesnt have any error log... so no one i believe can help you.. please post the log which has the error message too.. yours has only warnings..

and use [ hide] message [ /hide] without space inside [ ] to hide them and it makes easy to go through threads..

You can edit your makefile 196 line

like this..

change "your path to tool chain" to the path..

For EX:

EDIT: I looked into your makefile.. your KBUILD_CFLAGS is fine..
[Android] coolsandie:
Warnings are not Errors!

You'll get the zImage (in most cases), even if it displays lots of warnings.
[Android] Deadly:
See the last line in his quote bro.. he has got an error... but the error is appearing far before in terminal and he missed it while pasting here..

hit thanks button! If above post helps you..

Sent from my GT-S6102
[Android] coolsandie:
Yes, I meant if it displays lots of warnings, that doesn't mean he won't get the output. But if it displayed Error, then its an error.
[Android] AL92:
GREAT! This is realy big guide for who want to star building kernels
[Android] thewadegeek:
We need the part of the output actually pertaining to the error.
[Android] KOala888:
YEEEESSS, I have successfully compiled my kernel with arm-eabi-4.3.3 as one of the my device's devs suggested.

Thank you guys for all the help. I appreciate that guide, It's really good starting point.

Is it possible that 4.3.3 compiles sort of slower than 4.6.2?

It took ages. Too bad Vm doesn't seem to work on 2 cores on my PC
[Android] xiaoniou:
i only say

Remember to post 8 "reserved" posts if you create a guide for feature expanding
[Android] thewadegeek:
Possible, but not likely. I'm more inclined to think it was do to you being in a VM.

Ummm...if I would like to write another guide I'll just start a separate topic.
[Android] thicklizard:
To test to see if it works you would need to put it in a zip file. Easiest thing for now just for testing would be take a kernel zip that already works for your device and replace the zimage and the putting your. Kos in the sytem/lib/modules folder
[Android] :
Thanks. Will try
[Android] :
To make changes to kernel, before I run build_kernel.sh, do I need to set "msm8660-perf-PRESTO_TP20_defconfig" with "make msm8660-perf-PRESTO_TP20_defconfig" and then run "make menuconfig" ... obviously after I make my adjustments to any kconfig, makefiles, and create any files i need?

Here is my build_kernel.sh file.

Based on what you see from this file, would I still be able to run build_kernel.sh after make menuconfig and other steps, or would it wipe them away?

Here is my complete build output from terminal.

You will notice in my terminal output I only typed ./build_kernel.sh (from my terminal directory of course). This is because I modified the build_kernel.sh file to execute export ARCH=arm, export SUBARCH=arm, and export CROSS_COMPILE={my toolchain path}

Also, where would the zimage in the existing rom be located?
[Android] thicklizard:
Zimage is embedded in the boot.img so you would need to unpack and repack the boot img if someone already has a kernel for your device chances are they would have the scripts in there zip file to do this in the kernel folder. You would just delete their zimage and replace with yours. And then replace the modules with yours. As far as your other questions it seems like you should be good.
[Android] :
Thank you.

Unfortunately, we have no custom kernels, or roms for our device as of yet. I am simply trying to provide a start point for it to take off. I have had to learn much in recent months, to even get this far. I will look into tearing apart the boot.img. Thanks again
[Android] Deadly:
Use this tool to tear dowm that boot.img.. Link

Extract the file from zip file.. its a perl script..

You will have to keep the boot.img and the file in same folder.. and open terminal in that folder.. and type this command..

perl split_bootimg.pl boot.img

You will get 2 files.. one is zImage and other is ramdisk.. so all you need to do is repack your zImage with ramdisk you obtained..
[Android] :
Awesome. Thank you!

Question: I have a Python based pdl extractor script that I use to pull all of the images (ABOOT.img, RECOVERY.img... etc...) from the source. Will this tool split all .img files, or only boot.img?

And what about to repack when done?
[Android] zainthesnipe:
Is: command not found

oh and btw on step one how do u get those files im pretty sure i have them but wanted to get them, again if needed.

ty for ur help so far
[Android] thewadegeek:
"ls"

Not found? You are running Linux right man?
[Android] zainthesnipe:
yea im running 12.4 ubuntu

im serious it says command not found

adb is working btw it recognizes my device and i can do other commands
[Android] thewadegeek:
Did you change your shell or do anything funky like that? And at the very least can you use the GUI or something to tell me what's in the folder?
[Android] zainthesnipe:
here

there is probably something wrong with the location of the config file to pull
[Android] thewadegeek:
Ok do you have a device running a kernel similar to this, or a ROM based of of this? If so you need to have that device plugged in. Then open your terminal and type "cd ~/android/kernel" again. The "root" directory means the one containing all your source code.
[Android] zainthesnipe:
yes i do

so on ubuntu open terminal and type cd android/kernel that is where my source code is....

"remote object '/proc/config.gz' does not exist" is the error i get when i do the pull request

there already is one in the source so i'll use that one for my device

cleankernel says no directory was found when it get s to last subfolder
[Android] cdesai:
Everthing of this isn't needed

mkdir -p android/kernel

Better upload a diff somewhere, or atleast move the governor somewhere else ( gist, pastebin, etc)

<your_config_name>_defconfig
[Android] zainthesnipe:
Turns out cyanogenmod has the config for my device so I just used that. Still no help on my last post?
[Android] Jamison904:
Awesome info buddy! One question, anyone has some insight on adding backlight notification (BLN) support for ICS (SGS2 T989)? I am just trying to add it to the stock kernel for my ROM. This will be my first attempt at build a kernel so I am lost. I have been reading and screaching for days and cannot find the exact process. THanks for the help in advance. backlightnotification
[Android] zainthesnipe:
no love for my problem? :( literall on last 2 steps -_-
[Android] thewadegeek:
Sorry guys I was on vacation. When I get back from work tonight I'll take a look at both your problems and see if I can help
[Android] Hacre:
Further to this..

There's no need to load .config in make menuconfig because that's what make menuconfig loads anyway, you've already taken care of that with the make whatever_defconfig

'E. Type "MakeKernel"' won't work because 'MakeKernel' isn't in the execution path, it should be ./MakeKernel

As this is a tutorial, the scripts, in my opinion, should be taken out because you're already shortcutting the fundamentals, i.e. setting up the build environment (export ARCH=arm, export CROSS_COMPILE=arm-eabi- etc).

To begin with someone learning how to do this should become familiar with the tools they're using. Your script/tutorial also mentions make -j4...what if they don't have a 4 thread/core system? What if they have 6 threads? Or 8? This option should be explained in a tutorial covering something like compiling kernels. This isn't basic stuff, we're now getting into the nuts and guts of Android, modifying code at the heart of the operating system and handing out this code to people to use. This shouldn't be taken lightly and the person doing it needs some education on the matter, not just hand holding.

This is literally a "Do this, this, this and this and out pops a kernel" it's barely a step away from a kitchen. By this stage, things should be being explained, for example WHY are you editing Makefiles? What are those changes doing? What are each of the packages you're telling people to install do and how are they relevant to kernel compilation?

You haven't thought this through and yet still saw fit to regurgitate it onto the forums. Why does someone need openjdk to build a kernel? Why do they need mingw32? Why do they need open GL libraries? GnuPG? "Don't think they are all required but install them anyways" hahahaha what? Are you serious? You're not even at step C and you're already being lazy with your guide and half-assing it.

There's an old saying, the only thing more dangerous than stupid, is stupid and armed with a little knowledge. While the spread of knowledge is a good idea, a guide like this, for this, written like this, is absolutely not.
[Android] Hacre:
He said ls not Is as in LS, ELL ESS.

This is basic shell stuff, if you're not familiar with a shell you've gone too far trying to use compilation tools and mess with kernels.
[Android] thewadegeek:
Thanks for the feedback, implementing some of this in the new version. I am however leaving the mkdir's and broken apart. Practice makes perfect, and the more you get people typing theses commands the better they will understand. Those of us who know enough to not need the practice will know we can use the -p flag.
[Android] thewadegeek:
Derp, duh thanks. :P

Yep typo.

Valid points I'll integrate them.

Nope I wasn't really thinking, but I WAS planning on fixing and updating it as I went. There was some people who wanted a quick and dirty guide so I posted it to help them out. I didn't realize people(you) would freak out about it. I'll fix it up here and re-post. Once I get the new version up will you skim through it again and tell me what you think?
[Android] thewadegeek:
Ok new version up. Feedback welcome and appreciated.