]> Zhao Yanbai Git Server - minix.git/commitdiff
Add -M release.sh option to write out a symbol map, either to /usr/src on the image...
authorErik van der Kouwe <erik@minix3.org>
Mon, 17 May 2010 16:52:48 +0000 (16:52 +0000)
committerErik van der Kouwe <erik@minix3.org>
Mon, 17 May 2010 16:52:48 +0000 (16:52 +0000)
tools/chrootmake.sh
tools/release.sh

index f973782da571caa574a622b88b03bc10028e2e6e..eedd4c27a00151dc9ed3bad0492308b411cf1e56 100755 (executable)
@@ -11,6 +11,9 @@ make install
 cp /boot/image/* /boot/image_big  # Make big image accessible by this name
 cp ../boot/boot /boot/boot 
 cd /usr/src 
+if [ $MAKEMAP -ne 0 ]; then
+       find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
+fi
 make clean
 # Let man find the manpages
 makewhatis /usr/man
index b4cb81aaa08cf98e72d1b6a145bb62e89858fe7b..7815683db260936310f9692bd4b584139dbfa533 100755 (executable)
@@ -131,15 +131,16 @@ SVNREV=""
 REVTAG=""
 PACKAGES=1
 MINIMAL=0
+MAKEMAP=0
 ROOTKB=8192
 
 FILENAMEOUT=""
 
-while getopts "s:pmchu?r:f:" c
+while getopts "s:pmMchu?r:f:" c
 do
        case "$c" in
        \?)
-               echo "Usage: $0 [-p] [-c] [-h] [-m] [-r <tag>] [-u] [-f <filename>] [-s <username>]" >&2
+               echo "Usage: $0 [-p] [-c] [-h] [-m] [-M] [-r <tag>] [-u] [-f <filename>] [-s <username>]" >&2
                exit 1
        ;;
        h)
@@ -176,6 +177,8 @@ do
                ROOTKB=4096
                [ ! "$USRMB" ] && USRMB=22
                ;;
+       M)      MAKEMAP=1
+               ;;
        esac
 done
 
@@ -351,7 +354,7 @@ cp $RELEASEDIR/usr/src/etc/mk/* $RELEASEDIR/etc/mk/
 chown -R root $RELEASEDIR/etc/mk
 echo " * Chroot build"
 cp chrootmake.sh $RELEASEDIR/usr/$SRC/tools/chrootmake.sh
-chroot $RELEASEDIR "PATH=/$XBIN sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1
+chroot $RELEASEDIR "PATH=/$XBIN MAKEMAP=$MAKEMAP sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1
 # Copy built images for cd booting
 cp $RELEASEDIR/boot/image_big image
 echo " * Chroot build done"
@@ -372,6 +375,13 @@ fi
 echo $version_pretty, SVN revision $REVISION, generated `date` >$RELEASEDIR/etc/version
 if [ $MINIMAL -ne 0 ]
 then
+       if [ "$MAKEMAP" -ne 0 ]
+       then
+               echo " * Copying symbol map to ${IMG}-symbols.txt"
+               cp $RELEASEDIR/usr/src/symbols.txt ${IMG}-symbols.txt
+               $ZIP -f ${IMG}-symbols.txt
+       fi
+
        echo " * Removing files to create minimal image"
        rm -rf $RELEASEDIR/boot/image/* $RELEASEDIR/usr/man/man*/*      \
                $RELEASEDIR/usr/share/zoneinfo* $RELEASEDIR/usr/src     \