From nobody Fri Mar 01 14:49:21 2024 X-Original-To: dev-commits-src-branches@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 4TmWFZ2zmtz5CWXg; Fri, 1 Mar 2024 14:49:22 +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 4TmWFZ0f27z4CMR; Fri, 1 Mar 2024 14:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709304562; 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=+HnnOzPOjGfCGNE1IvOmFlj4aQvJEiu/DTdFyhh5buc=; b=abdy1hp5so8DkhR32OyQ9JPVlToTgQHvsYNRMeYKk6i7/c0wFn1gIWZdqOopQm3qH3trkv SPW/LYxD78O04gQIBNotPeooIRPtd9a9MtjcVuHemTkFIoO7xXP6r8/HdOX4QYeOx5EioP EcJ4VLPsonnrNTQQQdQ6nKgwl4zIAUkuaJcWhqZ2Re5LgGQF+d+dVUimXqFwLQXBRTylOV lyNv1b2Wb8umEN1b7S2fDNtK0f6VOkXIcvHmtqbKHfNclWUB/xjLe0nj9BzV4eSfLr7ss9 /dmwwpYBT1Fi0T/tDEtNh6ZQI5YVz2OwxblIV18jpUghbkkeyhhqGXNcGOaXpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709304562; a=rsa-sha256; cv=none; b=Z75SNz2uw2aQPqccwV70K4T6X/T8ZFWAUooHUuq12HbIGmxnEZvk5p+obHp1K+QwPSinzF 7C619v5+NgMbfhmRG/kIhwolhXQ6hInCK2xnpaQ2jKTRvVIFz9eDTzrvHbuXFRuCp2XMRV TZMvKOfXQFIMOxAc7bonKGRqaYLuamPE1zElYdh/SflDH+czvkQNJcVkHesGsaaPhmUfTg 85ZtFygT37BmHPZobh+r1ac4hYbsqPrYj1cADZXi7KXMaM7F9xRfcuPCFYipkZt6vpvmbq stOK5cSDcLfVLauGkAUs9CmZzs4fYiFqd3zru0CH4DqraR/Fo2o/p9+h1G7AUw== 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=1709304562; 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=+HnnOzPOjGfCGNE1IvOmFlj4aQvJEiu/DTdFyhh5buc=; b=Lumk1qJJG76sn1TxoKp4sPS1vZuiQBr9tqaB+2WUvCmaZfH+LaQzoDDArb7cxfF7yOsrL0 ioRRbMJr8Cd0w5dXRxoFsbSQtehywgzpoLYhotuoUopeekf7Ewhh5mcaXxw66eJvo0iV9K pzVfXkcAE6kAuTIMNdAGU1Vd/RHOuo7O1JKoFXl6/LnGKLNgez0QcCzFsjQhu2Kth787AN HiRNv+t96zFm4/smMk+HOimBVCKZoOYihCbaERhW4Srdp1WpeodwHJw/NYYayRnyU0FI7m UC80XA8HNQ8JoAgTrwTEmoHqM2ng4H1x8N8Zb0uQIN9b8RFZhLmIJfzJZtG9NA== 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 4TmWFZ06NDzVPQ; Fri, 1 Mar 2024 14:49:22 +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 421EnLg4091593; Fri, 1 Mar 2024 14:49:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421EnLDG091590; Fri, 1 Mar 2024 14:49:21 GMT (envelope-from git) Date: Fri, 1 Mar 2024 14:49:21 GMT Message-Id: <202403011449.421EnLDG091590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 2a04785cafe5 - stable/13 - mkimg.1: add new PARTITION SPECIFICATION section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a04785cafe5c4da6e83e7936ccaae39f0fc20ea Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=2a04785cafe5c4da6e83e7936ccaae39f0fc20ea commit 2a04785cafe5c4da6e83e7936ccaae39f0fc20ea Author: Eugene Grosbein AuthorDate: 2024-02-27 19:53:31 +0000 Commit: Eugene Grosbein CommitDate: 2024-03-01 14:49:05 +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. (cherry picked from commit d1797fb5bbaeb212501a72b916d647fb2e021d50) --- 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 a073265c21ba..28ed0ca03ccf 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 ,