| lpmake
Создание образа раздела Super Тип файла: команда Рус usage: lpmake [options]
Required options:
-d,--device-size=[SIZE|auto] Size of the block device for logical partitions
Can be set to auto to automatically calculate the minimum size,
the sum of partition sizes plus metadata-size times the number of partitions
-m,--metadata-size=SIZE Maximum size to reserve for partition metadata
-s,--metadata-slots=COUNT Number of slots to store metadata copies
-p,--partition=DATA Add a partition given the data, see below
-o,--output=FILE Output file
Optional:
-b,--block-size=SIZE Physical block size, defaults to 4096
-a,--alignment=N Optimal partition alignment in bytes
-O,--alignment-offset=N Alignment offset in bytes to device parent
-S,--sparse Output a sparse image for fastboot
-i,--image=PARTITION=FILE If building a sparse image for fastboot, include
the given file (or sparse file) as initial data for the named partition
-g,--group=GROUP:SIZE Define a named partition group with the given
maximum size
-D,--device=DATA Add a block device that the super partition spans over.
If specified, then -d/--device-size and alignments must not be specified.
The format for DATA is listed below
-n,--super-name=NAME Specify the name of the block device that will
house the super partition
-x,--auto-slot-suffixing Mark the block device and partition names needing
slot suffixes before being used
-F,--force-full-image Force a full image to be written even if no
partition images were specified.
Normally, this would produce a minimal super_empty.img which
cannot be flashed; force-full-image will produce a flashable image.
--virtual-ab Add the VIRTUAL_AB_DEVICE flag to the metadata header.
Note that the resulting super.img will require a liblp capable
of parsing a v1.2 header.
Partition data format:
<name>:<attributes>:<size>[:group]
Attrs must be 'none' or 'readonly'.
Device data format:
<partition_name>:<size>[:<alignment>:<alignment_offset>]
The partition name is the basename of the /dev/block/by-name/
path of the block device
The size is the device size in bytes.
The alignment and alignment offset parameters are the same
as -a/--alignment and -O/--alignment-offse
===================================
lpmake is a command-line tool for generating a super partition image.
It can currently generate two types of images:
Sparse images, for traditional fastboot.
Metadata-only images, for the lpflash utility.
The following command-line arguments are required:
-d,--device-size - The size of the super partition on the device.
It must match exactly, and it must be evenly divisible by the sector size
(512 bytes).
-m,--metadata-size - The maximum size that partition metadata may consume.
A partition entry uses 64 bytes and an extent entry uses 16 bytes.
The minimum size is 512 bytes.
-s,--metadata-slots - The number of slots available for storing metadata.
This should match the number of update slots on the device,
2 for A/B devices and 1 for non-A/B.
-p,--partition=DATA - Add a partition to the metadata.
At least one partition must be defined.
The format for the data string is <name>:<GUID>:<attributes>:<size>.
The attributes must be either none or readonly.
The size will be rounded up to the nearest aligned block (see below).
-o,--output=FILE - The output file for writing the image.
Optional arguments:
--alignment=N - By default, lpmake will align partitions to 1MiB boundaries.
However, an alternate alignment can be specified if desired.
This is useful for devices with a minimum I/O request size where mis-aligned
partition boundaries could be a performance issue.
--alignment-offset=N - In some cases, the super partition is misaligned
within its parent block device. This offset can be used to correct for that.
--sparse - If set, the output image will be in sparse format
for flashing with fastboot.
Otherwise, by default, the image will be a minimal format usable
with lpdump and lpflash.
-b,--block-size=N - When writing a sparse image, the device may require
a specific block size. That block size can be specified here.
The alignment must be a multiple of the block size.
By default the block size is 4096.
-i,--image=[NAME=FILE] - When writing a sparse image, include the contents
of FILE as the data for the partition named NAME.
The file can be a normal file or a sparse image, but the destination size
must be less than or equal to the partition size.
This option is only available when creating sparse images.
Example usage.
This specifies a 10GB super partition for an A/B device,
with a single 64MiB cache partition.
lpmake --device-size 10240000000 \
--metadata-size 65536 \
--metadata-slots 2 \
-o /tmp/super.img \
-p "cache:2da85788-f0e1-4fda-9ee7-e5177eab184b:none:67108864" \
-i "cache=out/target/hikey960/cache.img"
|
|