Subversion Repositories SvarDOS

Rev

Rev 847 | Rev 852 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 847 Rev 849
Line 73... Line 73...
73
# prepares image for floppy sets of:
73
# prepares image for floppy sets of:
74
# $1 cylinders
74
# $1 cylinders
75
# $2 heads (sides)
75
# $2 heads (sides)
76
# $3 sectors per track
76
# $3 sectors per track
77
# $4 size
77
# $4 size
-
 
78
# $5 working directory (for temporary files etc)
78
# $5 where to put a copy of the image (optional)
79
# $6 where to put a copy of the image (optional)
79
function prep_flop {
80
function prep_flop {
-
 
81
  WORKDIR="$5/$4"
80
  mkdir $4
82
  mkdir "$WORKDIR"
81
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$4/disk1.img"
83
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$WORKDIR/disk1.img"
82
  mcopy -sQm -i "$4/disk1.img" "$FLOPROOT/"* ::/
84
  mcopy -sQm -i "$WORKDIR/disk1.img" "$FLOPROOT/"* ::/
83
 
85
 
84
  # now populate the floppies
86
  # now populate the floppies
85
  curdisk=1
87
  curdisk=1
86
  for p in $ALLPKGS ; do
88
  for p in $ALLPKGS ; do
87
    # if copy fails, then probably the floppy is full - try again after
89
    # if copy fails, then probably the floppy is full - try again after
88
    # creating an additional floppy image
90
    # creating an additional floppy image
89
    if ! mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
91
    if ! mcopy -mi "$WORKDIR/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
90
      curdisk=$((curdisk+1))
92
      curdisk=$((curdisk+1))
91
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$4/disk$curdisk.img"
93
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$WORKDIR/disk$curdisk.img"
92
      mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/
94
      mcopy -mi "$WORKDIR/disk$curdisk.img" "$CDROOT/$p.svp" ::/
93
    fi
95
    fi
94
  done
96
  done
95
 
97
 
96
  # add a short readme
98
  # add a short readme
97
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$4/readme.txt"
99
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$WORKDIR/readme.txt"
98
  echo "" >> "$4/readme.txt"
100
  echo "" >> "$WORKDIR/readme.txt"
99
  echo "These images are raw floppy disk dumps. To write them on an actual floppy disk, you have to use a low-level sector copying tool, like dd." >> "$4/readme.txt"
101
  echo "These images are raw floppy disk dumps. To write them on an actual floppy disk, you have to use a low-level sector copying tool, like dd." >> "$WORKDIR/readme.txt"
100
  echo "" >> "$4/readme.txt"
102
  echo "" >> "$WORKDIR/readme.txt"
101
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$4/readme.txt"
103
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$WORKDIR/readme.txt"
102
 
104
 
103
  unix2dos "$4/readme.txt"
105
  unix2dos "$WORKDIR/readme.txt"
104
 
106
 
105
  # make a copy of the image, if requested
107
  # make a copy of the image, if requested
106
  if [ "x$5" != "x" ] ; then
108
  if [ "x$6" != "x" ] ; then
107
    cp "$4/disk1.img" $5
109
    cp "$WORKDIR/disk1.img" $6
108
  fi
110
  fi
109
 
111
 
110
  # zip the images (and remove them at the same time)
112
  # zip the images (and remove them at the same time)
111
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
113
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
112
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" $4/*
114
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" "$WORKDIR"/*
113
 
115
 
114
  # clean up
116
  # clean up
115
  rmdir $4
117
  rmdir "$WORKDIR"
116
}
118
}
117
 
119
 
118
 
120
 
119
### actual code flow starts here ############################################
121
### actual code flow starts here ############################################
120
 
122
 
Line 172... Line 174...
172
 
174
 
173
# build the boot (CD) floppy image
175
# build the boot (CD) floppy image
174
export MTOOLS_NO_VFAT=1
176
export MTOOLS_NO_VFAT=1
175
 
177
 
176
# prepare images for floppies in different sizes (args are C H S SIZE)
178
# prepare images for floppies in different sizes (args are C H S SIZE)
177
prep_flop 80 2 36 2880 "$CDROOT/boot.img"
179
prep_flop 80 2 36 2880 "$PUBDIR" "$CDROOT/boot.img"
178
prep_flop 80 2 18 1440
180
prep_flop 80 2 18 1440 "$PUBDIR"
179
prep_flop 80 2 15 1200
181
prep_flop 80 2 15 1200 "$PUBDIR"
180
prep_flop 80 2  9  720
182
prep_flop 80 2  9  720 "$PUBDIR"
181
 
183
 
182
echo
184
echo
183
echo "### Computing DOSEMU.zip"
185
echo "### Computing DOSEMU.zip"
184
echo
186
echo
185
 
187