[CRICKET]Getting errors when compiling the kernel - HTC Desire 510

I have been trying to compile the kernel for our device for the last 2 days.
But all i do is keep running into dead ends.
I have it almost all worked out to work with the linaro toolchain but i still end up with either this error
Code:
make -j9 ARCH=arm CROSS_COMPILE=~/toolchains/arm-2011.09/bin/arm-none-eabi-
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/media/radio/radio-iris.o
CC [M] drivers/media/radio/radio-iris-transport.o
LD drivers/media/radio/built-in.o
LD drivers/media/built-in.o
LD drivers/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `video_open':
/home/kalisto/kernel/android_kernel_htc_a11ul/drivers/media/radio/radio-iris.c:5069: undefined reference to `hci_fm_smd_register'
drivers/built-in.o: In function `iris_remove':
/home/kalisto/kernel/android_kernel_htc_a11ul/drivers/media/radio/radio-iris.c:5226: undefined reference to `hci_fm_smd_deregister'
make: *** [.tmp_vmlinux1] Error 1
Or this error
Code:
ERROR: "hci_fm_smd_deregister" [drivers/media/radio/radio-iris.ko] undefined!
ERROR: "hci_fm_smd_register" [drivers/media/radio/radio-iris.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/ashldi3.o
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 3m13.707s
user 18m42.083s
sys 2m24.205s
Anyone that could point me in the right direction would be great

you could try commenting out the aspects of code that are undefined references.that is more of just a hackish workaround and may cause other problems,so say for the error in /drivers/media/radio/radio-iris.c,as long as "hci_fm_smd_register" is just a single line,you could just // it out and it will be commented out,same for the other file,but if they are whole functions you could find the start and fully comment it out with /* all_code_inside_the_function */ <- with this being at the end of the function

pattyboi:) said:
you could try commenting out the aspects of code that are undefined references.that is more of just a hackish workaround and may cause other problems,so say for the error in /drivers/media/radio/radio-iris.c,as long as "hci_fm_smd_register" is just a single line,you could just // it out and it will be commented out,same for the other file,but if they are whole functions you could find the start and fully comment it out with /* all_code_inside_the_function */ <- with this being at the end of the function
Click to expand...
Click to collapse
Turns out i just needed to turn off the radio in the defconfig. Problems solved

kalisto2002 said:
Turns out i just needed to turn off the radio in the defconfig. Problems solved
Click to expand...
Click to collapse
thats odd....i've never had this error

Related

[Q] Well, I'm stuck. Make errors...

I can't seem to catch a break...
I haven't been able to compile anything with my build environment. For at least a few weeks. I know it should work, because I compiled a build of WD40M0D prior to all my merging of source. I'm using a MacBookPro running OS X 10.5.8
When trying to build a kernel, I get errors on "bounds.s" and "prepare0":
Code:
sean-whitleys-macbook-pro:kernel-msm wdfowty$ make ARCH=arm CROSS_COMPILE=$CCOMPILER
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
cc1: error: invalid option ‘little-endian’
cc1: error: invalid option ‘abi=aapcs-linux’
cc1: error: invalid option ‘no-thumb-interwork’
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
My next error, if I skip the kernel, is in building libgps.so...It claims to not be able to find librpc.so, which to the best of my knowledge is where it's supposed to be (somewhere in the out directory).
Code:
#
/Users/wdfowty/bin/mydroid/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: librpc.so, needed by out/target/product/passion/obj/lib/libgps.so, not found (try using -rpath or -rpath-link)
Some things I've noticed...
*Kernel error is constant across AOSP and CM source (could it be a bad .config?)
*Errors persist even after running "make clobber" or "make installclean"
I'm hoping someone can help, as I'm running on minimal knowledge and experience...Thank you in advance!
Here's the full librpc.so error on pastebin: http://pastebin.com/VBtAffE0

[Q] how to compile a driver/kernel ?

how to compile a driver ? SLOVE
i have problem after,,
#cp arch/arm/configs/htc_msm_android_defconfig .config
#make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- TARGET_BOARD_PLATFORM=msm7k
make: arm-none-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: arm-none-linux-gnueabi-gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC kernel/bounds.s
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
slove after download
codesourcery......com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

[Q] Fail to compile kernel.

I download the code from htcdev.But it looks like failed to compile it.
[email protected]:/opt/CM-11.0/kernel/htc/m7ul# export PATH=$PATH:/opt/CM-11.0/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
[email protected]:/opt/CM-11.0/kernel/htc/m7ul# make m7_defconfig
[email protected]:/opt/CM-11.0/kernel/htc/m7ul# make ARCH=arm CROSS_COMPILE=arm-eabi- -j5
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/gpu/msm/adreno_snapshot.o
drivers/gpu/msm/adreno_snapshot.c: In function 'snapshot_rb':
drivers/gpu/msm/adreno_snapshot.c:498: sorry, unimplemented: inlining failed in call to 'parse_ib': recursive inlining
drivers/gpu/msm/adreno_snapshot.c:469: sorry, unimplemented: called from here
make[3]: *** [drivers/gpu/msm/adreno_snapshot.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:/opt/CM-11.0/kernel/htc/m7ul#
How to solve it?
THX.
Nobody knows?

building kernel failed

I am trying to build a kernel for moto g 2014
I have tried using linaro and stock gcc toolchains.
Code:
[email protected]:~/kernelmoto$ export ARCH=arm
[email protected]:~/kernelmoto$ export CROSS_COMPILER=~/android/aosp-6.0/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-
[email protected]:~/kernelmoto$
[email protected]:~/kernelmoto$ make titan_defconfig
drivers/usb/gadget/Kconfig:881:warning: defaults for choice values not supported
#
# configuration written to .config
#
[email protected]:~/kernelmoto$ make clean && mrproper
CLEAN .
CLEAN arch/arm/kernel
CLEAN kernel
CLEAN security/selinux
CLEAN usr
CLEAN arch/arm/boot
CLEAN .tmp_versions
mrproper: command not found
[email protected]:~/kernelmoto$ make -j6
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/usb/gadget/Kconfig:881:warning: defaults for choice values not supported
CHK include/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC scripts/conmakehash
HOSTCC scripts/kallsyms
CC scripts/mod/empty.o
HOSTCC scripts/dtc/checks.o
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
scripts/Makefile.build:443: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/dtc/data.o
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/dtc/dtc-lexer.lex.o
make[1]: 'include/generated/mach-types.h' is up to date.
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
CC kernel/bounds.s
HOSTCC scripts/dtc/fstree.o
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
/home/sid/kernelmoto/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:995: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/util.o
HOSTCC scripts/dtc/treesource.o
HOSTLD scripts/dtc/dtc
Makefile:515: recipe for target 'scripts' failed
make: *** [scripts] Error 2
[email protected]:~/kernelmoto$
how to fix these errors? any help will be appreciated.

LineageOS and build error (kernel/gcc)

Hi,
I had my environment set up for building LineageOS (Ubuntu xenial) and it was working perfectly fine.
I haven't updated the machine since March 2017.
Now I did 'repo sync' and suddenly I'm getting the following errors during brunch hammerhead
Code:
LD drivers/video/msm/mdss/mdss-dsi.o
LD drivers/video/msm/mdss/built-in.o
LD drivers/video/msm/built-in.o
LD drivers/video/built-in.o
LD drivers/usb/gadget/g_android.o
LD drivers/usb/gadget/built-in.o
LD drivers/usb/built-in.o
LD drivers/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
ERROR: modpost: Found 12 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/media/rawi/android/lineageos/kernel/lge/hammerhead/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[2]: *** [vmlinux.o] Error 1
/media/rawi/android/lineageos/kernel/lge/hammerhead/Makefile:936: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/media/rawi/android/lineageos/kernel/lge/hammerhead'
[ 12% 4387/34154] target Java: android-support-compat-ics-mr1 (/media/rawi/android/lineageos/out/target/common/obj/JAVA_LIBRARIES/android-support-compat-ics-mr1_intermediates/classes)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/media/rawi/android/lineageos'
#### make failed to build some targets (13:29 (mm:ss)) ####
What I've already googled is that it's probably wrong toolchain used but I'm using the one supplied with LineageOS which is arm-eabi-4.8.
I added (not sure if it's necessary) the following exports
Code:
export PATH="/media/rawi/android/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin:$PATH"
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE="/media/rawi/android/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-"
I'd like to highlight that this environment was building LineageOS (cm-14.1 branch) in March perfectly fine
I know that I can add CONFIG_NO_ERROR_ON_MISMATCH=y to config but I assume this is not the right way to do.
Any help greatly appreciated
EDIT: solved... I was compiling CAF kernel with non-caf device
Thread closed as per OP request
-XDA Staff

Categories

Resources