#!/usr/bin/bash if [ $# -eq 0 ] then echo "usage: setpcode [0|4]" echo "Sets the pcode for disc application." exit 0 fi if [ $1 != "0" -a $1 != "4" ] then echo "Illegal argument. Do nothing and exit." exit 1 fi if [ $1 = "0" ] then PPARA=0x0 elif [ $1 = "4" ] then PPARA=0x4 fi for i in "$REVOLUTION_SDK_ROOT"/X86/bin/rvl*.bin do if [ -e $i ] then if ! $REVOLUTION_SDK_ROOT/x86/bin/rvlbinconv -f "$i" -pc $PPARA then echo "Failed to set the pcode for disc application." exit 1 fi fi done echo "Successfully done. Set the pcode for disc application to $1." echo echo "**********************************************************************" echo "* If you make master data, you must execute ndrun before you do so!! *" echo "**********************************************************************" echo