Remove forece_eeprom_read workaround after initial boot
@@ -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)
