vmimage.subr (fa5696158827f18547be5f6b9ec49448b595d67d) | vmimage.subr (bf93ac7884ea3bb53b5c2d65f8d9df88fba6a6a2) |
---|---|
1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 9export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 10trap "cleanup" INT QUIT TRAP ABRT TERM 11 12write_partition_layout() { 13 if [ -z "${NOSWAP}" ]; then 14 SWAPOPT="-p freebsd-swap/swapfs::1G" 15 fi 16 | 1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 9export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 10trap "cleanup" INT QUIT TRAP ABRT TERM 11 12write_partition_layout() { 13 if [ -z "${NOSWAP}" ]; then 14 SWAPOPT="-p freebsd-swap/swapfs::1G" 15 fi 16 |
17 _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')" 18 if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then 19 BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" | 17 _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" 18 if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then 19 BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" |
20 else | 20 else |
21 BOOTFILES="${_OBJDIR}/usr/src/sys/boot" | 21 BOOTFILES="/${_OBJDIR}/sys/boot" |
22 fi 23 24 case "${TARGET}:${TARGET_ARCH}" in 25 amd64:amd64 | i386:i386) 26 mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ 27 -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ 28 ${SWAPOPT} \ 29 -p freebsd-ufs/rootfs:=${VMBASE} \ --- 203 unchanged lines hidden --- | 22 fi 23 24 case "${TARGET}:${TARGET_ARCH}" in 25 amd64:amd64 | i386:i386) 26 mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ 27 -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ 28 ${SWAPOPT} \ 29 -p freebsd-ufs/rootfs:=${VMBASE} \ --- 203 unchanged lines hidden --- |