Page MenuHomeFreeBSD

D58957.id184322.diff
No OneTemporary

D58957.id184322.diff

diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -775,20 +775,6 @@
fi
)
-#
-# Create directories in the target tree, and record the fact. All paths
-# are relative to NANO_WORLDDIR.
-#
-tgt_dir() {
- for i; do
- mkdir -p "${NANO_WORLDDIR}/${i}"
-
- if [ -n "$NANO_METALOG" ]; then
- mtree_walk "$i"
- fi
- done
-}
-
#
# Generate metalog entries for each intermediate directory in a path.
# Assume default ownership and directory permissions
@@ -810,6 +796,20 @@
IFS="$oifs"
}
+#
+# Create directories in the target tree, and record the fact.
+# All paths are relative to NANO_WORLDDIR
+#
+tgt_dir() {
+ for i; do
+ mkdir -p "${NANO_WORLDDIR}/${i}"
+
+ if [ -n "$NANO_METALOG" ]; then
+ mtree_walk "$i"
+ fi
+ done
+}
+
#
# Remove files or directories in the target tree, and record the fact.
# All paths are relative to NANO_WORLDDIR
@@ -827,7 +827,7 @@
#
# Switch the current root partition in the target file system tab.
-# Takes two arguments: the current, and the new partition.
+# Input: $1 = current root partition, $2 = new root partition
#
tgt_switch_root_fstab()
{
@@ -840,17 +840,17 @@
done
}
-# run in the world chroot, errors fatal
+# Run in the world chroot, errors fatal
CR() {
chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*"
}
-# run in the world chroot, errors not fatal
+# Run in the world chroot, errors not fatal
CR0() {
chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true
}
-# Clean and create object directory (${MAKEOBJDIRPREFIX})
+# Clean and create object directory (MAKEOBJDIRPREFIX)
clean_build() {
pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})"
@@ -962,7 +962,7 @@
set -o xtrace
cd "${NANO_SRC}"
${NANO_MAKE} installworld DESTDIR="${NANO_WORLDDIR}" DB_FROM_SRC=yes
- chflags -R noschg "${NANO_WORLDDIR}"
+ # chflags -R noschg "${NANO_WORLDDIR}" # XXXJL
) > ${NANO_LOG}/_.iw 2>&1
}
@@ -1358,7 +1358,7 @@
#
# Convenient spot to work around any umount issues that your build environment
-# hits by overriding this method.
+# hits by overriding this method
#
nano_umount() {
umount ${1}
@@ -1381,7 +1381,7 @@
echo "Populating ${lbl} from ${dir}"
cd "${dir}"
find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' |
- cpio ${CPIO_SYMLINK} -dumpv ${mnt}
+ cpio ${CPIO_SYMLINK} -dumpv ${mnt}
fi
df -i ${mnt}
nano_umount ${mnt}
@@ -1593,7 +1593,7 @@
#######################################################################
# Install the stuff under ./Files
-# Copy all files from NANO_TOOLS/Files into NANO_WORLDDIR via cpio, apply optional mtree permissions
+# Copy all files from NANO_TOOLS/Files into NANO_WORLDDIR
cust_install_files() (
cd "${NANO_TOOLS}/Files"
find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' |
@@ -1723,11 +1723,13 @@
#
#######################################################################
+#
# Progress Print
-# Print $2 at level $1.
+# Input: $1 = level, $2 = message
+#
pprint() {
if [ "$1" -le $PPLEVEL ]; then
- runtime=$(( $(date +%s) - NANO_STARTTIME ))
+ runtime=$(( $(date +%s) - NANO_STARTTIME ))
printf "%s %.${1}s %s\n" \
"$(date -u -r $runtime +%H:%M:%S)" "#####" "$2" 1>&3
fi
diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh
--- a/tools/tools/nanobsd/legacy.sh
+++ b/tools/tools/nanobsd/legacy.sh
@@ -41,7 +41,10 @@
# Functions and variable definitions used by the legacy nanobsd
# image building system
-# Calculate MBR partition layout (start offset, size, index) from media/image/code/conf/data sizes
+#
+# Calculate MBR partition layout (start offset, size, index)
+# from media/image/code/conf/data sizes
+#
calculate_partitioning() {
echo $NANO_MEDIASIZE $NANO_IMAGES \
$NANO_SECTS $NANO_HEADS \
@@ -232,8 +235,6 @@
sh ${NANO_OBJ}/_.gpart ${MD}
gpart show ${MD}
- # XXX: params
- # XXX: pick up cached boot* files, they may not be in image anymore.
if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then
gpart bootcode -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOTFLAGS} ${MD}
boot0cfg ${NANO_BOOT0CFG} ${MD}

File Metadata

Mime Type
text/plain
Expires
Thu, Aug 27, 10:17 AM (6 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37298008
Default Alt Text
D58957.id184322.diff (4 KB)

Event Timeline