Add support for sparc to lh_binary_debian-installer.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-06-15 04:47:23 +01:00
parent 766cd2670c
commit 2b77ec6b5d
1 changed files with 56 additions and 11 deletions

View File

@ -133,10 +133,23 @@ case "${DI_IMAGE_TYPE}" in
;;
esac
# Varous architecture-specific hacks
case "${LH_ARCHITECTURE}" in
powerpc)
DI_REMOTE_BASE="${LH_ARCHITECTURE}/${DI_REMOTE_BASE}"
;;
sparc)
DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
DI_REMOTE_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DI_REMOTE_BASE_GTK="none"
if [ "${LH_DISTRIBUTION}" = "etch" ]
then
DI_REMOTE_BASE="cdrom/2.6"
else
DI_REMOTE_BASE="cdrom"
fi
;;
esac
Check_multiarchitecture
@ -257,8 +270,30 @@ else
URL="${LH_MIRROR_CHROOT}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
fi
# Downloading debian-installer
mkdir -p "${DESTDIR_DI}"
if [ "${LH_ARCHITECTURE}" = "sparc" ] && [ "${DI_IMAGE_TYPE}" = "netboot" ]
then
# There are no prepared kernel/initrd pairs for sparc netboot so we
# must unpack them from a mini.iso
if [ "${LH_DISTRIBUTION}" = "etch" ]
then
wget ${WGET_OPTIONS} -O mini.iso ${URL}/combined/2.6/mini.iso
else
wget ${WGET_OPTIONS} -O mini.iso ${URL}/mini.iso
fi
mkdir mini.tmp
mount -o loop -t iso9660 mini.iso mini.tmp
cp mini.tmp/boot/vmlinuz-${DEFAULT_FLAVOUR} "${DESTDIR}"/"${VMLINUZ_DI}"
cp mini.tmp/boot/initrd.gz "${DESTDIR}"/"${INITRD_DI}"
umount mini.tmp
rm -rf mini.tmp mini.iso
else
# Downloading debian-installer
wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI_REMOTE_BASE}/${DI_REMOTE_KERNEL}
wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz
@ -270,6 +305,7 @@ case "${LH_ARCHITECTURE}" in
wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz
;;
esac
fi
# Only download additional packages if appropriate
if [ "${DI_IMAGE_TYPE}" != "netboot" ]
@ -288,6 +324,15 @@ then
DI_PACKAGES="linux-image-2.6-486 linux-image-2.6-686 elilo lilo grub"
;;
sparc)
DI_PACKAGES="linux-image-2.6-sparc64 linux-image-2.6-sparc64-smp silo"
if [ "${LH_DISTRIBUTION}" = "etch" ]
then
DI_PACKAGES="${DI_PACKAGES} linux-image-2.6-sparc32"
fi
;;
powerpc)
DI_PACKAGES="linux-image-2.6-powerpc linux-image-2.6-powerpc64 linux-image-2.6-powerpc-smp linux-image-2.6-prep yaboot" # FIXME bootloader?
;;