Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
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. 

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
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Grant Likely
On Thu, Apr 22, 2010 at 12:58 PM, Sylvain Lamontagne
 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.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Albrecht Dreß

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.


pgpXGmQWIfTsP.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
Hi Albrecht,

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

> > 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.
> 
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
randomc   1   8
urandom   c   1   9
initrdb   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 ?
> 
> 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

> 
> Best, Albrecht.

Thank you 

Sylvain
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
[snip] 
> Can you halt the processor with JTAG and look at the contents of __log_buf?
Ok I'll try that as soon as I can get CodeWarrior to work again...

> > 1. Is it possible ?
> 
> Yes, I believe so, but I haven't tried.
Ok 
> 
> > 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?
> 
Nope and using init=/bin/sh 
gave me /bin/sh: can't access tty; job control turned off
And then 
/ # tty
not a tty

Is helpful ? This is while using console=ttyS1,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 ?
> 
> no
Ok :) 
> 
> > 4. The 'chosen' node is empty in my dts, does it require something to be
> > set ?
> 
> no
Good to know 
> 
> 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)

> 
> Cheers,
> g.
> 
Thank you

Sylvain
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-23 Thread Albrecht Dre�
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
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev