~tsimonq2/debian-cd/lubuntu-cosmic-changes

« back to all changes in this revision

Viewing changes to tools/boot/boot-m68k

  • Committer: Arch Librarian
  • Date: 2005-03-22 00:47:41 UTC
  • Revision ID: Arch-1:debian-cd@arch.ubuntu.com%debian-cd--MAIN--0--patch-29
Initial revision
Author: aph
Date: 1999-11-11 17:10:38 GMT
Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# boot-m68k v 1.13 (c) Steve McIntyre <stevem@chiark.greenend.org.uk>,
 
4
# Chris Lawrence <lawrencc@debian.org>, Christian Steigies <cts@debian.org>, 
 
5
# Michael Schmitz <MSchmitz@lbl.gov>
 
6
# Released under GPL 31 Mar 1999
 
7
# See the file COPYING for license details
 
8
# Released as part of the slink_cd package, not much use standalone
 
9
#
 
10
# Do install stuff for m68k, including making bootable CDs
 
11
#
 
12
# Enjoy!  This is all completely free.
 
13
# - Chris Lawrence <lawrencc@debian.org>
 
14
#
 
15
# Rewritten by Steve McIntyre <stevem@chiark.greenend.org.uk> in sh to
 
16
# interface better with the slink_cd package and cope with the mirror
 
17
# layout, 28 Feb 1999.
 
18
# Hopefully this will do the same job as the python map stuff did, it
 
19
# appears to...
 
20
#
 
21
# If you're burning a CD, use the mkhybrid in potato (HFS is broken in the
 
22
# slink version of mkhybrid; at least it is for me).  Please don't use Joliet
 
23
# extensions; some Mac kernels have apparently been known to choke on them
 
24
# (and you really shouldn't be supporting a Microsoft Standard anyway :-)
 
25
#
 
26
# You may also want the following:
 
27
# * A copy of the Linux/m68k FAQ
 
28
# * A copy of my m68k-specific README and m68k-tools directories
 
29
# * The m68k kernel sources from sunsite.auc.dk:/projects/680x0
 
30
#   (Sunsite-Denmark is rsync-capable at sunsite.auc.dk::ftp)
 
31
#   I recommend getting the 2.0.36 and 2.2.1-pre2 sources at least.
 
32
#   (Actually 2.0.36 is non-essential since it's on the CDs already;
 
33
#    you probably DO want the 2.2.1-pre2 tree however [under v2.1!]).
 
34
#
 
35
# MVME/BVME users will love you if you also include the "tools" directory
 
36
# from the FTP site, since they may want/need rawwrite for MS-DOS.
 
37
#
 
38
# The first two items are in a tar file at master.debian.org:~lawrencc, along
 
39
# with a silly rsync script that will accomplish the last item.
 
40
 
 
41
N=$1
 
42
CDDIR=$2
 
43
 
 
44
cd $CDDIR/..
 
45
 
 
46
# Only disk 1 bootable
 
47
if [ $N != 1 ]; then
 
48
        echo -n "--netatalk -j -hfs -probe -map $BASEDIR/data/hfs.map" \
 
49
                > $N.mkisofs_opts
 
50
        exit 0
 
51
fi
 
52
 
 
53
echo -n "--netatalk -j -hfs -probe -map $BASEDIR/data/hfs.map" \
 
54
        > $N.mkisofs_opts
 
55
        
 
56
echo -n " -b install/bvme6000/resc1440.bin -c install/bvme6000/boot.catalog" \
 
57
        >> $N.mkisofs_opts
 
58
 
 
59
 
 
60
DISKSROOT="$MIRROR/dists/$CODENAME/main/disks-$ARCH/current"
 
61
INSTALLDIR="$CDDIR/install"
 
62
 
 
63
cd $INSTALLDIR
 
64
 
 
65
#vecho Installing Amiga files
 
66
lha xqf $DISKSROOT/amiga/amigainstall.lha
 
67
mv debian amiga
 
68
mv debian.info amiga.info
 
69
cp $DISKSROOT/amiga/* amiga
 
70
 
 
71
# Needs to be executable
 
72
chmod a+x amiga/amiboot-5.6
 
73
 
 
74
# Add .info files for amiga
 
75
tar -C .. -xzf $BASEDIR/data/cts_amiga_info.tar.gz
 
76
for file in `tar tzf $BASEDIR/data/cts_amiga_info.tar.gz`
 
77
do
 
78
        chmod a+r ../$file
 
79
done
 
80
# And fix a few things up...
 
81
mkdir common
 
82
mv basecont.txt.info common
 
83
mv ../README.info ../README.m68k.info
 
84
cp ../README.1ST.info ../README.multicd.info
 
85
 
 
86
#vecho Installing Atari files
 
87
lha xqf $DISKSROOT/atari/install.lzh
 
88
mv debian atari
 
89
cp $DISKSROOT/atari/* atari
 
90
 
 
91
#vecho Installing Mac files
 
92
tar -C .. -zxf $DISKSROOT/source/macinstall.tar.gz
 
93
cp $DISKSROOT/mac/* mac
 
94
 
 
95
for TYPE in common bvme6000 mvme162 mvme167 source
 
96
do
 
97
        #vecho Installing $TYPE files
 
98
        if [ ! -d $TYPE ] ; then
 
99
            mkdir $TYPE
 
100
        fi
 
101
        cp $DISKSROOT/$TYPE/* $TYPE
 
102
done
 
103
 
 
104
vecho hexbin Mac files
 
105
cd $INSTALLDIR/mac
 
106
hexbin *.hqx
 
107
 
 
108
vecho Installing m68k FAQ and tools
 
109
mkdir $CDDIR/tmp
 
110
cd $CDDIR/tmp
 
111
tar xzf $BASEDIR/data/m68k-cd-misc.tar.gz
 
112
mv m68k-faq m68k-tools ..
 
113
mv update-kernels ../update-kernels.m68k
 
114
cd ..
 
115
rm -rf tmp
 
116
 
 
117
cd $CDDIR
 
118
# make mountpoint and temp HFS filesystem image
 
119
rm -rf /var/tmp/mnt-macinstall
 
120
mkdir /var/tmp/mnt-macinstall
 
121
dd if=/dev/zero of=/var/tmp/macinstall-temp.img bs=1024 count=1440
 
122
hformat /var/tmp/macinstall-temp.img
 
123
# mount it (':' is top dir) using hfsutils
 
124
hmount /var/tmp/macinstall-temp.img
 
125
# copy booter and preferences files in place (color table missing but 
 
126
# Penguin-17 has colors fixed anyway
 
127
hcopy -b install/mac/Penguin-17.hqx :
 
128
hcopy -b install/mac/Penguin_Prefs.hqx :"Penguin Prefs"
 
129
hcopy -b "install/mac/Penguin_Prefs_(autoboot).hqx" :"Penguin Prefs (autoboot)"
 
130
# unmount HFS image
 
131
humount /var/tmp/macinstall-temp.img
 
132
# mount this HFS floppy image again as netatalk using the loopback mount command
 
133
if [ ! 'mount -t hfs -o loop,fork=netatalk,afpd /var/tmp/macinstall-temp.img /var/tmp/mnt-macinstall' ] ; then
 
134
        # We managed to mount it loop-back
 
135
        # copy over both Penguin-15 and .AppleDouble/Penguin-15
 
136
        # copy over both Penguin Prefs and .AppleDouble/Penguin Prefs
 
137
        # (.AppleDouble files go into .AppleDouble subdir of target dir)
 
138
        cp /var/tmp/mnt-macinstall/Penguin* install/mac/
 
139
        mkdir install/mac/.AppleDouble
 
140
        cp /var/tmp/mnt-macinstall/.AppleDouble/Penguin* install/mac/.AppleDouble/
 
141
        # unmount, cleanup
 
142
        umount /var/tmp/mnt-macinstall
 
143
        rm /var/tmp/macinstall-temp.img
 
144
        rmdir /var/tmp/mnt-macinstall
 
145
else
 
146
        # We failed to mount it. Use the fallback tar.gz that we have
 
147
        echo HFS loopback mount failed on /var/tmp/macinstall-temp.img
 
148
        echo This is not fatal, but check that you have permissions to do this
 
149
        echo and that you have HFS support in your kernel...
 
150
        echo Extracting $BASEDIR/data/macinstall-cd.tar.gz instead.
 
151
        tar xzf $BASEDIR/data/macinstall-cd.tar.gz
 
152
fi
 
153
 
 
154
#
 
155
# can remove the .hqx stuff now I guess. 
 
156
#
 
157
# make CD image using the command
 
158
# mkhybrid -map <mapfile> --netatalk -a -j -hfs -r -V <label> -o <image> <source dir>
 
159
#
 
160
# map file contains stuff like
 
161
# # ext. xlate  creator  type    comment
 
162
# .hqx   Ascii  'BnHx'   'TEXT'  "BinHex file"
 
163
# .mov   Raw    'TVOD'   'MooV'  "QuickTime Movie"
 
164
# .deb   Raw    'Debn'   'bina'  "Debian package"
 
165
# .bin   Raw    'Debn'   'bina'  "Floppy or ramdisk image"
 
166
# *      Ascii  'ttxt'   'TEXT'  "Text file"
 
167
#
 
168
# Note that we can't use MacBinary mapping for .bin files due to
 
169
# name clashes with the binary image files, so we have to provide 
 
170
# all encoded Mac files in BinHex format.
 
171
#
 
172
# Kudos Brad Midgley, <brad@pht.com> for the tricks!
 
173
#
 
174
# Possible alternative: convert .hqx in MacBinary files, but we'd need
 
175
# to use a different extension as .bin is taken by the disk images.
 
176
# i.e. hexbin -s Penguin-17.hqx > Penguin-17.mac
 
177
# and use .mac as MacBinary extension. I don't know offhand what the 
 
178
# creator/type for MacBinary is. --netatalk would be replaced by 
 
179
# --macbin, possibly together with --probe.
 
180
 
 
181
 
 
182