2、编译内核过程中遇到的问题:
问题一:
arch/mips/kernel/asm-offsets.c:230: error: invalid 'asm': invalid use of '%X'
arch/mips/kernel/asm-offsets.c:231: error: invalid 'asm': invalid use of '%X'
arch/mips/kernel/asm-offsets.c:232: error: invalid 'asm': invalid use of '%X'
修改方法:打开arch/mips/kernel/asm-offsets.c
#define constant(string, member) \
__asm__("\n@@@" string "%X0" : : "ri" (member))
=>
#define constant(string, member) \
__asm__("\n@@@" string "%0" : : "ri" (member))
问题二:
arch/mips/math-emu/built-in.o: In function `ieee754dp_format':
(.text+0x2f24): undefined reference to `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_format':
(.text+0x2f24): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_mul':
(.text+0x495c): undefined reference to `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_mul':
(.text+0x495c): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_mul':
(.text+0x4eb0): undefined reference to `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_mul':
(.text+0x4eb0): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_sub':
(.text+0x539c): undefined reference to `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_sub':
(.text+0x539c): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_sub':
(.text+0x5690): undefined reference to `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_sub':
(.text+0x5690): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o:(.text+0x5c0c): more undefined references to
`__ucmpdi2' follow
arch/mips/math-emu/built-in.o: In function `ieee754dp_add':
(.text+0x5c0c): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
arch/mips/math-emu/built-in.o: In function `ieee754dp_add':
(.text+0x5fc8): relocation truncated to fit: R_MIPS_26 against `__ucmpdi2'
解决方法:
在最新的linux内核(我是从2.6.30)上找到arch/mips/lib/ucmpdi2.c 把它copy到我编译的版本的一致路
径下,而后修改arch/mips/lib/Makefile。
讨论QQ:2404117679