miner: Drop debug info
rpi: Fix various bugs in the upgrade code