内核编译问题和处理

内核编译问题和处理  

3333 在默认配置的基础上,再选择XX驱动
 
Error1:
drivers/ata/sata_sil.c: In function sil_broken_system_poweroff:
drivers/ata/sata_sil.c:713: error: implicit declaration of function dmi_first_match
drivers/ata/sata_sil.c:713: warning: initialization makes pointer from integer without a cast
make[2]: *** [drivers/ata/sata_sil.o] Error 1
make[1]: *** [drivers/ata] Error 2
make: *** [drivers] Error 2


diff -Naurp a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
--- a/drivers/ata/sata_sil.c 2009-01-29 00:19:30.000000000 +0530
+++ b/drivers/ata/sata_sil.c 2009-01-29 17:15:03.000000000 +0530
@@ -44,6 +44,7 @@
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
+#include <linux/dmi.h>

#define DRV_NAME "sata_sil"
#define DRV_VERSION "2.4"

http://lkml.indiana.edu/hypermail/linux/kernel/0901.3/01975.html

Error2
drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
drivers/scsi/advansys.c: In function `advansys_get_sense_buffer_dma':
drivers/scsi/advansys.c:9885: error: implicit declaration of function `dma_cache_sync'
make[2]: *** [drivers/scsi/advansys.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

mplicit declaration of function `dma_cache_sync'表示隐式声明错误,可能有几个原因:
1   没有把函数所在的c文件生成.o目标文件
2   在函数所在的c文件中定义了,但是没有在与之相关联的.h文件中声明
reference: http://hi.baidu.com/caosicong/blog/item/17e3f8d6f4d1862a06088b79.html

查找arch\arm\include\asm\dma-mapping.h下没有这个函数声明,但有如下注释:

/*
* Dummy noncoherent implementation.  We don't provide a dma_cache_sync
* function so drivers using this API are highlighted with build warnings.
*/
直接在advansys.c中把
dma_cache_sync(board->dev, scp->sense_buffer,
               SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
注释掉
,编译就OK了

http://www.delnabla.cn/article.asp?id=242


Error3
drivers/staging/comedi/drivers.c: In function ‘comedi_buf_alloc’: drivers/staging/comedi/drivers.c:505:41: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function) drivers/staging/comedi/drivers.c:505:41: note: each undeclared identifier is rep orted only once for each function it appears in make[3]: *** [drivers/staging/comedi/drivers.o] Error 1

Restrict the driver to only those architectures that define PAGE_KERNEL_NOCACHE.  PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as SGI IP27 are even uable to offer uncached operation - at least in the way an unwitting driver might assume.  I haven't looked in details how the driver is using the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it XFS-style using cached memory and the flush_kernel_vmap_range / invalidate_kernel_vmap_range APIs in conjunction with the DMA API is a practical alternative.  Signed-off-by: Ralf Baechle <ralf linux-mips org>   drivers/staging/comedi/Kconfig |    1 +  1 files changed, 1 insertions(+), 0 deletions(-)  diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 1502d80..bccdc12 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -2,6 +2,7 @@ config COMEDI   tristate "Data acquisition support (comedi)"   default N   depends on m + depends on BROKEN || FRV || M32R || MN10300 || SUPERH || TILE || X86   ---help---     Enable support a wide range of data acquisition devices     for Linux.  https://www.redhat.com/archives/linux-am33-list/2011-June/msg00008.html


Error4:
sound/core/jack.c:31: error: 'SW_VIDEOOUT_INSERT' undeclared here (not in a function)
make[2]: *** [sound/core/jack.o] 错误 1
make[1]: *** [sound/core] 错误 2
make: *** [sound] 错误 2

include/linux/input.h |    1 +  include/sound/jack.h  |    2 ++  sound/core/jack.c     |    1 +  3 files changed, 4 insertions(+), 0 deletions(-)  diff --git a/include/linux/input.h b/include/linux/input.h index 9a6355f..adc1332 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -661,6 +661,7 @@ struct input_absinfo {  #define SW_DOCK   0x05  /* set = plugged into dock */  #define SW_LINEOUT_INSERT 0x06  /* set = inserted */  #define SW_JACK_PHYSICAL_INSERT 0x07  /* set = mechanical switch set */ +#define SW_VIDEOOUT_INSERT 0x08  /* set = inserted */  #define SW_MAX   0x0f  #define SW_CNT   (SW_MAX+1)  diff --git a/include/sound/jack.h b/include/sound/jack.h index 85266a2..6b013c6 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h @@ -40,6 +40,8 @@ enum snd_jack_types {   SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,   SND_JACK_LINEOUT = 0x0004,   SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ + SND_JACK_VIDEOOUT = 0x0010, + SND_JACK_AVOUT  = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT,  };   struct snd_jack { diff --git a/sound/core/jack.c b/sound/core/jack.c index b2da10c..43b10d6 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -28,6 +28,7 @@ static int jack_types[] = {   SW_MICROPHONE_INSERT,   SW_LINEOUT_INSERT,   SW_JACK_PHYSICAL_INSERT, + SW_VIDEOOUT_INSERT,  };   static int snd_jack_dev_free(struct snd_device *device) --

http://blog.gmane.org/gmane.linux.alsa.devel/month=20090101/page=11







5.
sound/soc/codecs/ad73311.c: In function 'ad73311_soc_probe':
sound/soc/codecs/ad73311.c:56: error: 'struct snd_soc_device' has no member named 'codec'
sound/soc/codecs/ad73311.c:78: error: 'struct snd_soc_device' has no member named 'codec'
sound/soc/codecs/ad73311.c:79: error: 'struct snd_soc_device' has no member named 'codec'
sound/soc/codecs/ad73311.c: In function 'ad73311_soc_remove':
sound/soc/codecs/ad73311.c:86: error: 'struct snd_soc_device' has no member named 'codec'
make[3]: *** [sound/soc/codecs/ad73311.o] 错误 1
make[2]: *** [sound/soc/codecs] 错误 2
make[1]: *** [sound/soc] 错误 2
make: *** [sound] 错误 2


Error 6
init/built-in.o: In function `do_one_initcall':
/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/init/main.c:693: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `init_post':
/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/init/main.c:789: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `name_to_dev_t':
/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/init/do_mounts.c:77: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `rest_init':
/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/init/main.c:452: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `calibrate_delay':
/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/init/calibrate.c:123: undefined reference to `__gnu_mcount_nc'
arch/arm/kernel/built-in.o:/home/scholarfish/OMAP35x-PSP-SDK-02.01.03.11/src/kernel/workdir/opt/linux-02.01.03.11/arch/arm/kernel/elf.c:8: more undefined references to `__gnu_mcount_nc' follow
make: *** [.tmp_vmlinux1] 错误 1

法一(选用):
http://www.spinics.net/lists/arm-kernel/msg71687.html
法二:
选择一个合适的编译器版本就可以解决上面的问题。
Notes: arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 解决问题。
http://blog.csdn.net/unbutun/article/details/44504

法三:
http://hi.baidu.com/cbncb/blog/item/edc306b6765b60ea30add13f.html

法四:
http://hi.baidu.com/%CC%EC%D1%C4%D0%D0%D5%DF%D0%D0%CC%EC%CF%C2/blog/item/244452cbcd1e789cc8176829.html


Error 7
FATAL: drivers/net/b44: sizeof(struct ssb_device_id)=6 is not a modulo of the size of section __mod_ssb_device_table=16.
Fix definition of struct ssb_device_id in mod_devicetable.h
make[1]: *** [__modpost] 错误 1
make: *** [modules] 错误 2

http://www.chineselinuxuniversity.net/patches/35277.shtml
http://groups.google.com/group/linux.kernel/browse_thread/thread/0c4f13f1e02b41f9/805ae89473ad3b29

Error8
ERROR: "__gnu_mcount_nc" [crypto/khazad.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/gf128mul.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/gcm.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/fcrypt.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/des_generic.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/deflate.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/cts.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/ctr.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/crypto_null.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/cryptd.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/ccm.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/cast6.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/cast5.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/camellia.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/blowfish.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/authenc.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/async_tx/async_xor.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/async_tx/async_tx.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/async_tx/async_memcpy.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/arc4.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/anubis.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/ansi_cprng.ko] undefined!
ERROR: "__gnu_mcount_nc" [crypto/aes_generic.ko] undefined!
ERROR: "__gnu_mcount_nc" [arch/arm/oprofile/oprofile.ko] undefined!
make[1]: *** [__modpost] 错误 1
make: *** [modules] 错误 2

http://www.spinics.net/lists/arm-kernel/msg71727.html
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值