Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: adrien1977 on September 04, 2006, 04:43:57 PM

Title: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 04:43:57 PM
Hi
I just recently starting using rockbox (which I find it great) and I'd like to dive into the code a little bit. I have old C experience (almost none) I am mostly a JAVA dev.

Anyway, I've been reading and doing some research on this forum, but I could not find anything regarding help to compile under linux.

I have the latest kubuntu release.

Does anyone has some guides or suggestions?
I'd really like to avoid using cygwin

Thanks a bunch for the help
Title: Re: Compiling under linux???
Post by: Llorean on September 04, 2006, 04:48:18 PM
Take the Cygwin install guide, and skip any steps that say "Run cygwin" or "Install cygwin"


I mean, you use the same CVS command line, and the all the same commands, you just do them in Linux instead of in Cygwin... See the CrossCompiler wiki page, or use the shell script in the /tools/ folder of the source for setting up the necessary cross compilers since you aren't getting them bundled with Cygwin.
Title: Re: Compiling under linux???
Post by: dan_a on September 04, 2006, 04:50:07 PM
The first thing to do is to build a cross compiler (http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler).  The developers' documentation is mainly in the Wiki, rather than on the forums.

Hope that helps!
Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 04:50:53 PM
ok then
Let me try this right now
I'll let you know.
THnaks for the fast response
Title: Re: Compiling under linux???
Post by: bluebrother on September 04, 2006, 04:53:48 PM
you could also use the script rockboxdev.sh in the tools directory which sets up the cross compiler environment for your.
Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 04:59:15 PM
ok
rockboxdev.sh is running right now.
After that I'll try to compile the code and see what happens

I'll keep you posted
Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 05:28:04 PM
is that normal?


Using source code root directory: /home/adrien/rockbox/rockbox-devel
../tools/configure: line 1203: arm-elf-gcc: 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.
Created Makefile

Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 05:29:29 PM
I tried to compile and got this

adrien@athena-linux:~/rockbox/rockbox-devel/simulator$ make
make[1]: `rdf2binary' is up to date.
make[1]: `convbdf' is up to date.
make[1]: `scramble' is up to date.
make[1]: `ipod_fw' is up to date.
make[1]: `bmp2rb' is up to date.
make[1]: `codepages' is up to date.
/bin/sh: arm-elf-gcc: command not found
/bin/sh: arm-elf-gcc: command not found
CONVBDF
Header parsed
CC sysfont.c
make[1]: arm-elf-gcc: Command not found
make[1]: *** [/home/adrien/rockbox/rockbox-devel/simulator/firmware/sysfont.o] Error 127
make: *** [all] Error 2

I did compile the crosscompiler though

Title: Re: Compiling under linux???
Post by: Febs on September 04, 2006, 05:30:45 PM
Did you update your path to include a path to the cross-compiler?
Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 05:46:04 PM
oups.....
My bad
I thought that the script did it automatically

I modified the PATH, execute the configure  and everything went fine
I execute make and it seemed to work fine
I did make zip and created the zip.

Thanks a lot for the help

Now I have another quesiton.

What is that SDL they talk about in the how to build the simulator?

thanks
Title: Re: Compiling under linux???
Post by: dan_a on September 04, 2006, 06:08:26 PM
SDL is a graphics library.
There are probably packages available for Kubuntu called something like "libsdl" and "libsdl-devel" (I'm not sure, I don't use Kubuntu.)  Install both of these and you should be able to build the simulator.
Title: Re: Compiling under linux???
Post by: adrien1977 on September 04, 2006, 06:19:03 PM
You were right
I installed them and it compiled fine
It also executed fine
thanks for the help