From nobody Fri Mar 01 14:47:58 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 4TmWCz0YlKz5CWV2; Fri, 1 Mar 2024 14:47:59 +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 4TmWCz01sYz49WJ; Fri, 1 Mar 2024 14:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709304479; 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=njFwKbxE0RqSuUDYCrpsAQBpC3Rrk2+5wreOrZsHcfY=; b=hSk4tBO4MwQ9ySBuKRvJ4AS4eZUmkKNUfLHieIA+fsIRTOpNgLRfrJUeiW+eQSoTWtG1Yn Y+XBhjUQvol03eyE2gtaFftQ5y0k6inss4rIOfCAhV0BoUzn/LhGtwOxrbtQnHE3oa8FY8 IS3DtPogIPBYmU8YXbZX+B5Kq0AMzbOPbVBhVVKgL9kOf4zSXNibbTL2GnRMhTvqQD7GFD T0igGnrIFH121L5AlfU4b8ZanKe3EySHlDDfMsnA6p4U91bTXqL+LOBT45T8xiQTpAPZMU W8u9COKKIZeUKGV4EHW9ZM5JKpnIrC6jGjlzM133QjSGdkjZM1j2rFVqVxA6Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709304479; a=rsa-sha256; cv=none; b=IXcJXOqOcTqGXht5R+xYaf0FO2qQfRk6i+vM3ASn8msJhizay+QsrqyLuC5QcjZ9Kx09hP 0kBXpZckdxuWnew8uiyMZP33njZjCHZR0y223zyYd6b/eTWX8MwZ64pjO/OQ8r4Vxdsw3k Ym9/A0XlTvxzf7pTVHqgkHvxXoaK0QTwO1jRqxY6KF8tB3ClRkne+LTCWEMWQ9vJQxz+IN w9R1PRIdJMN3LPHHW4VSNLGqYP4ihIBLisZMwqb3OkWoNS3HZG2MX2WUGBV/bh3ABP980C cfmNuQyW8KG46A43hqiJXcKRVWLGltMII5OgVbJMcpULZmpPJb84wRSB6iQZhg== 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=1709304479; 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=njFwKbxE0RqSuUDYCrpsAQBpC3Rrk2+5wreOrZsHcfY=; b=h1RNgkPR3e1KpQwy6wMbdXUgknBKecglK+SldneLSeslo14Rm0rH9DwZeSiiYBzvOjSZC+ QV1s7U2a0y0fA3NwsSNOPFwyP/jOY65aMLg8YeRl7xrRc2APcmXCQDGsIkK/qTVQEwk5c0 t3PoiHzyKxtBZ3QzxP249BfmA5bdnx/HEety+1+DUIQMof+Ln2+qN3wzTBwu3Heuq+PVJ5 ZiiGbRxHf4EHB5XcV4K9BIg1O7FXLjA6b0tW4Bvi2pHua5fpSXPOSypN/CFr290WkV08EG VKhc2/yGH47qUnbCNd9sRFctIOvGxnCa0szX8B9CFdLyfbryzMQbnIrii0ipKA== 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 4TmWCy6gsPzVPN; Fri, 1 Mar 2024 14:47:58 +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 421Elw3K091018; Fri, 1 Mar 2024 14:47:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421Elwmf091015; Fri, 1 Mar 2024 14:47:58 GMT (envelope-from git) Date: Fri, 1 Mar 2024 14:47:58 GMT Message-Id: <202403011447.421Elwmf091015@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: 22f11923c6c8 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 22f11923c6c8fe1c7dbf32211695f9594aeb4769 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=22f11923c6c8fe1c7dbf32211695f9594aeb4769 commit 22f11923c6c8fe1c7dbf32211695f9594aeb4769 Author: Eugene Grosbein AuthorDate: 2024-02-27 19:53:31 +0000 Commit: Eugene Grosbein CommitDate: 2024-03-01 14:47:33 +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 ,