Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157533226
D48789.id169967.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48789.id169967.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
@@ -107,6 +107,7 @@
# Newfs parameters to use
NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
+NANO_MAKEFS="-o bsize=4096,density=8192,fsize=512,softupdates=1,version=2"
# The drive name of the media at runtime
NANO_DRIVE=ada0
@@ -688,6 +689,18 @@
mount -o async ${dev} ${mnt}
}
+nano_makefs() {
+ local dir image metalog options size
+ options=$1
+ metalog=$2
+ size=$3
+ image=$4
+ dir=$5
+
+ makefs ${options} -F "${metalog}" -N "${NANO_WORLDDIR}/etc" \
+ -s "${size}b" -T "${NANO_TIMESTAMP}" -t ffs "${image}" "${dir}"
+}
+
# Convenient spot to work around any umount issues that your build environment
# hits by overriding this method.
nano_umount() {
@@ -1002,6 +1015,7 @@
export_var NANO_IMGNAME
export_var NANO_IMG1NAME
export_var NANO_MAKE
+ export_var NANO_MAKEFS
export_var NANO_MAKE_CONF_BUILD
export_var NANO_MAKE_CONF_INSTALL
export_var NANO_MEDIASIZE
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
@@ -92,6 +92,17 @@
' > ${NANO_LOG}/_.partitioning
}
+_xxx_adjust_code_size()
+{
+ # XXX adjust the CODE_SIZE value by rounding it up to
+ # a bsize of 32768 (DFL_BLKSIZE).
+ # Otherwise makefs -s will fail because of the guard
+ # introduced in 5ad283b3c60d.
+ codesize=$1
+ bsize=32768
+ echo $(( ((codesize + (bsize - 1)) / bsize) * bsize ))
+}
+
create_code_slice() {
pprint 2 "build code slice"
pprint 3 "log: ${NANO_OBJ}/_.cs"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 23, 12:40 PM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33446608
Default Alt Text
D48789.id169967.diff (1 KB)
Attached To
Mode
D48789: nanobsd: Add a nano_makefs function
Attached
Detach File
Event Timeline
Log In to Comment