To use the console UART as a generic serial port on ODROID-HC1/HC2/XU4/XU3/XUQ, you need to modify u-boot code.
You can use UART2 (ttySAC2) as a serial port by modifying the u-boot and kernel console settings to another hidden port like UART1(ttySAC1).

To do this task requires an Ethernet connection and ssh login.
See the link below for instructions.
Headless setup

Kernel console option

Kernel console options can be changed by modifying the boot.ini file.

Login using ssh

On your Linux PC, type “ssh odroid@xxx.xxx.xxx.xxx” It will then prompt for your password. Type in the default password: odroid

ckkim@ck-desktop:~$ ssh odroid@xxx.xxx.xxx.xxx
odroid@192.168.10.7s password: 
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.9.44-54 armv7l)
 
 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
 
68 packages can be updated.
0 updates are security updates.
 
Last login: Tue Oct 17 06:37:54 2017 from 192.168.10.4
odroid@odroid:~$ 


Edit boot.ini file to disable Kernel message from UART2

odroid@odroid:~$ sudo nano /media/boot/boot.ini

Find the bootrootfs environment and change the console options as follows:
console=ttySAC1

#------------------------------------------------------------------------------------------------------
# Basic Ubuntu Setup. Don't touch unless you know what you are doing.
# --------------------------------
setenv bootrootfs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"

Save & reboot

odroid@odroid:~$ sudo reboot

If you have done, You can see the only outputs u-boot messages. No kernel messages.

U-Boot 2017.05-00004-g88af53fb (Oct 17 2017 - 05:42:16 +0000) for ODROID-XU4
 
CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU4 based on EXYNOS5422
Board: Odroid XU4 based on EXYNOS5422
Type:  xu4
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
MMC Device 0 ( SD ): 29.8 GiB
mmc_init: -5, time 4
*** Warning - bad CRC, using default environment
 
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Press quickly 'Enter' twice to stop autoboot:  0 
reading boot.ini
9088 bytes read in 4 ms (2.2 MiB/s)
cfgload addr = 0x50000000, Loading boot.ini from FAT
cfgload: applying boot.ini...
cfgload: setenv initrd_high "0xffffffff"
cfgload: setenv fdt_high "0xffffffff"
cfgload: setenv macaddr "00:1e:06:61:7a:39"
cfgload: setenv vout "hdmi"
cfgload: setenv cecenable "false" # false or true
cfgload: setenv disable_vu7 "false" # false
cfgload: setenv governor "performance"
cfgload: setenv ddr_freq 825
cfgload: setenv external_watchdog "false"
cfgload: setenv external_watchdog_debounce "3"
cfgload: setenv HPD "true"
cfgload: setenv bootrootfs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifna"
cfgload: fatload mmc 0:1 0x40008000 zImage
reading zImage
4793816 bytes read in 284 ms (16.1 MiB/s)
cfgload: fatload mmc 0:1 0x42000000 uInitrd
reading uInitrd
9748049 bytes read in 573 ms (16.2 MiB/s)
cfgload: if test "${board_name}" = "xu4"; then fatload mmc 0:1 0x44000000 exynos5422-odroidxu4.dtb; setenv fdtloaded "true"; fi
reading exynos5422-odroidxu4.dtb
61570 bytes read in 10 ms (5.9 MiB/s)
cfgload: if test "${board_name}" = "xu3"; then fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb; setenv fdtloaded "true"; fi
cfgload: if test "${board_name}" = "xu3l"; then fatload mmc 0:1 0x44000000 exynos5422-odroidxu3-lite.dtb; setenv fdtloaded "true"; fi
cfgload: if test "${fdtloaded}" != "true"; then fatload mmc 0:1 0x44000000 exynos5422-odroidxu4.dtb; fi
cfgload: fdt addr 0x44000000
cfgload: setenv hdmi_phy_control "HPD=${HPD} vout=${vout}"
cfgload: if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi
cfgload: if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
cfgload: if test "${external_watchdog}" = "true"; then setenv external_watchdog "external_watchdog=${external_watchdog} external_watchdog_debounce=${i
cfgload: setenv bootargs "${bootrootfs} ${videoconfig} ${hdmi_phy_control} ${hid_quirks} smsc95xx.macaddr=${macaddr} ${external_watchdog} governor=${"
cfgload: dmc ${ddr_freq}
cfgload: bootz 0x40008000 0x42000000 0x44000000
Kernel image @ 0x40008000 [ 0x000000 - 0x4925d8 ]
## Loading init Ramdisk from Legacy Image at 42000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    9747985 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 44000000
   Booting using the fdt blob at 0x44000000
   Using Device Tree in place at 44000000, end 44012081
 
Starting kernel ...

If you want to remove of u-boot messages, you must modify and compile the u-boot code.
Please follow the instructions below to rebuild the u-boot for ODROID. Those instructions cover native build of the u-boot.

Login using ssh

Type in the default password: odroid

ckkim@ck-desktop:~$ ssh odroid@xxx.xxx.xxx.xxx

Install dependencies

odroid@odroid:~$ sudo apt install build-essential libqt4-dev libncurses5-dev device-tree-compiler git

Checkout & modify code

odroid@odroid:~$ git clone https://github.com/hardkernel/u-boot.git -b odroidxu4-v2017.05
odroid@odroid:~$ cd u-boot
odroid@odroid:~/u-boot$ git branch -a
* odroidxu4-v2017.05
  remotes/origin/HEAD -> origin/odroid-v2010.12
  remotes/origin/master
  remotes/origin/odroid-next
  remotes/origin/odroid-v2010.12
  remotes/origin/odroid-v2012.07
  remotes/origin/odroid-v2015.10
  remotes/origin/odroidc-v2011.03
  remotes/origin/odroidc2-v2015.01
  remotes/origin/odroidxu3-v2012.07
  remotes/origin/odroidxu4-v2017.05
odroid@odroid:~/u-boot$
odroid@odroid:~/u-boot$ nano arch/arm/dts/exynos5422-odroidxu4.dts

To find the 'console' node and modify it as shown below. Bypass the console to the UART not used by ODROID-HC1.
The purpose of this is to use HW connected UART2 as a serial port.
“/serial@12C00000” UART0 Not used
“/serial@12C10000”
UART1 Not used
“/serial@12C20000” UART2 The debug serial is connected from UART2.
“/serial@12C30000”
UART3 Not used

If you do this, ssh is the only way to communicate with odroid-board.
The debug console has no output and no input.

        aliases {
                serial0 = "/serial@12C00000";
                console = "/serial@12C10000";
        };

Save & compile

Before you compile U-boot, you must configure for ODROID-XU3/4 with following command.

odroid@odroid:~/u-boot$ make odroid-xu4_defconfig
odroid@odroid:~/u-boot$ make

Then you can start to build u-boot image, u-boot-dtb.bin. This will create u-boot/u-boot-dtb.bin. You can also add -j option for fast compile.

Installation

If boot device is eMMC : “/dev/mmcblk0”
If boot device is u-SD : “/dev/mmcblk1”

odroid@odroid:~/u-boot$ cd sd_fuse/
odroid@odroid:~/u-boot/sd_fuse$ ./sd_fusing.sh /dev/mmcblk1
++ '[' -z /dev/mmcblk1 ']'
++ '[' -b /dev/mmcblk1 ']'
++ echo '/dev/mmcblk1 reader is identified.'
/dev/mmcblk1 reader is identified.
++ '[' -d /sys/block/mmcblk1boot0 ']'
++ '[' -n '' ']'
++ signed_bl1_position=1
++ bl2_position=31
++ uboot_position=63
++ tzsw_position=1503
++ device=/dev/mmcblk1
++ env_position=2015
++ '[' -f ./u-boot-dtb.bin ']'
++ '[' -f ./u-boot.bin ']'
++ '[' -f ../u-boot-dtb.bin ']'
++ uboot=../u-boot-dtb.bin
++ echo 'BL1 fusing'
BL1 fusing
++ sudo dd iflag=dsync oflag=dsync if=./bl1.bin.hardkernel of=/dev/mmcblk1 seek=1
30+1 records in
30+1 records out
15616 bytes (16 kB, 15 KiB) copied, 0.0524816 s, 298 kB/s
++ echo 'BL2 fusing'
BL2 fusing
++ sudo dd iflag=dsync oflag=dsync if=./bl2.bin.hardkernel.720k_uboot of=/dev/mmcblk1 seek=31
28+1 records in
28+1 records out
14592 bytes (15 kB, 14 KiB) copied, 0.0257337 s, 567 kB/s
++ echo 'u-boot fusing'
u-boot fusing
++ sudo dd iflag=dsync oflag=dsync if=../u-boot-dtb.bin of=/dev/mmcblk1 seek=63
1210+1 records in
1210+1 records out
619598 bytes (620 kB, 605 KiB) copied, 1.44196 s, 430 kB/s
++ echo 'TrustZone S/W fusing'
TrustZone S/W fusing
++ sudo dd iflag=dsync oflag=dsync if=./tzsw.bin.hardkernel of=/dev/mmcblk1 seek=1503
512+0 records in
512+0 records out
262144 bytes (262 kB, 256 KiB) copied, 0.452685 s, 579 kB/s
++ echo 'u-boot env erase...'
u-boot env erase...
++ sudo dd iflag=dsync oflag=dsync if=/dev/zero of=/dev/mmcblk1 seek=2015 bs=512 count=32
32+0 records in
32+0 records out
16384 bytes (16 kB, 16 KiB) copied, 0.030801 s, 532 kB/s
++ echo 'U-boot image is fused successfully.'
U-boot image is fused successfully.
++ echo 'Eject /dev/mmcblk1 and insert it again.'
Eject /dev/mmcblk1 and insert it again.
odroid@odroid:~/u-boot/sd_fuse$ sudo 

Reboot

odroid@odroid:~/u-boot/sd_fuse$ sudo reboot

If you have done, No messages to debug port. You can use ttySAC2 as a generic UART serial port.
However, Exynos5422 UART IO voltage is 1.8V. Be careful with the hardware connections.

You don't need to disable the Rx/Tx function by editing/compiling device-tree file.
Just export the GPIOs and they will work in GPIO mode.

UART2.RXD - GPA1.0 - 179(GPIO Export Number) - CON1.3
UART2.TXD - GPA1.1 - 180(GPIO Export Number) - CON1.2

Once you export it, you can confirm it with cat /sys/kernel/debug/gpio output.