Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167103729
D54979.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D54979.id.diff
View Options
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
@@ -424,8 +424,8 @@
echo "${CONF_WORLD}"
echo "${CONF_INSTALL}"
if [ -n "${NANO_NOPRIV_BUILD}" ]; then
- echo NO_ROOT=t
- echo METALOG=${NANO_METALOG}
+ echo NO_ROOT=true
+ echo METALOG=${NANO_METALOG}
fi
) > ${NANO_MAKE_CONF_INSTALL}
}
diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common
--- a/tools/tools/nanobsd/embedded/common
+++ b/tools/tools/nanobsd/embedded/common
@@ -83,7 +83,6 @@
NANO_CFG_BASE=$(pwd)
NANO_CFG_BASE=$(realpath ${NANO_CFG_BASE}/..)
NANO_SRC=$(realpath ${NANO_CFG_BASE}/../../..)
-#### XXX share obj
if [ -z ${NANO_CPUTYPE} ]; then
NANO_OBJ=${NANO_SRC}/../embedded/obj
else
@@ -95,7 +94,7 @@
NANO_DISKIMGDIR=${NANO_OBJ}/../images
NANO_WORLDDIR=${NANO_LOG}/_.w
NANO_INIT_IMG2=0
-NANO_NOPRIV_BUILD=t
+NANO_NOPRIV_BUILD=true
unset MAKEOBJDIRPREFIX
mkdir -p ${NANO_OBJ}
@@ -149,13 +148,13 @@
WITHOUT_SYSCONS=true
WITHOUT_LIB32=true
WITHOUT_TESTS=true
-WITHOUT_DEBUG_FILES=t
-WITHOUT_KERNEL_SYMBOLS=t
+WITHOUT_DEBUG_FILES=true
+WITHOUT_KERNEL_SYMBOLS=true
"
CONF_INSTALL="$CONF_BUILD
-INSTALL_NODEBUG=t
-NOPORTDOCS=t
-NO_INSTALL_MANPAGES=t
+INSTALL_NODEBUG=true
+NOPORTDOCS=true
+NO_INSTALL_MANPAGES=true
"
# The following would help...
# WITHOUT_TOOLCHAIN=true can't build ports
@@ -203,7 +202,6 @@
}
create_diskimage_mbr() {
-
local fmt
[ -z ${NANO_DISKIMAGE_FORMAT} ] || fmt=".${NANO_DISKIMAGE_FORMAT}"
@@ -268,11 +266,11 @@
[ -z ${NANO_NOPRIV_BUILD} ] || extra="-F ${NANO_METALOG}"
sz=${NANO_SLICE_ROOT_SIZE:+-s ${NANO_SLICE_ROOT_SIZE}}
eval "${NANO_MAKEFS_UFS}" ${extra} $sz "${NANO_LOG}/_.${NANO_ROOT}" \
- "${NANO_WORLDDIR}"
+ "${NANO_WORLDDIR}"
case ${NANO_DISK_SCHEME} in
mbr)
mkimg -s bsd ${bootbsd} -p freebsd-ufs:=${NANO_LOG}/_.${NANO_ROOT} \
- -o ${NANO_LOG}/_.${NANO_SLICE_ROOT}
+ -o ${NANO_LOG}/_.${NANO_SLICE_ROOT}
eval $NANO_SLICE_CFG=freebsd
eval $NANO_SLICE_ROOT=freebsd
;;
@@ -290,9 +288,9 @@
fi
# XXX -F cfg-mtree
eval "${NANO_MAKEFS_UFS}" -s ${NANO_SLICE_CFG_SIZE} \
- "${NANO_LOG}/_.${NANO_SLICE_CFG}" "${NANO_CFGDIR}"
+ "${NANO_LOG}/_.${NANO_SLICE_CFG}" "${NANO_CFGDIR}"
- # data slice not supported since we need the part for FAT for
+ # data slice not supported since we need the part for FAT for
# booting
# Now shuffle all the slices together into the proper layout
@@ -307,37 +305,35 @@
case ${NANO_LAYOUT} in
std-embedded)
mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \
- -p ${s2}:=${NANO_LOG}/_.s2 \
- -p ${s3}:=${NANO_LOG}/_.s3 \
- -o ${out}
+ -p ${s2}:=${NANO_LOG}/_.s2 \
+ -p ${s3}:=${NANO_LOG}/_.s3 \
+ -o ${out}
;;
std-x86)
# s3 is cfg, s1 is /, s2 is other / (s2 is created in first boot script)
mkimg -a 1 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \
- -p- \
- -p ${s3}:=${NANO_LOG}/_.s3 \
- -o ${out}
-
-
+ -p- \
+ -p ${s3}:=${NANO_LOG}/_.s3 \
+ -o ${out}
;;
std-uefi)
# s1 is boot, s2 is cfg, s3 is /, not sure how to make that
# boot (marked as active) with mkimg yet
mkimg -a 2 ${fmtarg} ${bootmbr} -s mbr \
- -p efi:=${NANO_WORLDDIR}/boot/efiboot.img \
- -p ${s2}:=${NANO_LOG}/_.s2 \
- -p ${s3}:=${NANO_LOG}/_.s3 \
- -o ${out}
+ -p efi:=${NANO_WORLDDIR}/boot/efiboot.img \
+ -p ${s2}:=${NANO_LOG}/_.s2 \
+ -p ${s3}:=${NANO_LOG}/_.s3 \
+ -o ${out}
;;
std-uefi-bios)
# p1 is boot for uefi, p2 is boot for gpt, p3 is cfg, p4 is /
# and p5 is alt-root (after resize)
mkimg -a 2 ${fmtarg} ${bootmbr} -s gpt \
- -p efi/efiboot0:=${NANO_WORLDDIR}/boot/efiboot.img \
- -p freebsd-boot:=${NANO_WORLDDIR}/boot/gptboot \
- -p ${p3}/cfg:=${NANO_LOG}/_.p3 \
- -p ${p4}:=${NANO_LOG}/_.p4 \
- -o ${out}
+ -p efi/efiboot0:=${NANO_WORLDDIR}/boot/efiboot.img \
+ -p freebsd-boot:=${NANO_WORLDDIR}/boot/gptboot \
+ -p ${p3}/cfg:=${NANO_LOG}/_.p3 \
+ -p ${p4}:=${NANO_LOG}/_.p4 \
+ -o ${out}
;;
powerpc64-ibm)
# A lie to make the boot loader work, it boots the first BSD partition
@@ -347,9 +343,9 @@
# partition isn't FAT with special files, but a copy of the boot
# loader itself.
mkimg -a 1 ${fmtarg} -s mbr -p prepboot:=${NANO_LOG}/_.s1 \
- -p ${s2}:=${NANO_LOG}/_.s2 \
- -p ${s3}:=${NANO_LOG}/_.s3a \
- -o ${out}
+ -p ${s2}:=${NANO_LOG}/_.s2 \
+ -p ${s3}:=${NANO_LOG}/_.s3a \
+ -o ${out}
;;
esac
rm -f ${out}.xz
@@ -357,7 +353,7 @@
) > ${NANO_LOG}/_.di 2>&1
}
-die( ) {
+die() {
echo "$*"
exit 1
}
@@ -374,8 +370,8 @@
rp=$(realpath ${NANO_OBJ}/)
__a=`mount | grep ${rp} | awk '{print length($3), $3;}' | sort -rn | awk '{$1=""; print;}'`
if [ -n "$__a" ]; then
- echo "unmounting $__a"
- umount $__a
+ echo "unmounting $__a"
+ umount $__a
fi
if [ "$DEBUG" = 1 ]; then
@@ -384,7 +380,7 @@
"
else
DEBUG_INSTALL="
-INSTALL_NODEBUG= t
+INSTALL_NODEBUG= true
"
fi
@@ -396,7 +392,7 @@
"
if [ "${NANO_PACKAGE_ONLY}" -eq 1 ]; then
- CONF_INSTALL="${CONF_INSTALL}
+ CONF_INSTALL="${CONF_INSTALL}
${PKG_ONLY_MAKE_CONF}
"
echo "Automatically building a thin image with packages"
@@ -439,10 +435,11 @@
mkdir -p pkg/tmp # Needed for pkg bootstrap
mkdir -p usr/local/etc # Will get moved to local/etc
(
- echo 'PKG_DBDIR = "/pkg/db"'
- echo 'PKG_CACHEDIR = "/pkg/cache"'
- echo 'DEFAULT_ALWAYS_YES = "yes"'
- echo 'ASSUME_ALWAYS_YES = "yes"'
+ echo 'PKG_DBDIR = "/pkg/db";'
+ echo 'PKG_CACHEDIR = "/pkg/cache";'
+ echo 'TMPDIR = "/pkg/tmp";'
+ echo 'DEFAULT_ALWAYS_YES = true;'
+ echo 'ASSUME_ALWAYS_YES = true;'
) >> usr/local/etc/pkg.conf
[ -z ${NANO_NOPRIV_BUILD} ] || (
echo "./pkg type=dir uname=root gname=wheel mode=0755"
@@ -470,7 +467,7 @@
# and gives us more back on 9.x as the default block and frag size
# are 4 times larger).
sed -i '' -e 's,-S -i 4096,-S -i 4096 -b 4096 -f 512,' \
- ${NANO_WORLDDIR}/etc/rc.initdiskless
+ ${NANO_WORLDDIR}/etc/rc.initdiskless
}
customize_cmd shrink_md_fbsize
@@ -531,17 +528,17 @@
# set global variables
#
-std_aarch64 ( ) {
+std_aarch64() {
}
-std_amd64 ( ) {
+std_amd64() {
std_i386
}
-std_armv7 ( ) {
+std_armv7() {
}
-std_i386 ( ) {
+std_i386() {
# Default values, if not overridden in .cfg file
: ${NANO_KERNEL:=GENERIC}
: ${NANO_DRIVE:=ada0}
@@ -550,11 +547,11 @@
: ${NANO_BOOT_BSD:=${NANO_WORLDDIR}/boot/boot}
}
-std_powerpc ( ) {
+std_powerpc() {
NANO_ENDIAN=big
}
-std_powerpc64 ( ) {
+std_powerpc64() {
NANO_LAYOUT=powerpc64-ibm
NANO_ENDIAN=big
}
@@ -562,8 +559,7 @@
#
# QEMU settings for the standard environments
#
-qemu_env ( ) {
-
+qemu_env() {
NANO_DISKIMAGE_FORMAT=qcow2
}
@@ -594,7 +590,7 @@
: ${NANO_ENDIAN:=little} # make -V something to figure it out?
: ${NANO_LAYOUT:=std-embedded}
: ${NANO_MAKEFS_UFS:=makefs -t ffs -B ${NANO_ENDIAN}}
-: ${NANO_DISK_SCHEME:=mbr} # No others really supported ATM (well, gpt)
+: ${NANO_DISK_SCHEME:=mbr} # No others really supported ATM (well, gpt)
case ${NANO_LAYOUT} in
std-embedded)
NANO_SLICE_FAT=s1
diff --git a/tools/tools/nanobsd/fill_pkg.sh b/tools/tools/nanobsd/fill_pkg.sh
--- a/tools/tools/nanobsd/fill_pkg.sh
+++ b/tools/tools/nanobsd/fill_pkg.sh
@@ -35,18 +35,18 @@
: ${PORTSDIR:=/usr/ports}
-usage () {
+usage() {
echo "Usage: $0 [-cv] package-dump-dir nano-package-dir port-dir-or-pkg ..." 1>&2
exit 2
}
-msg () {
+msg() {
local l
l=$1 ; shift
[ "$l" -le "$VERBOSE" ] && echo $*
}
-ports_recurse() (
+ports_recurse() {
local outputfile dumpdir type fullpath pkgname p
outputfile=$1 ; shift
dumpdir=$1 ; shift
@@ -100,9 +100,9 @@
else
dir=`dirname "$p"` # Get directory from SPECIFIED path, not from full path
if [ "$dir" = "." ] ; then
- dir=""
+ dir=""
else
- dir=${dir}/
+ dir=${dir}/
fi
deps=`pkg info -dF "$fullpath" | grep -v "$pkgname:"`
for dep in $deps ; do
@@ -114,7 +114,7 @@
echo "$pkgname" >> "$outputfile"
fi
done
-)
+}
COPY="ln -s"
VERBOSE=0
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 20, 3:02 AM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36975087
Default Alt Text
D54979.id.diff (7 KB)
Attached To
Mode
D54979: nanobsd: Minor cleanup
Attached
Detach File
Event Timeline
Log In to Comment