cli: Added hooks to flash firmware.