svn commit: r295376 - head/tools/tools/nanobsd
Warner Losh
imp at FreeBSD.org
Sun Feb 7 16:44:07 UTC 2016
Author: imp
Date: Sun Feb 7 16:44:06 2016
New Revision: 295376
URL: https://svnweb.freebsd.org/changeset/base/295376
Log:
Use NANO_LOG instead of NANO_OBJ for log file locations. Have it
default to NANO_OBJ.
Modified:
head/tools/tools/nanobsd/defaults.sh (contents, props changed)
Modified: head/tools/tools/nanobsd/defaults.sh
==============================================================================
--- head/tools/tools/nanobsd/defaults.sh Sun Feb 7 16:44:04 2016 (r295375)
+++ head/tools/tools/nanobsd/defaults.sh Sun Feb 7 16:44:06 2016 (r295376)
@@ -356,7 +356,7 @@ clean_world ( ) (
rm -r ${NANO_OBJ}/
fi
mkdir -p "${NANO_OBJ}" "${NANO_WORLDDIR}"
- printenv > ${NANO_OBJ}/_.env
+ printenv > ${NANO_LOG}/_.env
else
pprint 2 "Clean and create world directory (${NANO_WORLDDIR})"
if ! rm -rf "${NANO_WORLDDIR}/" > /dev/null 2>&1 ; then
@@ -385,7 +385,7 @@ make_conf_install ( ) (
install_world ( ) (
pprint 2 "installworld"
- pprint 3 "log: ${NANO_OBJ}/_.iw"
+ pprint 3 "log: ${NANO_LOG}/_.iw"
(
nano_make_install_env
@@ -393,13 +393,13 @@ install_world ( ) (
cd "${NANO_SRC}"
${NANO_MAKE} installworld DESTDIR="${NANO_WORLDDIR}"
chflags -R noschg "${NANO_WORLDDIR}"
- ) > ${NANO_OBJ}/_.iw 2>&1
+ ) > ${NANO_LOG}/_.iw 2>&1
)
install_etc ( ) (
pprint 2 "install /etc"
- pprint 3 "log: ${NANO_OBJ}/_.etc"
+ pprint 3 "log: ${NANO_LOG}/_.etc"
(
nano_make_install_env
@@ -409,14 +409,14 @@ install_etc ( ) (
# make.conf doesn't get created by default, but some ports need it
# so they can spam it.
cp /dev/null "${NANO_WORLDDIR}"/etc/make.conf
- ) > ${NANO_OBJ}/_.etc 2>&1
+ ) > ${NANO_LOG}/_.etc 2>&1
)
install_kernel ( ) (
local extra
pprint 2 "install kernel ($NANO_KERNEL)"
- pprint 3 "log: ${NANO_OBJ}/_.ik"
+ pprint 3 "log: ${NANO_LOG}/_.ik"
(
@@ -432,12 +432,12 @@ install_kernel ( ) (
cd "${NANO_SRC}"
${NANO_MAKE} installkernel DESTDIR="${NANO_WORLDDIR}"
- ) > ${NANO_OBJ}/_.ik 2>&1
+ ) > ${NANO_LOG}/_.ik 2>&1
)
native_xtools ( ) (
print 2 "Installing the optimized native build tools for cross env"
- pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
+ pprint 3 "log: ${NANO_LOG}/_.native_xtools"
(
@@ -446,7 +446,7 @@ native_xtools ( ) (
cd "${NANO_SRC}"
${NANO_MAKE} native-xtools DESTDIR="${NANO_WORLDDIR}"
- ) > ${NANO_OBJ}/_.native_xtools 2>&1
+ ) > ${NANO_LOG}/_.native_xtools 2>&1
)
#
@@ -460,9 +460,9 @@ run_customize ( ) (
for c in $NANO_CUSTOMIZE
do
pprint 2 "customize \"$c\""
- pprint 3 "log: ${NANO_OBJ}/_.cust.$c"
+ pprint 3 "log: ${NANO_LOG}/_.cust.$c"
pprint 4 "`type $c`"
- ( set -x ; $c ) > ${NANO_OBJ}/_.cust.$c 2>&1
+ ( set -x ; $c ) > ${NANO_LOG}/_.cust.$c 2>&1
done
)
@@ -476,9 +476,9 @@ run_late_customize ( ) (
for c in $NANO_LATE_CUSTOMIZE
do
pprint 2 "late customize \"$c\""
- pprint 3 "log: ${NANO_OBJ}/_.late_cust.$c"
+ pprint 3 "log: ${NANO_LOG}/_.late_cust.$c"
pprint 4 "`type $c`"
- ( set -x ; $c ) > ${NANO_OBJ}/_.late_cust.$c 2>&1
+ ( set -x ; $c ) > ${NANO_LOG}/_.late_cust.$c 2>&1
done
)
@@ -510,7 +510,7 @@ fixup_before_diskimage ( ) (
setup_nanobsd ( ) (
pprint 2 "configure nanobsd setup"
- pprint 3 "log: ${NANO_OBJ}/_.dl"
+ pprint 3 "log: ${NANO_LOG}/_.dl"
(
cd "${NANO_WORLDDIR}"
@@ -547,7 +547,7 @@ setup_nanobsd ( ) (
# Put /tmp on the /var ramdisk (could be symlink already)
tgt_dir2symlink tmp var/tmp
- ) > ${NANO_OBJ}/_.dl 2>&1
+ ) > ${NANO_LOG}/_.dl 2>&1
)
setup_nanobsd_etc ( ) (
@@ -630,7 +630,7 @@ populate_data_slice ( ) (
create_diskimage ( ) (
pprint 2 "build diskimage"
- pprint 3 "log: ${NANO_OBJ}/_.di"
+ pprint 3 "log: ${NANO_LOG}/_.di"
(
echo $NANO_MEDIASIZE $NANO_IMAGES \
@@ -699,7 +699,7 @@ create_diskimage ( ) (
# for booting the image from a USB device to work.
print "a 1"
}
- ' > ${NANO_OBJ}/_.fdisk
+ ' > ${NANO_LOG}/_.fdisk
IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME}
MNT=${NANO_OBJ}/_.mnt
@@ -718,7 +718,7 @@ create_diskimage ( ) (
trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
- fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD}
+ fdisk -i -f ${NANO_LOG}/_.fdisk ${MD}
fdisk ${MD}
# XXX: params
# XXX: pick up cached boot* files, they may not be in image anymore.
@@ -736,8 +736,8 @@ create_diskimage ( ) (
populate_slice /dev/${MD}${NANO_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}"
mount /dev/${MD}${NANO_ROOT} ${MNT}
echo "Generating mtree..."
- ( cd "${MNT}" && mtree -c ) > ${NANO_OBJ}/_.mtree
- ( cd "${MNT}" && du -k ) > ${NANO_OBJ}/_.du
+ ( cd "${MNT}" && mtree -c ) > ${NANO_LOG}/_.mtree
+ ( cd "${MNT}" && du -k ) > ${NANO_LOG}/_.du
nano_umount "${MNT}"
if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then
@@ -792,7 +792,7 @@ create_diskimage ( ) (
trap - 1 2 15
trap nano_cleanup EXIT
- ) > ${NANO_OBJ}/_.di 2>&1
+ ) > ${NANO_LOG}/_.di 2>&1
)
last_orders ( ) (
@@ -1026,7 +1026,8 @@ set_defaults_and_export ( ) {
: ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}}
: ${MAKEOBJDIRPREFIX:=${NANO_OBJ}}
: ${NANO_DISKIMGDIR:=${NANO_OBJ}}
- NANO_WORLDDIR=${NANO_OBJ}/_.w
+ : ${NANO_WORLDDIR:=${NANO_OBJ}/_.w}
+ : ${NANO_LOG:=${NANO_OBJ}}
NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build
NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install
@@ -1070,6 +1071,7 @@ set_defaults_and_export ( ) {
export_var NANO_MODULES
export_var NANO_NOPRIV_BUILD
export_var NANO_METALOG
+ export_var NANO_LOG
export_var SRCCONF
export_var SRC_ENV_CONF
}
More information about the svn-src-all
mailing list