dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Wiki > Main > AutomaticChecking (compare)

Difference: AutomaticChecking (r4 vs. r3)

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. Also, set "h10_20GB" to 1 if it is a 20GB model, or to 0 if not.

#!/bin/bash h10=/media/H10 h10_20GB=1 #h10_20GB=0 if [[ "${h10_20GB}" == "1" ]]; then h10_fw=H10_20GC.mi4 else h10_fw=H10.mi4 fi # 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"" exit else echo "OK - IRiver H10 mounted as UMS..." fi # Check the bootloader cd $h10 if [[ ! -e $h10/System/${h10_fw} ]]; then echo "FAILED - Rockbox Bootloader ($h10/System/${h10_fw}) missing" echo "See"" exit else rbfw=`grep -i rockbox $h10/System/${h10_fw}` if [[ ! -n $rbfw ]]; then echo "FAILED - Bootloader $h10/System/${h10_fw} is present but doesn't seems to be Rockbox's" echo "Please install the Rockbox bootloader" echo "See"" 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"" 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" echo "from 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"" else if [[ ! -e /tmp/mi4code/mi4code ]]; then mkdir -p /tmp/mi4code cd /tmp/mi4code if [[ ! -e mi4code.c ]]; then wget fi gcc -o mi4code mi4code.c -lgcrypt fi 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 """ 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" 

r4 - 07 May 2007 - 20:31:06 - NathanHepting

Revision r4 - 07 May 2007 - 20:31 - NathanHepting
Revision r3 - 08 Mar 2007 - 22:40 - LinusNielsenFeltzing
Copyright by the contributing authors.