Lines 24-29
Link Here
|
24 |
# into base-bits-dir as part of making the image. |
24 |
# into base-bits-dir as part of making the image. |
25 |
|
25 |
|
26 |
if [ "x$1" = "x-b" ]; then |
26 |
if [ "x$1" = "x-b" ]; then |
|
|
27 |
bootable=true |
27 |
# Apple boot code |
28 |
# Apple boot code |
28 |
uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu |
29 |
uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu |
29 |
bzip2 -d /tmp/hfs-boot-block.bz2 |
30 |
bzip2 -d /tmp/hfs-boot-block.bz2 |
Lines 31-37
if [ "x$1" = "x-b" ]; then
Link Here
|
31 |
OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') |
32 |
OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') |
32 |
dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc |
33 |
dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc |
33 |
|
34 |
|
34 |
bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" |
35 |
bootopts="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" |
35 |
|
36 |
|
36 |
# pSeries/PAPR boot code |
37 |
# pSeries/PAPR boot code |
37 |
mkdir -p $4/ppc/chrp |
38 |
mkdir -p $4/ppc/chrp |
Lines 43-56
if [ "x$1" = "x-b" ]; then
Link Here
|
43 |
<boot-script>boot &device;:,\ppc\chrp\loader</boot-script> |
44 |
<boot-script>boot &device;:,\ppc\chrp\loader</boot-script> |
44 |
</chrp-boot> |
45 |
</chrp-boot> |
45 |
EOF |
46 |
EOF |
46 |
bootable="$bootable -o chrp-boot" |
47 |
bootopts="$bootopts -o chrp-boot" |
47 |
|
48 |
|
48 |
# Playstation 3 boot code |
49 |
# Playstation 3 boot code |
49 |
echo "FreeBSD Install='/boot/loader.ps3'" > $4/etc/kboot.conf |
50 |
echo "FreeBSD Install='/boot/loader.ps3'" > $4/etc/kboot.conf |
50 |
|
51 |
|
51 |
shift |
52 |
shift |
52 |
else |
53 |
else |
53 |
bootable="" |
54 |
bootable=false |
|
|
55 |
bootopts="" |
54 |
fi |
56 |
fi |
55 |
|
57 |
|
56 |
if [ $# -lt 3 ]; then |
58 |
if [ $# -lt 3 ]; then |
Lines 62-69
LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift
Link Here
|
62 |
NAME=$1; shift |
64 |
NAME=$1; shift |
63 |
|
65 |
|
64 |
publisher="The FreeBSD Project. http://www.FreeBSD.org/" |
66 |
publisher="The FreeBSD Project. http://www.FreeBSD.org/" |
65 |
echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab |
67 |
$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab |
66 |
makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* |
68 |
makefs -t cd9660 $bootopts -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* |
67 |
rm $1/etc/fstab |
69 |
$bootable && rm $1/etc/fstab |
68 |
rm /tmp/hfs-boot-block |
70 |
rm /tmp/hfs-boot-block |
69 |
rm -rf $1/ppc |
71 |
rm -rf $1/ppc |