Skip to content

Node-locked images for commercial SD-card images and bitstreams

Some SD-card images are based on commercial/proprietary products (specifically the bitstream on the FPGA fabric). Depending on the licence of the product the SD card may work only on PYNQ boards that are authorised to do so. The SD-card image either already contains a licence file, or you may have to upload yourself. All PYNQs contain a unique identifier, called its DNA, and the FPGA bitstream checks if the DNA is in the licence file.

  • Configure the PYNQ board.
  • Connect to the PYNQ and log in using Visual Studio Code, MobaXterm, or ssh.
  • Extract the DNA that is unique to your PYNQ board by executing the following command in the terminal:
    cat /proc/BitSecureDriver
    
    which should result in something like this:
    DNA: 097114C0X0X7854
    BitID: E59BAXDD
    
  • Send these two lines of text to the lecturer, who will send you licence file (e.g. licence-new.txt).
  • Copy the licence file to /home/student/licence-new.txt on the PYNQ board.
  • On the PYNQ board, we first make a backup of the original licence file and then copy the new licence file to the right place:
    cp /boot/licence.txt licence-orig.txt # make backup
    sudo cp /home/student/licence-new.txt /boot/licence.txt # copy new
    
  • After rebooting the PYNQ you can use the new bitfile.
  • To check that you have installed the right licence file on the PYNQ board immediately after booting run the dmesg command:
    • You may see a number of Invalid licence key, skipping which can be ignored.
    • There must be a line statingValid licence key found and Load licence key that indicate that your PYNQ board is licensed. If you do not see this line then your board is not in the licence file.
    • Pro tip: use
      dmesg | egrep '(Valid|Load)