Rose, Brian | 23 Aug 2002 18:19
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 
(Continue reading)

Perry E. Metzger | 23 Aug 2002 22:23
Gravatar

Re: Where to start...?


"Rose, Brian" <Brian.Rose <at> icn.siemens.com> writes:
> 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.

What do you mean by "sets up the console"?

> I'm currently looking through all the glibc functions to find out

NetBSD doesn't use glibc.

Perry

Erik Anggard | 26 Aug 2002 11:15

Re: Where to start...?

The attached mini_init.c works for me. (Note that this is a stripped 
down version of an init that did a bit more stuff that is  specific to 
our system).

Compile with "cc -Wall -Werror -static -o init mini_init.c".

/Erik

Rose, Brian wrote:

>>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
(Continue reading)

Rose, Brian | 27 Aug 2002 19:44
Picon

MPC850 Development Boards


Is anyone doing a port for EST Corporation's (now owned by WindRiver)
PowerPC 850 development boards. I have a basic kit collecting dust and I was
wondering if it has been done before. If it has not been done, where should
I start reading to do a port?

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