yashsingh1/xdaforums huggingface dataset:
[Android] ahmedsheme:
try

ok going to try :rolleyes::rolleyes::eek::eek:
[Android] Pons:
Pretty sure you can't compile a kernel without source....

And please don't quote the entire OP. It's a little inconsiderate to make other users scroll ~10 times down just to read a minor question.
[Android] Boocy:
Question

Hello, will I be able to enable swapping on my phone using this tutorial? And if not, I would like if someone could give me suggestion how to do this (I need it to expand my RAM)? I have HDC Galaxy S3 G9300.
[Android] kylon:
You only need to enable swap from the menuconfig
[Android] Ankhie:
Help

T_T

need help
[Android] ciscogee:
Any good references available to suggest getting into learning C? Most guides or ref books are c# or c++...

Thanks (I've been subscribed since post 1)
[Android] joewong1991:
You need to find your device defconfig have a look in the read me in the source should tell you in there

e.g. my defconfig for one x is ap33_android_defconfig
[Android] joewong1991:
Ye you can also use config from proc but I found this way easyer and faster :D

Edit: read me is not in source it's in the zip it comes in
[Android] joewong1991:
Not sure to be honest I never managed to us config from device allways had similar errors
[Android] sgt. meow:
This may sound stupid, but 90% of the time this happens when you have not exported your toolchain path or are in the wrong directory.
[Android] sgt. meow:
Cd to the root of your kernel source. Easy way to check this is by issuing ls. If you get some thing like arch, Documentation blah blah...you e good to go.

---------- Post added at 02:28 PM ---------- Previous post was at 02:03 PM ----------

Are you sure there's a config_defconfig in arch/arm/configs? If you pulled the config from /proc/ you can rename it to XXX_defconfig and paste it in the aforementioned directory. Then continue as you would normally.
[Android] icspanneer:
NIce Job..... :)

:cowboy:thanks foe this guide......
[Android] Boocy:
?

First of all, thank you very much for answering on my question..

I have done a little research on menuconfig, and it seems that I got to have kernel source for my phone to go trough with this tutorial, and I found some mtk6577 kernel source, but I am not sure it will work, is it possible to make this done by spliting boot.img like it is shown in this tutorial; http://xdaforums.com/showthread.php?t=1272270

Regards,

Boocy.
[Android] edd-1988:
tell me how or do it

Hello everybody

i have two firmware for two Chinese tablets they have the same possessor ram all things is same ,just a camera and the screen is not the same ...

the first firmware (rom ) is good and much better than the original firmware for my android tablet .... and i try to install it and it s working well .. but i have two problems the camera and touch screen didn't work ....

so how can do to fix this problems .. ... what i should take from the original ROM to make it on the other ROM ?

or can you do it for me ?? i can send the two roms...

please tell me what i should do for any questions i am here to answer thanks ....
[Android] ciscogee:
Sounds like porting to me, this thread deals with compiling kernels from sources. Not porting roms. There are a few great threads on this around, search "port rom"
[Android] Guntur_ROXX:
thx

cool tutorial

want to make it :D
[Android] msg04:
nice tut! I was able to successfully build! Now to play around and see what fun tweaks I can make. Thanks!
[Android] brymaster5000:
Try ubuntu 12.04.

Sent from my Skyraiding Dinc2.
[Android] kylon:
.........................

It was working before
[Android] worf_1977:
You know that if you are suscribed to this thread, while in my SGS3 is a nightmare to view long posts, don't you? :confused:

Sent from Quo'nos via subspace transmission
[Android] kylon:
Sorry

Any help?

Ps tapatalk needs some improvements
[Android] Bastaerd:
If it was working before, what did you change?
[Android] kylon:
As i said i installed the packages from xda university to build android from source
[Android] thicklizard:
Here you go just copy and past in your terminal

Sudo apt-get install libncurses5-dev
[Android] kylon:
Thanks it works

I would like to know if this pkg can interfere when you build android...
[Android] GideonX:
Nope
[Android] bendy86:
Great stuff.
[Android] aweosomeabhijeet:
Ubuntu 10.04

abhijeet@ubuntu:~/android/kernel$ make XT_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/kconfig/kxgettext.o
make[1]: *** No rule to make target `scripts/kconfig/zconf.tab.c', needed by `scripts/kconfig/zconf.tab.o'. Stop.
make: *** [XT_defconfig] Error 2

Help.

PLease

Anyone?
[Android] dtrail1:
It looks like this issue appears after "export ..XT_defconfig? Not sure, but it seems that you didn't tag your compiler with the required arguments, like

export PATH=~/PATH/TO/arm-eabi-4.4.3/bin:$PATH (just an example, depends on your cross compiler)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make ARCH=arm XT_defconfig
make

This is only an example. If your kernel runs on arm-based CPU device you have to use arm architecture supported cross compiler like above.

If I'm mistaken here, sorry. Someone may correct me then.

If you already did this, you may look into the related C file and fix that issue which is shown there:

You see that something in "scripts/kconfig/conf.c" in line 105 is wrong. But it only a warning, so I'm not sure. Look into it for further reasearch. ANother suggestion is to look if you really need that related feature/option in your kernel. If not you may disable it in your defconfig and try again to build it.

Ok, guys, I have a problem too:

I'm building an OMAP Kernel for UMTS_SPYDER (Motorola Razr) and I'm stuck on the custom name.

I tried to add a LOCALVERSION string, I also tried it via KBUILD_BUILD_VERSION... I tried everything I could find but it won't work. On first try with custom localversion it didn't boot. The KBUILD method let the kernel boot but in phone info it shows "Kernel Version: Unavailable" while in any usual Kernel Settings / Monitoring App it shows me the full version string including my Custom Name string. The I reverted all changes and it still shows me "Unavailable"...

And I tried to "dirty hack" the "-dirty" tag in /Scripts/setlocalversion . I changed the "-dirty"-Tag to something else as it's only a printf-string, in theory it would display anything I set there... I can't continue...it still shows me "unavailable"...

Someone in another thread answered me already and I will quote my other answer here:

I know that the localversion has to match some prebuilt modules, but I don't know how to handle this exactly. Without a custom name it works with all features and it's stable.

Oh, and btw: I currently have a custom name in the "server@host" line from mkcompile_h. But it was nice to have a custom name in the version string. :)

Anyone has a suggestion for me? thx.
[Android] boyprodn32:
good tut for me :), thanks
[Android] Martini3001:
At first:

Thank you for your nice tutorial! :good:

But I got a question:

I got a S4 (I-9505) using CM10.1 -> could I use the Samsung kernel source to configure my own kernel for Cyanogen or is something else to do to get an kernel for CM?

Thanks a lot!

Martini
[Android] dtrail1:
If cm10.1 is already working on the S4 you'll have to grab the kernel source from cyanogenmod github site. It includes the right configuration for the S4. If your want to develop new features into the kernel you can also work with the cm source.
[Android] Ryrzy:
hi,

i'm compiling kernel for i9300 and i will compile it with linaro 4.7. i have made fixes: https://github.com/ryrzy/s3_JB/commit/b3167793836263332143d8706d3e2ffd5588e705 but kernel is instabile and (i think so) is to big (its about 1mb more with modules than on gcc 4.4.3) ... after flashing this kernel recovery is not working (download mode goes on) i think boot.img overwrites recovery (is it possible ?)
[Android] Ryrzy:
ok... i have fixed this :) now file has normal size and it dosn't break recovery :)

https://github.com/ryrzy/s3_JB/commit/d61285eb2d4f9120464d9381ca284826235f6629
[Android] dtrail1:
O2 flags are beloved by most kernels :D
[Android] badtreep:
what if i don't have any source code for my phone? can i build a kernel without it? thanks!
[Android] badtreep:
crap. i thought i can build a better kernel for my device. thanks anyway!
[Android] cj360:
Not sure how many people still build cm7, but I'm confused on building an inline kernel. Are the configs different then:

TARGET_KERNEL_SOURCE :=
TARGET_KERNEL_CONFIG :=
TARGET_KERNEL_CUSTOM_TOOLCHAIN

Since it's goten so old I'm not sure what the orrect settings are.

Sorry if this should be in a more cm7 oriented thread, since it's for building a kernel I thought I could ask here.
[Android] hell_lock:
I don't get your question. Do you want me to enter some values in that stuff you gave above or you want something else? Please rectify.
[Android] morfys:
Pretty much covers most of the information I was looking for.. thanks a ton bro !! :good:
[Android] cj360:
I building cm7and with the above values it doesn;t know/won't build the custom kernel I have setup.I wondering are there different values for kernel building back on gingerbread?
[Android] hell_lock:
can u show me the values?
[Android] cj360:
Edit- yes inline kernel building wasn't implemented till cm9. Figured out my issue
[Android] dtrail1:
I was still hoping for an advice... Anyone?

Gesendet von meinem A101 mit Tapatalk 2
[Android] aweosomeabhijeet:
Didn't worked. I think there's something in the source itself.
[Android] bcchgeneral:
Stock kernel vs custom kernel?

Please excuse the noob question, I was intrigued by this tweet from dtrail:

<blockquote class="twitter-tweet"><p>Stock kernels have the best battery life atm... Why kexec can't reach that amount? Need to know more about stock kernel configuration...</p>— dtrail (@dtrail1_xda) <a href="https://twitter.com/dtrail1_xda/status/334343805568442368">May 14, 2013</a></blockquote>

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I realize there are many variables involved in battery life, but does this mean that, all other things being equal, it is best to go with the stock kernel over a custom kernel?

(I am running a Razr XT910.)
[Android] iHateWebOS:
Make sure there is no extra spaces or symbols. I had this issue a while ago, and it turned out to be caused be an extra space and a plus sign I put into version name by accident.
[Android] _thrasher_x:
Awesome tutorial thewadegeek... One thing that wasn't really overlooked, but can be important is that there are hundreds, even thousands of sources for kernels on github alone. It should be a good place to look for those of you that aren't sure about kernel source being available for your device. There is also the chance that your device shares a common source for many devices. Got to github and search: 'your_device_defconfig' where "your_device" is the code name or regular name for your device. For example, my device, supersonic_defconfig can be found in numerous places with almost all versions of android attached to it. Now, I understand, this may not be the case for ALL devices, but it certainly would be a good place to look.

An advanced apology if I sound dumb or don't make sense.

Sent from my PC36100
[Android] yoezmys:
thank you so much.. :good:
[Android] dtrail1:
Thanks for answering.

There are no unwanted symbols or letters..

But I know that the pre built modules need a matching local version string. But I don't know enough...

Gesendet von meinem A101 mit Tapatalk 2

---------- Post added at 09:08 PM ---------- Previous post was at 08:58 PM ----------

In the meanwhile I made it to top stock kernel battery life with my kernel. Is a stock kernel better? Depends on the options you want. A stock kernel doesn't a allow any customisations such like OC, uV, etc...

Even not on a locked bootloader - which we have.

But I also figured out that the battery life also depends on Motorola build quality, regarding to stock Roms.

However, if you want to to use a high customisable kernel with a nice AOSP rom, you can use my kernel. It's fully stable now. Keep in mind that your device will need about one week to settle in, within this time battery life will become better.

P.s. There are new nightlies 0.4.7 online including some experimental changes for better power saving. If you want ultra high performance use the OCE version which allows stable OC up to ~1.5ghz.

Please ask further questions in my thread, it's OT here (sorry).

Gesendet von meinem A101 mit Tapatalk 2
[Android] Martini3001:
Hmm,

i need help and information about the configs-folder (/arch/arm/configs/)

im walked through the steps to get into the menuconfig-menu. (taking the cm10 source code of the 9300). But in my kernel source-code (sammy open source code I9505) it dont know which file i need to "make" in the terminal.

Does anybody know which files are necessary to take to do modifications on the kernel?

An other question is which is to correct file for the S4 (9505) from the cm10.1 source-code. I just see different stuff for the S3 (and S3 LTE)...

thanks a lot

best wishes

Martini3001
[Android] android@system:-$:
I have a Samsung galaxy player 4.2 and in the readme file Sammy use a particular tool chain... Can I use other tool chains like android ndk or linaro?

Inviato dal mio GT-N7000 con Tapatalk 2
[Android] Martini3001:
I'm not sure, but probably it will work with the NDK. I used the tool chain inside -> worked fine. :good:

The documentary doesn't help me with my problem... Is it normal that the "kernel"-folder in the git-hub is crossed with an red triangle "!"?

see:

https://github.com/CyanogenMod/android_kernel_samsung_smdk4412

Tell me, if it worked. ;)
[Android] thewadegeek:
Yes but it will take a lot of work. You will need to create all the board specific files manually, and it will probably be WAY more work then it is worth, and require experience beyond what most of us in this thread can offer.

Inline kernel building wasn't implemented in CM7.

Meh. I've heard both side of the fence and in the end it depends on the kernel. Not all custom kernels are the same and they do not all implement the same features. On my SII stock had the best, they could enver get a couple kernel bugs figured out. On my GNote2 my custom kernel gets me about a %50 battery life improvement due to governors and under-clocking. So there is no definite answer.

So you are on

?

Are you using stock source or CyanogenMod/AOSP? If a AOSP type kernel then the defconfig will be called out in the device tree. If Samsung source then it will be called out in the README they package with their kernel releases.

That means that github had an issue with the commit data.
[Android] thewadegeek:
Do you have CONFIG_LOCALVERSION in your defconfig?
[Android] dtrail1:
Sure. All needed entries are there...

I did some research again and found something about it. The modules are using a location to be loaded from, and usually the folder name includes the localversion string so the it has to match otherwise the kernel can't find and load the modules. I thought about this some time ago and configured all modules to be built into the kernel. In theory there won't be any module to load... But it didn't work and the kernel didn't boot. Modules versioning is disabled of course, modules load / unload enabled.

But now I've found another entry in the defconfig:

CONFIG_DEFCONFIG_LIST=/lib/modules/$UTS_VERSION/...

I don't remember the exact string at the moment, but someone who's comfortable with that topic might know about that..

I'll try to comment out that entry and configure a localversion again...

Besides that localversion problem I got another one. I'm currently implementing BLX into my kernel. As we don't have a fuel gauge chip in our device and the only charging logic / handling can be found in the battery driver, this may be the only place to insert BLX code. It's building without any errors or warnings but in action the kernel still ignores the charging limit which is set by user. I can't find my mistake, logic seems right.. And there is no code for charging rules anywhere else. Here's the latest commit, you may compare it to its original code available in many github kernel repositories for gnex.

https://github.com/RAZR-K-Devs/andr...mmit/15c9532ff16b41570d15e33c7d9297bc020c9978

I have ported lots of features in my kernel, e.g. from Gnex kernels, etc. and I got them all to work. But this BLX thing makes me crazy.
[Android] thewadegeek:
Never had to port BLX before, so no off the top of my head that code looks fine. It's WAY to early and I may just be being dull however. If you had printk messages where do you appear to be hitting?
[Android] dtrail1:
Good question :)

I will debug and see what does it say about charging values. A good idea is it to include debugging messages and see how it works...

The code is quite simple and it's hard to say why doesn't work.... But maybe there are more files which needs some code to be inserted, such like the charger or the battery drivers header files.? None of them includes rules to start, allow or stop charging, but they define the variables which are use to control the charging rules. I'd appreciate if someone could have a deeper look into /drivers/power (only the cpcap-stuff is related) and include/Linux/spi or /include/linux/power/spi (forgot the exact line).

Thanks
[Android] -NickHalden-:
Can anyone please help me with this

LD fs/nfs/built-in.o
LD net/ipv4/netfilter/built-in.o
LD fs/proc/proc.o
LD fs/proc/built-in.o
LD net/ipv4/built-in.o
LD fs/built-in.o
make: *** [net] Error 2

View attachment 1979981
[Android] dtrail1:
Please type just "make" and paste the output here. It seems you were building with a "-j" flag so it didn't show the exact error message.
[Android] -NickHalden-:
Here you go

make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/gpu/msm/kgsl_drm.o
drivers/gpu/msm/kgsl_drm.c:1614: error: implicit declaration of function 'DRM_IOCTL_DEF_DRV'
drivers/gpu/msm/kgsl_drm.c:1614: error: 'KGSL_GEM_CREATE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1615: error: 'KGSL_GEM_PREP' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1616: error: 'KGSL_GEM_SETMEMTYPE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1617: error: 'KGSL_GEM_GETMEMTYPE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1618: error: 'KGSL_GEM_BIND_GPU' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1619: error: 'KGSL_GEM_UNBIND_GPU' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1620: error: 'KGSL_GEM_ALLOC' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1621: error: 'KGSL_GEM_MMAP' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1622: error: 'KGSL_GEM_GET_BUFINFO' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1623: error: 'KGSL_GEM_SET_BUFCOUNT' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1625: error: 'KGSL_GEM_SET_ACTIVE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1626: error: 'KGSL_GEM_LOCK_HANDLE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1628: error: 'KGSL_GEM_UNLOCK_HANDLE' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1630: error: 'KGSL_GEM_UNLOCK_ON_TS' undeclared here (not in a function)
drivers/gpu/msm/kgsl_drm.c:1632: error: 'KGSL_GEM_CREATE_FD' undeclared here (not in a function)
make[3]: *** [drivers/gpu/msm/kgsl_drm.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
[Android] dtrail1:
You can see here, that the following file includes some wrong code:

drivers/gpu/msm/kgsl_drm.c

as it says always "undeclared" from line 1614 to 1632. It seems that these entries are in a block which isn't defined as a function in the head of the file. But I'm not sure here, could you copy&paste the whole code of the file kgsl_drm.c to pastebin or somewhere similar, please?
[Android] Martini3001:
Does anybody know the alternative CM-name for the S4 (9505 - Snapdragon)?
[Android] -NickHalden-:
Here it is sir

http://pastebin.com/ye1PKLic
[Android] thewadegeek:
I thought they just used i9505. How does this relate to kernel development? No offense but you'd get a better answer in the i9505 forums.
[Android] thewadegeek:
At work so I can't check the source for the problem, all file sharing site are blocked. My question is though do you know C? If not I suggest learning it, it will help you immensely.
[Android] v3rtex:
Hi guys, hopefully you can help me with my problem.

For now i try to compile a HTC M7 kernel with a 4.7.3 linaro toolchain, at the end i get my zImage (i chose xz compression) and the ko modules.

Then i prepare a already working boot.img with this new generated zImage, and merge it with the modules in a zip files for cwm flash.

My problem is, after flash wlan doesn't work, it shows a error and is unable to turn on. The rest works absolutely fine.

Do you have any ideas about this?

Here's a picture of my modules.

Exactly these modules, other kernel and rom devs, have in their zip files too (their compiled versions)

The whole evening i am looking for a solution...
[Android] thewadegeek:
Any kernel log messages complaining about your WiFi module?
[Android] Perka:
This helped me, not sure its the same for HTC tho.

https://github.com/perkarom/Shark/commit/f43f1deb3cd1af15d372f251ab12ced338c0bee9
[Android] v3rtex:
Here's some part of logcat which shows a driver problem, really strange...

D/WifiStateMachine( 815): SupplicantStartingState{ what=131083 when=-2m34s755ms target=Handler (com.android.internal.util.StateMachine$SmHandler) {41542578} }
D/StateMachine( 815): deferMessage: msg=131083
D/StateMachine( 815): handleMessage: X
D/StateMachine( 815): handleMessage: E msg.what=131083
D/StateMachine( 815): processMsg: SupplicantStartingState
D/WifiStateMachine( 815): SupplicantStartingState{ what=131083 when=-2m34s758ms target=Handler (com.android.internal.util.StateMachine$SmHandler) {41542578} }
D/StateMachine( 815): deferMessage: msg=131083
D/StateMachine( 815): handleMessage: X
E/wpa_supplicant( 3518): nl80211: Could not configure driver to use managed mode
E/wpa_supplicant( 3518): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 3518): wlan0: Failed to initialize driver interface

Hm, this original line isn't even in the original makefile, and not in the makefiles other kernel devs need for the HTC One.

So i think thats not the problem...

Thank you for this idea
[Android] thewadegeek:
So there are no kmsgs about it? Can't really help you then, beyond the scope of this thread. Essentially you've told me "It doesn't work for me but it does for everyone else", so my answer is: Set it up like everyone else and you won't have issues.
[Android] dtrail1:
I guess you're referring to me :)

I know the reason now but no solution works... It must be related to the kexec method. I'm using a prebuilt ramdisk and the vermagic must match it and also the kexec modules - while these also have to match the stock kernels vermagic, otherwise it wouldn't be able to boot the kexec kernel. So, there is no possibility to append a custom string.

But thanks for your help anyway.

---------- Post added at 09:20 PM ---------- Previous post was at 09:20 PM ----------

I will have a look later at home.