Index: ../haiku/build/jam/HaikuImage
===================================================================
--- ../haiku/build/jam/HaikuImage	(revision 41789)
+++ ../haiku/build/jam/HaikuImage	(working copy)
@@ -783,6 +783,8 @@
 	: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
 AddVariableToScript $(script) : dontClearImage : $(HAIKU_DONT_CLEAR_IMAGE) ;
 AddVariableToScript $(script) : updateOnly : [ IsUpdateHaikuImageOnly ] ;
+AddVariableToScript $(script) : stripOptionalPackageDebugSymbols
+	: $(HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES) ;
 AddTargetVariableToScript $(script) : <build>addattr ;
 AddTargetVariableToScript $(script) : <build>bfs_shell : bfsShell ;
 AddTargetVariableToScript $(script) : <build>fs_shell_command : fsShellCommand ;
Index: ../haiku/build/jam/HaikuCD
===================================================================
--- ../haiku/build/jam/HaikuCD	(revision 41789)
+++ ../haiku/build/jam/HaikuCD	(working copy)
@@ -28,6 +28,8 @@
 AddVariableToScript $(script) : cdLabel : $(HAIKU_CD_LABEL) ;
 AddVariableToScript $(script) : addBuildCompatibilityLibDir
 	: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
+AddVariableToScript $(script) : stripOptionalPackageDebugSymbols
+	: $(HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES) ;
 AddTargetVariableToScript $(script) : <build>addattr ;
 AddTargetVariableToScript $(script) : <build>copyattr ;
 AddTargetVariableToScript $(script) : <build>rc ;
Index: ../haiku/build/jam/UserBuildConfig.ReadMe
===================================================================
--- ../haiku/build/jam/UserBuildConfig.ReadMe	(revision 41789)
+++ ../haiku/build/jam/UserBuildConfig.ReadMe	(working copy)
@@ -62,6 +62,9 @@
 HAIKU_IMAGE_DIR		= /tmp ;
 HAIKU_IMAGE_SIZE	= 100 ;
 
+# Enable stripping the debug symbols from optional packages.
+HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES = 1 ;
+
 # Set image volume label to "Walter". Default label is "Haiku".
 HAIKU_IMAGE_LABEL	= Walter ;
 
Index: ../haiku/build/jam/ReleaseBuildProfiles
===================================================================
--- ../haiku/build/jam/ReleaseBuildProfiles	(revision 41789)
+++ ../haiku/build/jam/ReleaseBuildProfiles	(working copy)
@@ -16,7 +16,8 @@
 		HAIKU_ROOT_USER_REAL_NAME = "Yourself" ;
 		AddGroupToHaikuImage party : 101 : user sshd ;
 		HAIKU_IMAGE_HOST_NAME = shredder ;
-		HAIKU_IMAGE_SIZE = 790 ;
+		HAIKU_IMAGE_SIZE = 690 ;
+		HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES = 1 ;
 
 		AddOptionalHaikuImagePackages TimGMSoundFont TrackerNewTemplates
 			WQY-MicroHei ;
@@ -38,6 +39,7 @@
 		AddGroupToHaikuImage party : 101 : user sshd ;
 		HAIKU_IMAGE_HOST_NAME = shredder ;
 		HAIKU_IMAGE_SIZE = 500 ;
+		HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES = 1 ;
 
 		AddOptionalHaikuImagePackages Pe Nano Vision P7zip XZ-Utils ;
 		AddOptionalHaikuImagePackages Development Subversion OpenSSH OpenSSL ;
Index: ../haiku/build/scripts/build_haiku_image
===================================================================
--- ../haiku/build/scripts/build_haiku_image	(revision 41789)
+++ ../haiku/build/scripts/build_haiku_image	(working copy)
@@ -16,6 +16,7 @@
 # dontClearImage
 # isVMwareImage
 # optionalPackageDescriptions
+# stripOptionalPackageDebugSymbols
 #
 # addattr
 # copyattr
@@ -141,6 +142,20 @@
 fi
 
 
+stripDebugInfo()
+{
+	file="$1"
+
+	# Determine whether the file is an ELF file by checking the ELF signature,
+	# or at least the printable characters.
+	elfMarker=`dd "if=$file" bs=1 skip=1 count=3 2> /dev/null`
+	if [ "$elfMarker" = 'ELF' ]; then
+		# make user-writable first -- some files aren't
+		chmod u+w "$file"
+		strip --strip-debug "$file"
+	fi
+}
+
 extractFile()
 {
 	# extractFile <archive> <directory>
@@ -173,6 +188,24 @@
 		rm $extractDir/.OptionalPackageDescription
 	fi
 
+	if [ "$stripOptionalPackageDebugSymbols" = "1" ]; then
+		# strip executables in common/bin
+		if [ -d $extractDir/common/bin ]; then
+			for file in `find $extractDir/common/bin -type f -a -perm +100 \
+					-a -size +1k`; do
+				stripDebugInfo "$file"
+			done
+		fi
+
+		# strip libraries in common/lib
+		if [ -d $extractDir/common/lib ]; then
+			for file in `find $extractDir/common/lib -type f -a -size +1k \
+					-a -name lib\*`; do
+				stripDebugInfo "$file"
+			done
+		fi
+	fi
+
 	$cp -r "${sPrefix}$extractDir/$extractedSubDir/." "${tPrefix}$targetExtractedDir"
 
 	$rmAttrs -rf "$extractDir"
@@ -216,7 +249,7 @@
 		fi
 
 		$bfsShell --initialize $imageOffsetFlags "$imagePath" \
-			"$imageLabel" "block_size 2048"
+			"$imageLabel" "block_size 1024"
 		$makebootable $imageOffsetFlags "$imagePath"
 	fi
 
Index: ../haiku/src/system/kernel/device_manager/IOCache.cpp
===================================================================
--- ../haiku/src/system/kernel/device_manager/IOCache.cpp	(revision 41789)
+++ ../haiku/src/system/kernel/device_manager/IOCache.cpp	(working copy)
@@ -380,12 +380,20 @@
 			status_t error = _TransferPages(firstMissing - firstPageOffset,
 				missingPages, false, isVIP);
 			if (error != B_OK) {
+				dprintf("IOCache::_TransferRequestLine(): Failed to read into "
+					"cache (offset: %" B_PRIdOFF ", length: %" B_PRIuSIZE "), "
+					"trying uncached read (offset: %" B_PRIdOFF ", length: %"
+					B_PRIuSIZE ")\n", (off_t)firstMissing * B_PAGE_SIZE,
+					(size_t)missingPages * B_PAGE_SIZE, requestOffset,
+					requestLength);
+
 				_DiscardPages(firstMissing - firstPageOffset, missingPages);
 
-				dprintf("IOCache: falling back to uncached transfer, offset %"
-					B_PRIiOFF ", length %" B_PRIuSIZE "\n", requestOffset,
-					requestLength);
 
+//				dprintf("IOCache: falling back to uncached transfer, offset %"
+//					B_PRIiOFF ", length %" B_PRIuSIZE "\n", requestOffset,
+//					requestLength);
+
 				// Try again using an uncached transfer
 				return _TransferRequestLineUncached(request, lineOffset,
 					requestOffset, requestLength);
Index: ../haiku/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp
===================================================================
--- ../haiku/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp	(revision 41789)
+++ ../haiku/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp	(working copy)
@@ -28,7 +28,7 @@
 #include "IOSchedulerSimple.h"
 
 
-//#define TRACE_CD_DISK
+#define TRACE_CD_DISK
 #ifdef TRACE_CD_DISK
 #	define TRACE(x...) dprintf("scsi_cd: " x)
 #else
