annotate scripts/bundil1 @ 1859:dc2597886264

rma/rlink compatible version of tee.asm
author boisy
date Sun, 24 Jul 2005 22:00:49 +0000
parents 84b47b7ca7a6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1829
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
1 #!/bin/tcsh
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
2 #
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
3 # BUNDI - Build the Ultimate NitrOS-9 Disk Image
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
4 #
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
5 # This script builds the ULTIMATE NitrOS-9/6309 Level 2 disk image
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
6 # complete with HDB-DOS drives!
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
7 #
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
8 # The resulting image has a NitrOS-9 partition and an HDB-DOS partition.
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
9 # The first drive of the HDB-DOS partition is the HDB-DOS distribution
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
10 # diskette. The last drive is the NitrOS-9 boot disk.
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
11 #
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
12 # Size of image is 90,624 256-byte sectors, which fits in
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
13 # $00B100 OS-9 Offset in HDB-DOS
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
14 #
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
15 # ATTENTION! Set the HDB-DOS offset in your HDB-DOS ROM here! (must be in decimal)
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
16 set hdbdos_offset=45312 # 0x00B100
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
17 # ATTENTION! Set the number of HDB-DOS virtual disks (must be in decimal)
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
18 set num_hdbdos_disks=128
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
19 set ver=6809l1
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
20
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
21 # Check for argument
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
22 if ($2 == "") then
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
23 echo "Usage: bundi <bootscript> <diskname>"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
24 exit
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
25 endif
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
26
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
27 set diskname=$2
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
28 set multiplier=2
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
29 @ os9_sectors = $hdbdos_offset * $multiplier
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
30 echo $os9_sectors
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
31 @ hdb_drives = $num_hdbdos_disks - 2
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
32
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
33 echo "########## PART I ##########"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
34 echo "# #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
35 echo "# Assemble EVERYTHING! #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
36 echo "# #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
37 echo "#############################"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
38 echo
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
39 echo "Step 1 - Making the ENTIRE NitrOS-9 Project (could take a while)..."
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
40 #(pushd $NITROS9DIR; make dsk; popd)>&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
41
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
42 echo "Step 2 - Making the HDB-DOS Product..."
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
43 (pushd $CLOUD9DIR/Products/HDB-DOS/Software; make dsk; popd)>&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
44
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
45 echo "########## PART II ##########"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
46 echo "# #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
47 echo "# Prepare the Disk Image #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
48 echo "# #"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
49 echo "#############################"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
50 echo
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
51 echo "Step 1 - Format the disk and make the boot disk"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
52 os9 format -qe -l$os9_sectors tmp.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
53 ./$1>&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
54 os9 gen -b=bootfile -t=boottrack tmp.dsk>&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
55 os9 dsave -e $NITROS9DIR/$ver/nos96809l1_80d.dsk, tmp.dsk, >&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
56 os9 dsave -e $NITROS9DIR/3rdparty/packages/cc/cc.dsk, tmp.dsk, >&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
57 os9 dsave -e $NITROS9DIR/3rdparty/packages/basic09/basic09v010100.dsk, tmp.dsk, >&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
58 os9 format -qe -ss -dd boot.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
59 os9 gen -b=bootfile -t=boottrack boot.dsk>&/dev/null
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
60 rm bootfile boottrack
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
61
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
62 echo "Step 2 - Build the HDB-DOS drives"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
63 rm hdbdrives.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
64 decb dskini -h$hdb_drives hdbdrives.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
65 rm hdbdrives2.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
66 cat $CLOUD9DIR/Products/HDB-DOS/Software/hdbdos.dsk hdbdrives.dsk boot.dsk>hdbdrives2.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
67 rm hdbdrives.dsk boot.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
68 decb hdbconv hdbdrives2.dsk hdbdrives.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
69 rm hdbdrives2.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
70
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
71 echo "Step 3 - Put it all together"
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
72 rm $diskname
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
73 cat tmp.dsk hdbdrives.dsk>$diskname
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
74 rm tmp.dsk hdbdrives.dsk
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
75
84b47b7ca7a6 Added scripts
boisy
parents:
diff changeset
76 echo "Ok, we're done! The file $diskname is now a fresh disk image."