File: boot-powerpc

package info (click to toggle)
debian-cd 2.2.13
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,480 kB
  • ctags: 120
  • sloc: sh: 1,666; perl: 1,078; makefile: 832
file content (146 lines) | stat: -rwxr-xr-x 4,464 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
#
# boot-powerpc version 0.7 (C)  Hartmut Koptein <koptein@debian.org>,
# PReP support (C)  Matt Porter <porter@debian.org>
#
# Released under GPL 1 Mar 1999
# See the file COPYING for license details
# Released as part of the debian_cd package, not much use standalone
#
# Do install stuff for powerpc, including making bootable CDs
#
# $1 is the CD number
# $2 is the temporary CD build dir

set -e

N=$1
CDROOT=$2

cd $CDROOT/..

# Only disk 1* bootable
if [ $N != 1 -a $N != 1_NONUS ]; then
    # we don't need HFS cruft on anything but CD 1
	#echo -n "--netatalk -j -hfs -probe -map $BASEDIR/data/hfs.map" \
	#        > $N.mkisofs_opts
	:> $N.mkisofs_opts
	exit 0
fi

echo -n "--netatalk -hfs -probe -map $BASEDIR/data/hfs.map" \
        > $N.mkisofs_opts
echo -n " -prep-boot install/prep/boot.bin" >> $N.mkisofs_opts
# For newworld Mac booting  - Note, no spaces in volid!
case "$MKISOFS" in
    *mkhybrid)
    echo -n " -part -no-desktop -hfs-volid Debian/PowerPC_${CODENAME}" \
	    >> $N.mkisofs_opts
    ;;
    *mkisofs)
    echo -n " -part -no-desktop -hfs-bless CD$N/install/powermac -hfs-volid Debian/PowerPC_${CODENAME}" \
	    >> $N.mkisofs_opts
    ;;
    *)
    echo 1>&2 "Only mkhybrid or mkisofs can be used"
    exit 1
    ;;
esac

DISKSROOT="$MIRROR/dists/$CODENAME/main/disks-$ARCH/current"
INSTALLDIR="$CDROOT/install"

# Debian/PowerPC consits currently for three parts: CHRP, PMac and PReP
# Apus, MBX and BBox will hopefully follow
#
# -- We need a generic boot-loader --
# -- (We wish) --
#
cd $INSTALLDIR

#-------------- Install paths -------------------------------
# $DISKSROOT  == dists/potato/main/disks-powerpc/current/
# $INSTALLDIR == install/
#
# The layout has changed. Images are now in $SUBARCH/images-1.44
#

cd $INSTALLDIR

# Section for the base, rescue and drivers into the /install/
# area on the cd.

#--------------- APUS - Stuff -------------------------------
#echo Installing APUS files
mkdir apus
cp -f $DISKSROOT/apus/linux apus
cp -f $DISKSROOT/apus/images-1.44/root.bin apus
cp -f $DISKSROOT/apus/images-1.44/rescue.bin apus

#--------------- CHRP - Stuff -------------------------------
echo Installing CHRP files
mkdir chrp
cp -f $DISKSROOT/chrp/linux chrp
cp -f $DISKSROOT/chrp/images-1.44/root.bin chrp
cp -f $DISKSROOT/chrp/images-1.44/rescue.bin chrp

#-------------- Common - Stuff ------------------------------
#echo Installing Common files
#mkdir common
#cp -f $DISKSROOT/common/linux common
#cp -f $DISKSROOT/common/images-1.44/root.bin common
#cp -f $DISKSROOT/common/images-1.44/rescue.bin common

#---------------- MBX - Stuff -------------------------------
#echo Installing MBX files
#mkdir mbx
#cp -f $DISKSROOT/mbx/linux mbx
#cp -f $DISKSROOT/mbx/images-1.44/root.bin mbx
#cp -f $DISKSROOT/mbx/images-1.44/rescue.bin mbx

#--------------- PMac - Stuff -------------------------------
echo Installing Power-Macintosh files
mkdir powermac
cp -f $DISKSROOT/powermac/linux powermac/vmlinux
cp -f $DISKSROOT/powermac/images-1.44/root.bin powermac/
cp -f $DISKSROOT/powermac/images-1.44/boot-floppy-hfs.img powermac/

cp -f $DISKSROOT/powermac/BootX* powermac/
cp -f $DISKSROOT/powermac/bootvars* powermac/

# Completely useless!  It's an ext2 floppy... how is that supposed to boot?
# cp -f $DISKSROOT/powermac/images-1.44/rescue.bin powermac/

# New-world bootability
# This works in a subdirectory via an ugly hack; fix yaboot.
cat $BASEDIR/data/yaboot/potato-yaboot.conf \
 | sed "s/CODENAME/${CODENAME}/g" > powermac/yaboot.conf
cp -f $BASEDIR/data/yaboot/ofboot.b powermac/

# Extract yaboot from the archive
if [ -z "$YABOOT_DEBUG" ]; then
    YADEB="$($BASEDIR/tools/apt-selection cache show yaboot | \
	   grep ^Filename | awk '{print $2}')"
    (ar p "${MIRROR}/${YADEB}" data.tar.gz | \
	tar zxf - -C powermac ./usr/lib/yaboot/yaboot)
    mv powermac/usr/lib/yaboot/yaboot powermac/yaboot
    rm -rf powermac/usr
else
 cp -f $YABOOT_DEBUG powermac/yaboot
fi

#--------------- PReP - Stuff -------------------------------
echo Installing PReP files
mkdir prep
cp -f $DISKSROOT/prep/linux prep
cp -f $DISKSROOT/prep/images-1.44/boot.bin prep
cp -f $DISKSROOT/prep/images-1.44/root.bin prep
cp -f $DISKSROOT/prep/images-1.44/rescue.bin prep

#=============== fix a few things up... =====================
echo Installing PowerPC FAQ and tools
#mkdir common
#mv basecont.txt.info common
#mv ../README.info ../README.powerpc.info
#cp -f ../README.1ST.info ../README.multicd.info