On Thu 19 Apr 2001 at 09:13:07 -0700, williamson grant wrote:
> Austin,
>       when I try to apply the patch yes it hunks with
> offsets.
> i.e.
> 
> patching file arch/i386/kernel/apm.c
> Hunk #1 FAILED at 1536.
> 1 out of 1 hunk FAILED -- saving rejects to file
> arch/i386/kernel/apm.c.rej    

Follow these instructions from Richard Fish <[EMAIL PROTECTED]>:

----

- Save the following as /usr/src/win4lin-2.2.19-apm-patch

<snip>
--- linux/arch/i386/kernel/apm.c.orig   Fri Apr  6 10:48:58 2001
+++ linux/arch/i386/kernel/apm.c        Fri Apr  6 10:50:19 2001
@@ -1536,9 +1536,22 @@
         * This is for buggy BIOS's that refer to (real mode) segment 0x40
         * even though they are called in protected mode.
         */
+#ifndef BEFORE_GDT_PATCH
+       gdt[APM_40 >> 3].a = 0x00000000;
+       gdt[APM_40 >> 3].b = 0x00409200;
+#endif
        set_base(gdt[APM_40 >> 3],
                 __va((unsigned long)0x40 << 4));
        _set_limit((char *)&gdt[APM_40 >> 3], 4095 - (0x40 << 4));
+
+#ifndef BEFORE_GDT_PATCH
+       gdt[APM_CS >> 3].a = 0x00000000;
+       gdt[APM_CS >> 3].b = 0x00409a00 ;
+       gdt[APM_CS_16 >> 3].a = 0x00000000;
+       gdt[APM_CS_16 >> 3].b = 0x00009a00;
+       gdt[APM_DS >> 3].a = 0x00000000;
+       gdt[APM_DS >> 3].b = 0x00409200;
+#endif

        apm_bios_entry.offset = apm_info.bios.offset;
        apm_bios_entry.segment = APM_CS;
<snip>

- Make sure you have /usr/src/linux-2.2.19.tar.bz2 from kernel.org
- Make sure you have Kernel-Win4Lin2_2.2.18-1.patch from netraverse.
- Run:

% tar -xvf linux-2.2.19.tar.bz2 --use=bzip2
% cat Kernel-Win4Lin2_2.2.18-1.patch | (cd linux ; patch -p1)
(Will fail on arch/i386/kernel/apm.c)
% cat win4lin-2.2.19-apm-patch | (cd linux; patch -p1)

----

If you've already unpacked the kernel and applied the win4lin patch, you
can just do this:

% cat win4lin-2.2.19-apm-patch | (cd linux; patch -p1)

to patch the apm.c file.

This works for 2.2.18.  You need another patch as well for 2.2.19:

<snip>

--- linux-2.2.19-orig/include/linux/sched.h     Mon Mar 26 02:37:40 2001
+++ linux-2.2.19/include/linux/sched.h  Wed Apr 11 19:18:17 2001
@@ -267,7 +267,6 @@
        struct task_struct *next_task, *prev_task;
        struct task_struct *next_run,  *prev_run;
 
-       unsigned int task_exclusive;    /* task wants wake-one semantics in 
__wake_up() */
 /* task state */
        struct linux_binfmt *binfmt;
        int exit_code, exit_signal;
@@ -352,6 +351,8 @@
 
 /* oom handling */
        int oom_kill_try;
+
+       unsigned int task_exclusive;    /* task wants wake-one semantics in 
+__wake_up() */
 };
 
 /*
@@ -391,7 +392,6 @@
 /* counter */  DEF_PRIORITY,DEF_PRIORITY,0, \
 /* SMP */      0,0,0,-1, \
 /* schedlink */        &init_task,&init_task, &init_task, &init_task, \
-/* task_exclusive */ 0, \
 /* binfmt */   NULL, \
 /* ec,brk... */        0,0,0,0,0,0, \
 /* pid etc.. */        0,0,0,0,0, \
@@ -423,6 +423,7 @@
 /* signals */  SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, 
&init_task.sigqueue, 0, 0, \
 /* exec cts */ 0,0, \
 /* oom */      0, \
+/* task_exclusive */ 0, \
 }
 
 union task_union {

<snip>

Tim.
-- 
Tim Bell - [EMAIL PROTECTED] - System Administrator & Programmer
    Trinity College, Royal Parade, Parkville, Victoria, 3052, Australia
_______________________________________________
Win4Lin-users mailing list
[EMAIL PROTECTED]
https://lists.netraverse.com/mailman/listinfo/win4lin-users

Reply via email to