public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* Boot hang when setting console=none with MPC5200B custom board
@ 2010-04-22 18:58 Sylvain Lamontagne
  2010-04-22 19:11 ` Grant Likely
  2010-04-22 19:25 ` Albrecht Dreß
  0 siblings, 2 replies; 6+ messages in thread
From: Sylvain Lamontagne @ 2010-04-22 18:58 UTC (permalink / raw)
  To: linuxppc-dev@lists•ozlabs.org

Hi everybody,

I'm trying to remove the console from a custom board based on a
MPC5200B. During development we used console=3DttyS1,115200 in our bootcmd
for the kernel, but now that the product is ready to be shipped we want
to use ttyS1 for something else and would like to deactivate completely
the console. So the unit would be accessible only by ssh if needed.

(I'm not really confortable with this since a network problem would
prevent us of even debugging the platform... but I've been ask to do
it.)

Anyway, whenever I try to change console=3D to null or to tty1 or anything
else, the boot is hanging somewhere ( I know that, because some leds are
not flashing like they should on a normal boot and I can't login in with
ssh).

I've tried to use tty1, none, null, zero and I've tried to completely
remove the console=3D arguments... but nothing work, its hanging there
without any flashing leds.

I've tried redirecting another "real" serial port and it worked, so
console=3DttyPSC2,115200 work... but we need it also... so it can't do.

I've also tried the U-Boot's silent variable trick ... but it did not
work and I had to erase the environment of U-Boot with a JTAG to recover
back my default setting of ttyS1.

I'm now at a point where I think I have try everything that I know, and
since I have no way of "seeing" what is going on ... it's pretty hard to
debug.=20

The kernel is 2.6.29.2 and can't really be changed... (but it may be
patch)
This board doesn't have a framebuffer or a graphic chipset, everything
was done with a serial connection and now we want to remove this serial
connection (console) before sending it to a customer.

1. Is it possible ?
2. Do you have any idea how it can be achieve ?
3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
4. The 'chosen' node is empty in my dts, does it require something to be
set ?

Thank you for your help ( I hope ;) )

Sylvain Lamontagne

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

* Re: Boot hang when setting console=none with MPC5200B custom board
  2010-04-22 18:58 Boot hang when setting console=none with MPC5200B custom board Sylvain Lamontagne
@ 2010-04-22 19:11 ` Grant Likely
  2010-04-22 20:34   ` Sylvain Lamontagne
  2010-04-22 19:25 ` Albrecht Dreß
  1 sibling, 1 reply; 6+ messages in thread
From: Grant Likely @ 2010-04-22 19:11 UTC (permalink / raw)
  To: Sylvain Lamontagne; +Cc: linuxppc-dev@lists•ozlabs.org

On Thu, Apr 22, 2010 at 12:58 PM, Sylvain Lamontagne
<sylvain.lamontagne@novariant•com> wrote:
> Hi everybody,
>
> I'm trying to remove the console from a custom board based on a
> MPC5200B. During development we used console=ttyS1,115200 in our bootcmd
> for the kernel, but now that the product is ready to be shipped we want
> to use ttyS1 for something else and would like to deactivate completely
> the console. So the unit would be accessible only by ssh if needed.
>
> (I'm not really confortable with this since a network problem would
> prevent us of even debugging the platform... but I've been ask to do
> it.)
>
> Anyway, whenever I try to change console= to null or to tty1 or anything
> else, the boot is hanging somewhere ( I know that, because some leds are
> not flashing like they should on a normal boot and I can't login in with
> ssh).
>
> I've tried to use tty1, none, null, zero and I've tried to completely
> remove the console= arguments... but nothing work, its hanging there
> without any flashing leds.
>
> I've tried redirecting another "real" serial port and it worked, so
> console=ttyPSC2,115200 work... but we need it also... so it can't do.
>
> I've also tried the U-Boot's silent variable trick ... but it did not
> work and I had to erase the environment of U-Boot with a JTAG to recover
> back my default setting of ttyS1.
>
> I'm now at a point where I think I have try everything that I know, and
> since I have no way of "seeing" what is going on ... it's pretty hard to
> debug.

Can you halt the processor with JTAG and look at the contents of __log_buf?

> The kernel is 2.6.29.2 and can't really be changed... (but it may be
> patch)
> This board doesn't have a framebuffer or a graphic chipset, everything
> was done with a serial connection and now we want to remove this serial
> connection (console) before sending it to a customer.
>
> 1. Is it possible ?

Yes, I believe so, but I haven't tried.

> 2. Do you have any idea how it can be achieve ?

You should be doing the right thing.  Are your userspace init scripts
trying to start a getty on the non-existent console device?

> 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?

no

> 4. The 'chosen' node is empty in my dts, does it require something to be
> set ?

no

I think your best bet is to figure out some way to get at __log_buf to
retrieve the kernel output after the failed boot.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: Boot hang when setting console=none with MPC5200B custom board
  2010-04-22 18:58 Boot hang when setting console=none with MPC5200B custom board Sylvain Lamontagne
  2010-04-22 19:11 ` Grant Likely
@ 2010-04-22 19:25 ` Albrecht Dreß
  2010-04-22 20:23   ` Sylvain Lamontagne
  1 sibling, 1 reply; 6+ messages in thread
From: Albrecht Dreß @ 2010-04-22 19:25 UTC (permalink / raw)
  To: Sylvain Lamontagne; +Cc: linuxppc-dev@lists•ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Hi Sylvain:

Am 22.04.10 20:58 schrieb(en) Sylvain Lamontagne:
[snip]
> 1. Is it possible ?

Yes!  I tried this with several kernel versions (currently 2.6.33), using the option 'console=tty0'.  Works just fine...

> 2. Do you have any idea how it can be achieve ?

Hmmm, iirc, I also saw the effect you have.  I *think* the solution was to ensure that all /dev/* files were created manually in the jffs image, not by running mdev (if you use busybox).  But I might be wrong here, sorry.  Being at home, I don't have access to the device, but I can re-check tomorrow.

> 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?

Not sure if I used *exactly* that version w/o serial console, but (iirc) 2.6.28.something, and then many different up to .33 - they all work!

Best, Albrecht.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: Boot hang when setting console=none with MPC5200B custom board
  2010-04-22 19:25 ` Albrecht Dreß
@ 2010-04-22 20:23   ` Sylvain Lamontagne
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lamontagne @ 2010-04-22 20:23 UTC (permalink / raw)
  To: Albrecht Dreß; +Cc: linuxppc-dev@lists•ozlabs.org

Hi Albrecht,

> > 1. Is it possible ?
>=20
> Yes!  I tried this with several kernel versions (currently 2.6.33), using=
 the option 'console=3Dtty0'.  Works just fine...
>=20
Happy to know that it can be done !

> > 2. Do you have any idea how it can be achieve ?
>=20
> Hmmm, iirc, I also saw the effect you have.  I *think* the solution was t=
o ensure that all /dev/* files were created manually in the jffs image, not=
 by running mdev (if you use busybox).  But I might be wrong here, sorry.  =
Being at home, I don't have access to the device, but I can re-check tomorr=
ow.
>=20
Humm I see, here is the node I'm creating in the initial ramdisk, so
they are there before mdev is launched in one of my init scripts.
--------------------------------
console       c   5   1
null          c   1   3
zero          c   1   5
ptmx          c   5   2
tty           c   5   0
random        c   1   8
urandom       c   1   9
initrd        b   1   250
ram0          b   1   0
ram1          b   1   1
ram2          b   1   2
ram3          b   1   3
ramdisk -> ram0
ram -> ram0
loop0         b   7   0
loop1         b   7   1
--------------------------------

I think I have all the necessary device for boot, but if you could
double check with yours I would appreciated it.

> > 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
>=20
> Not sure if I used *exactly* that version w/o serial console, but (iirc) =
2.6.28.something, and then many different up to .33 - they all work!

Ok

>=20
> Best, Albrecht.

Thank you=20

Sylvain

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

* Re: Boot hang when setting console=none with MPC5200B custom board
  2010-04-22 19:11 ` Grant Likely
@ 2010-04-22 20:34   ` Sylvain Lamontagne
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lamontagne @ 2010-04-22 20:34 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev@lists•ozlabs.org

[snip]=20
> Can you halt the processor with JTAG and look at the contents of __log_bu=
f?
Ok I'll try that as soon as I can get CodeWarrior to work again...

> > 1. Is it possible ?
>=20
> Yes, I believe so, but I haven't tried.
Ok=20
>=20
> > 2. Do you have any idea how it can be achieve ?
>=20
> You should be doing the right thing.  Are your userspace init scripts
> trying to start a getty on the non-existent console device?
>=20
Nope and using init=3D/bin/sh=20
gave me /bin/sh: can't access tty; job control turned off
And then=20
/ # tty
not a tty

Is helpful ? This is while using console=3DttyS1,115200 (so when I know
it's working)

> > 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
>=20
> no
Ok :)=20
>=20
> > 4. The 'chosen' node is empty in my dts, does it require something to b=
e
> > set ?
>=20
> no
Good to know=20
>=20
> I think your best bet is to figure out some way to get at __log_buf to
> retrieve the kernel output after the failed boot.
Ok I'll try to revive CodeWarrior (I would better appreciate a BDI2000,
but I'm stuck with a Freescale USB TAP that require CodeWarrior)

>=20
> Cheers,
> g.
>=20
Thank you

Sylvain

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

* Re: Boot hang when setting console=none with MPC5200B custom board
@ 2010-04-23  7:28 Albrecht Dreß
  0 siblings, 0 replies; 6+ messages in thread
From: Albrecht Dreß @ 2010-04-23  7:28 UTC (permalink / raw)
  To: sylvain.lamontagne; +Cc: linuxppc-dev

Hi Sylvain:

> Humm I see, here is the node I'm creating in the initial ramdisk, so
> they are there before mdev is launched in one of my init scripts.
[snip]

I additionally have "tty0 c 4 0" which might be important here, plus a lot of other crap (should clean up there...;-).  I don't use a ramdisk, but have the /dev folder in the flash jffs2 image.  In the init script, I say

/bin/mount -t tmpfs ramfs /dev
mdev -s
mkdir /dev/pts
mkdir /dev/shm
chmod 1777 /dev/shm

and then tty0 is gone.  So to be honest I'm not absolutely sure it's necessary.

My inittab contains

::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh 
::shutdown:/etc/init.d/rcS stop
::restart:/sbin/init
::respawn:/sbin/dropbear -F

With this, I can access the board through ssh (dropbear).  The dmesg output lists "console=tty0" as expected.  All PSC's are in the device tree, btw, and available as serial ports.

Hth,
Albrecht.

Traumziele - von Beschreibung bis Buchung jetzt kompakt auf den Reise-Seiten von Arcor.de! http://www.arcor.de/rd/footer.reise

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

end of thread, other threads:[~2010-04-23  7:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 18:58 Boot hang when setting console=none with MPC5200B custom board Sylvain Lamontagne
2010-04-22 19:11 ` Grant Likely
2010-04-22 20:34   ` Sylvain Lamontagne
2010-04-22 19:25 ` Albrecht Dreß
2010-04-22 20:23   ` Sylvain Lamontagne
  -- strict thread matches above, loose matches on Subject: below --
2010-04-23  7:28 Albrecht Dreß

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