The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=689f7466c1aee7810e6a965e82338c765105a1cf
commit 689f7466c1aee7810e6a965e82338c765105a1cf Author: Jose Luis Duran <[email protected]> AuthorDate: 2026-05-27 00:12:48 +0000 Commit: Jose Luis Duran <[email protected]> CommitDate: 2026-05-27 00:12:48 +0000 nanobsd: Use NANO_IMG1NAME Do not hard-code _.disk.image, use NANO_IMG1NAME instead. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57040 --- tools/tools/nanobsd/legacy.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index fde4be9c7d5b..6ce477ea0c88 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -108,7 +108,7 @@ create_code_slice() { pprint 3 "log: ${NANO_OBJ}/_.cs" ( - IMG=${NANO_DISKIMGDIR}/_.disk.image + IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} MNT=${NANO_OBJ}/_.mnt mkdir -p ${MNT} CODE_SIZE=$(head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }') @@ -145,8 +145,8 @@ create_code_slice() { nano_umount ${MNT} if [ "${NANO_MD_BACKING}" = "swap" ] ; then - echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + echo "Writing out ${NANO_IMG1NAME}..." + dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k fi mdconfig -d -u $MD @@ -160,7 +160,7 @@ _create_code_slice() { pprint 3 "log: ${NANO_OBJ}/_.cs" ( - IMG=${NANO_DISKIMGDIR}/_.disk.image + IMG=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} CODE_SIZE=$(head -n 1 "${NANO_LOG}/_.partitioning" | awk '{ print $2 }') CODE_SIZE=$(_xxx_adjust_code_size "$CODE_SIZE") @@ -177,7 +177,7 @@ _create_code_slice() { mkimg -s bsd \ ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.disk.part" \ - -o "${NANO_DISKIMGDIR}/_.disk.image" + -o "${IMG}" rm -f "${NANO_OBJ}/_.disk.part" ) > ${NANO_OBJ}/_.cs 2>&1 @@ -231,7 +231,7 @@ create_diskimage() { fi echo "Writing code image..." - dd conv=sparse if=${NANO_DISKIMGDIR}/_.disk.image of=/dev/${MD}${NANO_SLICE_ROOT} bs=64k + dd conv=sparse if=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} of=/dev/${MD}${NANO_SLICE_ROOT} bs=64k if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) @@ -300,7 +300,7 @@ _create_diskimage() { echo "Image will not be bootable" fi - diskimage="-p freebsd:=${NANO_DISKIMGDIR}/_.disk.image" + diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}" if [ "$NANO_IMAGES" -gt 1 ] && [ "$NANO_INIT_IMG2" -gt 0 ] ; then echo "Duplicating to second image..."
