gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > DevkitAdv Linux version way behind?

#11111 - KashinKoji - Fri Sep 26, 2003 3:51 am

I've been using HAM, but I want to setup DevKitAdv. I couldn't get the source to compile properly under linux, so I downloaded the binaries, but I am wondering if it is worth the trouble to set up the environment, because the linux release version is so far behind the windows version. It looks like there hasn't been a linux release since last year sometime. Should I just boot into windows to use devkitadv? Does anybody know if the linux version is missing any features that are key in later windows releases?

I just hate switching operating systems midstream. Working with a dos command shell is pretty painful for me...
Anybody else use devkit under linux that can assuage my fears?

#11112 - tepples - Fri Sep 26, 2003 4:17 am

No, I can't help you compile DevKit Advance R5b3 under Linux (PM Jason Wilkins if you want a better chance of help), but I will offer one tip: If you don't like the DOS command line, use the MSYS command line or the Cygwin command line. Both MSYS and Cygwin use Bash, a shell in the Bourne tradition.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11146 - foobar - Sat Sep 27, 2003 1:28 pm

I also failed to get anything done with devkitadvance on Linux, but then I found, that for the distribution I use, which is Debian, there are already packages for a gba or gp32 development chain, see http://didaho1.free.fr/cross/lumiere_rouge.txt

This works great so far, but of course only on Debian, which is (one of) the best dists anyway.

#11174 - KashinKoji - Sun Sep 28, 2003 6:03 am

Thanks for the info, foobar.
Alas, I use redhat right now, but I'm going to look into that, and if push comes to shove there is no reason I can't install debian.

#11221 - foobar - Mon Sep 29, 2003 10:45 am

KashinKoji wrote:
Thanks for the info, foobar.
Alas, I use redhat right now, but I'm going to look into that, and if push comes to shove there is no reason I can't install debian.


At the URL I posted there also are tar.gz-packages, which might work on your Redhat install, too.

ciao,
-- foobar

#11231 - SmileyDude - Mon Sep 29, 2003 6:02 pm

I've been using DevKit Advance under RH Linux 9.0 for quite some time now (originally started using RH 8, upgraded shortly after the 9.0 release). So far, it's been fine. But, I do use a custom version of the crt0.s and lnkscript files, so I'm not really using all of DevKit Advance -- just the compiler/assembler/linker portion.

I would recommend giving it a shot -- it's much better than the alternative to moving over to Windows (IMO) :)
_________________
dennis

#11241 - KashinKoji - Mon Sep 29, 2003 8:07 pm

SmileyDude,
You are just the guy I want to talk to then.
Did you make the lnkscript yourself? If not where did you get it? Did you compile the cross compiler or just install it?

This game development scene (and me especially) could very much use a how-to setup devkit under linux, with a code sample that compiles and runs. Think you are the man for the job? There is no pay, just a big thank you from me, and maybe a few more linux users hiding out there.

Booting into windows actually makes me feel queasy.

#11263 - foobar - Tue Sep 30, 2003 3:07 pm

KashinKoji wrote:

This game development scene (and me especially) could very much use a how-to setup devkit under linux, with a code sample that compiles and runs.


http://linux.gbadev.org/gcc-gba/ and http://www.bits.bris.ac.uk/dooby/gba/ deal with doing it on Linux. The docs are a bit old, though.

-- foobar

#11315 - SmileyDude - Thu Oct 02, 2003 3:14 pm

KashinKoji wrote:
SmileyDude,
You are just the guy I want to talk to then.
Did you make the lnkscript yourself? If not where did you get it? Did you compile the cross compiler or just install it?

This game development scene (and me especially) could very much use a how-to setup devkit under linux, with a code sample that compiles and runs. Think you are the man for the job? There is no pay, just a big thank you from me, and maybe a few more linux users hiding out there.

Booting into windows actually makes me feel queasy.


LOL -- no, I didn't make it myself, I just used the one Jeff F. made. You can download it from devrs.com/gba/ someplace. What I do is just make a directory for each project that looks like this:

Code:
project/
   |
   + Makefile
   |
   + lnkscript
   |
   + src/
   |
   + include/
   |
   + bin/


I put the crt0.S file into the src directory. My makefile then handles the details of using the replacement lnkscript and crt0.S file. My Makefile can be downloaded at http://munsie.dhs.org/gba_code/makefile.tgz.

The other trick that I do is that I have an alias setup that sets all the environment variables to point to the devkit. That way, I can have windows open for working with the GBA tool chain and others for the regular tool chain. Here's my alias (put this in your .bashrc file, if you are using bash -- if you're not using bash, you'll have to figure out the equivalent for your shell):

Code:
alias devkit='export PATH=/usr/local/devkitadv/arm-agb-elf/bin:$PATH;export GCC_EXEC_PREFIX=/usr/local/devkitadv/arm-agb-elf/lib/gcc-lib/;export PS1="[gba \h:\w]\$ ";unalias devkit'


You may have noticed that I also change the prompt (PS1) in there. That's so that I can tell which toolchain that I am using by simply looking at the prompt. Comes in handy sometimes.

Other than that, I think everything is pretty much standard. I'm using a RH 9 box that was upgraded from RH 8. I'm using Virtual GameBoy Advance for emulation, and a MBV2 cable for quick testing and writing out to a flash cart.

I also have a script that I use to create a new project that I can make available as well. Let me know, and I can post that as well.

BTW, I originally created this Makefile and the new project script under Windows with Cygwin. Even the idea of the alias came from there, except that I used a batch script instead. I had very little problems with moving over to linux -- most of my problems come from having a slower linux machine (800mhz Duron vs a 1ghz PIII). But even still, it's a much nicer environment to work in (IMO) :)

EDIT: I forgot to mention. I downloaded a binary install of devkit advance. Here is the details on it:
Code:
[gba box:~/hd/dennis/linux-downloads (160.745 Mb)]$ ls -l devkitadv.tar.bz2
-rwxr-xr-x    1 dennis   dennis   18557379 Mar  7  2003 devkitadv.tar.bz2
[gba box:~/hd/dennis/linux-downloads (160.745 Mb)]$ md5sum devkitadv.tar.bz2
03f107b3decff9238572f90939c4b16b  devkitadv.tar.bz2
[gba box:~/hd/dennis/linux-downloads (160.745 Mb)]$ gcc --version
gcc (GCC) 3.1 (Linux DevKit-Advance by Tom Badran tb100@doc.ic.ac.uk)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[gba box:~/hd/dennis/linux-downloads (160.745 Mb)]$

_________________
dennis

#11379 - KashinKoji - Fri Oct 03, 2003 7:30 pm

Excellent info, guys, thank you. I should have the devkit up and compiling in no time (as soon as I find the time to start the process!)