From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 16 Jan 2021 11:25:54 -0500 Subject: [PATCH v3 6/6] cmd: Add MBR partition layout control utility In-Reply-To: <20201223125515.28865-7-m.szyprowski@samsung.com> References: <20201223125515.28865-1-m.szyprowski@samsung.com> <20201223125515.28865-7-m.szyprowski@samsung.com> Message-ID: <20210116162554.GE9782@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Dec 23, 2020 at 01:55:15PM +0100, Marek Szyprowski wrote: > Add a 'mbr' command to let users create or verify MBR partition layout > based on the provided text description. The partition layout is > alternatively read from the 'mbr_parts' environment variable. This can be > used in scripts to help system image flashing tools to ensure proper > partition layout. > > The syntax of the text description of the partition list is similar to > the one used by the 'gpt' command. Supported parameters are: name > (currently ignored), start (partition start offset in bytes), size (in > bytes or '-' to expand it to the whole free area), bootable (boolean > flag) and id (MBR partition type). If one wants to create more than 4 > partitions, an 'Extended' primary partition (with 0x05 ID) has to be > explicitely provided as a one of the first 4 entries. > > Here is an example how to create a 6 partitions (3 on the 'extended > volume'), some of the predefined sizes: > > > setenv mbr_parts 'name=boot,start=4M,size=128M,bootable,id=0x0e; > name=rootfs,size=3072M,id=0x83; > name=system-data,size=512M,id=0x83; > name=[ext],size=-,id=0x05; > name=user,size=-,id=0x83; > name=modules,size=100M,id=0x83; > name=ramdisk,size=8M,id=0x83' > > mbr write mmc 0 > > Signed-off-by: Marek Szyprowski Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: