FORUMS
Remove All Ads from XDA

[REFERENCE] How to compile an Android kernel

13,731 posts
Thanks Meter: 50,776
 
By nathanchance, Recognized Developer / Recognized Contributor on 26th June 2017, 05:38 AM
Post Reply Email Thread
28th October 2019, 12:41 PM |#641  
Member
Thanks Meter: 2
 
More
Hello! Im trying to compile the kernel here (which is based off, and very similar to this).

When I try to compile the kernel I get a number of errors which I have fixed by setting the ANDROID_VERSION and ANDROID_MAJOR_VERSION environment variables to p, but now about 5 secs after executing make -j8 I get a new error:
Code:
/mnt/d/AndroidKernel/NethunterKernel/Makefile:587: recipe for target 'scripts' failed
make[1]: *** [scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
Do you know what this could be?
In Makefile line 587 is:
Code:
585: scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
586:	 asm-generic
587:	$(Q)$(MAKE) $(build)=$(@)
7th November 2019, 04:40 PM |#642  
Account currently disabled
Thanks Meter: 51
 
More
Hello. I'm trying to compiler a kernel for G950F with drivers for nethunter external wifi adapter. I got this error:

/home/zerocount/kernel/kernel/Makefile:1058: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/zerocount/kernel/out'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

What does "recipe for target" mean?
7th November 2019, 05:15 PM |#643  
onliner's Avatar
Senior Member
Flag Sydney
Thanks Meter: 949
 
More
Quote:
Originally Posted by FakeSmile

Hello. I'm trying to compiler a kernel for G950F with drivers for nethunter external wifi adapter. I got this error:

/home/zerocount/kernel/kernel/Makefile:1058: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/zerocount/kernel/out'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

What does "recipe for target" mean?

Error 2 means that something failed before, look for the previous error in the full output.
8th November 2019, 02:46 AM |#644  
Account currently disabled
Thanks Meter: 51
 
More
Okay. This is the error 1 and error 2:

In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/delay.h:10,
from drivers/bluetooth/bcm43xx.c:23:
drivers/bluetooth/bcm43xx.c:80:15: error: 'check_bt_op' undeclared here (not in a function)
EXPORT_SYMBOL(check_bt_op);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/bluetooth/bcm43xx.c:80:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(check_bt_op);
^
scripts/Makefile.build:277: recipe for target 'drivers/bluetooth/bcm43xx.o' failed
make[2]: *** [drivers/bluetooth/bcm43xx.o] Error 1
scripts/Makefile.build:484: recipe for target 'drivers/bluetooth' failed
make[1]: *** [drivers/bluetooth] Error 2
Makefile:1058: recipe for target 'drivers' failed
make: *** [drivers] Error 2

I guess it's all about the first error (undeclared). Fixing it and it will continue to compile. I'm really sick of these errors all the time. I watched every video and read every topic in google about kernel compiling and still errors....
So how do I declare the function in the first error? I compared sources of 2 different kernels and in the other one this part:" EXPORT_SYMBOL(check_bt_op); " in drivers/bluetooth/bcm43xx.c: was missing. So can I just delete it?
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