Date: Wed, 27 May 2026 00:37:03 +0000 From: Jose Luis Duran <jlduran@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f1de49f50871 - main - nanobsd: Offset code partition to a track boundary Message-ID: <6a163caf.3fdb6.283217ed@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f1de49f508714b024ac6f3a60845108f81c7aee7 commit f1de49f508714b024ac6f3a60845108f81c7aee7 Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2026-05-27 00:15:39 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2026-05-27 00:15:39 +0000 nanobsd: Offset code partition to a track boundary Ensure the primary and secondary code partitions start at a proper track boundary by applying a NANO_SECTS offset in bytes. While track-boundary alignment is largely obsolete on modern storage, this change maintains compatibility with current images (legacy). A future commit will transition to 1 MiB alignment boundaries. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57221 --- tools/tools/nanobsd/legacy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 8e57163c030d..763f65c4dbdc 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -306,7 +306,7 @@ _create_diskimage() { echo "Image will not be bootable" fi - diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}" + diskimage="-p freebsd:=${NANO_DISKIMGDIR}/${NANO_IMG1NAME}:$(( NANO_SECTS * 512 ))" if [ "$NANO_IMAGES" -gt 1 ] && [ "$NANO_INIT_IMG2" -gt 0 ] ; then echo "Duplicating to second image..." @@ -322,13 +322,13 @@ _create_diskimage() { ${bootcode} \ -p freebsd-ufs:="${NANO_OBJ}/_.altroot.part" \ -o "${NANO_OBJ}/_.altroot.image" - altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image" + altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))" rm -f "${NANO_OBJ}/_.altroot.part" else altroot="-p-" fi if [ "${NANO_INIT_IMG2}" -eq 0 ]; then - altroot="-p freebsd::${CODE_SIZE}b" + altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))" fi # Create Config slicehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a163caf.3fdb6.283217ed>
