Add support for usb-hdd on sparc (requires parted 1.8 from experimental).

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-06-15 16:27:35 +01:00
parent 343497ad98
commit be0f6ae8a4
3 changed files with 36 additions and 3 deletions

View File

@ -488,7 +488,14 @@ Set_defaults ()
## config/binary
# Setting image filesystem
LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-fat16}"
case "${LH_ARCHITECTURE}" in
sparc)
LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-ext2}"
;;
*)
LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-fat16}"
;;
esac
# Setting image type
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"

View File

@ -111,7 +111,7 @@ esac
# Setting destination directory
case "${LH_BINARY_IMAGES}" in
iso)
iso|usb-hdd)
case "${LH_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
@ -125,7 +125,7 @@ case "${LH_BINARY_IMAGES}" in
DESTDIR_INSTALL="binary/install"
;;
net|tar|usb-hdd)
net|tar)
Echo_error "not yet supported, aborting (FIXME)."
exit 1
;;

View File

@ -53,6 +53,20 @@ Check_package chroot/sbin/mkdosfs dosfstools
Check_package chroot/usr/share/doc/mtools mtools
Check_package chroot/sbin/parted parted
if [ "${LH_ARCHITECTURE}" = "sparc" ]
then
case "${LH_BINARY_FILESYSTEM}" in
ext2|ext3)
Check_package chroot/sbin/mkfs.ext2 e2fsprogs
;;
*)
Echo_error "Sparc only supports booting from ext2, ext3 (or ufs)"
exit 1
;;
esac
fi
case "${LH_BOOTLOADER}" in
grub)
Check_package chroot/usr/sbin/grub grub
@ -92,12 +106,19 @@ echo "!!! The following error/warning messages can be ignored !!!"
Losetup $FREELO chroot/binary.img 0
case "${LH_ARCHITECTURE}" in
sparc)
PARTITION_TABLE_TYPE="sun"
;;
*)
PARTITION_TABLE_TYPE="msdos"
;;
esac
case "${LH_BINARY_FILESYSTEM}" in
ext2|ext3)
PARTITION_TYPE="ext2"
;;
fat16|fat32)
PARTITION_TYPE="${LH_BINARY_FILESYSTEM}"
;;
@ -140,6 +161,11 @@ FREELO="$(${LH_LOSETUP} -f)"
Losetup $FREELO chroot/binary.img 1
case "${LH_BINARY_FILESYSTEM}" in
ext2|ext3)
MKFS="${LH_BINARY_FILESYSTEM}"
MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
;;
fat16)
MKFS="vfat"
MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"