FORUMS
Remove All Ads from XDA

[REFERENCE] How to compile an Android kernel

13,732 posts
Thanks Meter: 50,791
 
By nathanchance, Recognized Developer / Recognized Contributor on 26th June 2017, 05:38 AM
Post Reply Email Thread
11th January 2018, 12:03 AM |#131  
metalmouth's Avatar
Member
Flag Lucena City
Thanks Meter: 22
 
More
i was expecting using my device config it will compile flawlessly out of the box but it always stop at the "drivers" part lol
12th January 2018, 03:48 PM |#132  
DSA's Avatar
Senior Member
Thanks Meter: 5,823
 
More
Quote:
Originally Posted by metalmouth

i was expecting using my device config it will compile flawlessly out of the box but it always stop at the "drivers" part lol

with what error?
13th January 2018, 12:16 PM |#133  
metalmouth's Avatar
Member
Flag Lucena City
Thanks Meter: 22
 
More
Quote:
Originally Posted by DSA

with what error?

sorry i didn't take a screenshot but it stopped at something about missing trace header in rndis. i was able to fix it but gave me more error still regarding rndis. so i gave up 😂
13th January 2018, 12:33 PM |#134  
logan71f100's Avatar
Member
Flag HERSHEY, PA
Thanks Meter: 1
 
More
need a little help
trying to compile nexus 6 for android 8.0 using https://github.com/AICP/kernel_moto_shamu/tree/o8.0

i used the google toolchain as stated because up streaming needs patchs, and id like to upstream but im not that good. i get this after i run make:
/home/logan/android_kernel_moto_shamu/scripts/gcc-version.sh: line 25: /home/logan/arm-eabi-4.8gcc: No such file or directory
/home/logan/android_kernel_moto_shamu/scripts/gcc-version.sh: line 26: /home/logan/arm-eabi-4.8gcc: No such file or directory

i did exactly like ZawZaw did
--------------------------------------------------------------------------------------
export CROSS_COMPILE=${HOME}/arm-eabi-4.8

export ARCH=arm && export SUBARCH=arm

make clean && make mrproper
---------------------------------------------------------------------------------------

everything seems to be in the right location and named the correct stuff
https://ibb.co/nvLKsR


my goal is to enable over clocking by modifying the frequency configs, if this cannot be done please let me know.... i haven't found any 8.0 kernels for shamu yet.... please enlighten me
14th January 2018, 01:08 AM |#135  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 50,791
 
More
Quote:
Originally Posted by logan71f100

need a little help
trying to compile nexus 6 for android 8.0 using https://github.com/AICP/kernel_moto_shamu/tree/o8.0

i used the google toolchain as stated because up streaming needs patchs, and id like to upstream but im not that good. i get this after i run make:
/home/logan/android_kernel_moto_shamu/scripts/gcc-version.sh: line 25: /home/logan/arm-eabi-4.8gcc: No such file or directory
/home/logan/android_kernel_moto_shamu/scripts/gcc-version.sh: line 26: /home/logan/arm-eabi-4.8gcc: No such file or directory

i did exactly like ZawZaw did
--------------------------------------------------------------------------------------
export CROSS_COMPILE=${HOME}/arm-eabi-4.8/bin/arm-eabi-

export ARCH=arm && export SUBARCH=arm

make clean && make mrproper
---------------------------------------------------------------------------------------

everything seems to be in the right location and named the correct stuff
https://ibb.co/nvLKsR


my goal is to enable over clocking by modifying the frequency configs, if this cannot be done please let me know.... i haven't found any 8.0 kernels for shamu yet.... please enlighten me

I've highlighted the error in red
14th January 2018, 01:36 AM |#136  
logan71f100's Avatar
Member
Flag HERSHEY, PA
Thanks Meter: 1
 
More
Quote:
Originally Posted by nathanchance

I've highlighted the error in red

thank you that allowed make to work, the only documentation on adding frequency at a kernel level iv found is from 2014 for an acer and this kernel doesn't have the cpu frequency configs that i was looking for, could you tell me what im looking for? iv been poking around in the arch/arm but no luck
14th January 2018, 01:51 AM |#137  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 50,791
 
More
Quote:
Originally Posted by logan71f100

thank you that allowed make to work, the only documentation on adding frequency at a kernel level iv found is from 2014 for an acer and this kernel doesn't have the cpu frequency configs that i was looking for, could you tell me what im looking for? iv been poking around in the arch/arm but no luck

This? https://github.com/flar2/shamu/commi...1edcc4e2c1bd95
14th January 2018, 02:02 AM |#138  
logan71f100's Avatar
Member
Flag HERSHEY, PA
Thanks Meter: 1
 
More
Quote:
Originally Posted by nathanchance

This? https://github.com/flar2/shamu/commi...1edcc4e2c1bd95

i was looking at this https://www.youtube.com/watch?v=lBYRLc5GKAI

but what you sent is way better, do you think i would be able to pull that whole file out of a kernel like elementalx? i used that kernel for some time and voltages where perfect.

https://github.com/flar2/shamu/blob/...m/apq8084.dtsi
comparing this one to the one from your link i know elementalx allows for a 3.0 ghz overclock but it may be applying it in ramdisk.... do you think if i add a frequency in the current and frequency list for each cpu that it would use it?
14th January 2018, 02:51 AM |#139  
nathanchance's Avatar
OP Recognized Developer / Recognized Contributor
Flag Mesa, AZ
Thanks Meter: 50,791
 
More
Quote:
Originally Posted by logan71f100

i was looking at this https://www.youtube.com/watch?v=lBYRLc5GKAI

but what you sent is way better, do you think i would be able to pull that whole file out of a kernel like elementalx? i used that kernel for some time and voltages where perfect.

https://github.com/flar2/shamu/blob/...m/apq8084.dtsi
comparing this one to the one from your link i know elementalx allows for a 3.0 ghz overclock but it may be applying it in ramdisk.... do you think if i add a frequency in the current and frequency list for each cpu that it would use it?

Code:
git fetch https://github.com/flar2/shamu ElementalX-5.00
git cherry-pick eb8d56044571a4e597e7665aef1edcc4e2c1bd95
That's the proper way to add the change from one kernel to another.

Code:
git fetch <repo_url> <branch_name>
git cherry-pick <commit_hash>
The Following User Says Thank You to nathanchance For This Useful Post: [ View ]
15th January 2018, 01:36 AM |#140  
Senior Member
Thanks Meter: 367
 
More
I have been trying to build a kernel for my mediatek device for a while now. I was given an incomplete kernel source and now it does not build when I use "make zImage".

It always gets stuck at xt_TCPMSS.c with this error:

Code:
net/netfilter/xt_TCPMSS.c: In function 'tcpmss_mt':
net/netfilter/xt_TCPMSS.c:64:26: error: dereferencing pointer to incomplete type
    return (mssval >= info->mss_min &&
                          ^
net/netfilter/xt_TCPMSS.c:65:19: error: dereferencing pointer to incomplete type
     mssval <= info->mss_max) ^ info->invert;
                   ^
net/netfilter/xt_TCPMSS.c:65:36: error: dereferencing pointer to incomplete type
     mssval <= info->mss_max) ^ info->invert;
                                    ^
net/netfilter/xt_TCPMSS.c:73:13: error: dereferencing pointer to incomplete type
  return info->invert;
             ^
net/netfilter/xt_TCPMSS.c: At top level:
net/netfilter/xt_TCPMSS.c:85:23: error: invalid application of 'sizeof' to incomplete type 'struct xt_tcpmss_match_info'
   .matchsize = sizeof(struct xt_tcpmss_match_info),
                       ^
net/netfilter/xt_TCPMSS.c:93:23: error: invalid application of 'sizeof' to incomplete type 'struct xt_tcpmss_match_info'
   .matchsize = sizeof(struct xt_tcpmss_match_info),
                       ^
scripts/Makefile.build:257: recipe for target 'net/netfilter/xt_TCPMSS.o' failed
There are no other errors.
Here is my kernel source (due to issues with travis-ci, the true stock branch is stock2 and dev is "stock"): https://github.com/Qiangong2/android_kernel_blu_d790q

I'm worried that just copying the xt_TCPMSS.c file from another MT6580 device may brick my device. That is why I have not tried that yet.
15th January 2018, 07:20 AM |#141  
Junior Member
Flag Aurora
Thanks Meter: 5
 
More
Nathan I followed your steps and I succeeded on building my kernel and making the zip file. My problem now is I cant flash it, I keep getting errors. I tried to tar it and other methods but they are not working.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes