Patching... I know it's simple, but I've never done it. I've set up a development environment using the VMWare development platform. I've used SVN to get the latest rockbox source code. I've successfully compiled and even made a zip.

I'm great at following recipes, and am grateful when hints are offered as to why I'm in a certain folder or need to use a certain command modifier. They did that in the above two links. However, the patch page leaves a something to be desired. I just want to apply patches. I've read and understood the man file for 'patch' and am still unsure why the -p(num) command modifier needs to be used, though it obviously has to do with file folder structure. Conceiveably you could download the patch file to the wrong place and never get the patch to work because you're in the wrong folder to begin with. So...

I assume that before I apply a patch I have to download it from the flyspray perhaps using wget, or maybe using svn. The file has to live somewhere specific. If I'm using SVN, that's likely taken care of. If I'm using wget, where is the most likely place for the patch file download to live? Like anything development-wise, there are probably a lot of ways to get around the barn. What's the shortest, easiest method just to download and apply a patch?

Here's a patch I want to apply: the Anti-Aliased Fonts Patch.
In my VMWare Player Debian 4 environment, using a recipe step format, what are the steps I would take to apply this patch?

Edit: I also notice that Eterm and bash do not allow copying and pasting with mouse select and right-click the way they do on a regular terminal. I can't copy from windows and paste into Debian, consequently. Apparently I have to type everything. Why is that, and is there something I'm missing?

The p# option issues patch to ignore the # leading path parts of each hunk.

So if a hunk in the patchfile looks like
+++ a/apps/menu.c
--- b/apps/menu.c

and you want to apply the patch while being in the root of the source tree, you need to ignore the a and b respectively, so that patch finds the apps dir.

As a general note: Most of the time -p0 works, because that's what "svn diff" produces. Sometimes you need to use -p1, that's when the patch creator uses the git(-svn) version control system or just compared to source dirs using the ordinary diff program.

First - thanks to the OP for starting this thread, I've been meaning to do the same.

I've been following the instructions, but using OS X. I (perhaps wrongly) didn't install the environment, figuring that OS X has Unix underpinnings. When it came to creating the compiled file I got this error:

sing source code root directory: /Users/Ayleen/rockbox
../tools/configure: line 2153: arm-elf-gcc: command not found
../tools/configure: line 2157: arm-elf-ld: command not found
WARNING: The compiler you must use (arm-elf-gcc) is not in your path!
WARNING: this may cause your build to fail since we cannot do the
WARNING: checks we want now.
Using arm-elf-ld
Created Makefile

You'll notice that a different version of the compiler was used - is this OK, or do I need to use the VMWare/Debian virtual machine environment that I'm currently downloading? I'd MUCH rather not have another VM installed on my machine - 2 OS's on here is more than enough already!).

First - thanks to the OP for starting this thread, I've been meaning to do the same.

I've been following the instructions, but using OS X. I (perhaps wrongly) didn't install the environment, figuring that OS X has Unix underpinnings.

OSX is unix based, but it does not come with arm-elf-gcc (in fact virtually no Unix systems do since its very rarely used for anything) so you'll still need to install it yourself. Follow the wiki instructions. I believe they explain what to do for MacOS (though I've never tried it myself since I don't have a Mac).

Does that mean that I'm going to need to use VMWare/Debian? I just booted it, tried both the root and "user" account - they booted, but I don't get anything except the Rockbox logo (on a nice black wallpaper background) and the toolbar (which has several options, none that help me). No command line, no menu bar at the top, etc. Could it be related to VmWare telling me that I have an outdated VMWare Tools, or is this the normal presentation of the environment? I'm running the 1.1 version of VMWare Fusion for OS X. It runs WinXP Pro just fine (in fact better than my Pentium 4 laptop).

Here's the terminal session - the first time I executed rockboxdev.sh I had already navigated to the tools directory, but it wasn't even recognized (I haven't updated the path statement, and am unsure how/where/if its necessary).
The second time I executed, you'll see that it TRIED to execute, but you'll see the error.
I'm in $Bash (which I don't believe is the default shell in Leopard).

BTW - I started the manual method, but its daunting for the neophyte like me. All I'm trying to do is patch a current build with the Album Art Resize - thats it!

While that works on Windows, on most unix systems, the command would be ./rockboxdev.sh. The "." means "current directory".

Quote:

OCKBOXDEV: gcc is required for this script to work.
ROCKBOXDEV: Please install gcc and re-run the script.

I assumed you installed gcc since you mentioned it before, but if not, you will need to install it. The rockboxdev script uses gcc to compile the arm cross compilers. I believe you can download it from Apple's website.

THAT (XCode isn't installed on this machine) is why I got an error about missing GCC. When I regain the courage, or grow impatient waiting for the album art resize to appear in the daily or current builds I might try again. Until then I'm going to do without it for a while. Thanks though to all of those that helped.