Assuming systemd treats ttyAMA0 as a serial port the same way it would treat ttyS0 on a PC, you need to edit the command started by the [email protected].
(You could check if systemctl status serial-getty@ttyAMA0 shows it is active.)
The base version is in /lib/systemd/system/[email protected] and inside it we find the command that starts the getty:
ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
Create an override file for the service to start the agetty with --autologin root: Create the directory /etc/systemd/system/[email protected], and a file called override.conf in it with the following content:
[Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
systemctl edit [email protected] will help with doing this.
Note that the terminal type passed as an argument to agetty needs to match what your serial terminal actually is. This has been the subject of various approaches in systemd over the years. It has variously been hardwired to vt102 and (indirectly) inherited from the kernel/bootstrap loader. The current approach (as of 2020) is rather complex in how it makes its decision.
However, it only eventually picks from the three values linux, vt220, and whatever the kernel/bootstrap loader says for the Linux console. The first is never right for any real terminal, and unlikely to even approximately match a terminal emulator over a serial cable. The second is unlikely to be right, especially when it comes to colour. Neither matches PuTTY, whose correct terminal type is putty (or putty-256color). And the third probably won't be putty, either; unless you've redirected the Linux /dev/console to the serial terminal and PuTTY as well, and properly reconfigured the boot loader with the console terminal type in lockstep.
So for best results you also need to set the TERM environment variable in that override file:
Environment=TERM=putty-256color
Then reload systemd and we can check that the new configuration is in place:
# systemctl daemon-reload # systemctl cat serial-getty\@ttyAMA0 | grep Exec
(we should see the new command on the last ExecStart line.)
If you want to only autologin after a key press, add -p or --login-pause to the agetty command line.
The page you linked talks about configuring automatic login on a virtual console: they are configured through [email protected] and the command line used for agetty is a bit different (it seems to be just missing the --keep-baud option). In that case we would use, say /etc/systemd/system/[email protected]/override.conf for tty1 instead.
There's an answer in Ask Ubuntu with more details about overriding systemd configuration.
On a system with sysvinit instead of systemd, you need to add/modify the line corresponding to the serial port in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 --autologin root 38400 vt100