Split the (quick hack) boot logic out from main.c to autoboot.c, add a