From 818927780163c4efa8f137f8a31468de55399c95 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Sun, 3 Aug 2003 15:06:00 +0000 Subject: [PATCH] - Removed vestiges of the IA64 boot floppy support. - Fixed the bootable CD-ROM support for IA64. Reviewed by: marcel Tested by: marcel --- release/Makefile | 8 +---- release/ia64/doFS.sh | 70 ------------------------------------- release/ia64/mkisoimages.sh | 8 ++--- 3 files changed, 5 insertions(+), 81 deletions(-) delete mode 100644 release/ia64/doFS.sh diff --git a/release/Makefile b/release/Makefile index e6b21a041b94..c3fbcfdbd498 100644 --- a/release/Makefile +++ b/release/Makefile @@ -249,9 +249,7 @@ CD_DISC2= ${CD}/disc2 # Where the bootstrap ports (see DOCPORTS) get installed. LOCALDIR= /usr/local/bin -.if exists(${.CURDIR}/${TARGET_ARCH}/doFS.sh) -DOFS_SH= ${.CURDIR}/${TARGET_ARCH}/doFS.sh -.elif ${TARGET} != ${MACHINE} +.if ${TARGET} != ${MACHINE} DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET} .else DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} "" @@ -1075,8 +1073,6 @@ doMFSKERN: .if ${TARGET} == "i386" @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o \ -o ${RD}/image.${FSIMAGE}/boot/loader ${RD}/trees/base/boot/loader -.elif ${TARGET_ARCH} == "ia64" - @cp ${RD}/trees/base/boot/loader.efi ${RD}/image.${FSIMAGE}/boot .else @cp ${RD}/trees/base/boot/loader ${RD}/image.${FSIMAGE}/boot .endif @@ -1092,9 +1088,7 @@ doMFSKERN: @echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc .endif @echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc -.if ${TARGET_ARCH} != "ia64" @echo "set hint.acpi.0.disabled=1" >> ${RD}/image.${FSIMAGE}/boot/loader.rc -.endif @if [ -r ${RD}/floppies/drivers.flp ]; then \ echo "set driver_floppy=YES" >> ${RD}/image.${FSIMAGE}/boot/loader.rc; \ fi diff --git a/release/ia64/doFS.sh b/release/ia64/doFS.sh deleted file mode 100644 index 98f6d09ead68..000000000000 --- a/release/ia64/doFS.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# See also: ../scripts/doFS.sh -# - -set -ex - -FSIMG=$1; shift -RD=$1 ; shift -MNT=$1 ; shift -FSSIZE=$1 ; shift -FSPROTO=$1 ; shift -FSINODE=$1 ; shift -FSLABEL=$1 ; shift - -# If the disklabel is not equal to "efi", we have to create a "normal" -# UFS file system. In that case, call the generic version: -if [ x$FSLABEL != "xefi" ]; then - DOFS_SH=`dirname $0`/../scripts/`basename $0` - echo "Transferring control to $DOFS_SH..." - exec sh $DOFS_SH bsdlabel ia64 $FSIMG $RD $MNT $FSSIZE $FSPROTO $FSINODE $FSLABEL -fi - -export BLOCKSIZE=512 - -# Express the size on 512-byte blocks for newfs_msdos -FSSIZE=$((${FSSIZE}*2)) - -rm -f ${FSIMG} -dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=512 2>/dev/null - -if [ "x${MDDEVICE}" != "x" ] ; then - umount /dev/${MDDEVICE} 2>/dev/null || true - umount ${MNT} 2>/dev/null || true - mdconfig -d -u ${MDDEVICE} 2>/dev/null || true -fi - -MDDEVICE=`mdconfig -a -t vnode -f ${FSIMG}` -if [ ! -c /dev/${MDDEVICE} ] ; then - echo "No /dev/$MDDEVICE" 1>&2 - exit 1 -fi - -trap "umount ${MNT}; mdconfig -d -u ${MDDEVICE}" EXIT - -EFI_SIZE=$((${FSSIZE}-68)) - -gpt create ${MDDEVICE} -gpt add -s ${EFI_SIZE} -t c12a7328-f81f-11d2-ba4b-00a0c93ec93b ${MDDEVICE} -newfs_msdos -F 12 -S 512 -h 4 -o 0 -s ${EFI_SIZE} -u 16 ${MDDEVICE}p1 -mount -t msdos /dev/${MDDEVICE}p1 ${MNT} - -if [ -d ${FSPROTO} ]; then - (set -e && cd ${FSPROTO} && find . -print | cpio -dump ${MNT}) -else - cp -p ${FSPROTO} ${MNT} -fi - -# Do some post-population munging so that auto-boot works... -mkdir -p ${MNT}/efi/boot -mv ${MNT}/boot/loader.efi ${MNT}/efi/boot/bootia64.efi - -df -ki ${MNT} - -set `df -ki ${MNT} | tail -1` - -echo "*** Filesystem is ${FSSIZE} K, $4 left" -echo "*** ${FSINODE} bytes/inode, $7 left" diff --git a/release/ia64/mkisoimages.sh b/release/ia64/mkisoimages.sh index d8ea1356c33d..035bd21ca6f6 100644 --- a/release/ia64/mkisoimages.sh +++ b/release/ia64/mkisoimages.sh @@ -70,20 +70,20 @@ fi EFIPART=efipart.sys # To create a bootable CD under EFI, the boot image should be an EFI -# system partition. Since we already made that on the boot floppy, -# we sneakily extract that. +# system partition. if [ $bootable = yes ]; then - EFISZ=20480 + EFISZ=32768 MNT=/mnt dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ md=`mdconfig -a -t vnode -f $BASE/$EFIPART` newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md - mount -t msdos /dev/$md $MNT + mount -t msdosfs /dev/$md $MNT mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel cp -R $BASE/boot/defaults $MNT/boot cp $BASE/boot/kernel/kernel $MNT/boot/kernel cp $BASE/boot/device.hints $MNT/boot cp $BASE/boot/loader.* $MNT/boot + cp $BASE/boot/mfsroot.gz $MNT/boot cp $BASE/boot/support.4th $MNT/boot mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi umount $MNT