SemenTsing 发表于 2003-9-22 09:18:27

patch 求助

Dragonfly 上次收到你的邮件后我到相应主页去看了一下
在patch相应的补丁是出现了如下问题:
# patch -p1 <kdb-v4.2-2.4.20-common-1 patching

patching file kernel/sched.c Hunk #1 FAILED at 658.
1 out of 1 hunk FAILED -- saving rejects to file kernel/sched.c.rej
patching file kernel/Makefile Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file kernel/Makefile.rej
patching file include/linux/sysctl.h Hunk #1 FAILED at 124.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/ sysctl.h.rej
patching file drivers/usb/usbkbd.c patching file drivers/char/serial.c Hunk #1 su
cceeded at 228 (offset 5 lines).
patching file drivers/char/keyboard.c Hunk #2 succeeded at 254 (offset 12 lines).

patching file Makefile Hunk #1 FAILED at 37.
Hunk #2 succeeded at 95 (offset 5 lines).
Hunk #3 succeeded at 132 with fuzz 2 (offset 1 line). Hunk #4 FAILED at 208.
Hunk #5 succeeded at 258 with fuzz 1 (offset 8 lines). Hunk #6 FAILED at 296. 3 o
ut of 6 hunks FAILED -- saving rejects to file Makefile.rej patching file Documen
tation/Configure.help Hunk #1 succeeded at 20570 (offset 176 lines). patching fil
e drivers/usb/hid-core.c
Hunk #2 succeeded at 1303 (offset 6 lines). patching file kernel/kallsyms.c patch
ing file include/linux/kallsyms.h
patching file include/linux/kdb.h patching file include/linux/kdbprivate.h patchi
ng file include/linux/dis-asm.h patching file kdb/kdbmain.c patching file kdb/kdb
_io.c
patching file kdb/kdb_id.c patching file kdb/kdb_bt.c
patching file kdb/kdb_bp.c patching file kdb/Makefile
patching file kdb/kdbsupport.c patching file kdb/modules/kdbm_vm.c patching file
kdb/modules/Makefile patching file kdb/modules/kdbm_pg.c patching file kdb/Change
Log
patching file kdb/kdb_cmds patching file Documentation/kdb/kdb_ss.man patching fi
le Documentation/kdb/kdb_rd.man
patching file Documentation/kdb/kdb_md.man patching file Documentation/kdb/kdb_ll
.man
patching file Documentation/kdb/kdb_bt.man patching file Documentation/kdb/kdb_en
v.man patching file Documentation/kdb/kdb.mm patching file Documentation/kdb/kdb_
bp.man patching file Documentation/kdb/slides patching file Documentation/kdb/kdb
_sr.man

第二条命令
# patch -p1 <kdb-v4.2-2.4.20-i386-1
patching file include/asm-i386/hw_irq.h Hunk #1 succeeded at 26 (offset 3 lines).

patching file include/asm-i386/keyboard.h patching file include/asm-i386/ptrace.h
Hunk #1 succeeded at 54 with fuzz 2.
patching file arch/i386/vmlinux.lds Hunk #1 succeeded at 31 with fuzz 2 (offset 3
lines).
Hunk #3 succeeded at 79 (offset 3 lines).
patching file arch/i386/config.in Hunk #1 succeeded at 502 (offset 51 lines).
patching file arch/i386/Makefile Hunk #2 succeeded at 118 (offset 8 lines).
patching file arch/i386/kernel/bluesmoke.c
patching file arch/i386/kernel/smpboot.c Hunk #2 succeeded at 433 with fuzz 2 (of
fset -5 lines).
patching file arch/i386/kernel/i8259.c
patching file arch/i386/kernel/smp.c Hunk #3 succeeded at 505 (offset 3 lines).
patching file arch/i386/kernel/irq.c
patching file arch/i386/kernel/process.c
Hunk #1 FAILED at 33. Hunk #2 FAILED at 401. 2 out of 2 hunks FAILED -- saving re
jects to file arch/i386/kernel/process.c.rej
patching file arch/i386/kernel/traps.c Hunk #1 succeeded at 31 (offset 1 line).
Hunk #2 succeeded at 56 (offset 1 line).
Hunk #3 succeeded at 87 (offset 1 line).
Hunk #4 FAILED at 150. Hunk
#5 FAILED at 220.
Hunk #6 succeeded at 252 (offset 11 lines).
Hunk #7 succeeded at 312 with fuzz 1 (offset 6 lines).
Hunk #8 succeeded at 414 (offset 11 lines).
Hunk #9 FAILED at 493.
Hunk #10 succeeded at 604 (offset 32 lines).
Hunk #11 succeeded at 653 (offset 11 lines).
Hunk #12 succeeded at 1033 (offset 1 line).
Hunk #13 succeeded at 1061 (offset 11 lines).
3 out of 13 hunks FAILED -- saving rejects to file arch/i386/kernel/traps.c.rej
patching file arch/i386/kernel/entry.S Hunk
#1 succeeded at 194 (offset 2 lines).
patching file arch/i386/kernel/nmi.c
Hunk #2 succeeded at 378 (offset 14 lines).
patching file arch/i386/kernel/io_apic.c
Hunk #1 FAILED at 28.
Hunk #2 succeeded at 601 (offset 1 line).
1 out of 2 hunks FAILED -- saving rejects to file arch/i386/kernel/io_apic.c.rej
patching file include/asm-i386/kmap_types.h
Hunk #1 FAILED at 8. 1 out of 1 hunk FAILED -- saving rejects to file include/asm
-i386/kmap_types.h.rej
patching file include/asm-i386/kdb.h
patching file include/asm-i386/kdbprivate.h
patching file arch/i386/kdb/kdba_io.c
patching file arch/i386/kdb/kdba_id.c
patching file arch/i386/kdb/kdba_bt.c
patching file arch/i386/kdb/kdba_bp.c
patching file arch/i386/kdb/i386-dis.c
patching file arch/i386/kdb/Makefile
patching file arch/i386/kdb/kdbasupport.c
patching file arch/i386/kdb/ansidecl.h
patching file arch/i386/kdb/bfd.h
patching file arch/i386/kdb/ChangeLog
因为要用kdb调试要求patch过程中不能够出错,对于以上的FAILED和*.rej如何解决?亲高手
指点!!

#号后面的数字是行号么?
after patching the two patches i can never recompile the linux kernel successfully!

Dragonfly 发表于 2003-9-22 23:44:48

u patch this on which kernel?

give me the link where u get the patches.

SemenTsing 发表于 2003-9-23 20:57:00

thanks for your answer!
I have solved this problem !the reason why I can patch successfully lies th original kernel version is 2.4.20-8 while the patch version is 2.4.20,the ftp site is ftp://oss.sgi.com/www/projects/kdb/v4.2
after patching I recompiled successfully (including make xconfig /dep/clean/ bzImge/modules/modules_install),but when I reboot my computer there is not any modules.and the system cannot support ext3 filesystem and netcard. so there are someother questions as the following:
1.whether the operations "make dep /clean" deal with the file /usr/src/linxu-2.4-20/Makefile?
2.which files have something with the operation "make bzImage"?
3.how can I load the original modules such as 8139too、ext3?
4.which file associates with the modules that kernel loaded?

SemenTsing 发表于 2003-9-23 21:07:17

sorry the ftp site is ftp://oss.sgi.com/projects/kdb/download/v4.2

Dragonfly 发表于 2003-9-23 21:38:18

yes, i guess u use the rh kernel instead of the vanilla kernel.

after u patch it, u need to compile it as a normal one, u need to choose ext3 and netcard. it is a totally seperate one with u old 2.4.20-8. so u can not load module from 2.4.20-8. u need build modules under 2.4.20 .

do make clean dep instead of make dep clean.

make dep has related with makefile

many source code, makefile, have sth with bzimage

u can not load the original module, u need to compile them in 2.4.20 as well

see /lib/modules/2.4.20/kernel.
页: [1]
查看完整版本: patch 求助