- Removed vestiges of the IA64 boot floppy support.

- Fixed the bootable CD-ROM support for IA64.

Reviewed by:	marcel
Tested by:	marcel
This commit is contained in:
Ruslan Ermilov 2003-08-03 15:06:00 +00:00
parent 5ff0108d21
commit 8189277801
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118393
3 changed files with 5 additions and 81 deletions

View File

@ -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

View File

@ -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"

View File

@ -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