Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
Developing application for linux
- 01-19-2005
- LinuxNovice
January 19, 2005, 9:49 am

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.
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.

Re: Developing application for linux

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"
Grant Edwards grante Yow! I put aside my
at copy of "BOWLING WORLD"
We've slightly trimmed the long signature. Click to see the full one.

Re: Developing application for linux

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.
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Re: Developing application for linux

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
Grant Edwards grante Yow! Yow! STYROFOAM...
at
We've slightly trimmed the long signature. Click to see the full one.

Re: Developing application for linux
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.
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.

Re: Developing application for linux

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 <args>
to your /etc/inittab.
Read about "init" and "normal" rc initialization here:
http://www.uwsg.iu.edu/UAU/boot/init.html
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Re: Developing application for linux

Well, here's what you find if you search Amazon.com for
"embedded linux":
(Amazon.com product link shortened)
(Amazon.com product link shortened)
(Amazon.com product link shortened)
(Amazon.com product link shortened)
(Amazon.com product link shortened)
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
Grant Edwards grante Yow! My CODE of ETHICS
at is vacationing at famed
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Embedded Linux Wireless?
- — Next thread in » Embedded Linux
-
- » Serial port issues
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Der beste Editor (was: kann man in dem Wirrwar nicht finden)
- — The site's Newest Thread. Posted in » Electronics (German)
-