日期:2014-05-16  浏览次数:20680 次

!求助:linux2.4.18编译make bzImage有错误
已有的内核是2.4.20-8,我想使用2.4.18,
编译的过程是:
1.下载源代码linux-2.4.18.tar.gz放在/usr/src/下解压倒linux;
2.#cd   /usr/src/linux
3.make   mrproper
4.make   menuconfig(做过改的也做过没改的,错误不变)
5.make   dep
6.make   clean
7.make   bzImage
这里出现如下错误:
fs/fs.o:   In   function   `nfs_readpage_result ':
fs/fs.o(.text+0x322b4):   undefined   reference   to   `cpu_CPU_NAME_cache_clean_invalidate_range '
fs/fs.o(.text+0x322b4):   relocation   truncated   to   fit:   R_ARM_PC24   cpu_CPU_NAME_cache_clean_invalidate_range
fs/fs.o:   In   function   `romfs_readpage ':
fs/fs.o(.text+0x3bb04):   undefined   reference   to   `cpu_CPU_NAME_cache_clean_invalidate_range '
fs/fs.o(.text+0x3bb04):   relocation   truncated   to   fit:   R_ARM_PC24   cpu_CPU_NAME_cache_clean_invalidate_range
drivers/block/block.o:   In   function   `ramdisk_updatepage ':
drivers/block/block.o(.text+0x2840):   undefined   reference   to   `cpu_CPU_NAME_cache_clean_invalidate_range '
drivers/block/block.o(.text+0x2840):   relocation   truncated   to   fit:   R_ARM_PC24   cpu_CPU_NAME_cache_clean_invalidate_range
drivers/block/block.o:   In   function   `rd_blkdev_pagecache_IO ':
drivers/block/block.o(.text+0x29f8):   undefined   reference   to   `cpu_CPU_NAME_cache_clean_invalidate_range '
drivers/block/block.o(.text+0x29f8):   relocation   truncated   to   fit:   R_ARM_PC24   cpu_CPU_NAME_cache_clean_invalidate_range
make:   ***   [vmlinux]   Error   1


------解决方案--------------------
你用的是从kernel.org上下载的2.4.18内核吗?估计你有可能用的不是标准的2.4.18内核,是否用的是某个ARM体系的内核?

另外请在make menuconfig时看看输出信息,看看做的链接是到哪里(如include/asm),另外也可以在make menuconfig后确认一下体系:ls -l include/asm看看具体是链接到哪个体系