简体   繁体   中英

Error in compiling a Linux kernel

How do you read the errors?

I run after having .config -file at /home/aal/build/kernel.

/usr/src/linux-2.6$ make O=/home/aal/build/kernel/

I get

  ... cut ...
  CC [M]  drivers/staging/go7007/s2250-board.o
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c:24:26: error: s2250-loader.h: No such file or directory
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c: In function ‘read_reg_fp’:
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c:264: warning: passing argument 1 of ‘down_interruptible’ from incompatible pointer type
/usr/src/linux-2.6/include/linux/semaphore.h:43: note: expected ‘struct semaphore *’ but argument is of type ‘struct mutex *’
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c:273: warning: passing argument 1 of ‘up’ from incompatible pointer type
/usr/src/linux-2.6/include/linux/semaphore.h:47: note: expected ‘struct semaphore *’ but argument is of type ‘struct mutex *’
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c: In function ‘s2250_init’:
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c:670: error: implicit declaration of function ‘s2250loader_init’
/usr/src/linux-2.6/drivers/staging/go7007/s2250-board.c:676: error: implicit declaration of function ‘s2250loader_cleanup’
make[4]: *** [drivers/staging/go7007/s2250-board.o] Error 1
make[3]: *** [drivers/staging/go7007] Error 2
make[2]: *** [drivers/staging] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Remove the reference to that driver from your .config and the issue will go away. Alternately if you need the driver appropriate the source.

All of those errors are caused by the missing header.

错误存在于暂存驱动程序中,即尚未出现尚未稳定的驱动程序中(例如, 在此处查看有关暂存树的讨论。)您可以在内核配置设备驱动程序->暂存驱动程序中禁用这些错误。

The errors probably all stem from the missing file in the first error.

I'd suspect include path or incomplete install of the sources...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM