Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: developing rockbox and updating patches

Re: developing rockbox and updating patches

From: Dave Hooper <dave_at_beermex.com>
Date: Wed, 1 Aug 2007 23:45:08 +0100

> I am using cygwin on windows. So it takes me about 15 minutes to build
> rockbox when compiling.
> If I am just editing a couple of files what is the best way to do this?

The best way to do what, exactly? After editing a file, if you type Make,
that is the only way to rebuild (and also the best!)

> What else will I need to know to make the things I said above work?
>>
>> You need to program. A lot.
>>
> Ok but what do I need to know in c.

If you read the code, and understand it, and understand how to make the
changes you want, then that is what you need to know. If you don't
understand the existing code, then that is what you need to know..
In essence, if you put together a bunch of functions, include statements,
for loops, while loops, if statements, and a couple of other things like
assigning values to variables, you can write 90% of Rockbox. But only if
you understand how to string them together in the right way. I'm not sure
what you mean by "what do you need to know in C". C is just a language, if
you know how to use the language then you can write code in Rockbox. But
there is no manual that describes 'which piece of the rockbox code you need
to look at to do some specific new kind of development that you want to do'.
You can only really get that knowledge by doing it. If you understand how
to read source code, how to write source code, how to understand the flow of
a program, and what the main utility functions do (e.g. lcd_xxxxx as already
mentioned), then that's all you "need" to know in C.

> And just to get me started where abouts should the code go?
> What file should I look at first?

Try searching the source code - for example, search for 'bookmark' to find
source code related to bookmarks, and search for 'playlist' to find source
code related to playlists.

>>> When I try to create a patch the diff file comes out with about 23000
>>> lines. Is there away I can fix this?
>>
>> Yes, don't modify whitespace/newlines on lines that you don't change!
>>
> And how do I do that?
> All I am doing is the following:
> 1. Open main_menu.c
> 2 I arrow around through the code and I also use the find function in my
> text editor.
> 3. I add my code.
> 4. I save.
> 5 I open english.lang.
> 6. I arrow around a bit and I use the find function in my text editor.
> 7. Once I have found the spot where my code should go I add my code there.
> All I did was fill in the disk size voice string.

Make sure the editor you use preserves the line endings of the original
files
Unfortunately you don't say what text editor you are using, maybe it isn't
designed for programming?
Personally I use jmacs on cygwin. I would avoid a Windows-only text editor
such as Notepad since these will change line endings whenever you save the
file.
Received on 2007-08-02


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa