uhd/mpm/tools/tlv_eeprom/eeprom-wrapper
Michael Auchter 530cb0a8aa mpm: add tlv_eeprom
Add support for parsing an eeprom that uses tag-length-value to store
contents.

Co-authored-by: Michael Auchter <michael.auchter@ni.com>
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Cristina Fuentes <cristina.fuentes@ni.com>
2021-05-31 05:28:47 -07:00

14 lines
306 B
Bash

#!/bin/bash
set -e
util=$(basename $0)
if [ $# -ge 1 ]; then
symbol=$1
if [ -n "$symbol" ] && [ "${symbol:(-7)}" != "_eeprom" ]; then
symbol="${symbol}_eeprom"
fi
path=$(eeprom-path $symbol)
fi
$util-core $path ${*:2} 2> >( sed "s!-core <\(eeprom\|output_file\)>! <symbol>!" >&2)