davidferguson / pibakery-blocks

All the blocks for the Pi Bakery program
GNU General Public License v3.0
242 stars 86 forks source link

Enable serial console #18

Closed CJKohler closed 8 years ago

CJKohler commented 8 years ago

I often use a USB to serial cable to connect to the serial console on the Pi as described here: http://elinux.org/RPi_Serial_Connection This is helpful when there is an issue with network configs.

Right now the SD card I made with pibakery does not have the serial console enabled. I enabled it in raspi-config, advanced, serial (which calls a function do_serial in /usr/bin/raspi-config). The change in my /boot/cmdline.txt file made by raspi-config are as follows:

Original /boot/cmdline.txt dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

With the serial port enabled: dwc_otg.lpm_enable=0 console=tty1 **console=serial0,115200** root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

It would be great to either have a block that enables the serial port, or have it enabled by default in the distribution

davidferguson commented 8 years ago

@CJKohler Disabling/enabling the serial is not something I have a massive amount of experience with - can I just check with you that the do_serial function will do everything required for this?

davidferguson commented 8 years ago

This has now been committed into the repo. I'm planning on pushing a block update this weekend, and the block will be included in that.

CJKohler commented 8 years ago

Thanks, I've tested it on a Pi3 this morning and the serial enabling worked. Thanks!