Disabling console i/o on Android Marshmallow

For a project I’m working on, I built a mezzanine PCB that includes a bi-directional 1V8 <-> 3V3 level shifter to interface a Teensy microcontroller board with the Dragonboard over UART. I didn’t pay attention while designing it, so I hardwired it to UART1, which is taken up by the console I/O. For the next iteration I can easily change it to use UART0, but for now I’d like to disable the console I/O on UART1.

I’ve understood that this can be disabled through the kernel cmdline and also found the reference to ttyHSL0 in /proc/cmdline, but where in the Android (M) source (codeaurora repo) do I find this?

Please follow below steps

1)we remove the flag “CONFIG_SERIAL_MSM_HSL_CONSOLE”.
2)We remove the dtsi configuration So we can use the same GPIO for other purpose.
3)Removed the console port ttyHSL0 from BOARD_KERNEL_CMDLINE (BoardConfig.mk).

Thanks.

  1. Which file should I be editing to remove CONFIG_SERIAL_MSM_HSL_CONSOLE? msm_defconfig?
  2. I plan to keep using it for UART so I guess I shouldn’t be doing this, right?
  3. Ok thanks!

Hi @Genoil

if you were running Debian, I think the only thing you would need to do is change the command line to reroute the console (mostly - more on this below) to the other tty port.

Rebuild the kernel by following the steps here: http://releases.linaro.org/96boards/dragonboard410c/linaro/debian/latest/ When you get to the mkbootimg step change the command line from MSM0 to MSM1,

–cmdline “root=/dev/disk/by-partlabel/rootfs rw rootwait console=ttyMSM1,115200n8”

This will move the console to the other port, once the system is up and running you will be fine, but there is a minor issue. The early bootloaders will spit out messages on ttyMSM0 because you haven’t moved their console port. I think you can work around this by having the Teensy ignore all serial data for the first 10 or 15 seconds after power-on. Once the system is up and running everything should be fine.

Your HW solution is the correct long term solution. the short term solution of moving the console will be enough to get you up and running.

Full Disclosure: I am currently an employee of Qualcomm Canada and any opinions I may have left in this or any other post do not necessarily match the opinions of my employer. As of May 22nd/2018 I will no longer be employed by Qualcomm Canada. Currently looking for new opportunities, you can contact my personal email through the forums at 96Boards.