Page MenuHomeFreeBSD

D54975.id170802.diff
No OneTemporary

D54975.id170802.diff

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
@@ -181,7 +181,7 @@
create_diskimage_mbr() {
- local fmt
+ local fmt fat_type fat_scheme
[ -z ${NANO_DISKIMAGE_FORMAT} ] || fmt=".${NANO_DISKIMAGE_FORMAT}"
@@ -208,7 +208,21 @@
# Populate the FAT partition, if needed
if [ -n "${NANO_SLICE_FAT}" ]; then
echo Creating MSDOS partition for kernel
- newfs_msdos -C ${NANO_SLICE_FAT_SIZE} -F 16 -L ${NANO_NAME} \
+
+ FAT16MIN=2
+ FAT32MIN=33
+ if [ "${NANO_SLICE_FAT_SIZE%?}" -ge "$FAT32MIN" ]; then
+ fat_type=32
+ fat_scheme=fat32lba
+ elif [ "${NANO_SLICE_FAT_SIZE%?}" -ge "$FAT16MIN" ]; then
+ fat_type=16
+ fat_scheme=fat16b
+ else
+ fat_type=12
+ fat_scheme=fat16b
+ fi
+
+ newfs_msdos -C ${NANO_SLICE_FAT_SIZE} -F "$fat_type" -L ${NANO_NAME} \
${NANO_LOG}/_.${NANO_SLICE_FAT}
if [ -d ${NANO_FAT_DIR} ]; then
# Need to copy files from ${NANO_FATDIR} with mtools, or use
@@ -256,7 +270,7 @@
# Now shuffle all the slices together into the proper layout
if [ -n "$NANO_SLICE_FAT" ]; then
- eval $NANO_SLICE_FAT=fat16b
+ eval $NANO_SLICE_FAT=$fat_scheme
fi
out=${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt}

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 18, 7:16 AM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28169746
Default Alt Text
D54975.id170802.diff (1 KB)

Event Timeline