diff options
-rwxr-xr-x | helpers/lh_binary_debian-installer | 67 |
1 files changed, 56 insertions, 11 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 7ee6dfd..7e9c39a 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? ;; |