+ -
当前位置:首页 → 问答吧 → clfs编译grub-0.97的一个问题

clfs编译grub-0.97的一个问题

时间:2009-11-15

来源:互联网

宿主机debian x86_64,目标机是x86,做到这一步:
http://cross-lfs.org/view/svn/x86/boot/grub-build.html
make出错:
代码:
main.c:143: warning: the address of 'config_file' will always evaluate as 'true'
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 -DUSE_MD5_PASSWORDS=1 -DSUPPORT_HERCULES=1 -DSUPPORT_SERIAL=1 -I../stage2 -I../stage1 -I../lib -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -O2 -g -MT asmstub.o -MD -MP -MF ".deps/asmstub.Tpo" -c -o asmstub.o asmstub.c; \
 then mv -f ".deps/asmstub.Tpo" ".deps/asmstub.Po"; else rm -f ".deps/asmstub.Tpo"; exit 1; fi
asmstub.c: In function 'grub_stage2':
asmstub.c:150: error: 'MAP_32BIT' undeclared (first use in this function)
asmstub.c:150: error: (Each undeclared identifier is reported only once
asmstub.c:150: error: for each function it appears in.)
make[2]: *** [asmstub.o] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/grub-0.97/grub'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/clfs/sources/grub-0.97'
make: *** [all] Error 2
发现只要不打grub-0.97-use_mmap-1.patch这个patch就能编译通过

代码:
GRUB has an issue that can cause it to segfault when you try to configure a drive to utilize GRUB on x86_64 and building machines. The following patch fixes this problem:
这句话我看不明白,请教这是干什么用的,我不打这个patch会不会导致以后出错?

作者: stesen   发布时间: 2009-11-15

您交叉编译工具链有问题。
其中,内核头文件 有最大嫌疑,再一个是头文件搜索路径问题。

作者: 聚焦深空   发布时间: 2009-11-15

引用:
作者: 聚焦深空
您交叉编译工具链有问题。
其中,内核头文件 有最大嫌疑,再一个是头文件搜索路径问题。
谢谢提示,后面编译eglibc也出问题了,没记下错误信息...
这周作业好多,等周末再折腾它去

作者: stesen   发布时间: 2009-11-16

热门下载

更多