From nobody Tue Feb 27 19:56:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkpCL5wC2z5CKlV; Tue, 27 Feb 2024 19:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkpCL5Q9Zz58kb; Tue, 27 Feb 2024 19:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXwFatZhYZcIDQ+tiCdEBVkFUuc72tygL3mGWBbyEr4=; b=uYdVwvloZDQViHqECk/85nKAlsbFk6uVW86s5u7uKBYHfjfDa5ooervZlwbEQEY/+P4GLW Fqm1No1YxJRh26TBkK9RKc0QUBz0cPE1b/CfeVhJd9WK/65INGQRElNVViJYlhAqjTdKVB 4iXMpgZgeHzHtSVRG+xdLBIpgMhCUvoMlAi9S4FgYPmRS3t2iZ0jc4wcZDfF3mLPbwlM4g OZEbJAERjqa7nnCO+9GnR6weFf9gYmILI0swYTVcBt/FZTjBSOuO3KfII1Q1NmU14IJa+t p2hPvMksg3ICT+8Ks79L0QPGODqQUQrs4AdfQH09/bQE4L6Aq44lUjdL7dChbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063790; a=rsa-sha256; cv=none; b=gA/YQFnoSqeGzD5fwOX9/py3D8MiQTW1f7HgFgSdEFj/RTELOd+V4j99nBGsphNnPrlS2s Jpm1VI3NK9keUadGDaDT3uRFJxTkxcmlm3F/5qpQeQtrAxRu5z7PD8FPQaQQfISPdIDLzi RwP/IeIgyUjKDH2ZagF5FnLVfCjvQo3bFm7ehI/ArpXw9ZuH+AXfmJpSdhRFCApA4rm2PS Swk/KuocJ54+iwx6uHhDuz3YUW53nWUrjrXG81HCtD2YhDXeylDnGPKpDcx4O4DTDrNcbb jv2xe6tky/ksp/AvMJxHaTC7EJ01OGRGIZoIONrScfSItCwk+7HXBEvBoxtcOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXwFatZhYZcIDQ+tiCdEBVkFUuc72tygL3mGWBbyEr4=; b=vIQmu9R2M7uKmgepzXqbNqbJOuWhEtTK8MH/3nJkGVuPtQ9SFNj8bfdvuqD6lCVud6DKh4 vwaaSYo9bbmIu2Yxs+tOYYONKwQHTbcKjxQ9FDU5JiKL8vvsSdTlEjcB7pEk2a/ENTb0/c F7FZY08X14iZwMem6mFZ+LrViKLNQyUyXuo09JsfaaV6n7KJeOlIONq7rgtnETmutpJQgv xl0p/2tC29aUTN7fiD/wsI4bLcFLbABCKiPAfq9Sln6gx/OBL+H4FKKTR3XII5/1kPULgd qIn+bKfWR4s4KiU1lUt5TctF3qOjeXXRA0p+SMNhcO3ZXRY0TJtrMixek+stDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkpCL49lMzQp6; Tue, 27 Feb 2024 19:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41RJuUWZ009866; Tue, 27 Feb 2024 19:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJuUCr009863; Tue, 27 Feb 2024 19:56:30 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:56:30 GMT Message-Id: <202402271956.41RJuUCr009863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: d1797fb5bbae - main - mkimg.1: add new PARTITION SPECIFICATION section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1797fb5bbaeb212501a72b916d647fb2e021d50 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=d1797fb5bbaeb212501a72b916d647fb2e021d50 commit d1797fb5bbaeb212501a72b916d647fb2e021d50 Author: Eugene Grosbein AuthorDate: 2024-02-27 19:53:31 +0000 Commit: Eugene Grosbein CommitDate: 2024-02-27 19:56:26 +0000 mkimg.1: add new PARTITION SPECIFICATION section The specification follows a commentary to the function parse_part() in the source code and the code itself. MFC after: 3 days --- usr.bin/mkimg/mkimg.1 | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/usr.bin/mkimg/mkimg.1 b/usr.bin/mkimg/mkimg.1 index adf0e2707e22..820fb9ad1d5a 100644 --- a/usr.bin/mkimg/mkimg.1 +++ b/usr.bin/mkimg/mkimg.1 @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 8, 2020 +.Dd February 28, 2024 .Dt MKIMG 1 .Os .Sh NAME @@ -287,6 +287,42 @@ is moved accordingly. This is typically not part of the conversion process. If possible, use an output format specifically for the environment in which the file is intended to be used. +.Sh PARTITION SPECIFICATION +An option +.Fl p +may be used multiple times to specify a list of created partition entries. +A specification that is a single dash indicates an unused partition entry. +Otherwise, a partition specification has the following format: +.Bd -literal -offset indent + ':' +.Ed +.Bl -tag -width indent +.It Cm type +the partition type alias (f.e.: freebsd-swap) +that may be optionally followed by a '/' separator +and a label for partitioning schemes that feature partition labels +(see the +.Sx EXAMPLES +Section below) +.It Cm kind +the interpretation of the contents specification: +.Bl -tag -width indent +.It Cm ':' +contents holds the size of an empty partition, +a number that may be suffixed with one of K, M, G, T, P or E +(either upper or lower case) following the SI power of two convention +(see also +.Xr expand_number 3 ) +.It Cm '=' +contents holds the name of a file to read +.It Cm '-' +contents holds a command to run; the output of which is the contents +of the partition. +Multi-word strings should be quoted according to the shell rules. +.El +.It Cm contents +the specification of a partition's contents +.El .Sh ENVIRONMENT .Bl -tag -width "TMPDIR" -compact .It Ev TMPDIR @@ -358,6 +394,7 @@ In the following example the file system partition is labeled as 'backup': .Dl % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img .Sh SEE ALSO .Xr dd 1 , +.Xr expand_number 3 , .Xr gpart 8 , .Xr makefs 8 , .Xr mdconfig 8 ,