aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/Makefile51
-rwxr-xr-xrelease/amd64/make-memstick.sh48
-rw-r--r--release/amd64/mkisoimages.sh39
-rwxr-xr-xrelease/arm64/make-memstick.sh44
-rw-r--r--release/arm64/mkisoimages.sh38
-rwxr-xr-xrelease/i386/make-memstick.sh46
-rw-r--r--release/i386/mkisoimages.sh36
-rw-r--r--release/packages/Makefile.package20
-rwxr-xr-xrelease/packages/generate-ucl.sh6
-rw-r--r--release/powerpc/mkisoimages.sh58
-rwxr-xr-xrelease/rc.local29
-rw-r--r--release/riscv/GENERICSD.conf2
-rwxr-xr-xrelease/riscv/make-memstick.sh44
-rw-r--r--release/riscv/mkisoimages.sh38
-rwxr-xr-xrelease/scripts/pkg-stage.sh4
-rw-r--r--release/tools/arm.subr7
-rw-r--r--release/tools/ec2.conf5
-rw-r--r--release/tools/gce.conf2
18 files changed, 403 insertions, 114 deletions
diff --git a/release/Makefile b/release/Makefile
index 646b9f8738d2..db9cc6b22cbe 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -117,12 +117,15 @@ clean: beforeclean
base.txz:
mkdir -p ${DISTDIR}
cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
+# TODO: Add NO_ROOT mode to mm-tree.sh and etcupdate
+.if !defined(NO_ROOT)
# Set up mergemaster root database
sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \
-D "${.OBJDIR}/${DISTDIR}/base"
etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
-s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate"
+.endif
# Package all components
cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
mv ${DISTDIR}/*.txz .
@@ -163,6 +166,12 @@ disc1: packagesystem
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
done
+.if defined(NO_ROOT)
+ echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
+ for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
+ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
+ done
+.endif
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -171,6 +180,13 @@ disc1: packagesystem
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
cp ${.CURDIR}/rc.local ${.TARGET}/etc
+.if defined(NO_ROOT)
+ echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
+ echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+.endif
touch ${.TARGET}
bootonly: packagesystem
@@ -187,6 +203,10 @@ bootonly: packagesystem
# Copy manifest only (no distfiles) to get checksums
mkdir -p ${.TARGET}/usr/freebsd-dist
cp MANIFEST ${.TARGET}/usr/freebsd-dist
+.if defined(NO_ROOT)
+ echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
+ echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+.endif
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -195,6 +215,13 @@ bootonly: packagesystem
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
cp ${.CURDIR}/rc.local ${.TARGET}/etc
+.if defined(NO_ROOT)
+ echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
+ echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+.endif
dvd: packagesystem
# Install system
@@ -208,6 +235,12 @@ dvd: packagesystem
for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
done
+.if defined(NO_ROOT)
+ echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
+ for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
+ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
+ done
+.endif
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -216,31 +249,39 @@ dvd: packagesystem
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
cp ${.CURDIR}/rc.local ${.TARGET}/etc
+.if defined(NO_ROOT)
+ echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
+ echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+ echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+.endif
touch ${.TARGET}
release.iso: disc1.iso
disc1.iso: disc1
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR}
+ cd disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
dvd1.iso: dvd pkg-stage
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR}
+ cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
bootonly.iso: bootonly
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR}
+ cd bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
memstick: memstick.img
memstick.img: disc1
- sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET}
+ cd disc1 && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
mini-memstick: mini-memstick.img
mini-memstick.img: bootonly
- sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET}
+ cd bootonly && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
touch ${.TARGET}
pkg-stage:
+# TODO: Support for -DNO_ROOT
.if !defined(NOPKG) || empty(NOPKG)
env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \
sh ${.CURDIR}/scripts/pkg-stage.sh
diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh
index c0e405c3a976..57902e559d10 100755
--- a/release/amd64/make-memstick.sh
+++ b/release/amd64/make-memstick.sh
@@ -5,7 +5,7 @@
# clean up after itself very well for error conditions on purpose so the
# problem can be diagnosed (full filesystem most likely but ...).
#
-# Usage: make-memstick.sh <directory tree> <image filename>
+# Usage: make-memstick.sh <directory tree or manifest> <image filename>
#
# $FreeBSD$
#
@@ -15,16 +15,26 @@ set -e
scriptdir=$(dirname $(realpath $0))
. ${scriptdir}/../../tools/boot/install-boot.sh
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export PATH
+if [ "$(uname -s)" = "FreeBSD" ]; then
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ export PATH
+fi
if [ $# -ne 2 ]; then
- echo "make-memstick.sh /path/to/directory /path/to/image/file"
+ echo "make-memstick.sh /path/to/directory/or/manifest /path/to/image/file"
exit 1
fi
-if [ ! -d ${1} ]; then
- echo "${1} must be a directory"
+MAKEFSARG=${1}
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
exit 1
fi
@@ -33,20 +43,30 @@ if [ -e ${2} ]; then
exit 1
fi
-echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
-echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
-makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1}
-rm ${1}/etc/fstab
-rm ${1}/etc/rc.conf.local
+echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab
+echo 'root_rw_mount="NO"' > ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ echo "./etc/rc.conf.local type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${MAKEFSARG}
+rm ${BASEBITSDIR}/etc/fstab
+rm ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
# Make an ESP in a file.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
-make_esp_file ${espfilename} ${fat32min} ${1}/boot/loader.efi
+make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
mkimg -s mbr \
- -b ${1}/boot/mbr \
+ -b ${BASEBITSDIR}/boot/mbr \
-p efi:=${espfilename} \
- -p freebsd:-"mkimg -s bsd -b ${1}/boot/boot -p freebsd-ufs:=${2}.part" \
+ -p freebsd:-"mkimg -s bsd -b ${BASEBITSDIR}/boot/boot -p freebsd-ufs:=${2}.part" \
-a 2 \
-o ${2}
rm ${espfilename}
diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh
index a9e8a2c04392..a90578c02ebd 100644
--- a/release/amd64/mkisoimages.sh
+++ b/release/amd64/mkisoimages.sh
@@ -41,7 +41,23 @@ if [ -z $MKIMG ]; then
fi
if [ "$1" = "-b" ]; then
- BASEBITSDIR="$4"
+ MAKEFSARG="$4"
+else
+ MAKEFSARG="$3"
+fi
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
+ exit 1
+fi
+
+if [ "$1" = "-b" ]; then
# This is highly x86-centric and will be used directly below.
bootable="-o bootimage=i386;$BASEBITSDIR/boot/cdboot -o no-emul-boot"
@@ -54,7 +70,6 @@ if [ "$1" = "-b" ]; then
shift
else
- BASEBITSDIR="$3"
bootable=""
fi
@@ -65,12 +80,23 @@ fi
LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
NAME="$1"; shift
+# MAKEFSARG extracted already
+shift
publisher="The FreeBSD Project. https://www.FreeBSD.org/"
echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab"
-$MAKEFS -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+$MAKEFS -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
rm -f "$BASEBITSDIR/etc/fstab"
rm -f ${espfilename}
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
if [ "$bootable" != "" ]; then
# Look for the EFI System Partition image we dropped in the ISO image.
@@ -85,15 +111,16 @@ if [ "$bootable" != "" ]; then
done
# Create a GPT image containing the partitions we need for hybrid boot.
+ hybridfilename=$(mktemp /tmp/hybrid.img.XXXXXX)
imgsize=`stat -f %z "$NAME"`
$MKIMG -s gpt \
--capacity $imgsize \
-b "$BASEBITSDIR/boot/pmbr" \
-p freebsd-boot:="$BASEBITSDIR/boot/isoboot" \
$espparam \
- -o hybrid.img
+ -o $hybridfilename
# Drop the PMBR, GPT, and boot code into the System Area of the ISO.
- dd if=hybrid.img of="$NAME" bs=32k count=1 conv=notrunc
- rm -f hybrid.img
+ dd if=$hybridfilename of="$NAME" bs=32k count=1 conv=notrunc
+ rm -f $hybridfilename
fi
diff --git a/release/arm64/make-memstick.sh b/release/arm64/make-memstick.sh
index 0cde77b018b8..9fcc001fc6fd 100755
--- a/release/arm64/make-memstick.sh
+++ b/release/arm64/make-memstick.sh
@@ -5,26 +5,36 @@
# clean up after itself very well for error conditions on purpose so the
# problem can be diagnosed (full filesystem most likely but ...).
#
-# Usage: make-memstick.sh <directory tree> <image filename>
+# Usage: make-memstick.sh <directory tree or manifest> <image filename>
#
# $FreeBSD$
#
set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export PATH
+if [ "$(uname -s)" = "FreeBSD" ]; then
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ export PATH
+fi
scriptdir=$(dirname $(realpath $0))
. ${scriptdir}/../../tools/boot/install-boot.sh
if [ $# -ne 2 ]; then
- echo "make-memstick.sh /path/to/directory /path/to/image/file"
+ echo "make-memstick.sh /path/to/directory/or/manifest /path/to/image/file"
exit 1
fi
-if [ ! -d ${1} ]; then
- echo "${1} must be a directory"
+MAKEFSARG=${1}
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
exit 1
fi
@@ -33,15 +43,25 @@ if [ -e ${2} ]; then
exit 1
fi
-echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
-echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
-makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1}
-rm ${1}/etc/fstab
-rm ${1}/etc/rc.conf.local
+echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab
+echo 'root_rw_mount="NO"' > ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ echo "./etc/rc.conf.local type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${MAKEFSARG}
+rm ${BASEBITSDIR}/etc/fstab
+rm ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
# Make an ESP in a file.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
-make_esp_file ${espfilename} ${fat32min} ${1}/boot/loader.efi
+make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
mkimg -s gpt \
-p efi:=${espfilename} \
diff --git a/release/arm64/mkisoimages.sh b/release/arm64/mkisoimages.sh
index 5556336840cd..e7e56eef1cb6 100644
--- a/release/arm64/mkisoimages.sh
+++ b/release/arm64/mkisoimages.sh
@@ -37,8 +37,23 @@ if [ -z $MKIMG ]; then
fi
if [ "$1" = "-b" ]; then
- BASEBITSDIR="$4"
+ MAKEFSARG="$4"
+else
+ MAKEFSARG="$3"
+fi
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
+ exit 1
+fi
+
+if [ "$1" = "-b" ]; then
# Make an EFI system partition.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
# ESP file size in KB.
@@ -49,7 +64,6 @@ if [ "$1" = "-b" ]; then
shift
else
- BASEBITSDIR="$3"
bootable=""
fi
@@ -60,12 +74,23 @@ fi
LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
NAME="$1"; shift
+# MAKEFSARG extracted already
+shift
publisher="The FreeBSD Project. https://www.FreeBSD.org/"
echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab"
-$MAKEFS -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+$MAKEFS -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
rm -f "$BASEBITSDIR/etc/fstab"
rm -f ${espfilename}
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
if [ "$bootable" != "" ]; then
# Look for the EFI System Partition image we dropped in the ISO image.
@@ -81,13 +106,14 @@ if [ "$bootable" != "" ]; then
done
# Create a GPT image containing the EFI partition.
+ efifilename=$(mktemp /tmp/efi.img.XXXXXX)
imgsize=`stat -f %z "$NAME"`
$MKIMG -s gpt \
--capacity $imgsize \
$espparam \
- -o efi.img
+ -o $efifilename
# Drop the GPT into the System Area of the ISO.
- dd if=efi.img of="$NAME" bs=32k count=1 conv=notrunc
- rm -f efi.img
+ dd if=$efifilename of="$NAME" bs=32k count=1 conv=notrunc
+ rm -f $efifilename
fi
diff --git a/release/i386/make-memstick.sh b/release/i386/make-memstick.sh
index 6774e86ae550..99f419fc0036 100755
--- a/release/i386/make-memstick.sh
+++ b/release/i386/make-memstick.sh
@@ -5,23 +5,33 @@
# clean up after itself very well for error conditions on purpose so the
# problem can be diagnosed (full filesystem most likely but ...).
#
-# Usage: make-memstick.sh <directory tree> <image filename>
+# Usage: make-memstick.sh <directory tree or manifest> <image filename>
#
# $FreeBSD$
#
set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export PATH
+if [ "$(uname -s)" = "FreeBSD" ]; then
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ export PATH
+fi
if [ $# -ne 2 ]; then
- echo "make-memstick.sh /path/to/directory /path/to/image/file"
+ echo "make-memstick.sh /path/to/directory/or/manifest /path/to/image/file"
exit 1
fi
-if [ ! -d ${1} ]; then
- echo "${1} must be a directory"
+MAKEFSARG=${1}
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
exit 1
fi
@@ -30,15 +40,25 @@ if [ -e ${2} ]; then
exit 1
fi
-echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
-echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
-makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1}
-rm ${1}/etc/fstab
-rm ${1}/etc/rc.conf.local
+echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab
+echo 'root_rw_mount="NO"' > ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ echo "./etc/rc.conf.local type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${MAKEFSARG}
+rm ${BASEBITSDIR}/etc/fstab
+rm ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
mkimg -s mbr \
- -b ${1}/boot/mbr \
- -p freebsd:-"mkimg -s bsd -b ${1}/boot/boot -p freebsd-ufs:=${2}.part" \
+ -b ${BASEBITSDIR}/boot/mbr \
+ -p freebsd:-"mkimg -s bsd -b ${BASEBITSDIR}/boot/boot -p freebsd-ufs:=${2}.part" \
-o ${2}
rm ${2}.part
diff --git a/release/i386/mkisoimages.sh b/release/i386/mkisoimages.sh
index b9eb893edeef..6ee7f72212c9 100644
--- a/release/i386/mkisoimages.sh
+++ b/release/i386/mkisoimages.sh
@@ -26,8 +26,25 @@
set -e
if [ "$1" = "-b" ]; then
+ MAKEFSARG="$4"
+else
+ MAKEFSARG="$3"
+fi
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
+ exit 1
+fi
+
+if [ "$1" = "-b" ]; then
# This is highly x86-centric and will be used directly below.
- bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot"
+ bootable="-o bootimage=i386;$BASEBITSDIR/boot/cdboot -o no-emul-boot"
shift
else
bootable=""
@@ -40,8 +57,19 @@ fi
LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
NAME="$1"; shift
+# MAKEFSARG extracted already
+shift
publisher="The FreeBSD Project. https://www.FreeBSD.org/"
-echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab"
-makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
-rm -f "$1/etc/fstab"
+echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab"
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
+rm -f "$BASEBITSDIR/etc/fstab"
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index 8abf7cbd5353..0edee34d8556 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -30,6 +30,8 @@ clang_COMMENT= Clang Utilities
clang_DESC= Clang Utilities
clibs_COMMENT= Core C Libraries
clibs_DESC= Core C Libraries
+csh_COMMENT= C Shell
+csh_DESC= C Shell
cxgbe-tools_COMMENT= Chelsio cxbge Utilities
cxgbe-tools_DESC= Chelsio cxbge Utilities
dma_COMMENT= DMA Mail Agent Utilities
@@ -44,8 +46,12 @@ ee_COMMENT= Easy Editor Utilities
ee_DESC= Easy Editor Utilities
efi-tools_COMMENT= UEFI Utilities
efi-tools_DESC= UEFI Utilities
+fetch_COMMENT= Fetch Utility
+fetch_DESC= Fetch Utility
ftp_COMMENT= FTP Utilities
ftp_DESC= FTP Utilities
+ftpd_COMMENT= FTP Daemon
+ftpd_DESC= FTP Daemon
gdb_COMMENT= GDB Utilities
gdb_DESC= GDB Utilities
ggate_COMMENT= GEOM Gate Utilities
@@ -75,10 +81,18 @@ manuals_COMMENT= Manual Pages
manuals_DESC= Manual Pages
mlx-tools_COMMENT= Mellanox Utilities
mlx-tools_DESC= Mellanox Utilities
+mtree_COMMENT= MTREE Files
+mtree_DESC= MTREE Files
+newsyslog_COMMENT= Newsyslog Utility
+newsyslog_DESC= Newsyslog Utility
nfs_COMMENT= NFS Utilities
nfs_DESC= NFS Utilities
openssl_COMMENT= OpenSSL Library and Utility
openssl_DESC= OpenSSL Library and Utility
+pkg-bootstrap_COMMENT= pkg bootstrap Utility
+pkg-bootstrap_DESC= pkg bootstrap Utility
+periodic_COMMENT= Periodic Utility
+periodic_DESC= Periodic Utility
rc_COMMENT= RC Scripts
rc_DESC= RC Scripts
rcmds_COMMENT= Remote Command Utilities
@@ -104,6 +118,10 @@ svn_COMMENT= Subversion Version Control System
svn_DESC= Subversion Version Control System
syscons_COMMENT= Syscons Console
syscons_DESC= Syscons Console
+syslogd_COMMENT= Syslog Daemon
+syslogd_DESC= Syslog Daemon
+tcpd_COMMENT= TCP Wrapper utilities
+tcpd_DESC= TCP Wrapper utilities
telnet_COMMENT= Telnet and telnetd
telnet_DESC= Telnet and telnetd
tests_COMMENT= Test Suite
@@ -118,3 +136,5 @@ vt_COMMENT= VT fonts and keyboard files
vt_DESC= VT fonts and keyboard files
wpa_COMMENT= 802.11 Supplicant
wpa_DESC= 802.11 Supplicant
+yp_COMMENT= Yellow Pages programs
+yp_DESC= Yellow Pages programs
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index 95a328d10637..2988b48b10a9 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -34,17 +34,19 @@ main() {
vital="false"
case "${outname}" in
+ bootloader)
+ pkgdeps=""
+ ;;
clibs)
vital="true"
# clibs should not have any dependencies or anything
# else imposed on it.
;;
caroot)
- pkgdeps="utilities"
+ pkgdeps="openssl"
;;
utilities)
uclfile="${uclfile}"
- vital="true"
;;
runtime)
outname="runtime"
diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh
index 2d5ea76ca7a2..0f13464567f1 100644
--- a/release/powerpc/mkisoimages.sh
+++ b/release/powerpc/mkisoimages.sh
@@ -26,6 +26,23 @@
set -e
if [ "$1" = "-b" ]; then
+ MAKEFSARG="$4"
+else
+ MAKEFSARG="$3"
+fi
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
+ exit 1
+fi
+
+if [ "$1" = "-b" ]; then
bootable=1
shift
else
@@ -39,6 +56,14 @@ fi
LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
NAME="$1"; shift
+# MAKEFSARG extracted already
+shift
+
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
if [ -n "$bootable" ]; then
echo "Building bootable disc"
@@ -48,14 +73,14 @@ if [ -n "$bootable" ]; then
bzip2 -d /tmp/hfs-boot-block.bz2
OFFSET=$(hd /tmp/hfs-boot-block | grep 'Loader START' | cut -f 1 -d ' ')
OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}')
- dd if="$1/boot/loader" of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc
+ dd if="$BASEBITSDIR/boot/loader" of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc
bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot"
# pSeries/PAPR boot code
- mkdir -p "$1/ppc/chrp"
- cp "$1/boot/loader" "$1/ppc/chrp"
- cat > "$1/ppc/bootinfo.txt" << EOF
+ mkdir -p "$BASEBITSDIR/ppc/chrp"
+ cp "$BASEBITSDIR/boot/loader" "$BASEBITSDIR/ppc/chrp"
+ cat > "$BASEBITSDIR/ppc/bootinfo.txt" << EOF
<chrp-boot>
<description>FreeBSD Install</description>
<os-name>FreeBSD</os-name>
@@ -63,14 +88,29 @@ if [ -n "$bootable" ]; then
</chrp-boot>
EOF
bootable="$bootable -o chrp-boot"
+ if [ -n "${METALOG}" ]; then
+ echo "./ppc type=dir uname=root gname=wheel mode=0755" >> ${metalogfilename}
+ echo "./ppc/chrp type=dir uname=root gname=wheel mode=0755" >> ${metalogfilename}
+ echo "./ppc/chrp/loader type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ echo "./ppc/bootinfo.txt type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ fi
# Petitboot config for PS3/PowerNV
- echo FreeBSD Install=\'/boot/kernel/kernel vfs.root.mountfrom=cd9660:/dev/iso9660/$LABEL\' > "$1/etc/kboot.conf"
+ echo FreeBSD Install=\'/boot/kernel/kernel vfs.root.mountfrom=cd9660:/dev/iso9660/$LABEL\' > "$BASEBITSDIR/etc/kboot.conf"
+ if [ -n "${METALOG}" ]; then
+ echo "./etc/kboot.conf type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ fi
fi
publisher="The FreeBSD Project. https://www.FreeBSD.org/"
-echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab"
-makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
-rm -f "$1/etc/fstab"
+echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab"
+if [ -n "${METALOG}" ]; then
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
+rm -f "$BASEBITSDIR/etc/fstab"
rm -f /tmp/hfs-boot-block
-rm -rf "$1/ppc"
+rm -rf "$BASEBITSDIR/ppc"
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
diff --git a/release/rc.local b/release/rc.local
index 8162cd1efff6..0b8df48b2085 100755
--- a/release/rc.local
+++ b/release/rc.local
@@ -1,12 +1,12 @@
#!/bin/sh
# $FreeBSD$
-: ${DIALOG_OK=0}
-: ${DIALOG_CANCEL=1}
-: ${DIALOG_HELP=2}
-: ${DIALOG_EXTRA=3}
-: ${DIALOG_ITEM_HELP=4}
-: ${DIALOG_ESC=255}
+: ${BSDDIALOG_OK=0}
+: ${BSDDIALOG_CANCEL=1}
+: ${BSDDIALOG_HELP=2}
+: ${BSDDIALOG_EXTRA=3}
+: ${BSDDIALOG_ESC=5}
+: ${BSDDIALOG_ERROR=255}
MACHINE=`uname -m`
@@ -48,20 +48,23 @@ else
fi
export TERM
+# Query terminal size; useful for serial lines.
+resizewin -z
+
if [ -f /etc/installerconfig ]; then
if bsdinstall script /etc/installerconfig; then
- dialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10
+ bsddialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10
reboot
else
- dialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
+ bsddialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
fi
exit
fi
-dialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0
+bsddialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0
case $? in
-$DIALOG_OK) # Install
+$BSDDIALOG_OK) # Install
# If not netbooting, have the installer configure the network
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -eq 0 -a ! -f /etc/diskless ]; then
@@ -71,15 +74,15 @@ $DIALOG_OK) # Install
trap true SIGINT # Ignore cntrl-C here
bsdinstall
if [ $? -eq 0 ]; then
- dialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 && reboot
+ bsddialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 && reboot
else
. /etc/rc.local
fi
;;
-$DIALOG_CANCEL) # Live CD
+$BSDDIALOG_CANCEL) # Live CD
exit 0
;;
-$DIALOG_EXTRA) # Shell
+$BSDDIALOG_EXTRA) # Shell
clear
echo "When finished, type 'exit' to return to the installer."
/bin/sh
diff --git a/release/riscv/GENERICSD.conf b/release/riscv/GENERICSD.conf
index d85a8ff7cd93..e969914dabe5 100644
--- a/release/riscv/GENERICSD.conf
+++ b/release/riscv/GENERICSD.conf
@@ -8,7 +8,7 @@ EMBEDDED_TARGET="riscv"
EMBEDDEDBUILD=1
FAT_SIZE="54m -b 8m"
FAT_TYPE="16"
-IMAGE_SIZE="3072M"
+IMAGE_SIZE="4096M"
KERNEL="GENERIC"
MD_ARGS="-x 63 -y 255"
PART_SCHEME="GPT"
diff --git a/release/riscv/make-memstick.sh b/release/riscv/make-memstick.sh
index 0cde77b018b8..9fcc001fc6fd 100755
--- a/release/riscv/make-memstick.sh
+++ b/release/riscv/make-memstick.sh
@@ -5,26 +5,36 @@
# clean up after itself very well for error conditions on purpose so the
# problem can be diagnosed (full filesystem most likely but ...).
#
-# Usage: make-memstick.sh <directory tree> <image filename>
+# Usage: make-memstick.sh <directory tree or manifest> <image filename>
#
# $FreeBSD$
#
set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export PATH
+if [ "$(uname -s)" = "FreeBSD" ]; then
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ export PATH
+fi
scriptdir=$(dirname $(realpath $0))
. ${scriptdir}/../../tools/boot/install-boot.sh
if [ $# -ne 2 ]; then
- echo "make-memstick.sh /path/to/directory /path/to/image/file"
+ echo "make-memstick.sh /path/to/directory/or/manifest /path/to/image/file"
exit 1
fi
-if [ ! -d ${1} ]; then
- echo "${1} must be a directory"
+MAKEFSARG=${1}
+
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
exit 1
fi
@@ -33,15 +43,25 @@ if [ -e ${2} ]; then
exit 1
fi
-echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
-echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
-makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1}
-rm ${1}/etc/fstab
-rm ${1}/etc/rc.conf.local
+echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab
+echo 'root_rw_mount="NO"' > ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ echo "./etc/rc.conf.local type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+makefs -D -N ${BASEBITSDIR}/etc -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${MAKEFSARG}
+rm ${BASEBITSDIR}/etc/fstab
+rm ${BASEBITSDIR}/etc/rc.conf.local
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
# Make an ESP in a file.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
-make_esp_file ${espfilename} ${fat32min} ${1}/boot/loader.efi
+make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
mkimg -s gpt \
-p efi:=${espfilename} \
diff --git a/release/riscv/mkisoimages.sh b/release/riscv/mkisoimages.sh
index 5556336840cd..e7e56eef1cb6 100644
--- a/release/riscv/mkisoimages.sh
+++ b/release/riscv/mkisoimages.sh
@@ -37,8 +37,23 @@ if [ -z $MKIMG ]; then
fi
if [ "$1" = "-b" ]; then
- BASEBITSDIR="$4"
+ MAKEFSARG="$4"
+else
+ MAKEFSARG="$3"
+fi
+if [ -f ${MAKEFSARG} ]; then
+ BASEBITSDIR=`dirname ${MAKEFSARG}`
+ METALOG=${MAKEFSARG}
+elif [ -d ${MAKEFSARG} ]; then
+ BASEBITSDIR=${MAKEFSARG}
+ METALOG=
+else
+ echo "${MAKEFSARG} must exist"
+ exit 1
+fi
+
+if [ "$1" = "-b" ]; then
# Make an EFI system partition.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
# ESP file size in KB.
@@ -49,7 +64,6 @@ if [ "$1" = "-b" ]; then
shift
else
- BASEBITSDIR="$3"
bootable=""
fi
@@ -60,12 +74,23 @@ fi
LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift
NAME="$1"; shift
+# MAKEFSARG extracted already
+shift
publisher="The FreeBSD Project. https://www.FreeBSD.org/"
echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab"
-$MAKEFS -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@"
+if [ -n "${METALOG}" ]; then
+ metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
+ cat ${METALOG} > ${metalogfilename}
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
+ MAKEFSARG=${metalogfilename}
+fi
+$MAKEFS -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
rm -f "$BASEBITSDIR/etc/fstab"
rm -f ${espfilename}
+if [ -n "${METALOG}" ]; then
+ rm ${metalogfilename}
+fi
if [ "$bootable" != "" ]; then
# Look for the EFI System Partition image we dropped in the ISO image.
@@ -81,13 +106,14 @@ if [ "$bootable" != "" ]; then
done
# Create a GPT image containing the EFI partition.
+ efifilename=$(mktemp /tmp/efi.img.XXXXXX)
imgsize=`stat -f %z "$NAME"`
$MKIMG -s gpt \
--capacity $imgsize \
$espparam \
- -o efi.img
+ -o $efifilename
# Drop the GPT into the System Area of the ISO.
- dd if=efi.img of="$NAME" bs=32k count=1 conv=notrunc
- rm -f efi.img
+ dd if=$efifilename of="$NAME" bs=32k count=1 conv=notrunc
+ rm -f $efifilename
fi
diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index 6dd9f2b62f27..f1bb19636f75 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -86,7 +86,9 @@ ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
# using the on-disc packages.
mkdir -p ${PKG_REPODIR}/Latest
(cd ${PKG_REPODIR}/Latest && \
- ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
+ ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).pkg pkg.pkg)
+(cd ${PKG_REPODIR}/Latest && \
+ rm -f pkg.txz && ln -s pkg.pkg pkg.txz)
${PKGCMD} repo ${PKG_REPODIR}
diff --git a/release/tools/arm.subr b/release/tools/arm.subr
index 89b52077e836..3dea17339958 100644
--- a/release/tools/arm.subr
+++ b/release/tools/arm.subr
@@ -77,7 +77,7 @@ arm_create_disk() {
chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1
chroot ${CHROOTDIR} gpart add -t freebsd ${mddev}
chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2
- chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2
+ chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k ${mddev}s2
chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a
fi
@@ -244,11 +244,6 @@ arm_install_boot() {
chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT}
chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT}
- if [ "${EMBEDDED_TARGET}" = "arm" ]; then
- chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
- ${FATMOUNT}/ubldr.bin
- fi
-
BOOTFILES="$(chroot ${CHROOTDIR} \
env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
WITH_UNIFIED_OBJDIR=yes \
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index f0665646088b..5be4937379a0 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -122,10 +122,9 @@ EOF
# historical "nvd" driver.
echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf
- # Disable ChallengeResponseAuthentication according to EC2
- # requirements.
+ # Disable KbdInteractiveAuthentication according to EC2 requirements.
sed -i '' -e \
- 's/^#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \
+ 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \
${DESTDIR}/etc/ssh/sshd_config
# Use FreeBSD Update and Portsnap mirrors hosted in AWS
diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index 745477f0bc8e..74e7455cb9dd 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -70,7 +70,7 @@ EOF
EOF
cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config
-ChallengeResponseAuthentication no
+KbdInteractiveAuthentication no
X11Forwarding no
AcceptEnv LANG
AllowAgentForwarding no