> Author: gjb > Date: Wed Apr 19 21:18:06 2017 > New Revision: 317169 > URL: > https://svnweb.freebsd.org/changeset/base/317169 > > > Log: > Trim trailing '/release/..' when setting _OBJDIR so arm64/aarch64 > boot1.efifat is properly located when creating virtual machine images. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/release/tools/vmimage.subr > > Modified: head/release/tools/vmimage.subr > ============================================================================== > --- head/release/tools/vmimage.subr Wed Apr 19 20:45:46 2017 > (r317168) > +++ head/release/tools/vmimage.subr Wed Apr 19 21:18:06 2017 > (r317169) > @@ -15,6 +15,7 @@ write_partition_layout() { > fi > > _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" > + _OBJDIR="$(realpath ${_OBJDIR})" > if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then > > BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" > else
In my experiments with making my own vmimage I had to make another change. Instead of just: _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" I had to add a use of realpath around ${WORLDDIR} to get the make -V .OBJDIR output to be correct: _OBJDIR="$(make -C $(realpath ${WORLDDIR}) -V .OBJDIR)" The .. use in WORLDDIR blocked the -V .OBJDIR from returning the relevant/correct path. This in turn lead to -p efi:=${BOOTFILES}/efi/boot1/boot1.efifat \ reporting the boot1.efifat as not found. With the additional realpath use the relevant/correct path was returned by -V .OBJDIR and boot1.efifat was found. (This is among other more experimental personal-use changes not appropriate to be checked-in. But the additional realpath use seemed to be appropriate svn content.) Other minor notes: BOOTFILES ends up with a leading // in a lot of contexts (including via the else clause assignment not shown). (Not a problem for me.) Use of /usr/src as the source tree is effectively required? (Not a problem for me.) For some reason aarch64 always has NOSWAP=1 and no provision for a swap partition. (This is part of why I was experimenting.) While Makefile.vm has "SWAPSIZE?= 1G", much like it has "VMSIZE?= 20G", SWAPSIZE does not have an equivalent of: scripts/mk-vmimage.sh: VMSIZE="${OPTARG}" and so any SWAPSIZE control is external and implicit. === Mark Millard markmi at dsl-only.net _______________________________________________ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"