After some attempts, I found that it's a problem around path. I used
the following way to apply these patches:
run patch -p1 < xyz.patch, the return message contains the path info,
it's the working path of patch. e.g.
$patch -p1 < alarm.patch
can't find file to patch at input line 6
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
| project kernel/                            <--- enter this directory
to apply patch
| diff -- git a/drivers/rtc/alarm.c b/drivers/rtc/alarm.c
......

So,
1)alarm.patch:
$cd <your android source dir>
$find ./  -name alarm.c
../system/core/toolbox/alarm.c
../kernel/drivers/rtc/alarm.c <-- patch should apply on it!
../bionic/libc/unistd/alarm.c

$cd <your android source dir>/kernel
$patch -p1 < <your android source dir>/patches/alarm.patch

.....

2)cursor.patch
Enter <your android source dir>/frameworks/base to apply it.

3)frameworks.patch
same as cursor.patch

4)e2fsprogs.patch
Enter <your android source dir>/external/e2fsprogs/ to apply it.

Good luck.

On Apr 22, 2:10 am, Gani Bhagavathula <[email protected]>
wrote:
> Guys:
>
> Thanks so much for this.  Believe me, I did read the man page, but
> could not make sense of it... If I look at it now after you guys have
> explained it, it seems so obvious...
>
> Thanks again.
>
> Gani
>
> On Apr 21, 6:51 pm, Yi Sun <[email protected]> wrote:
>
> > -p1 is good for all the patches.
> > try read "man patch" and you will get it.
>
> > On Tue, 2009-04-21 at 10:42 -0700, Gani Bhagavathula wrote:
> > > So, if a file had three patches, then I would move to the base
> > > directory of the files mentioned in the .patch file, and then go
>
> > > patch -p1 < patchfile.name
> > > patch -p2 < patchfile.name
> > > patch -p3 < patchfile.name
>
> > > like that?
>
> > > Regards,
> > > Gani
>
> > > On Apr 21, 6:12 pm, Yi Sun <[email protected]> wrote:
> > > > cd frameworks/base
> > > > patch -p1 < <where you patch is>
>
> > > > On Tue, 2009-04-21 at 10:07 -0700, Gani Bhagavathula wrote:
> > > > > Hi all:
>
> > > > > I have seen some patches at the site
> > > > >http://code.google.com/p/patch-hosting-for-android-x86-support/update...
> > > > > - How do I apply those patches?
>
> > > > > I have tried patch -p0 < cursor.patch for example, and get the
> > > > > following query
>
> > > > > can't find file to patch at input line 6
> > > > > Perhaps you should have used the -p or --strip option?
> > > > > The text leading up to this was:
> > > > > --------------------------
> > > > > |project frameworks/base/
> > > > > |diff --git a/core/java/android/view/RawInputEvent.java b/core/java/
> > > > > android/view/RawInputEvent.java
> > > > > |index 30da83e..4d9a11a 100644
> > > > > |--- a/core/java/android/view/RawInputEvent.java
> > > > > |+++ b/core/java/android/view/RawInputEvent.java
> > > > > --------------------------
>
> > > > > am I supposed to change the lines in the patch file (replace a/ with
> > > > > my actual path?)
>
> > > > > Regards,
> > > > > Gani
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to