WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Patch: Enable gettys for kernel consoles  (Read 16711 times)

Offline akoch

  • WikiUser
  • *
  • Posts: 2
Patch: Enable gettys for kernel consoles
« on: March 24, 2016, 08:14:44 AM »
Hi,

i'm in the process of setting up TC in a PXE-boot environment with a serial-line as console. As TC does not support a serial console by default, i'm submitting this small patch, that has /init enable getty-lines in /etc/inittab for devices that are configured as kernel-console (e.g. "console=ttyS0,38400n8" on the kernel cmdline):

newbielink:http://via.lunatica.net/~ak/tc7.0-SerialConsoleGettys.diff.txt [nonactive]

I'd be happy if you would consider including it into the distribution.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10217
Re: Patch: Enable gettys for kernel consoles
« Reply #1 on: March 24, 2016, 01:43:18 PM »
Since the ARM users on Pi often also use a serial console, and that's on a different device, I'd like it to be included too, so the support is generic enough and not just x86.

Can any pi users comment?
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Patch: Enable gettys for kernel consoles
« Reply #2 on: March 24, 2016, 11:38:08 PM »
In piCore since 6.0 serial consoled is enable in cmdline.txt

Code: [Select]
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed
and started in bootlocal.sh

Code: [Select]
# Start serial terminal
/usr/sbin/startserialtty &

# Set CPU frequency governor to ondemand (default is performance)
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# Load modules
/sbin/modprobe i2c-dev

# Start openssh daemon
/usr/local/etc/init.d/openssh start

# ------ Put other system startup commands below this line
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline akoch

  • WikiUser
  • *
  • Posts: 2
Re: Patch: Enable gettys for kernel consoles
« Reply #3 on: March 29, 2016, 04:37:56 AM »
I didn't try running TC on the pi, but from what i can see here, it would make sense to get rid of the /usr/sbin/startserialtty & in bootlocal.sh and include an appropriate line in inittab instead:

Code: newbielink:javascript:void(0); [nonactive]
#ttyAMA0::respawn:/sbin/getty 115200 ttyAMA0 vt100
The (patched) /init would then enable this line on bootup.