]> Zhao Yanbai Git Server - minix.git/commitdiff
only elf/multiboot images
authorBen Gras <ben@minix3.org>
Tue, 1 May 2012 11:55:49 +0000 (13:55 +0200)
committerBen Gras <ben@minix3.org>
Wed, 30 May 2012 22:58:44 +0000 (00:58 +0200)
tools/Makefile
tools/mkboot
tools/release.sh

index 173097d035129a57cd1725d92a3496bda3279d64..eec6e742db13ac47d8170f2535d57e11ea96fe87 100644 (file)
@@ -87,17 +87,13 @@ hdboot: image
        let n=n+1 >/dev/null;                                   \
        [ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0";      \
        newname="/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \
-       cp $$i $$newname;                               \
-       if [ -d /boot/image ];                          \
-       then    ln -f $$newname /boot/`basename $$i`;   \
-       else    strip -s $$newname;                     \
-               gzip $$newname;                         \
-       fi                                              \
+       cp $$i $$newname;                                       \
+       strip -s $$newname;                                     \
+       gzip $$newname;                                         \
        done
        cp ../kernel/kernel /boot/minix/.temp/
        strip -s /boot/minix/.temp/kernel
-       [ -d /boot/image ] && ln -f /boot/minix/.temp/kernel /boot/kernel || true
-       sh mkboot $@ minix
+       sh mkboot $@
        sh ../commands/update_bootcfg/update_bootcfg.sh
 
 fdboot:        image
index 3c48fdeeed4725f7e8e87b9bb1708d7596c87841..ca9d69c8e50b30be1fecaff5eb4189ee7c832485 100755 (executable)
@@ -4,7 +4,7 @@
 #                                                      Author: Kees J. Bot
 
 usage() {
-       echo "Usage: $0 [bootable | hdboot [minix or image] | fdboot [device]]" >&2
+       echo "Usage: $0 [bootable | hdboot | fdboot [device]]" >&2
        exit 1
 }
 
@@ -17,7 +17,7 @@ rotate_oldest() {
                # Not much there, do not remove a thing.
                ;;
        *)
-               # Remove the third-newest $hdboot_t in /boot/$hdboot_t, but
+               # Remove the third-newest image in /boot/$hdboot_t, but
                # only if there's an older one (which is kept). 
                echo "rm $root:$base_dir/$3"
                rm -rf "$base_dir/$3"
@@ -31,20 +31,12 @@ mdec=/usr/mdec      # bootstraps
 
 # Check arguments.
 case "$#:$1" in
-1:bootable | 2:hdboot | [12]:fdboot )
+1:bootable | 1:hdboot | [12]:fdboot )
        action=$1 dev=$2 size=$3
        ;;
 *)     usage
 esac
 
-if [ "$1" = "hdboot" ]
-then
-       if [ "$2" != "image" -a "$2" != "minix" ]
-       then usage
-       fi
-       hdboot_t="$2"
-fi
-
 # Get the device table.
 FSTAB=/etc/fstab
 touch $FSTAB
@@ -77,17 +69,6 @@ esac
 
 case $action in
 hdboot)
-       # Install a new image on the root device.
-       if [ -e $rootdir/boot/$hdboot_t -a ! -d $rootdir/boot/$hdboot_t ]
-       then
-               # /boot/$hdboot_t is not yet a directory!  Fix it.
-               su root -c \
-                   "exec mv $rootdir/boot/$hdboot_t /M"
-               install -d $rootdir/boot/$hdboot_t
-               su root -c \
-                   "exec mv $rootdir/M $rootdir/boot/$hdboot_t/`uname -r`"
-       fi
-
        sh tell_config OS_RELEASE . OS_VERSION >/tmp/mkb.$$
        version=`sed 's/["      ]//g;/^$/d' </tmp/mkb.$$`
 
@@ -119,25 +100,15 @@ hdboot)
 
        target="${version}${rrevision}${gitrev}"
 
-       rotate_oldest "$rootdir/boot/$hdboot_t"
+       rotate_oldest "$rootdir/boot/minix"
 
        # rotate system processes. We assume latest ones are in
        # /boot/modules/.temp and we maintain /boot/modules/ by ourselves.
-       if [ "$hdboot_t" = "minix" ]
-       then
-               [ -d /boot/minix/.temp ] || exit 1
-               rm -rf /boot/minix/"$target"/
-               mv /boot/minix/.temp /boot/minix/"$target"
-               rm -f /boot/minix_latest
-               ln -s minix/"$target" /boot/minix_latest 
-       else
-               # Install the new image.
-               echo "install $hdboot_t $root:/boot/$hdboot_t/$target"
-               install -o root -m 600 $hdboot_t $rootdir/boot/$hdboot_t/$target || exit 1
-
-               # Tell bootloader which image is newest
-               ln -f $rootdir/boot/$hdboot_t/$target $rootdir/boot/${hdboot_t}_latest
-       fi
+       [ -d /boot/minix/.temp ] || exit 1
+       rm -rf /boot/minix/"$target"/
+       mv /boot/minix/.temp /boot/minix/"$target"
+       rm -f /boot/minix_latest
+       ln -s minix/"$target" /boot/minix_latest 
 
        # Save the revision number.
        test "$revision" != "$oldrev" && echo $revision >revision
index 5218833704227fe6e6a1ed66ed906bc4324713ef..2c36dd2d3f920ee59c78167e7b285053b452a9ed 100755 (executable)
@@ -301,10 +301,9 @@ then
        fi
 
        echo " * Removing files to create minimal image"
-       rm -rf $RELEASEDIR/boot/image/* $RELEASEDIR/usr/man/man*/*      \
+       rm -rf $RELEASEDIR/usr/man/man*/*       \
                $RELEASEDIR/usr/share/zoneinfo* $RELEASEDIR/usr/src
        mkdir -p $RELEASEDIR/usr/src/tools
-       ln $RELEASEDIR/boot/image_big $RELEASEDIR/boot/image/$version
 fi
 
 if [ $EXTRAS_INSTALL -ne 0 ] ; then