Ah, ok. DD-WRT does not have the necessary drivers to work with SCSI controllers. In VirtualBox it was working with IDE controller, and when I switched to SCSI, it keeps rebooting the same way it does on ESXi.
The problem is that ESXi has only SCSI contrllers, no IDE.
Well, that's a dead end.
Support for SCSI controllers should be a priority for the x86 images. OpenWRT already has it and boots flawlessly on ESXi.