I am now trying to make my own kernel for the HoFo ROM with BFS. I would appreciate a little help, as this is my first at making a kernel. So far I am unsuccessful. Here are the steps that I have taken so far:
1) I've downloaded the source and placed them in ../msm
git clone git://android.git.kernel.org/kernel/msm.git
Click to expand...
Click to collapse
2) I've downloaded the ARM files and placed them in ../msm/arm-2009q1
3) I applied TT's patch:
patch -p1 < kernel-2.6.27-TT-V3.patch
Click to expand...
Click to collapse
4) I used gboddina's config:
http://forum.xda-developers.com/showthread.php?t=550558
5) I set the path:
export PATH=../msm/arm-2009q1/bin:$PATH
Click to expand...
Click to collapse
6) I tried compiling:
make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Click to expand...
Click to collapse
And I get this error:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:306: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
arm-none-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Click to expand...
Click to collapse
Any ideas about what is causing this error? The path is correct...
Seems like a missing file to me. Check paths and try again.
I am sure the path is correct. I also added a line with the path in the Makefile as this post has suggested:
http://forum.xda-developers.com/showthread.php?t=531194
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 27
EXTRAVERSION =
NAME = Rotary Wombat
CROSS_COMPILE=/home/paul/Desktop/msm/arm-2009q1/bin/arm-none-linux-gnueabi-
Click to expand...
Click to collapse
Try adding the absolute path rather than the relative and see if it helps.
I just entered the absolute path in step 6 and it started compiling. Thanks.
One more question, to switch to the 2.6.29 kernel version, do I just follow these commands:
$ cd kernel
$ git checkout --track -b android-2.6.29 origin/android-2.6.29
Click to expand...
Click to collapse
Hey, i. Am not ignirung you. Iam away from laptop until later today - when i get back i wiltry to help. I may write a how to for basic stuff...
Here is what I do to build the kernel.
I havent had too many errors - I guess I am lucky.
1)Get and build android source: http://source.android.com/download. I didn't specify a branch when I did my repo init:
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git
2)You need to add the location of arm-eabi- to your PATH. arm-eabi- is located in
Code:
<android source dir>/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1
3)Create a script or an alias that will let you run make for the kernel without always specifying options. The command used to make the kernel is:
Code:
make ARCH=arm CROSS_COMPILE=arm-eabi-
I created an alias to makeand.
4. Get the kernel source from cyanogen's github.
Code:
mkdir cyan-kernel
cd cyan-kernel
git clone git://github.com/cyanogen/cm-kernel.git
git branch -r
checkout --track -b cm-donut-4.1 origin/cm-donut-4.1
5. You can create a config or use one from a 32B device. There have been a few posted in my thread. The config is located in /proc/config.gz on the device. config.gz needs to be extracted and renamed to .config. Put the kernel config in the directory of the kernel source
6. You need to patch the kernel from TigerTael. It will edit the memory settings to enable the phone to boot.
http://www.4shared.com/file/128338342/3ef0c7a9/kernel-2627-TT-V3patchtar.html
7. Apply the patch to the kernel source:
Code:
cd <kernel source dir>
patch -p3 < patch_location
The -p3 means that it will ignore the first 3 / in the filenames in the patch file. It is hard to explain but google should help.
8. Make the kernel using the script or aliased command
Code:
makeand
9. The built kernel will be the zImage file in /arch/arm/boot. You can just rename this file repack it into your boot.img.
10. The wlan.ko must be generated to correspond to the kernel.
Code:
cd <cupcake source>/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR="<kernel source dir>" ARCH=arm
Thank-you very much!
I ran into a few problems with the config. I tried using one of the config's that I found in your thread for 4.1.11.1, but I still had 40 options thrown at me. Many of the options where new to me and I didn't know what to choose.
hotweiss said:
Thank-you very much!
I ran into a few problems with the config. I tried using one of the config's that I found in your thread for 4.1.11.1, but I still had 40 options thrown at me. Many of the options where new to me and I didn't know what to choose.
Click to expand...
Click to collapse
Something is wrong - I idnt get any options when I used those config files. Make sure you are downloading them, removing the .zip, and extracting the .gz file. Then rename the extracted file to .config and put it in the root folder of the source. Hope that helps.
bcrook said:
Something is wrong - I idnt get any options when I used those config files. Make sure you are downloading them, removing the .zip, and extracting the .gz file. Then rename the extracted file to .config and put it in the root folder of the source. Hope that helps.
Click to expand...
Click to collapse
Ok I have successfully built my own kernel! I loaded your kernel on my device and then pulled the config - it compiled with your config. Now the next problem. To get the camera working I have to change the driver from video4linux to i2c; as explained by cyanogen. Any ideas?
hotweiss said:
Ok I have successfully built my own kernel! I loaded your kernel on my device and then pulled the config - it compiled with your config. Now the next problem. To get the camera working I have to change the driver from video4linux to i2c; as explained by cyanogen. Any ideas?
Click to expand...
Click to collapse
Nope...maybe check out the config for an option. I really have idea - i just patch and compile lol.
bcrook said:
Nope...maybe check out the config for an option. I really have idea - i just patch and compile lol.
Click to expand...
Click to collapse
Well I removed all of the video4linux options from the config, as they are the only new changes that I see which could be related - yet the camera still doesn't work. Any ideas?
hotweiss said:
Well I removed all of the video4linux options from the config, as they are the only new changes that I see which could be related - yet the camera still doesn't work. Any ideas?
Click to expand...
Click to collapse
Maybe do defconfig and see if that works...if it does compare the .config files.
bcrook said:
Maybe do defconfig and see if that works...if it does compare the .config files.
Click to expand...
Click to collapse
Well I ran:
make defconfig
Click to expand...
Click to collapse
...which gave me a huge 60 kb config. The problem now is what to look for
I just tried using gboddina's V6 config with cyanogen's 4.1.11.1 kernel source, whereby I filled in all of the extra options by cross-referencing the 4.1.11.1 config. It was going by alright until I got this error:
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
arch/arm/mach-msm/built-in.o: In function `msm_init_pmic_vibrator':
htc_headset.c.init.text+0x23d8): undefined reference to `timed_output_dev_register'
make: *** [vmlinux] Error
Click to expand...
Click to collapse
I have success! I used the last good cyanogen config - version 4.1.8, and have successfully compiled version 4.1.11.1. Besides that, I comared the two configs to make sure everything is the same.
I am now having problems compiling the wlan driver:
rm -f ./libestadrv.a
make -C /home/paul/Desktop/hope/cyanogen M=`pwd` ARCH=arm CROSS_COMPILE=arm-eabi- modules
make[1]: arm-eabi-gcc: Command not found
make[1]: Entering directory `/home/paul/Desktop/hope/cyanogen'
CC [M] /home/paul/mydroid/system/wlan/ti/sta_dk_4_0_4_32/./common/src/core/data_ctrl/Tx/MsduList.o
/bin/sh: arm-eabi-gcc: command not found
make[2]: *** [/home/paul/mydroid/system/wlan/ti/sta_dk_4_0_4_32/./common/src/core/data_ctrl/Tx/MsduList.o] Error 127
make[1]: *** [_module_/home/paul/mydroid/system/wlan/ti/sta_dk_4_0_4_32] Error 2
make[1]: Leaving directory `/home/paul/Desktop/hope/cyanogen'
make: *** [libestadrv.a] Error 2
Click to expand...
Click to collapse
For some reason the path is not seen. Any ideas?
hotweiss said:
I am now having problems compiling the wlan driver:
For some reason the path is not seen. Any ideas?
Click to expand...
Click to collapse
Try this:
Code:
make KERNEL_DIR="<kernel source dir>" ARCH=arm
I also needed to make sure I had the up to date android source code.
bcrook said:
Try this:
Code:
make KERNEL_DIR="<kernel source dir>" ARCH=arm
I also needed to make sure I had the up to date android source code.
Click to expand...
Click to collapse
Yes, that's the command I used.
I just downloaded the repo today.
I had the same problem when compiling the kernel. I had to set the path directly. Now there is no way to set a direct path to the arm binaries.
Related
i cloned a kernel from git and tried to compile
Code:
ARCH=arm CROSS_COMPILE=arm-eabi- make oldconfig
scripts/kconfig/conf -o arch/arm/Kconfig
init/Kconfig:1243: can't open file "arch/Kconfig"
make[1]: *** [oldconfig] Error 1
make: *** [oldconfig] Error 2
theres no "arch/Kconfig" file, but cant understand why it isnt there
arnab321 said:
i cloned a kernel from git and tried to compile
Code:
ARCH=arm CROSS_COMPILE=arm-eabi- make oldconfig
scripts/kconfig/conf -o arch/arm/Kconfig
init/Kconfig:1243: can't open file "arch/Kconfig"
make[1]: *** [oldconfig] Error 1
make: *** [oldconfig] Error 2
theres no "arch/Kconfig" file, but cant understand why it isnt there
Click to expand...
Click to collapse
arch/arm/Kconfig
Line 1243
EDIT - sorry didn't read thoroughly....
I'm having the same prob with the same kernel. I'll look into it tomorrow. Please PM if you resolve it first.
I'm PM'd franco and this was his response:
"Ya its not your problem. Just create a blank Kconfig text file inside arch folder !"
Sure enough, it worked!
Turducken said:
I'm PM'd franco and this was his response:
"Ya its not your problem. Just create a blank Kconfig text file inside arch folder !"
Sure enough, it worked!
Click to expand...
Click to collapse
Lol
As requested by many people I decided to make this guide. Unfortunately I want everyone to know that you HAVE to do this in Linux(Ubuntu 12.04 in this case). You could do this in Cygwin but you have to look for other guides for that as I have never used it and don't know much about it.
Happy building~~!
Requirements
64bit Ubuntu
Python 2.4--2.7
Code:
sudo apt-get install python
Git 1.7 or newer
Code:
sudo apt-get install git-core
Installing Android SDK
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file(Change path according to your SDK dir):
Code:
# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin
Find your .profile file and add this at the bottom of the file:
Code:
PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
Check for updates by entering this in terminal:
Code:
android
Install required packages(12.04)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 lib32ncurses5-dev x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Toolchain and Source
Open your terminal and type :
Code:
mkdir android
cd android
mkdir kernel
Type this to get your toolchains. I used the linaro toolchain in my kernel using DooMLoRD's great prebuilt toolchains.
Code:
git clone git://github.com/DooMLoRD/android_prebuilt_toolchains.git toolchains
Git clone your kernel repo of choice into android/kernel. I shall use arco's 3.0.x kernel repo as reference.
Code:
git clone git://github.com/arco/samsung-kernel-msm7x30.git -b ics-3.0
Any modifications you wish to do should be done here. Like changing cpu frequency, adding governors, patching the kernel etc... I might add some examples later on. Till then please google how to do this.
Click to expand...
Click to collapse
Building The Kernel
Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory
B. Type "export ARCH=arm"
C. Type "export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-"
Part B. The First Build
A. Type "make ariesve_defconfig"
B. Type "make menuconfig" and make the required changes to use any modules you added or similar changes.
C. Type "make -j<maximum number of jobs>"
Part C. Re-Builds
A. Type "make clean"
B. Type "make oldconfig"
C. Type "make -j<maximum number of jobs>"
Part D. Building Modules
You have two options:
A. Type "make modules"
B. Type "make path/to/your/module.ko"
Explanation of all parts :
Part A.(These steps are required every time you close your terminal and re-open it to build again.)
A. Ok shouldn’t need to explain this.
B. This command sets your target architecture.
C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.
Part B.(These only need to be run the first time you build a kernel.)
A. Load's your configuration file.
B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.
C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j5". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.
Part C. (Use the command's when you are building any-time outside of the first)
A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every time I build unless my changes are really small and localized.
B. A very awesome command, it parses through what has changed and only prompts you about new options.
C. See the explanation for the above "Part C.".
Part D.(Use these for just building kernel modules.)
A. This will re-build all modules.
B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.
Making the boot.img
Make sure that you got the .ko files that were listed when your kernel got built. These are the modules like the WiFi module that are needed. If you didn't really take notice of where those files are and just want to do it a bit more easily you can use these commands(thanks to Recognized Dev Hacre)
Code:
A. Open a terminal
B. Change to your root kernel directory
C. Type "mkdir ../<your_kernel>_output"
D. Type "cp arch/arm/boot/zImage ../<your_kernel>_output/zImage"
E. Type "find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;"
Normally we would need to do many stuff with mkbootimg but this utility by koush is much easier for you guys. Later on try to learn the normal way though . http://forum.xda-developers.com/showthread.php?t=748106
After flashing the kernel to your device and it boots properly you can now use "adb push" to push the earlier .ko files to system/lib/modules/. Of course, make sure your device is plugged in and has adb debugging on. For example:
Code:
adb push dhd.ko system/lib/modules/dhd.ko
Another way of doing this would be to add a system/lib/modules folder in your kernels flashable zip which in my opinion is easier.
Click to expand...
Click to collapse
Andddd that is it . Pretty easy really even if it might be a bit time consuming. Kernels aren't really an expertise of mine so I probably won't be able to help much but please ask any questions you might need below with your error in a pastebin link ^_^.
Credits:
arco68 for his source
ivendor also for the source
thewadegeek for his kernel tutorial I based on
DooMLoRD for his toolchain
Everyone who requested this tutorial
This tutorial was based off of thewadegeek's tutorial : http://forum.xda-developers.com/showthread.php?t=1748297
Very awesome!
Sick!
Nice tutorial! Add it to the wiki ^^
broodplank1337 said:
Nice tutorial! Add it to the wiki ^^
Click to expand...
Click to collapse
Added to the useful dev guides ^_^ Also threw my CM10 guide in there. Thanks for reminding me.
Very good
Why this error?
david @ david: ~ $ make ariesve_defconfig
make: *** No rule to make target 'ariesve_defconfig. "Alto.
davidteri91 said:
Why this error?
david @ david: ~ $ make ariesve_defconfig
make: *** No rule to make target 'ariesve_defconfig. "Alto.
Click to expand...
Click to collapse
Make sure you are in the correct dir. You should be in android/kernel/(your kernel dir)/
Sent from my GT-I9001 using xda premium
and this error
david @ david-desktop: ~ / $ make-j2 android/kernel/samsung-kernel-msm7x30
scripts / kconfig / conf - silentoldconfig kconfig
*** Error during update of the configuration.
make [2]: *** [silentoldconfig] Error 1
make [1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include / config / auto.conf "necessary to" include / config / kernel.release'. Stop.
davidteri91 said:
and this error
david @ david-desktop: ~ / $ make-j2 android/kernel/samsung-kernel-msm7x30
scripts / kconfig / conf - silentoldconfig kconfig
*** Error during update of the configuration.
make [2]: *** [silentoldconfig] Error 1
make [1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include / config / auto.conf "necessary to" include / config / kernel.release'. Stop.
Click to expand...
Click to collapse
you are not in your kernel dir i think
Sent from my GT-I9001 using xda app-developers app
EternalFame said:
you are not in your kernel dir i think
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 ARCH = arm
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 CROSS_COMPILE = ~ / android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
root @ david-desktop :/ # make ariesve_defconfig home/david/android/kernel/samsung-kernel-msm7x30
#
# Configuration written to. Config
#
root @ david-desktop :/ # make-j3 home/david/android/kernel/samsung-kernel-msm7x30
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
scripts / kconfig / conf - silentoldconfig kconfig
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
CHK include / linux / version.h
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
CHK include / generated / utsrelease.h
HOSTCC scripts / kallsyms
CC scripts / mod / empty.o
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [2]: *** [scripts / mod / empty.o] Error 127
make [1]: *** [scripts / mod] Error 2
make [1]: *** is expected to finish other tasks ....
make [1]: "include / generated / mach-types.h 'is up to date.
CC kernel / bounds.s
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [1]: *** [kernel / bounds.s] Error 127
make: *** [prepare0] Error 2
make: *** is expected to finish other tasks ....
make: *** [scripts] Error 2
did you install the linaro toolchain?
Sent from my GT-I9001 using xda app-developers app
EternalFame said:
did you install the linaro toolchain?
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
yes
davidteri91 said:
yes
Click to expand...
Click to collapse
Did you make sure you set its path correctly? If it still doesn't work, add this to your .bashrc file in your home dir.(after pressing ctrl+h to see hidden files)
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/david/android/kernel/toolchains/linux-x86/toolchain/arm-eabi-linaro-4.6.2/bin
Xistance said:
Did you make sure you set its path correctly? If it still doesn't work, add this to your .bashrc file in your home dir.(after pressing ctrl+h to see hidden files)
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/david/android/kernel/toolchains/linux-x86/toolchain/arm-eabi-linaro-4.6.2/bin
Click to expand...
Click to collapse
Nothing
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 ARCH = arm
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 CROSS_COMPILE = ~ / android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
root @ david-desktop :/ # make ariesve_defconfig home/david/android/kernel/samsung-kernel-msm7x30
HOSTCC scripts / basic / fixdep
HOSTCC scripts / kconfig / conf.o
SHIPPED scripts / kconfig / zconf.tab.c
SHIPPED scripts / kconfig / lex.zconf.c
SHIPPED scripts / kconfig / zconf.hash.c
HOSTCC scripts / kconfig / zconf.tab.o
HOSTLD scripts / kconfig / conf
#
# Configuration written to. Config
#
root @ david-desktop :/ # make-j2 home/david/android/kernel/samsung-kernel-msm7x30
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
scripts / kconfig / conf - silentoldconfig kconfig
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
CHK include / linux / version.h
UPD include / linux / version.h
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
CHK include / generated / utsrelease.h
UPD include / generated / utsrelease.h
HOSTCC scripts / genksyms / genksyms.o
SHIPPED scripts / genksyms / lex.c
SHIPPED scripts / genksyms / parse.h
SHIPPED scripts / genksyms / keywords.c
SHIPPED scripts / genksyms / parse.c
HOSTCC scripts / genksyms / lex.o
CC scripts / mod / empty.o
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [2]: *** [scripts / mod / empty.o] Error 127
make [1]: *** [scripts / mod] Error 2
make [1]: *** is expected to finish other tasks ....
Generating include / generated / mach-types.h
CC kernel / bounds.s
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [1]: *** [kernel / bounds.s] Error 127
make: *** [prepare0] Error 2
make: *** is expected to finish other tasks ....
HOSTCC scripts / genksyms / parse.o
HOSTLD scripts / genksyms / genksyms
make: *** [scripts] Error 2
davidteri91 said:
Nothing
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 ARCH = arm
root @ david-desktop :/ # export home/david/android/kernel/samsung-kernel-msm7x30 CROSS_COMPILE = ~ / android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
root @ david-desktop :/ # make ariesve_defconfig home/david/android/kernel/samsung-kernel-msm7x30
HOSTCC scripts / basic / fixdep
HOSTCC scripts / kconfig / conf.o
SHIPPED scripts / kconfig / zconf.tab.c
SHIPPED scripts / kconfig / lex.zconf.c
SHIPPED scripts / kconfig / zconf.hash.c
HOSTCC scripts / kconfig / zconf.tab.o
HOSTLD scripts / kconfig / conf
#
# Configuration written to. Config
#
root @ david-desktop :/ # make-j2 home/david/android/kernel/samsung-kernel-msm7x30
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
scripts / kconfig / conf - silentoldconfig kconfig
make: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: program not found
CHK include / linux / version.h
UPD include / linux / version.h
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 25: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
/ Home/david/android/kernel/samsung-kernel-msm7x30/scripts/gcc-version.sh: line 26: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi -gcc: No such file or directory
CHK include / generated / utsrelease.h
UPD include / generated / utsrelease.h
HOSTCC scripts / genksyms / genksyms.o
SHIPPED scripts / genksyms / lex.c
SHIPPED scripts / genksyms / parse.h
SHIPPED scripts / genksyms / keywords.c
SHIPPED scripts / genksyms / parse.c
HOSTCC scripts / genksyms / lex.o
CC scripts / mod / empty.o
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [2]: *** [scripts / mod / empty.o] Error 127
make [1]: *** [scripts / mod] Error 2
make [1]: *** is expected to finish other tasks ....
Generating include / generated / mach-types.h
CC kernel / bounds.s
/ Bin / sh: 1: / root/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-gcc: not found
make [1]: *** [kernel / bounds.s] Error 127
make: *** [prepare0] Error 2
make: *** is expected to finish other tasks ....
HOSTCC scripts / genksyms / parse.o
HOSTLD scripts / genksyms / genksyms
make: *** [scripts] Error 2
Click to expand...
Click to collapse
Do you mind PM'ing me the steps you took?
when you say...
"Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory"
which directory do you mean exactly? the folder we have created named "kernel"?
It cant be that, so...
and the rest of steps are done over that same directory, right?
i get error at step B if i choose the kernel folder (empty)
Code:
make: *** No rule to make target `ariesv_defconfig'. Stop.
jaggyjags said:
when you say...
"Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory"
which directory do you mean exactly? the folder we have created named "kernel"?
It cant be that, so...
and the rest of steps are done over that same directory, right?
i get error at step B if i choose the kernel folder (empty)
Code:
make: *** No rule to make target `ariesv_defconfig'. Stop.
Click to expand...
Click to collapse
Yeah, sorry for the confusion. You are supposed to be in the kernel repo folder(the folder with msm7x30 in its name). Since that folder in necessarily the "kernel" itself I just called it that without thinking about the folders name.
Sent from my GT-I9001 using xda premium
what do mean in line C. Type "make -j<maximum number of jobs>, with maximum number of jobs?
jjaacckk94 said:
what do mean in line C. Type "make -j<maximum number of jobs>, with maximum number of jobs?
Click to expand...
Click to collapse
It means 1-2x the threads your CPU can handle. If you don't know how many just do -j(CPU cores + 1)
Sent from my GT-I9001 using xda premium
Hi,
I'm having some issues to build the kernel for my tablet Samsung Galaxy Tab p5110 from this github repo:
https://github.com/C...sung_espresso10
I'm getting the following error:
CC arch/arm/mach-omap2/common-board-devices.o
arch/arm/mach-omap2/common-board-devices.c:28: fatal error: linux/spi/ads7846.h: No such file or directory
compilation terminated.
make[1]: *** [arch/arm/mach-omap2/common-board-devices.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
I also had to edit arch/arm/mach-omap2/Makefile.sec because it was taking the BUILD_SOURCE as "".
I'm the doing the following steps:
# Sett the CROSS BUILD compiler here
make mrproper
make ARCH=arm cyanogenmod_p5110_defconfig
make -j4 ARCH=arm zImage
make clean
Any help will be appreciated.
Thanks,
Matias Kreder
This problem was caused because of the extract to .zip function of github. It corrupted some headers.
After building this kernel we were able to boot into CM10.1 but touch doesn't work, any idea why? do you know where should I ask?
I guess I should open a separate thread for that.
This guide is focused on xperia e3 but for other devices process will be simler too.
This guide is not in good shape now i will keep improving it and making it easier and better.
if xperia e3 don,t have too many developers then become one.
Requirements
linux os. -recommended ubuntu 14.04 LTS
(you can install ubuntu on virtualbox or dual boot ubuntu with windows)
cross compiler tool chain -recomended Linaro GCC 4.9.3 optimized for arm-cortex_a7
kernel source code. download it from sony or you can compile my nitrogen kernel only if you have D2212/02 recomended.
unlocked bootloader
tools for building boot.img Download HERE
Sony Kernel
D2202/12 DOWNLOAD
D2203/06/43 DOWNLOAD
Nitrogen Kernel
D2202/12/03/06/43 DOWNLOAD
config for lte varriants is not uploaded but u may find it in your device /proc/config.gz
extarct config from config.gz and rename it to Nitrogen_lte_defconfig and put it in
<kernel source folder>/arch/arm/config/<here>
Setting up Environment in Ubuntu.
boot up ubuntu and open Home directory.
create two new folder.
one with name "toolchain"
one with name "build"
now extract your toolchain to toolchain folder it must contain these folders
Code:
arm-cortex_a7-linux-gnueabihf
bin
include
lib
libexec
share
(depends on toolchain you have)
Extracting Nitrogen source code
if you downloaded zip then extract that zip home dir.
then rename flamingo-kernel folder to kernel
else you can use these commands
Code:
sudo apt-get update
sudo apt-get install git
then
Code:
git clone https://github.com/vinay94185vinay/Flamingo-kernel.git
after that rename flamingo kernel to kernel.
How to extract sony source code
open terminal type
Code:
tar -xjvf
then drag n drop source code file
then hit enter. (it will extract files in home firectory)
open your firmware number folder. eg: 18.5.C.0.19
delete extarnal folder then move/copy "kernel" folder to home dir.
and then extract build tools to build folder.
Compiling.
open an terminal (CTRL+ALT+T) and type
Code:
cd Kernel
(this will change directory to kernel folder.)
then type
Code:
export CROSS_COMPILE=[COLOR="Green"]~/toolchain/bin/[/COLOR][COLOR="Red"]arm-cortex_a7-linux-gnueabihf-[/COLOR]
(red line depend on tool chain and green line on it,s location)
how to find correct red line for toolchain.
open toolchain folder
then bin
in my case it contains files like
arm-cortex_a7-linux-gnueabihf-addr2line
arm-cortex_a7-linux-gnueabihf-ar
arm-cortex_a7-linux-gnueabihf-as
see all files contains that red line.
now you must understood how to know that line.
for sony kernel source code type
For D2202 and D2212
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8226ds_dp_defconfig[/COLOR]
For D2203 and D2206 and D2243
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8926ss_dp_defconfig[/COLOR]
"RED" line make sure that you compile kernel for arm based cpu that is in your android device
if you remove this line you will end up making a kernel for your pc.
"GREEN" is to load an preset default configuration for compiling kernel
it contains what thing,s has to be compiled in this kernel.
for nitrogen kernel source code type
D2202 and D2212
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
D2203 and D2206 and D2243
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_lte_defconfig
Now type for dualcore cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE [COLOR="red"]-j3[/COLOR]
"red" -j3 tell,s compiler to make 3 job,s which is good for intel dual core cpu.
if you have dual core amd cpu it should be better for you to have 2 job,s mean -j2
and -j4 for quard core.
for quard core cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j5
(do it like this cores + 1)
now wait for untill your kernel get compiled.
it may take long time. depend on how fast and how many cores your cpu have.
if you don,t get any error then
you have compiled your kernel :good:.
building boot.img
copy zimage from kernel/arch/arm/boot folder.
to build/msm8226_flamingo/<zimage>
now in msm8226_flamingo folder.
open new_stock_files/<according to your device>/
copy ramdisk. and dt.img to msm8226_flamingo folder.
now open terminal (CTRL+ALT+T) and type
Code:
cd build/msm8226_flamingo/
then
Code:
./makeit.sh
(don,t forget dot.)
now you can see boot.img in build/msm8226_flamingo folder.
now you can flash boot.img with fastboot or flashtool.
feel free to ask if you don,t understand or have error in any step.
RESERVED
adding features.
adding your and kernel name in kernel version.
adding kernel name
in kernel folder you will see Makefile open and edit it.
find these lines.
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=Red]EXTRAVERSION = [/COLOR]
NAME = Saber-toothed Squirrel
write name of kernel next to extraversion (highlited in red)
like this
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=red]EXTRAVERSION = -My_Kernel[/COLOR]
NAME = Saber-toothed Squirrel
adding your name.
open kernel/scripts
edit file called mkcompile_h
find lines like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]build_admin`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=green] ubuntu_builder`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
change red one to your name and green one to your host it will look like this in kernel version.
build_admin@ubuntu_builder
change it like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]my_name`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=red] i_compiled_on[/COLOR]`
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
adding governors and i/o sheduer
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
fixing error.
#1
if you get error with line
Code:
[-Werror=implicit-function-declaration]
like this one
Code:
CC drivers/video/msm/mdss/mdss_dsi_host.o
CC drivers/video/msm/mdss/mdss_dsi_cmd.o
CC drivers/video/msm/mdss/mdss_dsi_panel.o
drivers/video/msm/mdss/mdss_dsi_panel.c: In function ‘mdss_dsi_panel_reset’:
drivers/video/msm/mdss/mdss_dsi_panel.c:291:3: error: implicit declaration of function ‘mdss_dsi_request_gpios’ [COLOR="Red"][-Werror=implicit-function-declaration][/COLOR]
rc = mdss_dsi_request_gpios(ctrl_pdata);
^
cc1: some warnings being treated as errors
make[4]: *** [drivers/video/msm/mdss/mdss_dsi_panel.o] Error 1
make[3]: *** [drivers/video/msm/mdss] Error 2
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
then open makefile in kernel folder and find line
Code:
CFLAGS_KERNEL =
and make it like this
Code:
CFLAGS_KERNEL = -w
then save and exit you will not see that error again.
I will try it
Thanks bro
arpit.j said:
I will try it
Thanks bro
Click to expand...
Click to collapse
export command was incorrect.
i fixed it and added details of it.
hi,
guy,s some info here.
if you compile nitrogen kernel from source code it will give you some extra features that i added in source code after release of Nitrogen 4.1.
nitrogen kernel source code have
- prima wifi drivers
- headset in high performance mode
- zzmove governor
- 30% faster input output
- enhance power efecency with series of NVIDIA patches
- some tweaks for ASoc
- Enabled TCP Congestions like high speed,westwood etc.
if you want these features then compile kernel from source.
i will keep adding features to source code
only D2202 and D2212 is supported.
Don,t forget the poll at top of thread.
any on making any kernel.
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
pjk11 said:
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
Click to expand...
Click to collapse
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
vinay said:
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
Click to expand...
Click to collapse
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
pjk11 said:
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
Click to expand...
Click to collapse
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
vinay said:
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
Click to expand...
Click to collapse
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
pjk11 said:
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
Click to expand...
Click to collapse
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
vinay said:
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
Click to expand...
Click to collapse
Thank you very much, Vinay.
Regards
guide updated.
added link to a guide about adding features to your kernel
if you wan,t to learn anything more just ask me..
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
himfa71 said:
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
Click to expand...
Click to collapse
nothing will happen after that command actually it tells terminal $CROSS_COMPILE is equal to home/username/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
himfa71 said:
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
Click to expand...
Click to collapse
did you used git clone or downloaded zip.
TRY
Code:
chmod -R 777 ~/kernel
and ~/kernel is path to folder which contains kernel source code.
i downloaded the zip, and after this "chmod -R 777 ~/kernel" command im still getting same error,
thanks vinay for help, but now im leaving this kernel compiling, thanks.
I wanted to enable certain kernel features and in my Android 10 build for Pixel 3. I downloaded and built the correct msm kernel and successfully flashed it on the Pixel. To build the kernel I'm using the build/build.sh from the kernel source. I tried adding a custom defconfig file in private/msm-google/arch/arm64/configs/ and changing the DEFCONFIG variable in build.config to that file. When I compile I get following error:
Code:
++ echo ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
How can I compile the kernel with a custom defconfig? It doesn't have to be through the build.sh method (although it would be preferable)
gardeimasei said:
I wanted to enable certain kernel features and in my Android 10 build for Pixel 3. I downloaded and built the correct msm kernel and successfully flashed it on the Pixel. To build the kernel I'm using the build/build.sh from the kernel source. I tried adding a custom defconfig file in private/msm-google/arch/arm64/configs/ and changing the DEFCONFIG variable in build.config to that file. When I compile I get following error:
Code:
++ echo ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
How can I compile the kernel with a custom defconfig? It doesn't have to be through the build.sh method (although it would be preferable)
Click to expand...
Click to collapse
I don't know if it's solved, but I solved the problem removing the "check defconfig" in build.config (the symlink in the root which points to the kernel build.config).
Change
Code:
POST_DEFCONFIG_CMDS="check_defconfig"
to
Code:
POST_DEFCONFIG_CMDS=""
I've been working with a Google engineer who showed me the fix for my savedefconfig problem. Maybe it will fix yours, too.
The key is to set ARCH:
Code:
$ export ARCH=arm64
Here's the context and full procedure. My work is based on the b1c1_defconfig config. Your directory names may vary.
Code:
$ cd private/msm-google
$ export ARCH=arm64 # this is the magic line
$ make b1c1_defconfig # This sets up the config for my hardware. Yours is probably different.
$ make menuconfig
Now edit the kernel configuration and save it as ".config", the default.
When you're done:
Code:
$ make savedefconfig
$ cp defconfig arch/arm64/configs/b1c1_defconfig # or whatever your hardware configuration is
$ make mrproper
With luck, you won't see any savedefconfig problems.