Bootloader rewrite for simplicity