GP32 Linux Coding


Octavious

Programer Guru! ...in the making
Joined
Feb 2, 2004
Messages
1,795
Location
USA
Website
www.retroportables.4x2.net
well, I am now interested in gplinux
so....
I start programming classes next year, I will read and learn some before then, and I am scheduling vocational classes real soon
so....
what language do I need to know to make Linux stuff?
I would like to make drivers and apps eventually, but just apps for now
so....
like I said, what language should I learn for coding linux things, also, is there a differance in gplinux and normal linux? and can I do the coding in a windows environment and compile it as a linux prog kinda like gp32 dev?

~Octavious


good thing this is the NEW dev section
 
Octavious posted on Sep 2 2004 at 11:07 PM said:
well, I am now interested in gplinux
so....
I start programming classes next year, I will read and learn some before then, and I am scheduling vocational classes real soon
so....
what language do I need to know to make Linux stuff?

C.

Linux is mostly written in C. Some programmers use C++, but C is the language.

The thing is, that first there was UNIX. And for UNIX, they needed a language, so they invented C. Years later this guy called Stallman decided to write his own, free UNIX replacement, GNU HURD. He got many programs done, but he couldn't get the kernel done, so there was this Finnish guy named Linus Torvalds, who created the kernel and put all his stuff next to it.

Octavious posted on Sep 2 2004 at 11:07 PM said:
I would like to make drivers and apps eventually, but just apps for now
so....

The kernel is in C, so if you plan to put your apps there, C is the choice.

Octavious posted on Sep 2 2004 at 11:07 PM said:
like I said, what language should I learn for coding linux things, also, is there a differance in gplinux and normal linux? and can I do the coding in a windows environment and compile it as a linux prog kinda like gp32 dev?

At least try Linux. Knoppix is a good starter. When you run Knoppix, you usually don't install anything on your hard drive, but boot and run it from CD.

Edit: corrected typos
 
Last edited by a moderator:
Octavious posted on Sep 3 2004 at 01:07 AM said:
what language do I need to know to make Linux stuff?
[...]
like I said, what language should I learn for coding linux things, also, is there a differance in gplinux and normal linux? and can I do the coding in a windows environment and compile it as a linux prog kinda like gp32 dev?
If you really want to get into Linux coding, I suggest the following roadmap:

1. Get a live distro like Knoppix
Knoppix runs from CD without using the harddisk, so it's a rather easy way to do the first steps. Once you find out that you like it, you can also install it on harddisk for faster access. And because it's based on Debian you can install its packages.

2. Get to know the shell
The shell (usually bash) is the most efficiant tool you'll ever have.

3. Start your coding in C
First you need to know the basics of coding so it's wise to start in C.

4. Take a look at C++
If you're going to write more complex apps, you might find that C++ will be the better choice of a programming language. But beware, like Linus Torwalds once said: "It's easier to write bad C++ code than to write bad C code!". First master C before going C++. It's like learning to walk before learning to run. Device driver are written in C, anyway.

5. Don't reinvent the wheel
Before you rush into a new project, take a look at freshmeat.net to see if someone else has already has provided a solution for your problem. Maybe there are already part of the solution to your problem available as a library. Best example: you'll probably use a toolkit like QT, GTK or FLTK do draw your windows instead of doing it "by hand" and X11 only.

Greetings,
SvOlli
 
Last edited by a moderator:
Octavious posted on Sep 2 2004 at 11:07 PM said:
like I said, what language should I learn for coding linux things, also, is there a differance in gplinux and normal linux? and can I do the coding in a windows environment and compile it as a linux prog kinda like gp32 dev?

Well the only difference between linux and gplinux is that linux (I assume you meant PC linux) is compiled for an x86 architecture and gplinux is compiled for arm.

You could code in a windows environment and compile it with cygwin, but that'd be a bit pointless..


PS : I'm using Linux as my main OS now since a few weeks as my windows died, and I don't see any reason why I'd reinstall windows.. except for some games maybe
 
Last edited by a moderator:
Zap posted on Sep 3 2004 at 10:15 AM said:
PS : I'm using Linux as my main OS now since a few weeks as my windows died, and I don't see any reason why I'd reinstall windows.. except for some games maybe

Check out Cedega.
 
Last edited by a moderator:
Zap posted on Sep 3 2004 at 12:15 PM said:
Well the only difference between linux and gplinux is that linux (I assume you meant PC linux) is compiled for an x86 architecture and gplinux is compiled for arm.
There's one other: on PC hosted linux you usually compile the sourcecode on the machine for that machine, that's called selfhosted development. On gplinux you'll propably compile the sourcecode on a PC hosted linux or cygwin system for the linux on the GP32, that's called crosscompiling. Yes, you can create a compiler that runs on the GP32 natively, but the limited power of the CPU and even more the limited amount of RAM will slow you down big time. (I tried this one on the Sega Dreamcast and, believe me, this was no fun either.)

Greetings,
SvOlli
 
Last edited by a moderator:
SvOlli posted on Sep 3 2004 at 02:24 PM said:
Zap posted on Sep 3 2004 at 12:15 PM said:
Well the only difference between linux and gplinux is that linux (I assume you meant PC linux) is compiled for an x86 architecture and gplinux is compiled for arm.
There's one other: on PC hosted linux you usually compile the sourcecode on the machine for that machine, that's called selfhosted development. On gplinux you'll propably compile the sourcecode on a PC hosted linux or cygwin system for the linux on the GP32, that's called crosscompiling. Yes, you can create a compiler that runs on the GP32 natively, but the limited power of the CPU and even more the limited amount of RAM will slow you down big time. (I tried this one on the Sega Dreamcast and, believe me, this was no fun either.)

Greetings,
SvOlli


Yeah, of course.. but you could cross compile from arm to x86 too :p

Also I'm using cedega since a while now (I already used it when it was still called WineX) but not all games work with it. When it works it work generally very well tho.


By the way Jay, where does that fish come from ? I know I've seen it somewhere
 
Last edited by a moderator:
Zap posted on Sep 3 2004 at 04:27 PM said:
By the way Jay at where does that fish come from ? I know I've seen it somewhere

From Commander Keen. I have original copies of the first five games + dreams. I am planning on remake (source only). I will start after my exams are finished and I hopefully pass :)

It has a webpages here.

I have also contacted the main developer of Triplane Turmoil and I will be working on a port real soon now ;)

Edit: still fixing my typos. Some people are not created for forum posting.
 
Last edited by a moderator:
JayLettu posted on Sep 3 2004 at 06:51 PM said:
From Commander Keen.

That's what I tought at first, but I can't remember where ? :eek:

nm, found it on your site (episode IV)
 
Last edited by a moderator:
have a look there too
http://www.gp32x.de/board/index.php?showtopic=12412

the fltk video is good
you can make your apps on windows if you want first
and the compile it for gp

right now we still have to solve some input issues
but well, we the new usb stuff i didnt had time
i was trying to get my wifi work
but the latest drivers dont compile for arm
and the old ones compile but dont have support for my wifi device
:(

wait and see ...

i wanted to compile some light webrowser
but didnt had all the things needed on handhelds.org ipaq cluster

waiting for other people with ipaq and zaurus to help
still have the new flash lib in my files
waiting to be linked with the player

if you want a book for linux system programming
http://www.advancedlinuxprogramming.com/alp-folder
 
Last edited by a moderator:
Back
Top