To my surprise htop became black and white. dmesg from util-linux as well became BW by default. I’m not familiar with all consoles and terminal nuisances. What can I do to restore colors?
Update: echo $TERM returns vt220. I see serial-getty@.service is different, older one sets TERM=xterm, and a new one leaves it unset. So one of solutions could be bbappend something to patch serial-getty@.service. Or perhaps the more right way creating override file for serial-getty@.service with TERM set, like suggested here. Seems working.
When logging in via serial (e.g. using Minicom), I was able to reproduce it. The default for TERM was vt220. In this case, htop and dmesg was black and white. htop was still using bold to highlight some stuff.
After executing export TERM=xterm, htop became colorful, but dmesg remained colorless.
But, when logging via ssh, TERM was screen-256color and htop was colorful. dmesg again was colorless.
dmesg is part of busybox, which does not seem to be implemented with color. So, if you need colorful dmesg, you will need to add util-linux to your build (which seems like you are already doing).
Instead of modifying the serial-getty@.service, you can also:
add TERM=<terminal> to your /etc/profile, or
add export TERM=<terminal> to your ~/.bashrc
The possible <terminal> values can be found in /etc/terminfo: