Developing application for linux

Jan 19, 2005 6 Replies

Hi all. This is my first project on linux. I am gathering information on my project.


**In brief we are implementing an SNMP client on linux kernel. The hardware is a powerPC based system with two 10/100 Ethernet ports and a RS232 Serial port.

Can somebody tell me how to develop an application for linux.



I have questions like



- is the application a *.c file that is compiled with the kernel to form an image.



- OR it is some form of an object file such that the kernel is configured to run after booting.



I would also like to know the tools in general required to develop such application.



No.

Yes.

Host computer (most probably running Linux), target computer (running Linux), cross toolchain, editor, CVS, etc.

Grant Edwards grante Yow! I put aside my at copy of "BOWLING WORLD" visi.com and think about GUN CONTROLlegislation...

No.

You build an ELF executable (not an object file). The kernel knows absolutely nothing about your executable. You simply run that exe just like you would run 'date' or 'ls'.

True, you can make starting that executable be a part of an 'rc' script, which is started by the 'init' process, which is started by the kernel. But it's a long way from "kernel is configured to run after booting".

Cheers,

In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.

ELF executables are object files.

That depends on its name. If you name it 'init', then the kernel _does_ know about it.

Really? I thought there was a way to tell the kernel what program to run if you wanted to run someting other than /sbin/init.

Grant Edwards grante Yow! Yow! STYROFOAM... at visi.com

Thanks guys. So this is what I understand. I can use Code Warrior to create an elf object. As I am using MPC875 as my CPU.

But I am still not clear on how to configure my kernel to start the application. ppbly I may sound very naive in asking this nut I am still not clear from the correspondence. Like how do I edit/modify the rc scripts. Some sort of readme or some links for starters might help.

With an editor?

Assuming your target is configured to run "init", you can simply add a line like this:

1:2345:respawn:/path/to/your/app

to your /etc/inittab.

Read about "init" and "normal" rc initialization here:

formatting link

Cheers,

In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.

Well, here's what you find if you search Amazon.com for "embedded linux":

formatting link
formatting link
formatting link
formatting link
formatting link

The first two (the O'Reilly book and Hollabaugh's book are both good. Rubini & Corbet is also a must if you have to support any custom hardware. The New Riders books is OK as well. The other one I haven't looked at.

Grant Edwards grante Yow! My CODE of ETHICS at is vacationing at famed visi.com SCHROON LAKE in upstate New York!!

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required