Index: tools/tools/nanobsd/embedded/common =================================================================== --- tools/tools/nanobsd/embedded/common (revision 313159) +++ tools/tools/nanobsd/embedded/common (working copy) @@ -73,8 +73,12 @@ echo "NANO_NAME not defined. Use foo.cfg instead." fi -NANO_SLICE_FAT_SIZE=32m -NANO_SLICE_CFG_SIZE=32m +if [ -z $NANO_SLICE_FAT_SIZE ]; then + NANO_SLICE_FAT_SIZE=32m +fi; +if [ -z $NANO_SLICE_CFG_SIZE ]; then + NANO_SLICE_CFG_SIZE=32m +fi; NANO_BOOT2CFG="-P -S115200" @@ -221,6 +225,7 @@ # 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} -c 1 -F 32 -L ${NANO_NAME} \ newfs_msdos -C ${NANO_SLICE_FAT_SIZE} -F 16 -L ${NANO_NAME} \ ${NANO_LOG}/_.${NANO_SLICE_FAT} if [ -d ${NANO_FAT_DIR} ]; then @@ -270,6 +275,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=fat32 fi out=${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt} @@ -278,17 +284,28 @@ # boot off parittion 3 or 2 by hand if you're playing around with this WIP case ${NANO_LAYOUT} in std-embedded) - mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ +# mkimg ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ + mkimg ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ -p ${s2}:=${NANO_LOG}/_.s2 \ -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} + mdi=`mdconfig -f ${out}` + gpart show $mdi + gpart set -a active -i 3 $mdi + gpart show $mdi + mdconfig -d -u $mdi ;; std-x86) # s1 is cfg, s2 is /, not sure how to make that # boot (marked as active) with mkimg yet - mkimg -a 2 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ + mkimg ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ -p ${s2}:=${NANO_LOG}/_.s2 \ -o ${out} + mdi=`mdconfig -f ${out}` + gpart show $mdi + gpart set -a active -i 2 $mdi + gpart show $mdi + mdconfig -d -u $mdi ;; std-uefi) # s1 is boot, s2 is cfg, s3 is /, not sure how to make that @@ -302,12 +319,17 @@ 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 \ + mkimg ${fmtarg} ${bootmbr} -s gpt \ -p efi:=${NANO_WORLDDIR}/boot/boot1.efifat \ -p freebsd-boot:=${NAANO_WORLDDIR}/boot/gptboot \ -p ${p3}:=${NANO_LOG}/_.p3 \ -p ${p4}:=${NANO_LOG}/_.p4 \ -o ${out} + mdi=`mdconfig -f ${out}` + gpart show $mdi + gpart set -a active -i 2 $mdi + gpart show $mdi + mdconfig -d -u $mdi ;; powerpc64-ibm) # A lie to make the boot loader work, it boots the first BSD partition @@ -316,10 +338,15 @@ # boot image is on a special partition, ala std-embedded, but that # 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 \ + mkimg ${fmtarg} -s mbr -p prepboot:=${NANO_LOG}/_.s1 \ -p ${s2}:=${NANO_LOG}/_.s2 \ -p ${s3}:=${NANO_LOG}/_.s3a \ -o ${out} + mdi=`mdconfig -f ${out}` + gpart show $mdi + gpart set -a active -i 1 $mdi + gpart show $mdi + mdconfig -d -u $mdi ;; esac rm -f ${out}.xz