Skip to contentSkip to conversation

Login on a ttyS fails

Buildroot Stéphane Mancini 3 participants 9 messages Sep 16, 2008 – Sep 17, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,
I'm trying to set up linux on a Xilinx platform.
The boot starts but the root login fails
after prompting :

I've made some prompt in login.c (busybox) and I have the following

################ LOG ######################
boot stuff
init started: BusyBox v1.12.0 (2008-09-16 16:37:51 CEST) command='/bin/mount -t proc proc /proc' action=1 tty='/dev/null'

command='/etc/init.d/rcS' action=1 tty=''

command='/sbin/getty -L ttyUL0 57600 vt100 ' action=2 tty='/dev/ttyUL0'

command='/bin/touch /var/log/messages' action=1 tty='/dev/null'

command='/sbin/reboot' action=32 tty=''

command='/sbin/swapoff -a' action=64 tty='/dev/null'

Welcome to the Erik's uClibc development environment. (none) login: root

Dec 31 17:00:12 login[169]: root login succeeded  on the TTY : 'ttyUL0'
-> /bin/ash
Dec 31 17:00:12 login[169]: Run t

Welcome to the Erik's uClibc development environment. (none) login:

#######

I've modified the login.c text to be sure of which code is executing.

It appears that it goes up to the call to the shell. But, then, nothing happens.
I've put a

	syslog(LOG_INFO, "Get to the shell ash!!\n");

at the begining of ash.c:ash_main(int argc UNUSED_PARAM, char **argv) It's never displayed !

I've also modified inittab to execute "ash" instead of "/init" but nothing happen also.

It seems that there's a trouble with the shell......

I'm using the Xilinx UARTLITE and the driver comming with linux 2.6.26.2

Maybe there's something wrong with this device but it seems to work perfectly since I can see all the boot process !

Please, can you tell me :
what are the configuration parameters to be set to run a a shell on
this tty properly ?
To mean, in buildroot, busybox, libc, linux, etc ....

I set the console on ttyUL0. Is it correct ?

Greetings !

St?phane Mancini

Signature · 12 lines
|St?phane Mancini   Ma?tre de Conference ENSIMAG/GIPSA-lab DIS
| Tel : 04 76 57 43 58
| 961 rue de la Houille Blanche
| Domaine universitaire - BP 46
| 38402 Saint Martin d'H?res cedex
| Email : stephane.mancini at grenoble-inp.fr
| http://www.lis.inpg.fr/pages_perso/mancini
================================================
Join us for the DASIP'08 Conference
ULB, Bruxelles, Belgique
Visit http://www.ecsi.org/dasip/
================================================
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

St?phane> Hi,
St?phane> I'm trying to set up linux on a Xilinx platform. St?phane> The boot starts but the root login fails St?phane> after prompting :

Probably you have CONFIG_FEATURE_SECURETTY enabled in busybox and haven't added ttyUL0 to /etc/securetty.

I'll add it to securetty of target/generic shortly.

St?phane> I'm using the Xilinx UARTLITE and the driver comming with St?phane> linux 2.6.26.2

My driver afaik works correctly.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

Thanks Peter,
Yes, you're right the driver works correctly.

The behavior of busybox is very strange :
the main of appletlib.c sometime stops before doing anything. The prompt I've inserted don't appear : they could be not reached or never displayed ...
Is there a way to trace the shell running ?

Do you mind to send me a configuration file for a ML405 board that works ?

Greetings

St?phane

Le mardi 16 septembre 2008 ? 20:37 +0200, Peter Korsgaard a ?crit :

Quoted 18 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

St?phane> Hi,
St?phane> I'm trying to set up linux on a Xilinx platform. St?phane> The boot starts but the root login fails St?phane> after prompting :

Probably you have CONFIG_FEATURE_SECURETTY enabled in busybox and haven't added ttyUL0 to /etc/securetty.

I'll add it to securetty of target/generic shortly.

St?phane> I'm using the Xilinx UARTLITE and the driver comming with St?phane> linux 2.6.26.2

My driver afaik works correctly.

Signature · 12 lines
|St?phane Mancini   Ma?tre de Conference ENSIMAG/GIPSA-lab DIS
| Tel : 04 76 57 43 58
| 961 rue de la Houille Blanche
| Domaine universitaire - BP 46
| 38402 Saint Martin d'H?res cedex
| Email : stephane.mancini at grenoble-inp.fr
| http://www.lis.inpg.fr/pages_perso/mancini
================================================
Join us for the DASIP'08 Conference
ULB, Bruxelles, Belgique
Visit http://www.ecsi.org/dasip/
================================================
#3 lore raw

How about a debug line in /etc/inittab:

::sysinit:/sbin/strace /bin/sh

/Flemming

Quoted 11 lines · St?phane Mancini

Thanks Peter,
Yes, you're right the driver works correctly.

The behavior of busybox is very strange :
the main of appletlib.c sometime stops before doing anything. The prompt I've inserted don't appear : they could be not reached or never displayed ...
Is there a way to trace the shell running ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080917/19d8ad9d/attachment.htm

#4 lore raw
In reply to Stéphane Mancini
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

Hi,

St?phane> Thanks Peter,
St?phane> Yes, you're right the driver works correctly.

Good ;)

St?phane> The behavior of busybox is very strange : the main of St?phane> appletlib.c sometime stops before doing anything. The St?phane> prompt I've inserted don't appear : they could be not St?phane> reached or never displayed ... Is there a way to trace the St?phane> shell running ?

strace?

Do you still have problems logging in after updating to r23409 (and rebuilding from scratch)?

St?phane> Do you mind to send me a configuration file for a ML405 St?phane> board that works ?

Sorry, I don't have access to a ML405. I've used systems with my uartlite driver and buildroot without problems though.

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Well, I've tried to launch ash after the boot instead of init. I get a kernel panic :

init has generated signal 4 but has no handler for it

Kernel panic - not syncing: Attempted to kill init!

Rebooting in 180 seconds..

It seems that there is an "illegal instruction".

Is there a way to get the program counter and instruction code that caused this signal ?
By the way, why the message states that "init" generates the signal while I launched ash ?

Maybe there are troubles with my processor or the memory is getting corrupted after I download the kernel....

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

St?phane> Well, I've tried to launch ash after the boot instead of init. St?phane> I get a kernel panic :

St?phane> init has generated signal 4 but has no handler for it

St?phane> Kernel panic - not syncing: Attempted to kill init!

St?phane> Rebooting in 180 seconds..

Did you by any change configure buildroot for hardware floating point and not enable the FPU emulation in the kernel?

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

Yes that's it !
It's working.

Please, if you come to Grenoble, I would be happy to offer you a beer !

Le mercredi 17 septembre 2008 ? 14:34 +0200, Peter Korsgaard a ?crit :

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

St?phane> Well, I've tried to launch ash after the boot instead of init. St?phane> I get a kernel panic :

St?phane> init has generated signal 4 but has no handler for it

St?phane> Kernel panic - not syncing: Attempted to kill init!

St?phane> Rebooting in 180 seconds..

Did you by any change configure buildroot for hardware floating point and not enable the FPU emulation in the kernel?

Signature · 12 lines
|St?phane Mancini   Ma?tre de Conference ENSIMAG/GIPSA-lab DIS
| Tel : 04 76 57 43 58
| 961 rue de la Houille Blanche
| Domaine universitaire - BP 46
| 38402 Saint Martin d'H?res cedex
| Email : stephane.mancini at grenoble-inp.fr
| http://www.lis.inpg.fr/pages_perso/mancini
================================================
Join us for the DASIP'08 Conference
ULB, Bruxelles, Belgique
Visit http://www.ecsi.org/dasip/
================================================
#9 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"St?phane" == St?phane Mancini <[email protected]> writes:

St?phane> Yes that's it !
St?phane> It's working.

Great!

You'll get better performance by using soft float though.

St?phane> Please, if you come to Grenoble, I would be happy to offer St?phane> you a beer !

;)

Signature · 1 line
Bye, Peter Korsgaard