Prevent the bootloader from clearing the MCUSR register. The programm sould know the reset reason to.