Commit 93592a81 authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Dropping some sparc leftovers (Closes: #774196).

parent 30122125
......@@ -604,19 +604,6 @@ Set_defaults ()
esac
;;
sparc)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
exit 1
;;
*)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-sparc64}"
;;
esac
;;
*)
Echo_error "Architecture(s) ${LB_ARCHITECTURES} not yet supported (FIXME)"
exit 1
......@@ -659,15 +646,7 @@ Set_defaults ()
## config/binary
# Setting image filesystem
case "${LB_ARCHITECTURES}" in
sparc)
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-ext4}"
;;
*)
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
;;
esac
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
# Setting image type
case "${LB_ARCHITECTURES}" in
......
......@@ -57,20 +57,6 @@ esac
Check_package chroot /usr/share/doc/mtools mtools
Check_package chroot /sbin/parted parted
if [ "${LB_ARCHITECTURES}" = "sparc" ]
then
case "${LB_BINARY_FILESYSTEM}" in
ext2|ext3|ext4)
Check_package chroot /sbin/mkfs.${LB_BINARY_FILESYSTEM} e2fsprogs
;;
*)
Echo_error "Sparc only supports booting from ext2, ext3, ext4 or ufs."
exit 1
;;
esac
fi
case "${LB_BOOTLOADER}" in
grub)
Check_package chroot /usr/sbin/grub grub
......@@ -154,14 +140,7 @@ fi
echo "!!! The following error/warning messages can be ignored !!!"
Losetup $FREELO chroot/binary.img 0
case "${LB_ARCHITECTURES}" in
sparc)
PARTITION_TABLE_TYPE="sun"
;;
*)
PARTITION_TABLE_TYPE="msdos"
;;
esac
PARTITION_TABLE_TYPE="msdos"
case "${LB_BINARY_FILESYSTEM}" in
ext2|ext3|ext4)
......
......@@ -48,76 +48,6 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
if [ "${LB_ARCHITECTURES}" = "sparc" ]
then
# Checking depends
Check_package chroot /usr/bin/elftoaout sparc-utils
# Restoring cache
Restore_cache cache/packages.binary
# Installing depends
Install_package
# Set target and source directories
DESTDIR="tftpboot"
case "${LB_INITRAMFS}" in
casper)
ORIGDIR="binary/casper"
;;
live-boot)
ORIGDIR="binary/live"
;;
*)
ORIGDIR="binary/boot"
;;
esac
# Find defaults
DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
DEFAULT_MAP="$(echo chroot/boot/System.map-*${DEFAULT_FLAVOUR})"
gzip -cd ${ORIGDIR}/${DEFAULT_KERNEL} > kernel.tmp
mkdir -p ${DESTDIR}
rm -f ${DESTDIR}/boot.img
elftoaout -o ${DESTDIR}/boot.img kernel.tmp
case "${DEFAULT_FLAVOUR}" in
sparc32)
piggyback ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD}
;;
sparc64)
piggyback64 ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD}
;;
*)
Echo_error "Invalid default kernel flavour for sparc \"%s\"" "${DEFAULT_FLAVOUR}"
exit 1;
;;
esac
# Pad boot.img
REMAINDER=$((( 4 - $(stat -c %s ${DESTDIR}/boot.img) % 4 ) % 4))
dd if=/dev/zero bs=1 count=${REMAINDER} >> ${DESTDIR}/boot.img
# No need for kernel and initrd images in the binary
rm -f ${ORIGDIR}/vmlinuz-*
rm -f ${ORIGDIR}/initrd.img-*
# Clean temporaries
rm -f kernel.tmp
# Saving cache
Save_cache cache/packages.binary
# Removing depends
Remove_package
fi
# Remove old binary
rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz
......
......@@ -139,13 +139,6 @@ case "${LB_ARCHITECTURES}" in
DI_REMOTE_BASE_GTK="${DI_REMOTE_BASE}/gtk"
;;
sparc)
DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
DI_REMOTE_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DI_REMOTE_BASE_GTK="none"
DI_REMOTE_BASE="cdrom"
;;
*)
case "${DI_IMAGE_TYPE}" in
netboot)
......@@ -283,49 +276,33 @@ esac
mkdir -p "${DESTDIR_DI}"
if [ "${LB_ARCHITECTURES}" = "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
Download_file mini.iso ${URL}/mini.iso
mkdir mini.tmp
mount -o loop -t iso9660 mini.iso mini.tmp
# Downloading debian-installer
Download_file "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI_REMOTE_BASE}/${DI_REMOTE_KERNEL}
Download_file "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz
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
Download_file "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI_REMOTE_BASE}/${DI_REMOTE_KERNEL}
Download_file "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz
# Downloading graphical-installer
DOWNLOAD_GTK_INSTALLER=0
if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]
then
# Downloading graphical-installer
DOWNLOAD_GTK_INSTALLER=0
if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]
then
case "${LB_ARCHITECTURES}" in
amd64|i386)
DOWNLOAD_GTK_INSTALLER=1
;;
amd64|i386)
DOWNLOAD_GTK_INSTALLER=1
;;
powerpc)
if [ "${LB_DEBIAN_INSTALLER}" = "netboot" ]
then
DOWNLOAD_GTK_INSTALLER=1
fi
;;
esac
fi
powerpc)
if [ "${LB_DEBIAN_INSTALLER}" = "netboot" ]
then
DOWNLOAD_GTK_INSTALLER=1
fi
;;
esac
fi
if [ ${DOWNLOAD_GTK_INSTALLER} -eq 1 ]
then
mkdir -p "${DESTDIR_GI}"
Download_file "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL}
Download_file "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz
fi
if [ ${DOWNLOAD_GTK_INSTALLER} -eq 1 ]
then
mkdir -p "${DESTDIR_GI}"
Download_file "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL}
Download_file "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz
fi
# Only download additional packages if appropriate
......@@ -374,19 +351,6 @@ then
esac
;;
sparc)
DI_REQ_PACKAGES="silo"
case "${LB_MODE}" in
ubuntu)
DI_PACKAGES="${DI_REQ_PACKAGES} linux-sparc64"
;;
*)
DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-sparc64 linux-image-sparc64-smp"
;;
esac
;;
powerpc)
DI_REQ_PACKAGES="yaboot"
case "${LB_MODE}" in
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment