yashsingh1/xdaforums huggingface dataset:
[Android] Deadly:
Edit .config file under common folder.. search "swap" in that file.. you will get it..

#CONFIG_SWAP IS NOT SET

To

CONFIG_SWAP=y

____________________________________

“If you wait to do everything until you’re sure it’s right, you’ll probably never do much of anything.” –Win Borden
[Android] moncojoe:
g05b777c sources

I just got an update to 4.2.2 on my Nexus 7 3G and now a want to build and flash custom kernel. I did this for 4.2.1 with no problem, but

now I can't find where I can get updated sources for kernel. Now I have 3.1.10-g05b777c kernel, but when I do git log kernel in grouper

I can only see old commit 22b4fcd. So my question is, to which commit should i do git checkout in tegra so I can get latest kernel sources for my nexus?
[Android] moon61:
Hai thanx...

I've done it before. But seem swap doesn't work. app like swaper can't activate it. And the "free" command in terminal show output like

total used free shared buffers

Mem: 399692 370048 29644 0 7332

-/+ buffers: 362716 36976

Swap: 0 0 0

Any suggest...
[Android] moncojoe:
I figured it out, my mistake was to checkout to g05b777c, when i needed to checkout to 05b777c.

How can I get right commits? What steps should I take?
[Android] vanja_z:
Thanks for the guide. I'm able to build kernels and make mods based on the existing CM10.x kernel source for my device (HTC One XL evita).

I would like to build a CM10.1 compatible kernel based on the Linux 3.4 source code recently released by HTC since the current kernel for our device is based on Linux 3.0 and has some problems.

The CyanogenMod "porting intro"

http://wiki.cyanogenmod.org/w/Doc:_porting_intro

seems to indicate that you should be able to get CM up and running with any old kernel however if I just flash either the stock Sense boot.img or one that I've built from the source I can't even get the screen to power on.

I'm not asking for a step by step guide (although I wouldn't complain), I'm just wondering what issues need to be resolved to boot a not-stock kernel.

ps. I hope I'm asking this in the right section, the guidelines suggested to post in an existing thread rather than make a new one.
[Android] azoller1:
So can you build a kernel off of say cms kernel for kernel_asus_grouper? Where would I get the source for nexus devices or Asus?
[Android] TroNit:
https://github.com/CyanogenMod/android_kernel_asus_grouper
[Android] Antiga:
Fault in mentioned patch?

Hi.. I am trying this now, but the patching will not work correctly. I am gettin an error like this when patching: "The text leading up to this was:

--------------------------

|diff -uNr Vanilla/drivers/cpufreq/Makefile New/drivers/cpufreq/Makefile

|--- Vanilla/drivers/cpufreq/Makefile	2011-11-30 01:52:01.000000000 -0600

|+++ New/drivers/cpufreq/Makefile	2012-07-06 17:46:32.000000000 -0500

--------------------------

File to patch:

Skip this patch? [y]

Skipping patch.

1 out of 1 hunk ignored

(Stripping trailing CRs from patch.)

can't find file to patch at input line 1932

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff -uNr Vanilla/include/linux/cpufreq.h New/include/linux/cpufreq.h

|--- Vanilla/include/linux/cpufreq.h	2011-11-30 01:51:52.000000000 -0600

|+++ New/include/linux/cpufreq.h	2012-07-06 17:49:32.474953576 -0500

--------------------------

" Why is that? I can`t make the files "Makefile", CPUFreq.h" and "Kconfig". :crying:

OK, i fixed it. But, i can`t get any zImage! Tried googled, but dont find the appropriate solution. Any help to get? I am at the last step here:S
[Android] Perka:
Hows the patch guide going? :)

Also I try to patch my samsung 3.0.31 source with Linux 3.0.68, but cant seem to get it right. :(

Do I need to use all the patches up to 3.0.68?

Thx for a great thread.
[Android] coolsandie:
Yup, that's what I've heard. It should be incremental from 3.0.31 all way upto 3.0.68 by referring ftp://ftp.kernel.org/pub/linux/kernel/v3.x/

Here's a pretty good explanation regarding patching:

http://www.linuxchix.org/content/courses/kernel_hacking/lesson9
[Android] :
Nice guide, thanx for guide...!!
[Android] Perka:
So I now get a lot of errors when I try to patch my source. http://pastebin.com/3ksSCEr4

What do I do wrong? Been on it all day before asking for help :)
[Android] kylon:
R: [Tutorial] Building Your First Kernel

You have to patch the files manually.

The android kernel does not match the linux kernel

Look at the .rej files

You can edit the script for the modules to move all the rej files in a folder
[Android] Perka:
Is there any guide on this? Cant find one :(
[Android] kylon:
R: [Tutorial] Building Your First Kernel

You don t need a guide

Open the patch and follow the instructions

Open the file to patch

Go to the right line or use search to find it if it does not match

Copy-paste/delete the code
[Android] Brick3d:
Simple question

B. Required packages: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb.

Hi, thx for this awesome guide!! I do have a question regarding the above. can you provide a link where to download all these? I am new to developing this kind of thing,never done it before. I bricked my phone, and decided to go fix it myself since there is less than 0 development for it and Acer just released their source code for kernel. Can you tell me if the kernel contains a boot.img file too after created?

many thx!

Brick3d
[Android] coolsandie:
You should run that in Terminal (In any Linux OS)

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib

No, Kernel won't contain the boot.img, you would only get the zImage as the output after compilation and you should pack it to form a boot.img. You should find an existing boot.img for your device, unpack it, change the zImage, re-pack it, and that's it. ;)
[Android] Perka:
Also copy the modules :)
[Android] coolsandie:
Yes, indeed. :)
[Android] Daniel_GT:
And do an awful LOT of reading and searching!!! Best of luck of you, making your first build is very satisfying and well worth the effort. You'll get a lot of support from the forum but do swot up on the basics, you'd gain so much from it and will only benefit from understanding how the cogs turn.

A good place to start is here and here for Android. Here for Linux.
[Android] thewadegeek:
No you can run that in Terminal in any Linux OS with apt-get installed. Basically you need to substitute "apt-get" with whatever your package manager is.
[Android] moon61:
Where to copy it from extracted boot.img, Can you explain how to do it.
[Android] Perka:
You copy from your build folder to your initramfs and repack the boot.img
[Android] ttibbetts83:
adding oc

could you touch on how to add overclocking to a kernel im building cm10.1 and would like to add overclocking before i compile the rom any help would be great

building for samsung n7000 maybe somebody knows of a guide or some links that may help have googled many times and cant find any help on this topic
[Android] Perka:
I updated to 3.0.39 but when I try to compile I get this error:

mm/page_alloc-cma.c: In function '__alloc_pages_nodemask':
mm/page_alloc-cma.c:2594: error: too few arguments to function 'put_mems_allowed'
mm/page_alloc-cma.c:2606: error: too few arguments to function 'put_mems_allowed'
mm/page_alloc-cma.c: In function 'skip_free_areas_node':
mm/page_alloc-cma.c:2835: error: too few arguments to function 'put_mems_allowed'
make[1]: *** [mm/page_alloc-cma.o] Error 1
make: *** [mm] Error 2
make: *** Waiting for unfinished jobs....

How to solve this?

uploaded the file.

EDIT:Wrong file :p uploaded the right file.
[Android] apascual89:
I already have cm10.1 and Paranoid android set up and building. I'm going to try and tweak the cm10.1 kernel. What command can I use to build just the kernel. I will read through the thread, but just wanted to put this question out there first.

Thanks
[Android] TroNit:
Re: [Tutorial] Building Your First Ker

Don't wanna sound mean but if u read it first u don't have to put this question.

Anyway just get to ur kernel path/ and follow the guide. :thumbup:
[Android] DerTeufel1980:
hi perka :) long time no see. how are you?

i just came to the same error, and started googling. this is why i found your post ;)

please try building your kernel with:

# CONFIG_DMA_CMA is not set

you also can try to commit the changes from the linux patch from page_alloc.c to page_alloc-cma.c

but after solving this, the next error and then again the over next error appeared. maybe ill find the time to solve them all, but not now...
[Android] Deadly:
You don't need to worry about warnings.. zImage is ready as it says.. You can try that kernel by packing it.
[Android] Perka:
ok found this commmit about fixing some of the warnings tho, Link

The kernel works, just wondering if I gain something by fixing the warnings?

---------- Post added at 12:50 PM ---------- Previous post was at 12:28 PM ----------

Hi yea good :)

Started over with my patching and now it builds :) So again a user error :p (No idea what I did wrong)
[Android] Perka:
And again :p says modules are built but they are not in build folder :(

perk@s-file-stash ~/GT-I9300/u8 $ find . -type f -name "*.ko" shows nothing and I looked in the right folder.

LD [M] arch/arm/mvp/commkm/commkm.ko
LD [M] arch/arm/mvp/mvpkm/mvpkm.ko
LD [M] arch/arm/mvp/pvtcpkm/pvtcpkm.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
LD [M] drivers/net/wireless/btlock/btlock.ko
LD [M] drivers/scsi/scsi_wait_scan.ko
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/piggy.gzip.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready

real	5m54.750s
user	14m49.440s
sys	1m0.696s
[Android] thicklizard:
They aren't in the build folder they are in the folders the reference. Example your scsi_wait_scan.ko is in the directory drivers/scsi
[Android] Perka:
yes I know but they are not in their folder.

EDIT: also no zImage o.O

perk@s-file-stash ~/GT-I9300/u8/drivers/net/wireless/btlock $ ls
btlock.c Kconfig Makefile

perk@s-file-stash ~/GT-I9300/u8/drivers/net/wireless/bcmdhd $ ls
aiutils.c dhd_bus.h dhd_wlfc.h wl_cfg80211.c
bcmevent.c dhd_cdc.c dngl_stats.h wl_cfg80211.h
bcmsdh.c dhd_cfg80211.c dngl_wlhdr.h wl_cfgp2p.c
bcmsdh_linux.c dhd_cfg80211.h hndpmu.c wl_cfgp2p.h
bcmsdh_sdmmc.c dhd_common.c include wl_dbg.h
bcmsdh_sdmmc_linux.c dhd_custom_gpio.c Kconfig wldev_common.c
bcmsdspi_linux.c dhd_custom_sec.c linux_osl.c wldev_common.h
bcmspibrcm.c dhd_dbg.h Makefile wl_iw.c
bcmutils.c dhd.h sbutils.c wl_iw.h
bcmwifi_channels.c dhd_linux.c siutils.c wl_linux_mon.c
bcmwifi_channels.h dhd_linux_sched.c siutils_priv.h wl_roam.c
bcmwifi_rates.h dhd_proto.h uamp_api.h
dhd_bta.c dhd_sdio.c wl_android.c
dhd_bta.h dhd_sec_feature.h wl_android.h
[Android] pac213:
Hi,

Im encountering this error just right now. I did locate vmlinux and no results appeared. What do I need to do? I have changed kernel still having this one.

make: [vmlinux] Error 1 (ignored)

SYSMAP System.map

arm-linux-androideabi-nm: 'vmlinux': No such file

make: [vmlinux] Error 1 (ignored)

SYSMAP .tmp_System.map

arm-linux-androideabi-nm: '.tmp_vmlinux2': No such file

make: [vmlinux] Error 1 (ignored)

make[1]: *** No rule to make target `vmlinux', needed by `arch/arm/boot/Image'. Stop.

make: [zImage] Error 2 (ignored)
[Android] razor17:
Help

In my kernel source, threre is no zImage in arch/arm/boot

My kernel version is 2.3.35.10

How do I make boot.img?

I can't find perfect tutorial of making boot.img
[Android] elbermu:
Please clarify, you said you don't have zImage, without that you can't create boot.img. Did the build complete?
[Android] razor17:
too may error in compiling, I need to recompile
[Android] thicklizard:
Fix the errors then recompile.
[Android] koreanjeong:
I wonder if My way is correct...

all my builded or ported kernel can't wifi ...... !!!

modules on ramdisk was trashed or changed

.....

what is missed !!!! ;;

after build a module link seen what is those ....

help me please and my device is shw-m250l
[Android] vvaklnprm:
great info!

thanks! :)
[Android] irizwan:
Installing Ubuntu as i type this.. this will be my first time trying to compile anything hope it all goes well,
[Android] jaggu1989:
awesome guide ... surely looking forward for my own custom kernel
[Android] crossfire77:
anyone tell me how to disable perflock while we made kernel from htc source?
[Android] thicklizard:
In your config it's called htc performance lock. Should be under system type I believe. Which htc phone by the way? If it is a one series htc does not include source for wifi and disabling perflock will break your symbols between kernel and precompiled prima_wlan.ko module.
[Android] FlyinGrub:
[Q][kernel] Try to compile a kernel

hi ,

so i'm here beacause i would to compile a kernel myself for my One S, i've already the linaro toolchain 4.7.2 (with the 4.6.2 it fail too) installed and the source of my kernel too ; i follow your step by step guide but it fail everytime :

****@My-PC:~/android/kernel/bricked-ville-3.4$ export CROSS_COMPILE=~/android/toolchains/arm-eabi-linaro-4.7.2/bin/arm-eabi-
****@My-PC:~/android/kernel/bricked-ville-3.4$ make ville_defconfig
arch/arm/configs/ville_defconfig:364:warning: override: reassigning to symbol INPUT_KEYCHORD
arch/arm/configs/ville_defconfig:519:warning: override: reassigning to symbol USB_ARCH_HAS_HCD
arch/arm/configs/ville_defconfig:532:warning: override: reassigning to symbol USB_OTG_HOST
arch/arm/configs/ville_defconfig:672:warning: override: reassigning to symbol CABLE_DETECT_ACCESSORY
warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
#
# configuration written to .config
#
****@My-PC:~/android/kernel/bricked-ville-3.4$ make -j1
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: « include/generated/mach-types.h » est à jour.
CC kernel/bounds.s
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[1]: *** [kernel/bounds.s] Erreur 2
make: *** [prepare0] Erreur 2

thanks in advance :highfive:
[Android] GideonX:
Your compile path isn't right.
[Android] FlyinGrub:
but i'm sure this is the right path ... :eek:

and i 've tried many other path ... :confused:
[Android] kylon:
R: [Tutorial] Building Your First Kernel

Maybe there is a problem with the permissions.

I had the same problem

Just download the toolchain again and paste it in a new folder

This fixed the gcc problem for me
[Android] FlyinGrub:
i've already tried to chmod 755 the folder ...

but i will try

edit : in home folder there is no problem ?
[Android] kylon:
R: [Tutorial] Building Your First Kernel

??

My toolchain is in home

I also tried to change permissions but it didn t work

I had to download the toolchain again
[Android] thicklizard:
But you didn't call to home. Should be /home/your user name /android/toolchains blah blah blah
[Android] FlyinGrub:
my toolchain is already in this folder ....

/home/your user name /android/toolchains
[Android] thicklizard:
Exactly but in your export command you omitted home/your user name /
[Android] GideonX:
The tilde ~ references your home directory.

In your export command, just use the full absolute path instead (/home/user/path/to/toolchain/blah/blah).

Sent from my Nexus 7
[Android] riskey95:
how to add CWM to kernel?? can you give me tutor ..:D
[Android] kylon:
R: [Tutorial] Building Your First Kernel

Why home/user name?

I do $HOME/toolchain/bin/........
[Android] FlyinGrub:
i've still the same error :eek::(
[Android] Rishik999:
Can some please help me here!

drivers/cpufreq/cpufreq.c: In function 'cpufreq_add_dev':
drivers/cpufreq/cpufreq.c:1047: error: 'CPUFREQ_DEFAULT_GOVERNOR' undeclared (first use in this function)
drivers/cpufreq/cpufreq.c:1047: error: (Each undeclared identifier is reported only once
drivers/cpufreq/cpufreq.c:1047: error: for each function it appears in.)
make[2]: *** [drivers/cpufreq/cpufreq.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2

Thanks
[Android] xMinistro:
Hi all, I'm a newbie trying to learn to develop as well.

Anybody knows how to enable the otg support for mt6577 kernel? I've been scrapping google and the kernel but I haven't found any. Thanks!
[Android] alko_m:
Hi! I have some Noob question. I trying to make my own ROM for my phone and I need more space in /system.

I use Turbo kernel which remap /system partition to 310 MiB. Can you tell me please how to change partition layout?

Sorry for my English.
[Android] Krunal1313:
newline syntax error

I followed all steps but atlast step it gives error.

bash: syntax error near unexpected token `newline'
[Android] Des-franco:
Thanks a lot !

Finally, i can build a kernel:good:
[Android] Ankhie:
can i follow this guide using cygwin?
[Android] Deadly:
kernel development/compilation is better suited with Linux environment.. use VM ware if you want.. but cygwin is not the solution in this case..

____________________________________

“If you wait to do everything until you’re sure it’s right, you’ll probably never do much of anything.” –Win Borden
[Android] Perka:
So after many hours of pulling my hair out yank555 helped me and here is the solution:

Update to 3.0.38 and then add this fix https://github.com/perkarom/Shark/commit/7db1d6bed1288822afa8e9113d46e6d32dcad184

then you can update to latest Linux patch, as for now 3.0.72
[Android] AlbertoSONIC:
I've got a problem... I can't compile the kernel!

These are things that i've done:

1)First compile, aborted (no such file or directory)

2)Make clean

3)Make old-config

4)Make -j3 (aborted without a reason....)

5)Make clean

6)Make old-config

7)Make -j1

And after some times, it stops:

CC net/ipv4/netfilter/nf_nat_proto_dccp.o
CC net/ipv4/netfilter/nf_nat_proto_gre.o
CC net/ipv4/netfilter/nf_nat_proto_udplite.o
CC net/ipv4/netfilter/nf_nat_proto_sctp.o
net/ipv4/netfilter/nf_nat_proto_sctp.c: In function 'sctp_manip_pkt':
net/ipv4/netfilter/nf_nat_proto_sctp.c:39:16: warning: variable 'newip' set but not used [-Wunused-but-set-variable]
net/ipv4/netfilter/nf_nat_proto_sctp.c:39:9: warning: variable 'oldip' set but not used [-Wunused-but-set-variable]
CC net/ipv4/netfilter/ip_tables.o
CC net/ipv4/netfilter/iptable_filter.o
CC net/ipv4/netfilter/iptable_mangle.o
LD net/ipv4/netfilter/iptable_nat.o
CC net/ipv4/netfilter/ipt_addrtype.o
CC net/ipv4/netfilter/ipt_ah.o
make[3]: *** Nessuna regola per generare l'obiettivo "net/ipv4/netfilter/ipt_ecn.o", necessario per "net/ipv4/netfilter/built-in.o". Aborted.
make[2]: *** [net/ipv4/netfilter] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2
alberto@alberto-laptop:~/android/kernel/u8650_2.3.6_kernel$

What can i do?
[Android] Ankhie:
my pc is not working so i'm using only a netbook with intel atom and 2gb ram,i don't think it can handle VM ware
[Android] khojim:
Build modules

Somebody know how to build wifi modules for ics sony with .587 source? i've done compile my kernel and everything is working but not my wifi. anyone can help me? :(

Edit:

I found solution for this by searching entire xda.

http://xdaforums.com/showpost.php?p=23209225&postcount=115
[Android] :
Some help please guys , On ubuntu 12.04 LTS 64Bit :(
[Android] joewong1991:
Out of many tuts and days this one finally helped me compile a kernel thanks very much really appropriate your effort to teach and share cheers :D
[Android] moon61:
Any help with this error message...
[Android] varun.chitre15:
In your kernel makefile, find line

-Werror-implicit-
function-declaration

and remove it.

There is a way to fix implicit declarations more correctly but this could be your quick solution.
[Android] varun.chitre15:
In your defconfig add CONFIG_TINY_RCU=y
[Android] moon61:
Hai thanx for your reply, there is still the same error message after follow your instruction.

*edit

I have fix it after set the power.h path folder to the correct place.
[Android] storm11:
Is it possible to load touchscreen driver as a module ?

which boots with android!!

I kinda think it is , can someone point me in the right direction?
[Android] brymaster5000:
Thanks for the guide. I am trying to build a kernel for the HTC Incredible 2 and have tried using a few different toolchains, but get stuck with this error and can't seem to find a fix. I figured I might get a better chance at someone helping me here than in my device forum...which is becoming a ghost town fast.

arch/arm/mach-msm/smd.c:60:17: error: size of array ‘dummy_state’ has non-integer type
arch/arm/mach-msm/smd.c:60:1: warning: variably modified ‘dummy_state’ at file scope [enabled by default]
error, forbidden warning: smd.c:60
make[1]: *** [arch/arm/mach-msm/smd.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
[Android] nitsua98:
Hi
[Android] storm11:
Check line 60 of arch/arm/mach-msm/smd.c something about dummy_state having a float value
[Android] brymaster5000:
Here are lines 60 through 65 of my smd.c file.

static unsigned dummy_state[SMSM_STATE_COUNT];

static struct shared_info smd_info = {
/* FIXME: not a real __iomem pointer */
.state = &dummy_state,
};

There is a /*FIXME here and I thought the patch I applied might fix the error message. Any body have insight as to what I should be changing the dummy state to?
[Android] thewadegeek:
Could try casting to an Integer...so essentially go learn some C friend. I would check to see what your patch changed and make sure it applied correctly.
[Android] :
Can anyone give me a hand ? :)
[Android] brymaster5000:
Essentially, you need to declare the function before you use it on line 864.. Copy the error message into Google and see what others have done. Or look at somebody else's commits for your/or similar kernel and see if they patched it.

Sent from my Skyraiding Dinc2.
[Android] blazingmods:
thank you!
[Android] Ankhie:
Can somebody help me I'm new to to ubuntu,,I don't know what I did wrong and what is wrong,,I'm using virtual box running guest ubuntu 12.10 on windows 7 starter

Edit:

I posted in the Android Q&A section and nobody answers my question so I figure posting it here, if it's ok

So I'm using a phone with mt6577 processor ICS,my main problem is cpu frequencies doesn't "stick" i.e. when I set 500mhz max freq. cpu still jumps to 1ghz,the only solution i have in mind is to compile my own kernel from source.

1. which version of ubuntu can i use?

2. if i use kernel source from other phone with mt6577 processor will it be compatible?

3. if it's not compatible how can i make it compatible?

4. is there any alternative solution to my problem? like using custom kernel for other mt6577 phones
[Android] coolsandie:
1. Can use any versions I guess, as long as the build essentials are installed. I personally used Ubuntu 11.10 64-bit because I didn't even care to upgrade it. :o

2. Yes, most probably. Kernel sources should be dependent upon processors. (For Eg: Galaxy Mini and Fit uses the same kernel source, but you need to change some things like config file and some other things too, if the processor speeds differ)

3. If its not compatible, then you may have to make some edits in the code.

4. Not sure, but if you are sure it won't brick the device then no problem in trying.
[Android] Ankhie:
thanks for the great answer,,and sir can you help me with my ubuntu,,when i enter sudo apt-get update/install it seem to have errors,,pls see attachment to see what i'm saying
[Android] Adhi1419:
Superb..

Sent from my Micromax A89 using Xparent BlueTapatalk 2