|
今天在编译 Mandrake 9.1 的内核,源码是MDK91带 kernel-src-2.4.21-0.13mdk的 rpm,安装源码后位置在 /usr/src/linux --> /usr/src/linux-2.4.21-0.13mdk
参照一些内核编译的文章进行了配置,优化了硬件配置,去掉了一些不用的驱动和RAID、Bluetooth、1394支持之类我没有的东西。编译的时候有些错误请大家一起帮忙分析一下,蓝色的是我插入的注释 。
make bzImage 的信息如下:
......
make[1]: Leaving directory `/usr/src/linux-2.4.21-0.13mdk/lib'
这前面都正常,从下面开始好像出现了问题
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.21-0.13mdk/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 " -C sound
make[1]: Entering directory `/usr/src/linux-2.4.21-0.13mdk/sound'
make -C arm
make[2]: Entering directory `/usr/src/linux-2.4.21-0.13mdk/sound/arm'
make all_targets
make[3]: Entering directory `/usr/src/linux-2.4.21-0.13mdk/sound/arm'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-0.13mdk/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=sa11xx_uda1341 -c -o sa11xx-uda1341.o sa11xx-uda1341.c
sa11xx-uda1341.c:67:26: asm/hardware.h: No such file or directory
我怀疑这个是不是因为 /usr/include/asm 目录链接的问题,我原来的/usr/include/asm是一个目录,我重命名到 /usr/include/asm.ori 了,然后ln -s /usr/src/linux/include/asm-i386 /usr/include/asm。/usr/include/scsi 和 /usr/include/linux也是类似处理。
上面这句错误提示是不是说明在asm下面找不到 hardware.h 的头文件?我找了/usr/include/asm.ori 和 /usr/src/linux/include/asm-i386,都没有这个头文件。/usr/src/linux/drivers/isdn/sc 目录里倒是有一个,不过我觉得应该没有关系
下面还有错,我也不知道是什么
sa11xx-uda1341.c:74:25: linux/l3/l3.h: No such file or directory
In file included from sa11xx-uda1341.c:78:
/usr/src/linux-2.4.21-0.13mdk/include/sound/uda1341.h:223: warning: `struct l3_client' declared inside parameter list
/usr/src/linux-2.4.21-0.13mdk/include/sound/uda1341.h:223: warning: its scope is only this definition or declaration, which is probably not what you want
sa11xx-uda1341.c:104: parse error before "dma_device_t"
sa11xx-uda1341.c:104: warning: no semicolon at end of struct or union
sa11xx-uda1341.c:105: warning: type defaults to `int' in declaration of `dma_regs'
sa11xx-uda1341.c:105: warning: data definition has no type or storage class
sa11xx-uda1341.c:107: parse error before ':' token
sa11xx-uda1341.c:116: parse error before '}' token
sa11xx-uda1341.c:116: warning: type defaults to `int' in declaration of `audio_stream_t'
sa11xx-uda1341.c:116: warning: data definition has no type or storage class
sa11xx-uda1341.c:124: parse error before "audio_stream_t"
sa11xx-uda1341.c:124: warning: no semicolon at end of struct or union
sa11xx-uda1341.c:125: warning: type defaults to `int' in declaration of `sa11xx_uda1341_t'
sa11xx-uda1341.c:125: warning: data definition has no type or storage class
sa11xx-uda1341.c:157:2: #error This driver could serve H3x00 handhelds only!
sa11xx-uda1341.c: In function `sa11xx_uda1341_set_audio_clock':
sa11xx-uda1341.c:164: `GPCR' undeclared (first use in this function)
sa11xx-uda1341.c:164: (Each undeclared identifier is reported only once
sa11xx-uda1341.c:164: for each function it appears in.)
sa11xx-uda1341.c:164: warning: implicit declaration of function `GPIO_GPIO'
sa11xx-uda1341.c:168: `GPSR' undeclared (first use in this function)
sa11xx-uda1341.c: At top level:
sa11xx-uda1341.c:183: parse error before '*' token
......
sa11xx-uda1341.c:1014: dereferencing pointer to incomplete type
sa11xx-uda1341.c:1015: dereferencing pointer to incomplete type
sa11xx-uda1341.c: In function `sa11xx_uda1341_exit':
sa11xx-uda1341.c:1034: dereferencing pointer to incomplete type
sa11xx-uda1341.c:1035: dereferencing pointer to incomplete type
make[3]: *** [sa11xx-uda1341.o] 错误 1
make[3]: Leaving directory `/usr/src/linux-2.4.21-0.13mdk/sound/arm'
make[2]: *** [first_rule] 错误 2
make[2]: Leaving directory `/usr/src/linux-2.4.21-0.13mdk/sound/arm'
make[1]: *** [_subdir_arm] 错误 2
make[1]: Leaving directory `/usr/src/linux-2.4.21-0.13mdk/sound'
make: *** [_dir_sound] 错误 2
另外,怎么让 make bzImage 在屏幕显示信息的同时,也把这些信息写到一个记录文件里面去? |
|