[Q] error compiling kernel - can't open file "arch/Kconfig" - Android Software/Hacking General [Developers Only]

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

Related

Need help compiling my first kernel

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.

help in compiling kernel

i m trying to build a kernel for our devices
i have done every thing including config modifaction
n now m ready to compile the kernel but i have tried many commands for compiling kernel but the it always retur an error like for example when i put
this command
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4
or
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER zImage -j4
get this error
[email protected]:~/kernel/omap$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option ‘-mlittle-endian’
cc1: error: unrecognized command line option ‘-mno-thumb-interwork’
scripts/mod/empty.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch
scripts/mod/empty.c:1:0: error: bad value (armv5t) for -march= switch
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
[email protected]:~/kernel/omap$
plz help guyz its urgent!!!
Bro asking for technical help here isn't going to help, most devs do not look here. You try posting in various kernel threads for help, or private message a kernel developer for help
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CyanogenMod 9!
1. make ARCH=arm CROSS_COMPILE=/home/name /toolchain/arm-eabi-4.4.0/bin/arm-eabi- menuconfig
2. make ARCH=arm CROSS_COMPILE=/home/name/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
1. make ARCH=arm CROSS_COMPILE=/home/name /toolchain/arm-eabi-4.4.0/bin/arm-eabi- menuconfig
2. make ARCH=arm CROSS_COMPILE=/home/name/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
Click to expand...
Click to collapse
Sent from my GT-I9003 using the XDA mobile application powered by Tapatalk

Having some troubles to build kernel from Github Repository

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.

Compiling cm13 error 'unknown type init_shell'

Hello,
I'm coming from another phone and am new to this one. I'm jumping in to see if and where I can help with with bugs related to the cm13 device tree.
After almost a full compile, I'm running into an error I can't figure out.
Code:
No private recovery resources for TARGET_DEVICE osprey
make -C kernel/motorola/msm8916 O=/home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/xclusive36/android/cm13/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= osprey_defconfig
host Executable: mkbootfs (/home/xclusive36/android/cm13/out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
make[1]: Entering directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
Install: /home/xclusive36/android/cm13/out/host/linux-x86/lib64/libcutils.so
/home/xclusive36/android/cm13/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/policy.conf
device/motorola/osprey/sepolicy/init_shell.te:2:ERROR 'unknown type init_shell' at token ';' on line 26943:
#line 1 "device/motorola/osprey/sepolicy/init_shell.te"
allow init_shell utags_block_device:blk_file { getattr open read ioctl lock };
checkpolicy: error(s) encountered while parsing configuration
make: *** [/home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
GEN /home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make[1]: Leaving directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
make: Leaving directory `/home/xclusive36/android/cm13'
#### make failed to build some targets (07:12 (mm:ss)) ####
Any help would be appreciated.
Thanks
xclusive36 said:
Hello,
I'm coming from another phone and am new to this one. I'm jumping in to see if and where I can help with with bugs related to the cm13 device tree.
After almost a full compile, I'm running into an error I can't figure out.
Code:
No private recovery resources for TARGET_DEVICE osprey
make -C kernel/motorola/msm8916 O=/home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/xclusive36/android/cm13/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= osprey_defconfig
host Executable: mkbootfs (/home/xclusive36/android/cm13/out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
make[1]: Entering directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
Install: /home/xclusive36/android/cm13/out/host/linux-x86/lib64/libcutils.so
/home/xclusive36/android/cm13/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/policy.conf
device/motorola/osprey/sepolicy/init_shell.te:2:ERROR 'unknown type init_shell' at token ';' on line 26943:
#line 1 "device/motorola/osprey/sepolicy/init_shell.te"
allow init_shell utags_block_device:blk_file { getattr open read ioctl lock };
checkpolicy: error(s) encountered while parsing configuration
make: *** [/home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
GEN /home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make[1]: Leaving directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
make: Leaving directory `/home/xclusive36/android/cm13'
#### make failed to build some targets (07:12 (mm:ss)) ####
Any help would be appreciated.
Thanks
Click to expand...
Click to collapse
You'll need the SELinux patch on gerrit. It's still a WIP. http://review.cyanogenmod.org/#/c/118765/
squid2 said:
You'll need the SELinux patch on gerrit. It's still a WIP. http://review.cyanogenmod.org/#/c/118765/
Click to expand...
Click to collapse
Gotcha, thanks for the reply. I was able to get a full compile by removing that folder from the device/motorola/osprey folder. I'll take a look at that patch tonight when I get off of work and try it again with SELinux enabled.

[Completed] Need help with ROM Compilation error

Hey guys, I have been trying to compile a rom for bacon. I have all the source set up and the build is stopping at this error. Please help me solve this problem.
make -C kernel/oneplus/msm8974 O=out/target/product/bacon/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/int/darko/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androideabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= bacon_defconfig
/bin/sh: 1: cd: can't cd to out/target/product/bacon/obj/KERNEL_OBJ
host Executable: mkbootfs (out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
Install: out/host/linux-x86/lib64/libcutils.so
make[1]: Entering directory `/home/int/darko/kernel/oneplus/msm8974'
Makefile:121: *** output directory "out/target/product/bacon/obj/KERNEL_OBJ" does not exist. Stop.
make[1]: Leaving directory `/home/int/darko/kernel/oneplus/msm8974'
make: *** [out/target/product/bacon/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
INT3NSE07 said:
Hey guys, I have been trying to compile a rom for bacon. I have all the source set up and the build is stopping at this error. Please help me solve this problem.
make -C kernel/oneplus/msm8974 O=out/target/product/bacon/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/int/darko/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androideabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= bacon_defconfig
/bin/sh: 1: cd: can't cd to out/target/product/bacon/obj/KERNEL_OBJ
host Executable: mkbootfs (out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
Install: out/host/linux-x86/lib64/libcutils.so
make[1]: Entering directory `/home/int/darko/kernel/oneplus/msm8974'
Makefile:121: *** output directory "out/target/product/bacon/obj/KERNEL_OBJ" does not exist. Stop.
make[1]: Leaving directory `/home/int/darko/kernel/oneplus/msm8974'
make: *** [out/target/product/bacon/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
Hello,
Try posting your query here [GUIDE][COMPLETE] Android ROM Development From Source To End, the experts there maybe able to assist you.
-Vatsal

Categories

Resources