Newbie question..

Posted by: foxtrot_xray

Newbie question.. - 15/05/2002 19:01

Okay, so I know very very little C, but am teaching myself slowly. I'd like to test my armstools setup on my Linux box. Is there a small utility that I can compile myself? I'm assuming any source code will do (i.e. Any one of the available utilities for the empeg out there..)
Essentially, after installing the arms-tools stuff, modifying my path and such, and after I get a c code, is there anything special I need to do to avoid an error?
I'm trying it now, but curious to hear any info..

Much appreciated..
Mike.
Posted by: tonyc

Re: Newbie question.. - 15/05/2002 20:02

Try this guy, explained in this thread.

I have a couple things I've written and promised to release the source for, but I've been really slow in getting said source ready.
Posted by: foxtrot_xray

Re: Newbie question.. - 15/05/2002 21:15

Ah, cool. Something to try and break.
I, of course, have no idea what I'm going to DO with it (it being the ability to compile something for use on the empeg) but at least I'll know that I *CAN*.
I 'installed' the preinint, the telnetd, and the VNCserver just now without a single hitch, so now I wanna see if I can compile something and run it...
Posted by: tonyc

Re: Newbie question.. - 15/05/2002 21:26

Hey, not a problem. I'm all about having new guys to write stuff. If you can't come up with ideas, scour this very forum, many people have requested a variety of little apps to do this and that.
Posted by: johnmcd3

Re: Newbie question.. - 16/05/2002 04:55

hehe. I am also teaching myself c / linux programming this summer with the empeg as a tool. this board has some really smart and helpful people on it, and I think it will be a valuble expirience. hopefully you'll see some stuff soon.

currently my knowledge of c++ is about 6/10 (2 college courses), c about 3/10 (read and understood all the examples in the K&R), and linux about 3/10 (currently dual booting). we'll see how that improves as i progress.

i think my first big project will be porting emptris to the hijack interface and have it easy to install, but i'm not quite there yet. i'll let you know how it goes.

john
Posted by: tonyc

Re: Newbie question.. - 16/05/2002 07:08

Very cool. Porting Emptris to use Hijack is something that a lot of people would be happy seeing, myself included. If I didn't have three other projects on my plate now I would have given that one a shot. The best part is it doesn't use any graphics libraries so it should be faster than my apps which are using the GD libs.

Glad to see some new guys jumping in and getting their hands dirty. Keep us posted!
Posted by: foxtrot_xray

Re: Newbie question.. - 16/05/2002 12:47

Oookay, got everything running successfully, and after looking thru the code for the viewer (simpler than I expected..!) I notice I need a 'hijack.h' header file, which wasn't in the armstools dist I got from Mark's site, and didn't SEE it on his site, nor is it on my empeg.. Where can I grab a copy?

Also, pending the 'grabbing' above, I'm going to just make it, and go from there. However, in anticipating problems, how do I tell 'make' or 'cc' to use the libs in the armstools directory? Or will it look there automagically since my PATH has the ARM modification to it (per the README)? Or, will I have to tell it - using the "-I..." parameter?

Gratzi!
Me.
(Who, for the record, rates his skills at: C - 1/10, Linux (RedHat) - 5/10. )
Posted by: genixia

Re: Newbie question.. - 16/05/2002 12:57

You need to build a kernel tree:

Download the kernel, rds.patch, voladj.patch and the latest hijack patch into somewhere convenient...eg /home/me/empeg/

Untar the stock empeg kernel:
Go to the root of that kernel.
patch -p0 < ../rds.patch
patch -p0 < ../voladj.patch
patch -p1 < ../v266-hijack.patch (or whatever it's called..(!))

After you have done this, hijack.c should be in arch/arm/special
Posted by: foxtrot_xray

Re: Newbie question.. - 16/05/2002 13:28

In reply to:

Download the kernel, rds.patch, voladj.patch and the latest hijack patch into somewhere convenient...eg /home/me/empeg/




Ack.. Well, good then. Stuff to do while work is slow.

Me.
Posted by: foxtrot_xray

Re: Newbie question.. - 16/05/2002 14:15

Anyways, (and I think this falls under general "compiling" questions, which I'm going to start researching after I post..) Got all that done, without a hitch. Pretty spiffy. But, I'm not sure if I untar'd it in the correct directory.. When I try to compile, I use:
gcc -I/usr/local/armtools-empeg/hijack/linux-v2.00b11/include/asm-arm/arch-sa1100/ -I/usr/local/armtools-empeg/include/ viewer.c -o viewer
(I'm in the /usr/local/armtools-empeg directory.) When run, I get many lines similar to:
In reply to:

In file included from /usr/include/sys/types.h:132,
from viewer.c:44:
/usr/local/armtools-empeg/hijack/linux-v2.00b11/include/asm-arm/arch-sa1100/time
.h:9:31: asm/arch/hardware.h: No such file or directory




It looks like it's trying to use the wrong header files (the one for my linux installation, and not the arm).

Again, I apologize if this is one of those 'stoopid' questions. Other than source tars, where you just do a 'configure' and a 'make', I've never compiled anything before. :P But, I'm still poundin' away at it..

Thanks!
Mike.