#!/bin/sh

# Make a bunch of copies of the generic unix distribution to driver specific
# versions and then edit rootdev, pipedev, swapdev and nswap to put root and
# pipe on partition `a' of drive 0 (/dev/xx0a) and swap on partition `b' of
# drive 0 (/dev/xx0b).  The hk and rl distributions are exceptions to this
# rule.  See their configuration comments below for explanations.


# HK Distribution Kernels
#
# The hk's partition `a' is too small to support a root - partition `e'
# which overlaps partitions `a' and `b' is used instead.  If you want to
# boot the hk distribution kernel you have to have two drives: drive 0
# partition `e' (/dev/hk0e) is root, drive 1 partition `a' (/dev/hk1a) is swap.

cp generic-unix hkunix
adb -w hkunix << EOF
rootdev?*w 02004
pipedev?*w 02000
swapdev?*w 02011
nswap?*w 5940
EOF
echo "hkunix configured"


# RA Distribution Kernels
#
# Nswap is set to the smallest partition `b' of any drive that the ra driver
# supports (RD51/52/53, RA60/80/81, RC25).  This happens to be on the rc25.

cp generic-unix raunix
adb -w raunix << EOF
rootdev?*w 02400
pipedev?*w 02400
swapdev?*w 02401
nswap?*w 10032
EOF
echo "raunix configured"


# RL Distribution Kernels
#
# The rl driver doesn't support partitions.  If you want to boot the rl
# distribution kernel you have to have two drives: drive 0 (/dev/rl0h) is
# root, drive 1 (/dev/rl1h) is swap.  Nswap is set to the size of an RL01.

cp generic-unix rlunix
adb -w rlunix << EOF
rootdev?*w 03400
pipedev?*w 03400
swapdev?*w 03401
nswap?*w 10240
EOF
echo "rlunix configured"


# XP Distribution Kernels
#
# Nswap is set to the smallest partition `b' of any drive that the xp driver
# supports that the generic xp distribution can be booted on (SI Eagle, Diva
# Comp V controlling an Ampex 9300, RP04/05/06, Fuji 160, RM05).  This happens
# to be the RP drives.

cp generic-unix xpunix
adb -w xpunix << EOF
rootdev?*w 05000
pipedev?*w 05000
swapdev?*w 05001
nswap?*w 8878
EOF
echo "xpunix configured"


# RM02/RM03 Distribution Kernels
#
# This is actually yet another version of the xp driver.  The RM02 and RM03
# Have such a tiny partition `a' that we put root on partition `f' which
# overlaps partitions `a' and `b' instead.  If you want to boot the rm
# distribution kernel you have to have two drives: drive 0 partition `f'
# (/dev/xp0f) is root, drive 1 partition `a' (/dev/xp1a) is swap.

cp generic-unix rmunix
adb -w rmunix << EOF
rootdev?*w 05005
pipedev?*w 05005
swapdev?*w 05010
nswap?*w 4800
EOF
echo "rmunix configured"
