Rockbox Development > Starting Development and Compiling
Unable to patch the source code
psgarcha92:
Hey guys
i've been trying hard to compile my own Build of rockbox for my Sansa Fuze V2 since a couple of days, and i wanted it to have the Line Out Dock patch as posted in
"http://www.rockbox.org/tracker/task/12074?string=sansa+fuze+dock&project=1&type[0]=4&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto="
Now, i follow the Steps as on http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling,
and i have downloaded and installed all repositories needed, including the source code.
Now, i believe, or by as much i have understood, this is the time to apply a patch, prior to compiling.
So, i check if i have the Patch program/code installed, and i do.
now, i type in and get the following.
prabhdeepsingh@ubuntu:~$ cd rockbox/tools
prabhdeepsingh@ubuntu:~/rockbox/tools$ sudo patch < /home/prabhdeepsingh/fuze22.patch
[sudo] password for prabhdeepsingh:
patching file as3514.c
Hunk #1 FAILED at 78.
Hunk #2 FAILED at 265.
Hunk #3 FAILED at 275.
Hunk #4 FAILED at 316.
4 out of 4 hunks FAILED -- saving rejects to file as3514.c.rej
patching file as3514.h
Hunk #1 FAILED at 23.
Hunk #2 FAILED at 30.
2 out of 2 hunks FAILED -- saving rejects to file as3514.h.rej
patching file sansafuzev2.h
Hunk #1 FAILED at 209.
1 out of 1 hunk FAILED -- saving rejects to file sansafuzev2.h.rej
patching file power-as3525.c
Hunk #1 FAILED at 73.
1 out of 1 hunk FAILED -- saving rejects to file power-as3525.c.rej
why am i so unable to patch the files? what am i doing wrong?
marc2003:
http://www.rockbox.org/wiki/WorkingWithPatches#Applying_A_Patch
[Saint]:
What strip setting did you use?
The patch was generated with git, so you'll need to use the -p1 strip option.
patch -p1 < name_of_patch.patch
If after that, you still get failed hunks, then the patch is so out of sync that patch can't even make an educated guess at where to apply the code, so it will fail.
At that point you'll need to patch by hand, if it indeed comes to that.
I suspect in this case that changing the strip option will "just work", though.
[St.]
psgarcha92:
In the page that describes Working with patches, the "patch < patchfile"
command is used first, and i use,
patch < fuze22.patch.
Using the strings is to be done after this command results in something right? In my case patch < fuze22.patch fails already, how do i use the strings then?i am going to try right now.
saratoga:
--- Quote from: psgarcha92 on May 19, 2011, 09:20:04 AM ---In the page that describes Working with patches, the "patch < patchfile"
--- End quote ---
1) p option
2) wrong folder
A patch is just a list of files and changes to make to them. Open up the patch and take a look at the paths it uses. Unless your path matches the one in the patch file, you will need to use a p option. In this case probably "-p 1".
Navigation
[0] Message Index
[#] Next page
Go to full version