Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,768,220 Members 44,820 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Help a noob build a kernel

Tip us?
 
kdomn37
Old
(Last edited by kdomn37; 16th June 2014 at 06:16 AM.) Reason: make it look better
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Nov 2010
Default [Q] Help a noob build a kernel

I'm hoping one of you can help me, my google foo isn't working here and neither is IRC. Probably simple, i'v never built a kernel before.

So I got the source from: github.com/MotorolaMobilityLLC/
and I'm trying to build a stand alone kernel, so I setup my build environment:

Code:
export CROSS_COMPILE=~/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-

export ARCH=arm
and then I make the config file:

Code:
me@ubuntu:~/android/kernel$ make msm8610_defconfig
drivers/usb/gadget/Kconfig:881:warning: defaults for choice values not supported
arch/arm/configs/msm8610_defconfig:443:warning: override: reassigning to symbol REGULATOR_TPS65132
arch/arm/configs/msm8610_defconfig:528:warning: override: reassigning to symbol PPP
arch/arm/configs/msm8610_defconfig:529:warning: override: reassigning to symbol PPP_ASYNC
arch/arm/configs/msm8610_defconfig:531:warning: override: reassigning to symbol PPP_DEFLATE
arch/arm/configs/msm8610_defconfig:532:warning: override: reassigning to symbol PPP_BSDCOMP
arch/arm/configs/msm8610_defconfig:534:warning: override: reassigning to symbol PPPOLAC
arch/arm/configs/msm8610_defconfig:535:warning: override: reassigning to symbol PPPOPNS
arch/arm/configs/msm8610_defconfig:536:warning: override: reassigning to symbol PPP_MPPE
arch/arm/configs/msm8610_defconfig:544:warning: override: reassigning to symbol MOT_UTAG
arch/arm/configs/msm8610_defconfig:546:warning: override: reassigning to symbol SECURITY
arch/arm/configs/msm8610_defconfig:547:warning: override: reassigning to symbol AUDIT
arch/arm/configs/msm8610_defconfig:548:warning: override: reassigning to symbol SECURITY_NETWORK
#
# configuration written to .config
#
By the way, what is the difference between msm8610_defconfig and msm8610-perf_defconfig?

I would now use menuconfig but I don't want to try to customize the kernel this first go, although I get the same results using menuconfig or not.
So now I just make right?

Code:
me@ubuntu:~/android/kernel$ make
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
  UPD     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o


...



  CC      arch/arm/mach-msm/perf_trace_counters.o
  CC      arch/arm/mach-msm/perf_debug.o
  CC      arch/arm/mach-msm/platsmp.o
  CC      arch/arm/mach-msm/hotplug.o
  AS      arch/arm/mach-msm/idle-v7.o
  CC      arch/arm/mach-msm/smd.o
  CC      arch/arm/mach-msm/smd_debug.o
  CC      arch/arm/mach-msm/remote_spinlock.o
/tmp/ccNV5VPY.s: Assembler messages:
/tmp/ccNV5VPY.s:174: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccNV5VPY.s:201: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
  CC      arch/arm/mach-msm/smd_private.o
  CC      arch/arm/mach-msm/smem.o
  CC      arch/arm/mach-msm/smd_init_dt.o
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
 #include <smd_private.h>
                         ^
compilation terminated.
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
me@ubuntu:~/android/kernel$
i have checked of course, smd_private.h is right where it should be and where make says it isn't. What gives?
 
newhor1z0n
Old
#2  
newhor1z0n's Avatar
Member
Thanks Meter 354
Posts: 41
Join Date: Jul 2014
Location: San Francisco

 
DONATE TO ME
Default Fix

Quote:
Originally Posted by kdomn37 View Post
I'm hoping one of you can help me, my google foo isn't working here and neither is IRC. Probably simple, i'v never built a kernel before.

So I got the source from: github.com/MotorolaMobilityLLC/
and I'm trying to build a stand alone kernel, so I setup my build environment:

Code:
export CROSS_COMPILE=~/NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-

export ARCH=arm
and then I make the config file:

Code:
me@ubuntu:~/android/kernel$ make msm8610_defconfig
drivers/usb/gadget/Kconfig:881:warning: defaults for choice values not supported
arch/arm/configs/msm8610_defconfig:443:warning: override: reassigning to symbol REGULATOR_TPS65132
arch/arm/configs/msm8610_defconfig:528:warning: override: reassigning to symbol PPP
arch/arm/configs/msm8610_defconfig:529:warning: override: reassigning to symbol PPP_ASYNC
arch/arm/configs/msm8610_defconfig:531:warning: override: reassigning to symbol PPP_DEFLATE
arch/arm/configs/msm8610_defconfig:532:warning: override: reassigning to symbol PPP_BSDCOMP
arch/arm/configs/msm8610_defconfig:534:warning: override: reassigning to symbol PPPOLAC
arch/arm/configs/msm8610_defconfig:535:warning: override: reassigning to symbol PPPOPNS
arch/arm/configs/msm8610_defconfig:536:warning: override: reassigning to symbol PPP_MPPE
arch/arm/configs/msm8610_defconfig:544:warning: override: reassigning to symbol MOT_UTAG
arch/arm/configs/msm8610_defconfig:546:warning: override: reassigning to symbol SECURITY
arch/arm/configs/msm8610_defconfig:547:warning: override: reassigning to symbol AUDIT
arch/arm/configs/msm8610_defconfig:548:warning: override: reassigning to symbol SECURITY_NETWORK
#
# configuration written to .config
#
By the way, what is the difference between msm8610_defconfig and msm8610-perf_defconfig?

I would now use menuconfig but I don't want to try to customize the kernel this first go, although I get the same results using menuconfig or not.
So now I just make right?

Code:
me@ubuntu:~/android/kernel$ make
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
  UPD     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o


...



  CC      arch/arm/mach-msm/perf_trace_counters.o
  CC      arch/arm/mach-msm/perf_debug.o
  CC      arch/arm/mach-msm/platsmp.o
  CC      arch/arm/mach-msm/hotplug.o
  AS      arch/arm/mach-msm/idle-v7.o
  CC      arch/arm/mach-msm/smd.o
  CC      arch/arm/mach-msm/smd_debug.o
  CC      arch/arm/mach-msm/remote_spinlock.o
/tmp/ccNV5VPY.s: Assembler messages:
/tmp/ccNV5VPY.s:174: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccNV5VPY.s:201: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
  CC      arch/arm/mach-msm/smd_private.o
  CC      arch/arm/mach-msm/smem.o
  CC      arch/arm/mach-msm/smd_init_dt.o
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
 #include <smd_private.h>
                         ^
compilation terminated.
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
me@ubuntu:~/android/kernel$
i have checked of course, smd_private.h is right where it should be and where make says it isn't. What gives?
Open smd_init_dt.c and replace:
Code:
#include <smd_private.h>
with
Code:
#include "smd_private.h"
Should do the trick!

Bye the way, are you sure that the msm8610_defconfig should be used? I don't own the device so I'm not sure.

Cheers.

If I helped you or you like my work please click the Thanks button.
The Following 4 Users Say Thank You to newhor1z0n For This Useful Post: [ Click to Expand ]
 
dr34m3r94
Old
#3  
dr34m3r94's Avatar
Junior Member
Thanks Meter 2
Posts: 7
Join Date: Jul 2014
Location: New Delhi
Quote:
Originally Posted by newhor1z0n View Post
Open smd_init_dt.c and replace:
Code:
#include <smd_private.h>
with
Code:
#include "smd_private.h"
Should do the trick!

Bye the way, are you sure that the msm8610_defconfig should be used? I don't own the device so I'm not sure.

Cheers.

If I helped you or you like my work please click the Thanks button.
Thanks! I was getting the same error. Fixed now!

Sent from my Nexus 5 using XDA Premium 4 mobile app
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes