fix_creothech_batch_2014.sh 676 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#! /bin/sh

# Scan serial number
serial=$1
if [ x$1 = x"" ]; then
	echo -n "Please scan CERN serial number bar-code, then press [ENTER]: "
        read serial
fi

if [ x$serial = x"" ]; then
	echo -n "Serial numer cannot be empty!!"
        exit
fi

if [ -e ../serial.txt ]; then
    sudo rm -f ../serial.txt
fi

echo $serial >> ../serial.txt

# Load bitstream
sudo ./test00.py

# Read eeprom, dump to eeprom_content.out
sudo ./test26.py

# Backup eeprom content
cp eeprom_content.out ../eeprom_bkp/eeprom_$serial.bin

# Save calibration data
sudo sdb-read -e 0x200 eeprom_content.out calib > sdbfs/calib

# Re-write eeprom (new ipmi, saved calibration data)
sudo ./test46.py