LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-15-2014, 08:24 PM   #1
achris
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Rep: Reputation: Disabled
How to run busybox from USB serial console


Hi

I was trying to debug a wayland problem so I tried to change the console on my PC build from tty0 to ttyUSB0 which is a USB serial port. I am using a machine without PC serial.

I am running busybox and I cannot get the output to go to this console. If I change cmd line in the kernel to exclude tty0 I get a cannot initialize console error.

Is there an easy way to run see the output from the serial port, something like tee, with busybox only.

Busybox is running as init at this stage.

Last edited by achris; 12-15-2014 at 08:29 PM.
 
Old 12-15-2014, 09:52 PM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Hi,

Normally you would use the kernel console parameter to redirect the output.
Look here for more information.

Cheers,
 
Old 12-15-2014, 11:12 PM   #3
achris
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
There is also an ubuntu page and the kernel documentation. I haven't had a look at the source but the following command line works:
console=tty0 console=ttyUSB0,115200n8
According to the Documentation in the source tree the last console paramater is used as the default should the others not be specified. I suspect that this is incorrect.

If I put the ttyUSB0 first and don't have the PL2303 plugged in I get a panic/oops. If I have it plugged in while it is first, I see a line cannot open console. I have craeted the tty0 ttyUSB0 console devices in the image with the same major and minors that udev gives them. I do get output.

If I use the command line as specified I see output on both consoles but I can only enter commands from the keyboard as I don't have a video driver loaded yet. But I do get the kernel traces on the serial port. So I would also like to be able to redirect the output from the console (ie process #1's fds 1 & 2) to the USB device. So I think that I need something like tee that will take the output and write it to two fds. Would that work?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
serial console +plx tech console server card pankajd Linux - Hardware 1 10-14-2009 01:45 PM
using mouse in console in a busybox context tomnab Linux - Distributions 0 06-21-2009 05:43 PM
Completely usb based serial console server, possible??? ashtank Linux - General 8 07-31-2008 05:38 PM
Configuring a USB to Serial Cable to connect to a console port on a HP Procurve jamtech Linux - Networking 3 01-22-2008 07:30 AM
BusyBox - Serial Console Disable/Enable serdark Linux - Embedded & Single-board computer 2 01-17-2008 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration