Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] debugging inittab
@ 2013-08-22 20:11 Jenkins, Lee
  2013-08-22 23:36 ` Arnout Vandecappelle
  0 siblings, 1 reply; 9+ messages in thread
From: Jenkins, Lee @ 2013-08-22 20:11 UTC (permalink / raw)
  To: buildroot

Hello. I am debugging a boot problem for a few hours. I'm clearly in over my head and I could use some insight.

For debugging purposes, I am booting from a kernel and rootfs on an nfs share of my dev machine. The console is ttyS0.

The kernel boots and rootfs is mounted and the scripts in /etc/init.d are executed. The kernel messages and startup script messages appear on the tty.

The problem is that right after the init.d scripts this message appears: "can't open /dev/ttyS0: Permission denied". This message is repeated in an infinite loop.

If I boot with the kernel argument "init=/bin/sh" then the init is bypassed and the system boots OK. So the problem is definitely in the init.

I'm new to debugging init-time and I cannot even figure out who is printing this message.

The error message sounds like a permissions problem, so I added a hack script /etc/init.d/S99chmod, which does chmod 777 /dev/ttyS0 and then ls to show the result. The chmod works but the error still occurs.

Then I thought maybe getty was having trouble opening ttyS0, so I wrote a "wrapper" script called getty.shell to print a debug message and then modified the entry in inittab like this:

# Put a getty on the serial port
ttyS0::respawn:/sbin/getty.shell -L ttyS0 115200 vt100 # GENERIC_SERIAL

It doesn't look like the wrapper script is ever called because the debug message never appears.

So, any ideas? What happens between /etc/init.d and /sbin/getty?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130822/428adbc4/attachment.html>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-29 10:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 20:11 [Buildroot] debugging inittab Jenkins, Lee
2013-08-22 23:36 ` Arnout Vandecappelle
2013-08-27 22:38   ` Jenkins, Lee
2013-08-29  5:17     ` Arnout Vandecappelle
2013-08-29  7:29       ` Peter Korsgaard
2013-08-29  7:39         ` Arnout Vandecappelle
2013-08-29  8:45           ` Peter Korsgaard
2013-08-29  8:31       ` Thomas Petazzoni
2013-08-29 10:14         ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox