|
|
|
|
This script will check if dual-booting is correctly set.
Please modify the "h10" variable at the begining of this script to point to your iriver H10 (UMS) mount point.
#!/bin/bash
h10=/media/H10
# Test if mounted
h10_mounted=`mount | grep $h10`
if [[ ! -n $h10_mounted ]]; then
echo "FAILED - IRiver H10 not mounted as Universal Mass Storage (UMS)"
echo "Please use the UMS trick to mount device"
echo "See http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Installing_the_boot_loader"
exit
else
echo "OK - IRiver H10 mounted as UMS..."
fi
# Check the bootloader
cd $h10
if [[ ! -e $h10/System/H10.mi4 ]]; then
echo "FAILED - Rockbox Bootloader ($h10/System/H10.mi4) missing"
echo "See http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Installing_the_boot_loader"
exit
else
rbfw=`grep -i rockbox $h10/System/H10.mi4`
if [[ ! -n $rbfw ]]; then
echo "FAILED - Bootloader $h10/System/H10.mi4 is present but doesn't seems to be Rockbox's"
echo "Please install the Rockbox bootloader"
echo "See http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Installing_the_boot_loader"
exit
fi
echo "OK - Rockbox bootloader is installed"
fi
# Check the firmware
rbpresent=`ls $h10/.rockbox 2>&1 | grep ls`
if [[ "$rbpresent" != "" ]]; then
echo "FAILED - Rockbox ($h10/.rockbox) missing"
echo "See http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Installing_the_firmware"
exit
fi
if [[ ! -e $h10/rockbox.h10 ]]; then
echo "FAILED - Rockbox ($h10/rockbox.h10) missing"
echo "Some daily builds don't include the file rockbox.h10"
echo "Please download http://build.rockbox.org/dist/build-h10_5gb/rockbox.zip"
echo "from http://build.rockbox.org/ and unzip to $h10"
exit
fi
echo "OK - Rockbox firmware is installed"
# Check original firmware for dual-booting (optional)
if [[ ! -e $h10/System/OF.bin ]]; then
echo "Decrypted original firmware not present ($h10/System/OF.bin)"
echo "If you want to dualboot (IRiver/Rockbox) you need to install"
echo "an iriver's decrypted firmware."
echo "Please see http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Preparing_for_dual_booting_to_th"
else
decrypted=`/tmp/mi4code/mi4code verify $h10/System/OF.bin 2>&1 | grep -i invalid`
if [[ "$decrypted" == "" ]]; then
echo "FAILED - Your iriver's firmware ($h10/System/OF.bin) is not decrypted!"
echo "Please decrypt it using mi4code"
echo "See http://www.rockbox.org/twiki/bin/view/Main/H10InstallationBeta#Preparing_for_dual_booting_to_th"
fi
iriver_fw=`grep -i rockbox $h10/System/OF.bin`
if [[ "$iriver_fw" != "" ]]; then
echo "FAILED - File $h10/System/OF.bin is present but"
echo "it is not orignal (decrypted) Iriver firmware!"
echo "Please put it back to place and decrypt!"
exit
fi
fi
echo "OK - Original iriver's firmware is in place and ready to dualboot"
r1 - 17 Feb 2007 - 18:02:57 - NicolasBigaouette?
Copyright © by the contributing authors.
|