- 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:
parent
5ff0108d21
commit
8189277801
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118393
@ -249,9 +249,7 @@ CD_DISC2= ${CD}/disc2
|
|||||||
# Where the bootstrap ports (see DOCPORTS) get installed.
|
# Where the bootstrap ports (see DOCPORTS) get installed.
|
||||||
LOCALDIR= /usr/local/bin
|
LOCALDIR= /usr/local/bin
|
||||||
|
|
||||||
.if exists(${.CURDIR}/${TARGET_ARCH}/doFS.sh)
|
.if ${TARGET} != ${MACHINE}
|
||||||
DOFS_SH= ${.CURDIR}/${TARGET_ARCH}/doFS.sh
|
|
||||||
.elif ${TARGET} != ${MACHINE}
|
|
||||||
DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET}
|
DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET}
|
||||||
.else
|
.else
|
||||||
DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ""
|
DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ""
|
||||||
@ -1075,8 +1073,6 @@ doMFSKERN:
|
|||||||
.if ${TARGET} == "i386"
|
.if ${TARGET} == "i386"
|
||||||
@${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o \
|
@${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o \
|
||||||
-o ${RD}/image.${FSIMAGE}/boot/loader ${RD}/trees/base/boot/loader
|
-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
|
.else
|
||||||
@cp ${RD}/trees/base/boot/loader ${RD}/image.${FSIMAGE}/boot
|
@cp ${RD}/trees/base/boot/loader ${RD}/image.${FSIMAGE}/boot
|
||||||
.endif
|
.endif
|
||||||
@ -1092,9 +1088,7 @@ doMFSKERN:
|
|||||||
@echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
|
@echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
|
||||||
.endif
|
.endif
|
||||||
@echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
|
@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
|
@echo "set hint.acpi.0.disabled=1" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
|
||||||
.endif
|
|
||||||
@if [ -r ${RD}/floppies/drivers.flp ]; then \
|
@if [ -r ${RD}/floppies/drivers.flp ]; then \
|
||||||
echo "set driver_floppy=YES" >> ${RD}/image.${FSIMAGE}/boot/loader.rc; \
|
echo "set driver_floppy=YES" >> ${RD}/image.${FSIMAGE}/boot/loader.rc; \
|
||||||
fi
|
fi
|
||||||
|
@ -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"
|
|
@ -70,20 +70,20 @@ fi
|
|||||||
EFIPART=efipart.sys
|
EFIPART=efipart.sys
|
||||||
|
|
||||||
# To create a bootable CD under EFI, the boot image should be an EFI
|
# 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,
|
# system partition.
|
||||||
# we sneakily extract that.
|
|
||||||
if [ $bootable = yes ]; then
|
if [ $bootable = yes ]; then
|
||||||
EFISZ=20480
|
EFISZ=32768
|
||||||
MNT=/mnt
|
MNT=/mnt
|
||||||
dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
|
dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
|
||||||
md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
|
md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
|
||||||
newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md
|
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
|
mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel
|
||||||
cp -R $BASE/boot/defaults $MNT/boot
|
cp -R $BASE/boot/defaults $MNT/boot
|
||||||
cp $BASE/boot/kernel/kernel $MNT/boot/kernel
|
cp $BASE/boot/kernel/kernel $MNT/boot/kernel
|
||||||
cp $BASE/boot/device.hints $MNT/boot
|
cp $BASE/boot/device.hints $MNT/boot
|
||||||
cp $BASE/boot/loader.* $MNT/boot
|
cp $BASE/boot/loader.* $MNT/boot
|
||||||
|
cp $BASE/boot/mfsroot.gz $MNT/boot
|
||||||
cp $BASE/boot/support.4th $MNT/boot
|
cp $BASE/boot/support.4th $MNT/boot
|
||||||
mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi
|
mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi
|
||||||
umount $MNT
|
umount $MNT
|
||||||
|
Loading…
Reference in New Issue
Block a user