linux编译内核时出报错;

jasenwan 2009-05-19 11:02:40
我从kernle.org上下载了一个linux-2.6.29.3版的内核进行编译,开始执行:make mrproper没有出现任何错误,在执行
make bzImage时提示如下错误:

make[1]: *** No rule to make target `|', needed by `firmware/keyspan/usa19qi.fw.gen.S'. Stop.
make: *** [firmware] Error 2

分别在两台不同的机器进行执行,结果也是同样;
gcc版本为V3.3.2-1;望请那位兄弟指点迷津;
...全文
1373 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
yao1198984063 2012-05-30
  • 打赏
  • 举报
回复
问题解决了吗?????我也遇到同样的问题
yao1198984063 2012-05-30
  • 打赏
  • 举报
回复
问题解决了吗? 我也遇到了同样的问题
Linux-Torvalds 2010-07-28
  • 打赏
  • 举报
回复
[Quote=引用 19 楼 jasenwan 的回复:]

提示错误如下:
Red hat nash version 4.2.1.10 starting
Enforcing mode requested but no policy loaded,Halting now
[address] kernel panic - not syncing:Attempted to kill init;
因为我自已看一下/etc/grub.conf信息:
如……
[/Quote]
这种情况是相当棘手的。不是grub的问题。是内核的问题。当内核遇到无法处理的问题的时候,就会调用panic显示信息。同时退出。你的显示并没有sync,就是那些数据没有写入磁盘。然后结束开机时候首先启动的那个进程init。也就是init有错误。至于什么错误就看你上一行了。"Enforcing mode requested but no policy loaded",那是关于SELinux的一条信息,是关于系统安全方面的。可能你当时并没有配置好SELinux,因为你是采用make defconfig,建议你用make menuconfig看看,至于SELinux是否可以在内核配置,以及怎么配置,就没有研究过了。不过当中也涉及了一些内核相关的东西。下面贴出了关于panic的系统调用,也许对你有用。对应文件kernel/panic.c

/**
* panic - halt the system
* @fmt: The text string to print
*
* Display a message, then perform cleanups.
*
* This function never returns.
*/

NORET_TYPE void panic(const char * fmt, ...)
{
long i;
static char buf[1024];
va_list args;
#if defined(CONFIG_S390)
unsigned long caller = (unsigned long) __builtin_return_address(0);
#endif

/*
* It's possible to come here directly from a panic-assertion and not
* have preempt disabled. Some functions called from here want
* preempt to be disabled. No point enabling it later though...
*/
preempt_disable();

bust_spinlocks(1);
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
bust_spinlocks(0);

/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
* Do we want to call this before we try to display a message?
*/
crash_kexec(NULL);

#ifdef CONFIG_SMP
/*
* Note smp_send_stop is the usual smp shutdown function, which
* unfortunately means it may not be hardened to work in a panic
* situation.
*/
smp_send_stop();
#endif

atomic_notifier_call_chain(&panic_notifier_list, 0, buf);

if (!panic_blink)
panic_blink = no_blink;

if (panic_timeout > 0) {
/*
* Delay timeout seconds before rebooting the machine.
* We can't use the "normal" timers since we just panicked..
*/
printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
for (i = 0; i < panic_timeout*1000; ) {
touch_nmi_watchdog();
i += panic_blink(i);
mdelay(1);
i++;
}
/* This will not be a clean reboot, with everything
* shutting down. But if there is a chance of
* rebooting the system it will be rebooted.
*/
emergency_restart();
}
#ifdef __sparc__
{
extern int stop_a_enabled;
/* Make sure the user can actually press Stop-A (L1-A) */
stop_a_enabled = 1;
printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom\n");
}
#endif
#if defined(CONFIG_S390)
disabled_wait(caller);
#endif
local_irq_enable();
for (i = 0;;) {
touch_softlockup_watchdog();
i += panic_blink(i);
mdelay(1);
i++;
}
}

EXPORT_SYMBOL(panic);
za2007021084 2010-03-27
  • 打赏
  • 举报
回复
我也遇到这个问题了,顶一下!!高手帮忙啊!!
tanlingyun 2010-03-21
  • 打赏
  • 举报
回复
唉!我也是,郁闷
jikeman 2009-07-07
  • 打赏
  • 举报
回复
一楼的问题解决了吗?怎么解决的?我也遇到了同样的问题,试了好多次还是解决不了,高手帮个忙啦!
jasenwan 2009-05-23
  • 打赏
  • 举报
回复
提示错误如下:
Red hat nash version 4.2.1.10 starting
Enforcing mode requested but no policy loaded,Halting now
[address] kernel panic - not syncing:Attempted to kill init;
因为我自已看一下/etc/grub.conf信息:
如下:
titile Red Hat entripse linux AS(2.6.29.new_kernel)
root(hd0,0)
kernel /boot/vmlinuxz-2.6.29.new_kernel ro root=/LABLE=/ rhgb quiet
initrd /boot/initrd-2.6.29.new_kernel.img
其它的就不贴了,我想大家都知道了;
jasenwan 2009-05-22
  • 打赏
  • 举报
回复
命令如下:
cd /usr/src
tar jxvf linux_2.6.29.3.tar.bz2
cd linux_2.6.29.3
make mrproper
make defconfig
make all
此时就提示上述错误,我今天又用公司的电脑重新做了一遍,结果还是一样,不过这次看到是在加载声卡相应项
才出现此报错语句的的;我所在的编绎环境在XP的系统下使用虚拟机进行的哦;
现在又重新安装了一个纯linux系统,再试;
hefuhua 2009-05-22
  • 打赏
  • 举报
回复
[Quote=引用 17 楼 jasenwan 的回复:]
在新的linux中重新编译此内核,编译成功了哦,没有修改/etc/grub.conf文件,因为查看
此文件中有相应的信息,reboot后用新内核进行启动,无法进入登陆界面,要更改/etc/grub.conf
文件吗?还是连/etc/lilo.conf也需要进行修改啊?请高手支招;谢谢;问题解决了再追加50分技术分;
[/Quote]

不能进入登陆界面,看看错误的提示,或者再什么地方停止了的调戏信息,或者贴到这里让大家看看
独孤过儿 2009-05-22
  • 打赏
  • 举报
回复
那你编译过程中的命令列一下,从tar 源代码包开始
jasenwan 2009-05-22
  • 打赏
  • 举报
回复
在新的linux中重新编译此内核,编译成功了哦,没有修改/etc/grub.conf文件,因为查看
此文件中有相应的信息,reboot后用新内核进行启动,无法进入登陆界面,要更改/etc/grub.conf
文件吗?还是连/etc/lilo.conf也需要进行修改啊?请高手支招;谢谢;问题解决了再追加50分技术分;
puheavy123 2009-05-22
  • 打赏
  • 举报
回复
我以前编译很顺利哦。。。。顶一个,待高手解决
jasenwan 2009-05-21
  • 打赏
  • 举报
回复
同志们啊,我昨天把gcc的版本更新至V4.0.1的了,今天晚上重新编译了一下内核;
用如下的命令进行操作的,make mrproper;
make defconfig
make all
报错如下显示:
***No rule to make target '|',need by 'firmware/e100/d101m_ucode.bin.gen.S'. Stop.
make:***[firmware] error 2;
不知道你们是否也有遇到同样的问题?怎么解决;
y_lei 2009-05-21
  • 打赏
  • 举报
回复
觉得,应该是在配置的时候有问题,一些不需要的选项,选上了,有时候就会报错,碰到不少了
超龄编码人 2009-05-21
  • 打赏
  • 举报
回复
还没有解压就编译
wangkongxinglang 2009-05-21
  • 打赏
  • 举报
回复
呵呵
要解压缩你的内核文件
进入你的内核文件夹里面
再开始编译
liua1 2009-05-20
  • 打赏
  • 举报
回复
可能是你的gcc版本太低了,不能编译2.6.x的内核,只能编译2.4.x的吧,建议装个gcc4.1.x,我的就是4.1.2的gcc,编译2.6.x的内核没问题。
步骤:进入内核源代码文件夹,然后make mrproper,接下来是make,然后是make modules_install,最后是make install。
chl7862 2009-05-20
  • 打赏
  • 举报
回复
一般超过4.0的gcc不会出问题的
morris88 2009-05-19
  • 打赏
  • 举报
回复
因为以前已经编译了,所以就很简单的连接:
[root@bache linux-2.6.29]# make defconfig
*** Default configuration is based on 'i386_defconfig'
#
# configuration written to .config
#
[root@bache linux-2.6.29]# make all
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC [M] arch/x86/kernel/test_nx.o
CC [M] drivers/hid/hid-dummy.o
CC [M] drivers/scsi/scsi_wait_scan.o
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 3 modules
CC arch/x86/kernel/test_nx.mod.o
LD [M] arch/x86/kernel/test_nx.ko
CC drivers/hid/hid-dummy.mod.o
LD [M] drivers/hid/hid-dummy.ko
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
[root@bache linux-2.6.29]#
morris88 2009-05-19
  • 打赏
  • 举报
回复
哦,你的 gcc 版本太低了,一般选用 v4.xx 版本的 gcc 就可以了。
我用的是 fedora 10,其版本是 v4.3.2:


[root@bache ~]# gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
[root@bache ~]#
加载更多回复(5)

4,441

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧