Index: toolchain.sh
===================================================================
--- toolchain.sh	(リビジョン 82)
+++ toolchain.sh	(作業コピー)
@@ -25,7 +25,7 @@
 # OTHER DEALINGS IN THE SOFTWARE.
 
 # What version of the toolchain are we building?
-TOOLCHAIN_VERSION="3.0"
+TOOLCHAIN_VERSION="3.1.2"
 
 # Everything is built relative to IPHONEDEV_DIR
 IPHONEDEV_DIR="`pwd`"
@@ -121,7 +121,7 @@
 MNT_DIR="${FILES_DIR}/mnt"
 FW_DIR="${FILES_DIR}/firmware"
 
-IPHONE_SDK="iphone_sdk_*_final.dmg"
+IPHONE_SDK="iphone_sdk*.dmg"
 [ -z $IPHONE_SDK_DMG ] && IPHONE_SDK_DMG="${FILES_DIR}/${IPHONE_SDK}"
 
 # URLS
@@ -351,7 +351,7 @@
 
 	# Check which PACKAGE we have to extract. Apple does have different
 	# namings for it, depending on the SDK version. 
-	if [ "${TOOLCHAIN_VERSION}" == "3.0" ] ; then
+	if [ "${TOOLCHAIN_VERSION}" == "3.1.2" ] ; then
 		PACKAGE="iPhoneSDKHeadersAndLibs.pkg"
 	elif [[ "`vercmp $SDK_VERSION $TOOLCHAIN_VERSION`" == "newer" ]]; then
 		PACKAGE="iPhoneSDK`echo $TOOLCHAIN_VERSION | sed 's/\./_/g' `.pkg"
@@ -518,16 +518,18 @@
 		echo "We need the decryption key for `basename $FW_RESTORE_SYSTEMDISK`."
 		echo "I'm going to try to fetch it from $IPHONEWIKI_KEY_URL...."
  
-		DECRYPTION_KEY_SYSTEM=$( wget --quiet -O - $IPHONEWIKI_KEY_URL | awk '\
-			BEGIN { IGNORECASE = 1; }
-			/name="3.0_.28Build_7A341.29"/               { found_3_0 = 1;   }
-			/name="Root_Filesystem"/ && found_3_0        { found_root = 1;  }
-			/title="'${HW_BOARD_CONFIG}'"/ && found_root { found_phone = 1; }
-			/.*<pre>.*$/ && found_phone { 
-				sub(/.*<pre>/,"", $0); 
-				print toupper($0); exit; }
-		')
+#		DECRYPTION_KEY_SYSTEM=$( wget --quiet -O - $IPHONEWIKI_KEY_URL | awk '\
+#			BEGIN { IGNORECASE = 1; }
+#			/name="3.0_.28Build_7A341.29"/               { found_3_0 = 1;   }
+#			/name="Root_Filesystem"/ && found_3_0        { found_root = 1;  }
+#			/title="'${HW_BOARD_CONFIG}'"/ && found_root { found_phone = 1; }
+#			/.*<pre>.*$/ && found_phone { 
+#				sub(/.*<pre>/,"", $0); 
+#				print toupper($0); exit; }
+#		')
 
+         DECRYPTION_KEY_SYSTEM="a8a886d56011d2d98b190d0a498f6fcac719467047639cd601fd53a4a1d93c24e1b2ddc6"
+
 		if [ ! "$DECRYPTION_KEY_SYSTEM" ] ; then
 			error "Sorry, no decryption key for system partition found!"
 			exit 1
@@ -900,6 +902,7 @@
 	message_status "Configuring gcc-4.2-iphone..."
 	mkdir -p "${BUILD_DIR}/gcc-4.2-iphone"
 	cd "${BUILD_DIR}/gcc-4.2-iphone"
+
 	"${GCC_DIR}"/configure \
 		--target="${TARGET}" \
 		--prefix="$PREFIX" \

