免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: aq1234xyq
打印 上一主题 下一主题

[求助]内核编译 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-04-07 14:33 |只看该作者
好的,我试试

论坛徽章:
0
12 [报告]
发表于 2006-04-07 17:50 |只看该作者
原帖由 egret 于 2006-4-6 21:25 发表
试试这个config,根据你的硬件做些修改尤其是SATA那些,将你的SATA 驱动编进内核。

我用你给的config文件,没改其他的地方,只是改了cpu型号,选择了sata(ATA/ATAPI/MFM/PLL support 下的ata support ,不知道是不是这一项
结果在make menuconfig 时,还是有些错误,
arch/i386/kernel/cpu/transmeta.c: In function ‘init_transmeta’:
arch/i386/kernel/cpu/transmeta.c:12: warning: ‘cpu_freq’ may be used uninitialized in this function
arch/i386/kernel/efi.c: In function ‘efi_call_phys_epilog’:
arch/i386/kernel/efi.c:118: warning: assignment makes integer from pointer without a cast
arch/i386/kernel/efi.c: In function ‘efi_memmap_walk’:
arch/i386/kernel/efi.c:275: warning: ‘prev.start’ may be used uninitialized in this function
arch/i386/kernel/efi.c:275: warning: ‘prev.end’ may be used uninitialized in this function
kernel/power/pm.c:259: warning: ‘pm_register’ is deprecated (declared at kernel/power/pm.c:63)
kernel/power/pm.c:260: warning: ‘pm_unregister’ is deprecated (declared at kernel/power/pm.c:86)
kernel/power/pm.c:261: warning: ‘pm_unregister_all’ is deprecated (declared at kernel/power/pm.c:115)
kernel/power/pm.c:262: warning: ‘pm_send_all’ is deprecated (declared at kernel/power/pm.c:234)
kernel/audit.c: In function ‘kauditd_thread’:
kernel/audit.c:303: warning: no return statement in function returning non-void
kernel/auditsc.c: In function ‘audit_filter_user’:
kernel/auditsc.c:607: warning: ‘state’ is used uninitialized in this function
fs/bio.c: In function ‘bio_alloc_bioset’:
fs/bio.c:168: warning: ‘idx’ may be used uninitialized in this function
fs/eventpoll.c: In function ‘sys_epoll_create’:
fs/eventpoll.c:508: warning: ‘fd’ may be used uninitialized in this function
fs/isofs/namei.c: In function ‘isofs_lookup’:
fs/isofs/namei.c:162: warning: ‘offset’ may be used uninitialized in this function
fs/isofs/namei.c:162: warning: ‘block’ may be used uninitialized in this function
fs/reiserfs/item_ops.c: In function ‘indirect_print_item’:
fs/reiserfs/item_ops.c:278: warning: ‘num’ may be used uninitialized in this function
fs/udf/balloc.c: In function ‘udf_table_new_block’:
fs/udf/balloc.c:751: warning: ‘goal_eloc.logicalBlockNum’ may be used uninitialized in this function
fs/udf/super.c: In function ‘udf_fill_super’:
fs/udf/super.c:1362: warning: ‘ino.partitionReferenceNum’ may be used uninitialized in this function
fs/xfs/xfs_alloc_btree.c: In function ‘xfs_alloc_insert’:
fs/xfs/xfs_alloc_btree.c:611: warning: ‘nkey.ar_startblock’ may be used uninitialized in this function
fs/xfs/xfs_alloc_btree.c:611: warning: ‘nkey.ar_blockcount’ may be used uninitialized in this function
fs/xfs/xfs_bmap_btree.c: In function ‘xfs_bmbt_insert’:
fs/xfs/xfs_bmap_btree.c:753: warning: ‘nkey.br_startoff’ may be used uninitialized in this function
fs/xfs/xfs_da_btree.c: In function ‘xfs_da_split’:
fs/xfs/xfs_da_btree.c:151: warning: ‘action’ may be used uninitialized in this function
fs/xfs/xfs_dir.c: In function ‘xfs_dir_removename’:
fs/xfs/xfs_dir.c:363: warning: ‘totallen’ may be used uninitialized in this function
fs/xfs/xfs_dir.c:363: warning: ‘count’ may be used uninitialized in this function
fs/xfs/xfs_ialloc_btree.c: In function ‘xfs_inobt_insert’:
fs/xfs/xfs_ialloc_btree.c:545: warning: ‘nkey.ir_startino’ may be used uninitialized in this function
fs/xfs/xfs_inode.c: In function ‘xfs_ifree’:
fs/xfs/xfs_inode.c:1951: warning: ‘last_offset’ may be used uninitialized in this function
fs/xfs/xfs_inode.c:1949: warning: ‘last_dip’ may be used uninitialized in this function
fs/xfs/xfs_log.c: In function ‘xlog_write’:
fs/xfs/xfs_log.c:1749: warning: ‘iclog’ may be used uninitialized in this function
fs/xfs/xfs_log_recover.c: In function ‘xlog_find_tail’:
fs/xfs/xfs_log_recover.c:523: warning: ‘first_blk’ may be used uninitialized in this function
ipc/msg.c: In function ‘sys_msgctl’:
ipc/msg.c:334: warning: ‘setbuf.qbytes’ may be used uninitialized in this function
ipc/msg.c:334: warning: ‘setbuf.uid’ may be used uninitialized in this function
ipc/msg.c:334: warning: ‘setbuf.gid’ may be used uninitialized in this function
ipc/msg.c:334: warning: ‘setbuf.mode’ may be used uninitialized in this function
ipc/sem.c: In function ‘sys_semctl’:
ipc/sem.c:806: warning: ‘setbuf.uid’ may be used uninitialized in this function
ipc/sem.c:806: warning: ‘setbuf.gid’ may be used uninitialized in this function
ipc/sem.c:806: warning: ‘setbuf.mode’ may be used uninitialized in this function
lib/zlib_inflate/inftrees.c: In function ‘huft_build’:
lib/zlib_inflate/inftrees.c:121: warning: ‘r.base’ may be used uninitialized in this function
Root device is (253, 0)
Boot sector 512 bytes.
Setup is 7023 bytes.
System is 1577 kB

引导时出错
Kernel panic-not syncing:VFS:unable to mount root fs on unknow-block(0,0)
是不是因为我的ro o t 是LVM分区遭成的

论坛徽章:
0
13 [报告]
发表于 2006-04-07 19:04 |只看该作者
你得将-> Device Drivers                                                                            │
  │       -> SCSI device support                                                                     │
  │         -> SCSI device support (SCSI [=y])                                                       │
  │           -> SCSI low-level drivers
里与你硬盘相匹配的SATA驱动编进去。

是不是内核编好了用它重启出现
Kernel panic-not syncing:VFS:unable to mount root fs on unknow-block(0,0)
的?
你的fstab怎么写的?

[ 本帖最后由 egret 于 2006-4-7 19:10 编辑 ]

论坛徽章:
0
14 [报告]
发表于 2006-04-07 20:37 |只看该作者
/etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol01 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
/dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs   defaults        0 0
/dev/VolGroup00/LogVol03 /home                   ext3    defaults,usrquota,grpquota        1 2
/dev/proc               /proc                   proc    defaults        0 0
/dev/sys                /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol02 /usr                    ext3    defaults        1 2
/dev/VolGroup00/LogVol04 /var                    ext3    defaults        1 2
/dev/VolGroup00/LogVol00 swap                    swap    defaults        0 0
/dev/fd0                /media/floppy1          auto    pamconsole,exec,noauto,managed 0 0
/dev/hdc                /media/cdrom3           auto    pamconsole,exec,noauto,managed 0 0

论坛徽章:
0
15 [报告]
发表于 2006-04-07 20:38 |只看该作者
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,10)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol01
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,10)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4smp)
        root (hd0,10)
        kernel /vmlinuz-2.6.11-1.1369_FC4smp ro root=/dev/VolGroup00/LogVol01 rhgb quiet
        initrd /initrd-2.6.11-1.1369_FC4smp.img
title Fedora Core-up (2.6.11-1.1369_FC4)
        root (hd0,10)
        kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
        initrd /initrd-2.6.11-1.1369_FC4.img
title WindowsXP Professional
        rootnoverify (hd0,0)
        chainloader +1
title Linux-2.6.16.1
      root (hd0,10)
      kernel /vmlinuz-2.6.16.1 ro root=/dev/VolGroup00/LogVol01 rhgb quiet

最后的linux-2.6.16.1就是我编译后的新内核

论坛徽章:
0
16 [报告]
发表于 2006-04-07 20:48 |只看该作者
原帖由 egret 于 2006-4-7 19:04 发表
你得将-> Device Drivers                                                                            │
  │       -> SCSI device support                                                                     │
  │         -> SCSI device support (SCSI [=y])                                                       │
  │           -> SCSI low-level drivers
里与你硬盘相匹配的SATA驱动编进去。

是不是内核编好了用它重启出现Kernel panic-not syncing:VFS:unable to mount root fs on unknow-block(0,0)
的?

请问,使用如下命令,make bzImage 1>out1 2>out2,如果out2非空,是否就表示一定没编译成功,我在编译后生成的out2的内容已放在上面的帖子里了.
在out2非空的情况下,我就把编译的内核给用上了,就出现了这个问题Kernel panic-not syncing:VFS:unable to mount root fs on unknow-block(0,0)

我当时择加进了> Device Drivers                                                                            │
  │       -> ATA/ATAPI/MFM/PLL support                                                                     │
  │         -> Support for SATA(deprecated;conflicts with libata SATA dri), 这一项是否和SATA有关呢?

[ 本帖最后由 aq1234xyq 于 2006-4-7 20:56 编辑 ]

论坛徽章:
0
17 [报告]
发表于 2006-04-07 21:14 |只看该作者
原帖由 aq1234xyq 于 2006-4-7 20:48 发表
我当时择加进了> Device Drivers                                                                            │
  │       -> ATA/ATAPI/MFM/PLL support                                                                     │
  │         -> Support for SATA(deprecated;conflicts with libata SATA dri), 这一项是否和SATA有关呢?

这个别选。

make menuconfig完成存档之后
# make && make modules_install
如果能过,就
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.16.1
然后重启。

你的源码是官方下的还是RH打包的?

论坛徽章:
0
18 [报告]
发表于 2006-04-07 21:20 |只看该作者
感谢各位尤其是egret的帮助,新内核可以用了,就是initrd.image的问题,不用它,就出现了Kernel panic-not syncing:VFS:unable to mount root fs on unknow-block(0,0),在grub.conf中加入initrd /initrd-2.6.16.1.img后,问题就解决了,我已经进入登录界面了,除了声音控制器出了问题,没法加载,其他一切正常,还请各位回答一下上几楼的问题,谢谢

论坛徽章:
0
19 [报告]
发表于 2006-04-07 21:29 |只看该作者
原帖由 egret 于 2006-4-7 21:14 发表

这个别选。

make menuconfig完成存档之后
# make && make modules_install
如果能过,就
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.16.1
然后重启。

你的源码是官方下的还是RH打包的?


http://kernel.org下载的

论坛徽章:
0
20 [报告]
发表于 2006-04-07 21:38 |只看该作者
原帖由 egret 于 2006-4-6 18:56 发表

多半是你的选项不对。
我自用2.6的kernel以来,几乎每个版本都试过,从未用过initrd。

怎么才能做到不使用  initrd,是否就是选项的事呢?
就如下问题请egret和其他高手指教
1.使用如下命令,make bzImage 1>out1 2>out2,如果out2非空,否就表示一定有问题?
  有没有一篇详细的关于各个选项的中文说明
2.FC4下的使用rpm --rebuild/--recompile *.src.rpm为何总是出错: rpm: arguments to --root (-r) must begin with a /
难道一定要用rpmbuild命令吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP