init does not run on 405GP system

Robert Schwebel r.schwebel at pengutronix.de
Wed Jun 11 04:00:32 EST 2003


On Tue, Jun 10, 2003 at 06:52:51PM +0200, Wolfgang Denk wrote:
> Show us your "hello_world" code. Does it actually open "/dev/console" ?

Attached - source + compiled binary (this one is dynamically linked).
Could you verify that this hello world works with your hardware when
copied to /sbin/init? I would assume it prints out the text and then the
kernel panics because of the return.

> > do not see the sys_write() syscall being called at all. Btw, init on my
> > other rootfs is busybox init. I suppose I should always see someting
> > useful when init is starting.
>
> Why do you assume that?

Normally init makes some output, something like

	message(MAYBE_CONSOLE | LOG, "init started:  %s", bb_msg_full_version);

from busybox-init.

Robert
--
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
-------------- next part --------------
#include <stdio.h>

int main(void) {

	FILE *f;

	f = fopen("/dev/console","w");
	fprintf(f,"hello penguin world\n");
	fclose(f);

	return 0;

}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello
Type: application/octet-stream
Size: 9420 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20030610/966a557c/attachment.obj>


More information about the Linuxppc-dev mailing list