rpi: Increase upgrade robustness