Booting the system without asking for the user login


I dont want to be asked for the user login everytime I boot the system with a ccimx6ulsbc pro with yocto image. I would like to be always root so I want to start being root automaticaly without being asked.

How can I do that?

I have solved this with the following lines in the /etc/inittab:
1:2345:respawn:/bin/login -f root ttymxc4 /dev/ttymxc4 2>&1