2012-03-13 72 views
0

我试图编译三星Galaxy迷你的Android内核(氰),根据这些instructionsAndroid的内核编译错误

我使用CM-7。

我完成以下步骤:

  1. 下载内核源代码。

  2. 配置构建:

    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 ARCH=arm CROSS_COMPILE=$CCOMPILER -j4 
    

后这个内核开始编译,一切工作正常,但随后抛出一个错误,这里是所述终端的输出:

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 

如果任何人都可以请告诉如何解决这个问题。

+0

检查我的编辑答案。看看它是否有帮助。 – 2012-03-13 14:30:53

回答

1

尝试,包括这个头

#include<asm/io.h> 

如果它不为iowrite16be
http://lxr.free-electrons.com/ident?i=iowrite16be

所有定义工作,然后看看这个选择基于你的架构相应的头。

编辑:通常implicit declaration of function xyz()是一个警告。可能在您的系统中,它被迫与-Werror-implicit-function-declaration错误。您可以在构建结构搜索这一点,并试图把它关闭(虽然它一个很好的做法,但反正你可以做到这一点,如果你想完成的工作),但如果iowrite16be真的丢失,那么即使这个方法不会从链接器的愤怒中帮助你。

+0

包括的#include 头没有修复的错误,但我会努力的剩余头,感谢您的答复。 – uyaseen 2012-03-13 13:08:00

+0

从makefile中删除-Werror-implicit-function-declaration修复了错误,谢谢你的持续帮助。 :) – uyaseen 2012-03-14 12:58:50

+0

@usamayaseen很高兴听到:) – 2012-03-14 13:02:56

0

用户也可以直接添加自己的定义:

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

只需添加它正上方的ttl_set_value()函数。