I would like the system to output its kernel messages to the serial console (ttyS0) during the boot process and end up with a login prompt on ttyS0.
By default, the image uses the following kernel commandline:
console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1
… which of course doesn't output any kernel messages to ttyS0 — I get no output whatsoever between the U-Boot's "
Uncompressing Linux... done, booting the kernel." and systemd spawning the login prompt.
I figured I just needed to replace
console=ttyS0,115200n8, but then systemd grabs the serial console and squelches the kernel, so I only get the bootloader messages, then systemd's "
[ OK ] Started foo."-style messages, and finally the login prompt.
Is there a way to get both the kernel messages ("
[ 0.000000] foo") and systemd's output on ttyS0?
Or a way to at least mute systemd so I can see the kernel messages if I ever need to debug a boot failure?
I should add that the kernel definitely supports logging to ttyS0: When I replace the entire kernel commandline with
console=ttyS0,115200n8, I get the "
[ 0.000000] foo" messages I want, but the kernel naturally panics because it can't find its rootfs.