summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_debian-installer
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-06-15 04:47:23 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:35 +0100
commit336687882cf35eb81b720771e82ae8d7c4f2dae2 (patch)
treed6e5fdf84f5d3a2396f9f4318d7edbd4b69d797e /helpers/lh_binary_debian-installer
parentd4f70af91bce74ee742b57eb96626c168b6cc280 (diff)
downloadvyos-live-build-336687882cf35eb81b720771e82ae8d7c4f2dae2.tar.gz
vyos-live-build-336687882cf35eb81b720771e82ae8d7c4f2dae2.zip
Add support for sparc to lh_binary_debian-installer.
Diffstat (limited to 'helpers/lh_binary_debian-installer')
-rwxr-xr-xhelpers/lh_binary_debian-installer67
1 files changed, 56 insertions, 11 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 7ee6dfd8e..7e9c39a6e 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -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,19 +270,42 @@ else
URL="${LH_MIRROR_CHROOT}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
fi
-# Downloading debian-installer
mkdir -p "${DESTDIR_DI}"
-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
-# Downloading graphical-installer
-case "${LH_ARCHITECTURE}" in
- amd64|i386|powerpc)
- mkdir -p "${DESTDIR_GI}"
- wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL}
- wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz
- ;;
-esac
+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
+
+ # Downloading graphical-installer
+ case "${LH_ARCHITECTURE}" in
+ amd64|i386|powerpc)
+ mkdir -p "${DESTDIR_GI}"
+ wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL}
+ 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?
;;