[X 2014 Q&A, Help & Troubleshooting] Vinnom:
Guys, I need help.

I'm trying to compile a stock kernel for victara, however I'm still learning. So I couldn't compile yet =/

I used motorola kernel-msm source and other files from here (motorola kernel, as motorola github). I just merged motorola-kernel folder in kernel-msm, so I could update the files.

The steps I took was:

- Followed this guide to include a governor and a hotplug.

- After merging, I did a make defconfig using msm8974-defconfig, so I had a standard defconfig.

- make -j3 (I have only 3 cores, with only 1 thread per core. ARCH and SUBARCH already exported as "arm" and cross-compile set to my arm-eabi folder).

I got some errors that I could solve, but now, I don't know exactly what is wrong or how to solve it.

Here is my output

(venv)[vinnom@localhost kernel-msm]$ make -j3
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
CC arch/arm/mach-msm/smd_init_dt.o
CC arch/arm/mach-msm/smd_init_plat.o
CC arch/arm/mach-msm/smp2p.o
CC arch/arm/mach-msm/smp2p_debug.o
CC arch/arm/mach-msm/smp2p_gpio.o
CC arch/arm/mach-msm/smp2p_loopback.o
CC ipc/util.o
CC arch/arm/mach-msm/smp2p_test.o
CHK kernel/config_data.h
CC arch/arm/mach-msm/smp2p_gpio_test.o
CC ipc/msgutil.o
CC arch/arm/mach-msm/smp2p_spinlock_test.o
CC security/keys/gc.o
CC ipc/msg.o
CC arch/arm/mach-msm/scm.o
CC security/keys/key.o
CC arch/arm/mach-msm/scm-boot.o
CC ipc/sem.o
CC security/keys/keyring.o
CC arch/arm/mach-msm/scm-xpu.o
CC arch/arm/mach-msm/peripheral-loader.o
CC security/keys/keyctl.o
CC ipc/shm.o
CC arch/arm/mach-msm/scm-pas.o
CC security/keys/permission.o
CC arch/arm/mach-msm/pil-q6v5.o
CC ipc/ipcns_notifier.o
CC security/keys/process_keys.o
CC ipc/syscall.o
CC arch/arm/mach-msm/pil-q6v5-lpass.o
CC ipc/ipc_sysctl.o
CC security/keys/request_key.o
LD ipc/built-in.o
CC crypto/api.o
CC arch/arm/mach-msm/pil-msa.o
CC security/keys/request_key_auth.o
CC arch/arm/mach-msm/pil-q6v5-mss.o
CC security/keys/user_defined.o
CC crypto/cipher.o
CC arch/arm/mach-msm/pil-pronto.o
CC security/keys/proc.o
CC crypto/compress.o
CC security/keys/sysctl.o
CC arch/arm/mach-msm/pil-venus.o
CC crypto/algapi.o
LD security/keys/built-in.o
GEN security/selinux/flask.h security/selinux/av_permissions.h
CC security/selinux/avc.o
CC arch/arm/mach-msm/bam_dmux.o
CC crypto/scatterwalk.o
CC security/selinux/hooks.o
CC crypto/proc.o
CC crypto/ablkcipher.o
CC arch/arm/mach-msm/ipc_logging.o
CC crypto/blkcipher.o
CC arch/arm/mach-msm/ipc_logging_debug.o
CC crypto/ahash.o
CC security/selinux/selinuxfs.o
CC arch/arm/mach-msm/socinfo.o
CC crypto/shash.o
CC arch/arm/mach-msm/smd_tty.o
CC security/selinux/netlink.o
CC crypto/algboss.o
CC security/selinux/nlmsgtab.o
CC arch/arm/mach-msm/smd_qmi.o
CC security/selinux/netif.o
CC crypto/testmgr.o
CC arch/arm/mach-msm/smd_pkt.o
CC security/selinux/netnode.o
CC crypto/crypto_wq.o
LD crypto/crypto_algapi.o
CC crypto/aead.o
CC security/selinux/netport.o
CC arch/arm/mach-msm/smd_nmea.o
CC arch/arm/mach-msm/ipc_router_smd_xprt.o
CC security/selinux/exports.o
LD crypto/crypto_blkcipher.o
CC crypto/chainiv.o
CC security/selinux/ss/ebitmap.o
CC crypto/eseqiv.o
CC arch/arm/mach-msm/ipc_router.o
CC security/selinux/ss/hashtab.o
LD crypto/crypto_hash.o
CC crypto/pcompress.o
CC security/selinux/ss/symtab.o
CC security/selinux/ss/sidtab.o
LD crypto/cryptomgr.o
CC crypto/hmac.o
CC security/selinux/ss/avtab.o
CC crypto/xcbc.o
CC crypto/crypto_null.o
CC arch/arm/mach-msm/ipc_socket.o
CC security/selinux/ss/policydb.o
CC crypto/md4.o
CC arch/arm/mach-msm/msm_ipc_router_security.o
CC crypto/md5.o
CC crypto/sha1_generic.o
CC arch/arm/mach-msm/msm_qmi_interface.o
CC crypto/sha256_generic.o
MKCAP arch/arm/mach-msm/smd_rpc_sym.c
CC crypto/ecb.o
CC security/selinux/ss/services.o
CC crypto/cbc.o
AS arch/arm/mach-msm/memutils/memcpy.o
AS arch/arm/mach-msm/memutils/copy_from_user.o
AS arch/arm/mach-msm/memutils/copy_to_user.o
CC arch/arm/mach-msm/memutils/copy_page.o
AS arch/arm/mach-msm/memutils/memmove_8974.o
CC crypto/des_generic.o
LD arch/arm/mach-msm/memutils/built-in.o
CC arch/arm/mach-msm/msm_bus/msm_bus_core.o
CC arch/arm/mach-msm/msm_bus/msm_bus_fabric.o
CC security/selinux/ss/conditional.o
CC crypto/twofish_generic.o
CC arch/arm/mach-msm/msm_bus/msm_bus_config.o
CC crypto/twofish_common.o
CC security/selinux/ss/mls.o
CC arch/arm/mach-msm/msm_bus/msm_bus_arb.o
CC crypto/aes_generic.o
CC security/selinux/ss/status.o
CC arch/arm/mach-msm/msm_bus/msm_bus_bimc.o
LD security/selinux/selinux.o
LD security/selinux/built-in.o
CC security/commoncap.o
CC arch/arm/mach-msm/msm_bus/msm_bus_noc.o
CC crypto/arc4.o
CC crypto/deflate.o
CC security/min_addr.o
CC arch/arm/mach-msm/msm_bus/msm_bus_of.o
CC security/security.o
CC crypto/crc32c.o
CC crypto/authenc.o
CC arch/arm/mach-msm/msm_bus/msm_bus_rpm.o
CC security/capability.o
CC crypto/authencesn.o
CC arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o
CC arch/arm/mach-msm/msm_bus/msm_bus_board_8974.o
CC arch/arm/mach-msm/msm_bus/msm_bus_dbg.o
CC crypto/rng.o
CC security/lsm_audit.o
CC crypto/krng.o
LD arch/arm/mach-msm/msm_bus/built-in.o
CC [M] crypto/ansi_cprng.o
arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o: In function `msm_bus_rpm_set_mt_mask':
/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.c:23: multiple definition of `msm_bus_rpm_set_mt_mask'
arch/arm/mach-msm/msm_bus/msm_bus_rpm.o:/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c:28: first defined here
arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o: In function `msm_bus_rpm_is_mem_interleaved':
/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.c:29: multiple definition of `msm_bus_rpm_is_mem_interleaved'
arch/arm/mach-msm/msm_bus/msm_bus_rpm.o:/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c:40: first defined here
arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o: In function `msm_bus_rpm_fill_cdata_buffer':
/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.c:39: multiple definition of `msm_bus_rpm_fill_cdata_buffer'
arch/arm/mach-msm/msm_bus/msm_bus_rpm.o:/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c:144: first defined here
arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o: In function `msm_bus_remote_hw_commit':
/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.c:196: multiple definition of `msm_bus_remote_hw_commit'
arch/arm/mach-msm/msm_bus/msm_bus_rpm.o:/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c:957: first defined here
arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o: In function `msm_bus_rpm_hw_init':
/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.c:239: multiple definition of `msm_bus_rpm_hw_init'
arch/arm/mach-msm/msm_bus/msm_bus_rpm.o:/home/vinnom/android/Github/Victara/kernel/kernel-msm/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c:961: first defined here
scripts/Makefile.build:375: recipe for target 'arch/arm/mach-msm/msm_bus/built-in.o' failed
make[2]: *** [arch/arm/mach-msm/msm_bus/built-in.o] Error 1
scripts/Makefile.build:443: recipe for target 'arch/arm/mach-msm/msm_bus' failed
make[1]: *** [arch/arm/mach-msm/msm_bus] Error 2
Makefile:955: recipe for target 'arch/arm/mach-msm' failed
make: *** [arch/arm/mach-msm] Error 2
LD security/built-in.o
LD crypto/crypto.o
LD crypto/built-in.o
make: ** Esperando que outros processos terminem.

PS: I use arch linux, so my python is updated. It means that I need to use a virtual environment everytime I try to compile some android stuff. I followed arch wiki android build guide to set up my machine.