x86: add upgrade support to diag.sh