Rose, Brian | 23 Aug 18:19 2002
Picon

Re: Where to start...?


> From: Erik Anggard <erik.anggard <at> packetfront.com>
> List: tech-embed
>
> Well, if you want to get really minimalistic all you'll need is:
> - A kernel (comment out all options and devices you don't need, in the 
> config file before compiling it to reduce the size of the kernel).
> - A root device: if you don't have a hardrive you can use a memory disk 
> beded in the kernel (like in the installation-kernel) or NFS.
> - Your own statically linked /sbin/init on the root device. This is the 
> only userland process started by the kernel so if your system only need 
> to run one program call it init and place it in /sbin. (Your program 
> might have to do some of the things that the original init does, e.g. if 
> your program wants do console io you will need a /dev/console and your 
> init will have to open that device and dup2 fd's 0, 1 and 2 to that fd). 
> You can of course use the standard init and instead creat your own
/etc/rc.

Has anyone created a minimal init that just sets up the console? I've tried
looking through the init code, but I'm not seeing where it sets this up.

I'm currently looking through all the glibc functions to find outhow to do
this. Is there a simple code snippet somewhere that shows how to set up the
console and operate a simple C program (aka Hello World!)?

Thanks for the help.

Brian Rose 
Brian dot Rose at icn dot siemens dot com 
407-942-6934 
If you hold a Unix shell to your ear, do you hear the C?


Gmane