Applied a patch by Ingo, to strip the debug info from optional packages.
To note, the reduction of block size from 2048 to 1024 was not applied. Introduced a new build variable HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES, which will allow users to enable/disable that functionality. In the alpha-* and nightly-* profiles, it is enabled. Reduced the image size for alpha-* to 690M. The size for nightly images was left untouched. +alpha3 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41812 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
105fd85c3a
commit
b8c41a1ad8
@ -28,6 +28,8 @@ AddVariableToScript $(script) : isCD : 1 ;
|
||||
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 ;
|
||||
|
@ -153,7 +153,7 @@ SYSTEM_ADD_ONS_PRINT =
|
||||
PS\ Compatible
|
||||
Preview
|
||||
;
|
||||
SYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR
|
||||
SYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR
|
||||
# Parallel\ Port
|
||||
Print\ To\ File Serial\ Port USB\ Port
|
||||
;
|
||||
@ -783,6 +783,8 @@ AddVariableToScript $(script) : addBuildCompatibilityLibDir
|
||||
: $(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 ;
|
||||
|
@ -16,7 +16,8 @@ switch $(HAIKU_BUILD_PROFILE) {
|
||||
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 @@ switch $(HAIKU_BUILD_PROFILE) {
|
||||
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 ;
|
||||
|
@ -62,6 +62,9 @@ HAIKU_IMAGE_NAME = walter.image ;
|
||||
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 ;
|
||||
|
||||
|
@ -16,6 +16,7 @@ set -o errexit
|
||||
# dontClearImage
|
||||
# isVMwareImage
|
||||
# optionalPackageDescriptions
|
||||
# stripOptionalPackageDebugSymbols
|
||||
#
|
||||
# addattr
|
||||
# copyattr
|
||||
@ -141,6 +142,20 @@ else
|
||||
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 @@ extractFile()
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user