PowerPC boot support

This commit is contained in:
Dan Jacobowitz 2000-05-01 04:59:02 +00:00
parent 2d78bdd898
commit 0b6a1c2ebf
9 changed files with 103 additions and 57 deletions

10
CONF.sh
View File

@ -10,7 +10,7 @@ export BASEDIR=`pwd`
export CODENAME=potato
# ... for arch
export ARCH=i386
export ARCH=powerpc
# IMPORTANT : The 4 following paths must be on the same partition/device.
# If they aren't then you must set COPYLINK below to 1. This
@ -18,20 +18,20 @@ export ARCH=i386
# images, however. Also, if you are using an NFS partition for
# some part of this, you must use this option.
# Paths to the mirrors
export MIRROR=/ftp/debian
export MIRROR=/org/ftp.debian.org/ftp
# Comment the following line if you don't have/want non-US
#export NONUS=/ftp/debian-non-US
# Path of the temporary directory
export TDIR=/ftp/tmp
export TDIR=/scratch/dan/tmp
# Path where the images will be written
export OUT=/rack/debian-cd
export OUT=/scratch/dan/images
# Where we keep the temporary apt stuff.
# This cannot reside on an NFS mount.
export APTTMP=/ftp/tmp/apt
export APTTMP=/scratch/dan/apt-tmp
# Do I want to have NONFREE
# export NONFREE=1

View File

@ -467,6 +467,10 @@ bin-images: ok bin-md5list $(OUT)
rm -f $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw; \
$(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \
-o $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw $$opts $$n ; \
if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) ]; then \
$(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) $$n $$dir \
$(OUT)/$(CODENAME)-$(ARCH)-$$n.raw; \
fi \
done
src-images: ok src-md5list $(OUT)
@echo "Generating the source iso images ..."

View File

@ -6,5 +6,5 @@ set -e
make distclean
make ${CODENAME}_status
make mirrorcheck
make list COMPLETE=1 SIZELIMIT1=576716800
make official_images
make list COMPLETE=1 SIZELIMIT1=$((525 * 1024 * 1024)) SRCSIZELIMIT=$((630 * 1024 * 1024))
make bin-official_images

View File

@ -1,6 +1,10 @@
# ext. xlate creator type comment
.hqx Ascii 'BnHx' 'TEXT' "BinHex file"
.mov Raw 'TVOD' 'MooV' "QuickTime Movie"
.deb Raw 'Debn' 'bina' "Debian package"
.bin Raw 'Debn' 'bina' "Floppy or ramdisk image"
* Ascii 'ttxt' 'TEXT' "Text file"
# ext. xlate creator type comment
.hqx Ascii 'BnHx' 'TEXT' "BinHex file"
.mov Raw 'TVOD' 'MooV' "QuickTime Movie"
.deb Raw 'Debn' 'bina' "Debian package"
.bin Raw 'Debn' 'bina' "Floppy or ramdisk image"
.b Raw 'UNIX' 'tbxi' "bootstrap"
yaboot Raw 'UNIX' 'boot' "bootstrap"
vmlinux Raw 'UNIX' 'boot' "bootstrap"
.conf Raw 'UNIX' 'conf' "bootstrap"
* Ascii 'ttxt' 'TEXT' "Text file"

11
data/yaboot/ofboot.b Normal file
View File

@ -0,0 +1,11 @@
<CHRP-BOOT>
<COMPATIBLE>
iMac,1 PowerMac1,1 PowerBook1,1 PowerMac2,1 PowerMac3,1 PowerBook2,1 PowerBook3,1
</COMPATIBLE>
<DESCRIPTION>
Debian GNU/Linux 2.2 (potato) PowerPC bootloader
</DESCRIPTION>
<BOOT-SCRIPT>
boot cd:2,\install\powermac\yaboot
</BOOT-SCRIPT>
</CHRP-BOOT>

15
data/yaboot/yaboot.conf Normal file
View File

@ -0,0 +1,15 @@
## This yaboot.conf is for CD booting only, do not use as reference.
## Debian GNU/Linux PowerPC (CODENAME)
init-message="Debian GNU/Linux PowerPC (CODENAME)"
# The comma is important
device=cd:,
timeout=50
image=\\install\\powermac\\vmlinux
label=debian
partition=2
initrd=\\install\\powermac\\root1440.bin
initrd-size=8192
read-only

View File

@ -29,6 +29,9 @@ fi
echo -n "--netatalk -j -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!
echo -n " -part -no-desktop -hfs-volid Debian/PowerPC_${CODENAME}" \
>> $N.mkisofs_opts
DISKSROOT="$MIRROR/dists/$CODENAME/main/disks-$ARCH/current"
INSTALLDIR="$CDROOT/install"
@ -40,47 +43,6 @@ INSTALLDIR="$CDROOT/install"
# -- (We wish) --
#
cd $INSTALLDIR
# ---- auto-booting section -----
echo "Copying boot images to $CDROOT/install/boot for disc 1"
rm -fr boot
mkdir -p boot
for subarch in apus chrp common mbx powermac prep ; do
mkdir boot/$subarch
echo "extracting stuff for $subarch"
case $subarch in
apus)
echo "need work for Apus"
;;
chrp)
echo "need work for CHRP"
;;
common)
echo "need work for common"
;;
mbx)
echo "need work for mbx"
;;
powermac)
#cp -p $BOOTDIR/cd.b $BOOTDIR/second.b boot/powermac
#cp -p $BOOTDIR/second.b boot/powermac
#cat - > boot/powermac/quik.conf << __EOF__
#timeout=300
#root=/dev/ram
#image=!cd1
#label=Linux
#initrd=!cd5
#__EOF__
echo "need work for PowerMac"
;;
prep)
# PReP doesn't need an extra copy of the boot image
# The -B parameter to mkhybrid points directly to our
# PReP bootable image in /install/prep/boot.bin
# We put a symlink here for now for uniformity.
ln -s ../../prep/boot.bin boot/prep/
;;
esac
done
#-------------- Install paths -------------------------------
# $DISKSROOT == dists/potato/main/disks-powerpc/current/
@ -125,9 +87,27 @@ cp $DISKSROOT/chrp/images-1.44/rescue.bin chrp
#--------------- PMac - Stuff -------------------------------
echo Installing Power-Macintosh files
mkdir powermac
cp $DISKSROOT/powermac/linux powermac
cp $DISKSROOT/powermac/images-1.44/root.bin powermac
cp $DISKSROOT/powermac/images-1.44/rescue.bin powermac
cp $DISKSROOT/powermac/linux powermac/vmlinux
cp $DISKSROOT/powermac/images-1.44/root.bin powermac/
cp $DISKSROOT/powermac/images-1.44/boot-floppy-hfs.img powermac/
cp $DISKSROOT/powermac/BootX* powermac/
cp $DISKSROOT/powermac/bootvars* powermac/
# Completely useless! It's an ext2 floppy... how is that supposed to boot?
# cp $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/yaboot.conf \
| sed "s/CODENAME/${CODENAME}/g" > powermac/yaboot.conf
cp $BASEDIR/data/yaboot/ofboot.b powermac/
# Extract yaboot from the archive
(ar p $MIRROR/dists/$CODENAME/main/binary-powerpc/base/yaboot_* data.tar.gz | \
tar zxf - -C powermac ./boot/yaboot)
mv powermac/boot/yaboot powermac/yaboot
rmdir powermac/boot
#--------------- PReP - Stuff -------------------------------
echo Installing PReP files

View File

@ -0,0 +1,29 @@
#!/bin/bash
#
# post-boot-powerpc 0.1 (C) Daniel Jacobowitz <dan@debian.org>
#
# Released under GPL 10 April 2000
# See the file COPYING for license details
#
# Do post-image-building tasks for powerpc, to make CDs bootable.
#
# $1 is the CD number
# $2 is the temporary CD build dir
# $3 is the image file
set -e
N=$1
CDROOT=$2
CDIMAGE=$3
cd $CDROOT/..
# Only disk 1 bootable
if [ $N != 1 ]; then
exit 0
fi
hmount $3
hattrib -b ":install:powermac"
humount $3

View File

@ -401,6 +401,9 @@ sub add_package {
$limit = $ENV{"SIZELIMIT$cd"} || $deflimit;
msg(2, "Limit for CD $cd is $limit.\n");
}
msg(2, " \$cd_size = $cd_size, \$size = $size\n");
$cd_size += $size;
$total_size += $size;