Ubuntu installation:

   sudo apt -f -y install ./diag_x86_64.deb

Correct Linux kernel headers (for active kernel) must be installed to build diagnostic driver on-the-fly during installation.


Notes for CentOS 6.x:
 - If you have problems with loading diag driver by insmod (like "Invalid module format" or "Unknown symbol in module"), follow these steps:
   1) Uninstall old diag by "sudo rpm -e diag-*" if needed
   2) Install correct kernel-devel package: sudo yum install "kernel-devel-uname-r == $(uname -r)"
   3) Install diag again: sudo rpm -i --replacepkgs ./diag_2.9_bld_centos6_x86_64.rpm


Note for pre-built aqdiag.ko usage:
 - Load diag driver by this command:
       sudo insmod aqdiag.ko inttype=2 vectors=4


Check if DIAG works:
   $ sudo /opt/aquantia/diag/DIAG --password \!h:ahT8uW6 --flash_fields mac_addr=00-17-b0-00-00-10 -s
   
   FLASH type = Winbond W25Q32
   Starting Read Whole Flash  . Pass
   NCB pointers were updated.
     Bytes: 0x20000
     Bytes: 0x40000

Example for "--clx_mirror" option:
   $ sudo /opt/aquantia/diag/DIAG -s -f /tmp/vryabov/ATL-5G-A0_B0-1.5.44\!EUR-v3.2.6-AQN-108_MDINormal\!PCIROM-2.5.13-d108\!VPD-0.0.1\!59882F84-052\!AQN.clx --clx_mirror
   
   FLASH type = Winbond W25Q32
   Starting Flash Burn
    Correct CRC for NCB block inside image file (ncbCrc == 0xA4AA and crc16Calculated == 0xA4AA)
    Kickstarting MCP
   . Pass

