Skip to content

Commit

Permalink
Remove forece_eeprom_read workaround after initial boot
Browse files Browse the repository at this point in the history
  • Loading branch information
hifiberry committed Mar 30, 2020
1 parent af6c04d commit a7f5b09
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion buildroot/package/hifiberry-tools/detect-hifiberry
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,21 @@ if [ "$FOUND" == "" ]; then
echo "No HiFiBerry card configured, try to probe using I2C" >> /var/log/hifiberry.log

echo "Mounting /boot"
mount /boot
mount -o remount,rw /boot
if [ ! -f /boot/config.txt ]; then
echo "couldn't mount FAT file system, aborting card detection" >> /var/log/hifiberry.log
exit 1
fi

echo "Detecting force_eeprom_read"
FORCEEEPROM=`cat /boot/config.txt | grep force_eeprom_read`
if [ "$FORCEEEPROM" != "" ]; then
cat /boot/config.txt | grep -v force_eeprom_read > /tmp/config.txt
cp /boot/config.txt /boot/config.txt.bak
cp /tmp/config.txt /boot/config.txt
sync
fi

echo "Detecting using I2C"
check_i2c
card=$(detect_card)
Expand Down

0 comments on commit a7f5b09

Please sign in to comment.