LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 850|回复: 7

请问安装LFS时能不能用自己从网上下载的内核?

[复制链接]
发表于 2003-1-20 16:29:27 | 显示全部楼层 |阅读模式
同上,我在安装内核时用
ln -s /static/bin/pwd /bin/pwd &&
make mrproper &&
make include/linux/version.h &&
make symlinks &&
cp -HR include/asm /usr/include &&
cp -R include/asm-generic /usr/include &&
cp -R include/linux /usr/include &&
touch /usr/include/linux/autoconf.h &&
rm /bin/pwd
出现错误:
make: *** No rule to make target `mrproper'.  Stop
我想用我自己下载的内核从新编译可以吗?
发表于 2003-1-20 16:54:27 | 显示全部楼层
你在哪个目录下运行这些命令的?要在linux内核的目录里。比方说
/usr/src/linux-2.4.20
当然可以用自己下载的内核。这个无所谓的。
 楼主| 发表于 2003-1-20 16:56:43 | 显示全部楼层
我的/usr/src/下是空的,现在下了一个linux-2.4.20,我先编译一下新的吧 ,谢谢!
发表于 2003-1-20 16:58:16 | 显示全部楼层

Re: 请问安装LFS时能不能用自己从网上下载的内核?

最初由 Richard 发布
同上,我在安装内核时用
ln -s /static/bin/pwd /bin/pwd &&
make mrproper &&
make include/linux/version.h &&
make symlinks &&
cp -HR include/asm /usr/include &&
cp -R include/asm-generic /usr/include &&
cp -R include/linux /usr/include &&
touch /usr/include/linux/autoconf.h &&
rm /bin/pwd
出现错误:
make: *** No rule to make target `mrproper'.  Stop
我想用我自己下载的内核从新编译可以吗?

执行这些命令要在源代码目录下。至于用什么内核,是没有关系的,只要能启动就行。
 楼主| 发表于 2003-1-20 17:44:48 | 显示全部楼层
我在编译内核时出现错误,导致以后的工作无法进行
I have no name!:/usr/src/linux#make dep:
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
scripts/mkdep.c:33:19: ctype.h: No such file or directory
scripts/mkdep.c:34:19: fcntl.h: No such file or directory
In file included from /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/syslimits.h:7,
                 from /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/limits.h:11,
                 from scripts/mkdep.c:35:
/static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/limits.h:132:75: limits.h: No such file or directory
scripts/mkdep.c:36:19: stdio.h: No such file or directory
scripts/mkdep.c:37:20: stdlib.h: No such file or directory
scripts/mkdep.c:38:20: string.h: No such file or directory
scripts/mkdep.c:39:20: unistd.h: No such file or directory
scripts/mkdep.c:41:23: sys/fcntl.h: No such file or directory
scripts/mkdep.c:42:22: sys/mman.h: No such file or directory
scripts/mkdep.c:43:22: sys/stat.h: No such file or directory
scripts/mkdep.c:44:23: sys/types.h: No such file or directory
scripts/mkdep.c:69: `NULL' undeclared here (not in a function)
scripts/mkdep.c: In function `do_depname':
scripts/mkdep.c:78: warning: implicit declaration of function `printf'
scripts/mkdep.c: In function `grow_config':
scripts/mkdep.c:93: warning: implicit declaration of function `realloc'
scripts/mkdep.c:93: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:94: `NULL' undeclared (first use in this function)
scripts/mkdep.c:94: (Each undeclared identifier is reported only once
scripts/mkdep.c:94: for each function it appears in.)
scripts/mkdep.c:95: warning: implicit declaration of function `perror'
scripts/mkdep.c:95: warning: implicit declaration of function `exit'
scripts/mkdep.c: In function `is_defined_config':
scripts/mkdep.c:111: warning: implicit declaration of function `memcmp'
scripts/mkdep.c: In function `define_config':
scripts/mkdep.c:126: warning: implicit declaration of function `memcpy'
scripts/mkdep.c: At top level:
scripts/mkdep.c:148: `NULL' undeclared here (not in a function)
scripts/mkdep.c: In function `grow_precious':
scripts/mkdep.c:163: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:164: `NULL' undeclared (first use in this function)
scripts/mkdep.c: In function `define_precious':
scripts/mkdep.c:176: warning: implicit declaration of function `strlen'
scripts/mkdep.c: In function `handle_include':
scripts/mkdep.c:204: warning: implicit declaration of function `access'
scripts/mkdep.c:204: `F_OK' undeclared (first use in this function)
scripts/mkdep.c: In function `add_path':
scripts/mkdep.c:221: `PATH_MAX' undeclared (first use in this function)
scripts/mkdep.c:224: warning: implicit declaration of function `strcmp'
scripts/mkdep.c:225: warning: implicit declaration of function `realpath'
scripts/mkdep.c:225: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:227: warning: implicit declaration of function `fprintf'
scripts/mkdep.c:227: `stderr' undeclared (first use in this function)
scripts/mkdep.c:235: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:243: warning: implicit declaration of function `malloc'
scripts/mkdep.c:243: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:248: warning: implicit declaration of function `strcpy'
scripts/mkdep.c:221: warning: unused variable `resolved_path'
scripts/mkdep.c: In function `use_config':
scripts/mkdep.c:271: warning: implicit declaration of function `isupper'
scripts/mkdep.c:271: warning: implicit declaration of function `tolower'
scripts/mkdep.c: In function `state_machine':
scripts/mkdep.c:493: warning: implicit declaration of function `isalnum'
scripts/mkdep.c: In function `do_depend':
scripts/mkdep.c:526: warning: implicit declaration of function `getpagesize'
scripts/mkdep.c:528: storage size of `st' isn't known
scripts/mkdep.c:531: warning: implicit declaration of function `open'
scripts/mkdep.c:531: `O_RDONLY' undeclared (first use in this function)
scripts/mkdep.c:537: warning: implicit declaration of function `fstat'
scripts/mkdep.c:539: `stderr' undeclared (first use in this function)
scripts/mkdep.c:540: warning: implicit declaration of function `close'
scripts/mkdep.c:546: warning: implicit declaration of function `mmap'
scripts/mkdep.c:546: `NULL' undeclared (first use in this function)
scripts/mkdep.c:546: `PROT_READ' undeclared (first use in this function)
scripts/mkdep.c:546: `MAP_PRIVATE' undeclared (first use in this function)
scripts/mkdep.c:546: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:562: warning: implicit declaration of function `puts'
scripts/mkdep.c:567: warning: implicit declaration of function `munmap'
scripts/mkdep.c:528: warning: unused variable `st'
scripts/mkdep.c: In function `main':
scripts/mkdep.c:581: warning: implicit declaration of function `getenv'
scripts/mkdep.c:581: warning: assignment makes pointer from integer without a cast
scripts/mkdep.c:583: warning: implicit declaration of function `fputs'
scripts/mkdep.c:584: `stderr' undeclared (first use in this function)
scripts/mkdep.c:591: warning: implicit declaration of function `strncmp'
make: *** [scripts/mkdep] Error 1
我把linux-2.4.20的文件夹名该成了linux
 楼主| 发表于 2003-1-20 17:47:56 | 显示全部楼层
还有一个问题,我现在用的是rh8,可是make xconfig和make menuconfig都无法执行,我只能用make config编译,好麻烦,很多都不懂!
发表于 2003-1-20 18:02:44 | 显示全部楼层

你可能是相关包没有装吧

make xconfig包需要ncurse和tcl tk包,make menuconfig这个不大清楚,一般装了开发工具就可用了
 楼主| 发表于 2003-1-20 18:05:26 | 显示全部楼层
我想还是先解决上面的问题吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表