uyaseen
uyaseen

Reputation: 1201

Android kernel compilation error

I am trying to compile android kernel (cyanogen) for Samsung Galaxy mini , according to these instructions:

I am using CM-7.

I performed these steps:

  1. Download kernel source code.

  2. Configure the build :

    adb pull /proc/config.gz /home/user_name/android/kernel/cm-kernel/config.gz 
    cat config.gz | gunzip > .config 
    make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
    
  3. Make the build:

     make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4
    

After this kernel starts compiling and everything works fine but then it throws an error, here is the output of the terminal:

 CC [M]  drivers/gpio/wm8994-gpio.o
 LD [M]  sound/usb/misc/snd-ua101.o
 LD [M]  sound/usb/snd-usb-audio.o
 LD [M]  sound/usb/snd-usbmidi-lib.o
 CC [M]  drivers/gpio/sch_gpio.o
 CC [M]  drivers/gpio/rdc321x-gpio.o
 LD      fs/nfs_common/built-in.o
 CC [M]  fs/nfs_common/nfsacl.o
 CC [M]  fs/nfs/direct.o
 CC      net/socket.o
 CC [M]  drivers/gpio/janz-ttl.o
 LD [M]  fs/nfs_common/nfs_acl.o
  drivers/gpio/janz-ttl.c: In function 'ttl_set_value':
  drivers/gpio/janz-ttl.c:107: error: implicit declaration of function 'iowrite16be'
  make[2]: *** [drivers/gpio/janz-ttl.o] Error 1
  make[1]: *** [drivers/gpio] Error 2
  make: *** [drivers] Error 2
  make: *** Waiting for unfinished jobs....
  CC [M]  fs/nfs/pagelist.o   
  fs/nfs/direct.c: In function 'nfs_direct_read_schedule_segment':
  fs/nfs/direct.c:364: warning: format '%zu' expects type 'size_t', but argument 5 has type 'unsigned int'
  fs/nfs/direct.c: In function 'nfs_direct_write_schedule_segment':
  fs/nfs/direct.c:799: warning: format '%zu' expects type 'size_t', but argument 5 has type 'unsigned int'
  fs/nfs/direct.c: In function 'nfs_file_direct_read':
  fs/nfs/direct.c:928: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'size_t'
  fs/nfs/direct.c: In function 'nfs_file_direct_write':
  fs/nfs/direct.c:982: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'size_t'
 CC      net/802/p8022.o
 CC [M]  fs/nfs/proc.o
 CC      net/802/psnap.o
 CC      net/802/tr.o
 CC [M]  fs/nfs/read.o
 CC      net/8021q/vlan_core.o
 CC [M]  net/8021q/vlan.o
 CC      net/802/fc.o
 CC [M]  fs/nfs/symlink.o
 CC      net/802/fddi.o
 CC [M]  net/8021q/vlan_dev.o
 CC [M]  fs/nfs/unlink.o

If anyone can please tell how to resolve this issue.

Upvotes: 0

Views: 2156

Answers (2)

Kenneth
Kenneth

Reputation: 748

You can also just add the definition yourself:

void iowrite16be(u8 shadow, void __iomem* port);

Just add it right above the ttl_set_value() function.

Upvotes: 0

Pavan Manjunath
Pavan Manjunath

Reputation: 28525

Try including this header

#include<asm/io.h>

If it doesn't work then look at this for all the definitions of iowrite16be
http://lxr.free-electrons.com/ident?i=iowrite16be

Choose the appropriate header based on your architecture.

EDIT : Generally implicit declaration of function xyz() is a warning. May be in your system its been forced to an error with -Werror-implicit-function-declaration. You can search for this in your build structure and try to take it off ( Though its not a good practice, but anyways you can do it, if you want the work done ) But if iowrite16be is really missing, then even this method wont help you from the linker's wrath.

Upvotes: 1

Related Questions