1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

wic: implement 'wic write' command

This command writes image to the media or another file with
the possibility to expand partitions to fill free target space.

[YOCTO #11278]

(From OE-Core rev: ac5fc0d691aad66ac01a5cde34c331c928e9e25a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2017-08-25 23:12:27 +03:00
committed by Richard Purdie
parent cee58f1d41
commit cdef76e424
3 changed files with 241 additions and 0 deletions
+40
View File
@@ -468,6 +468,46 @@ DESCRIPTION
containing the tools(parted and mtools) to use.
"""
wic_write_usage = """
Write image to a device
usage: wic write <image> <target device> [--expand [rules]] [--native-sysroot <path>]
This command writes wic image to a target device (USB stick, SD card etc).
See 'wic help write' for more detailed instructions.
"""
wic_write_help = """
NAME
wic write - write wic image to a device
SYNOPSIS
wic write <image> <target>
wic write <image> <target> --expand auto
wic write <image> <target> --expand 1:100M-2:300M
wic write <image> <target> --native-sysroot <path>
DESCRIPTION
This command writes wic image to a target device (USB stick, SD card etc)
$ wic write ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic /dev/sdb
The --expand option is used to resize image partitions.
--expand auto expands partitions to occupy all free space available on the target device.
It's also possible to specify expansion rules in a format
<partition>:<size>[-<partition>:<size>...] for one or more partitions.
Specifying size 0 will keep partition unmodified.
Note: Resizing boot partition can result in non-bootable image for non-EFI images. It is
recommended to use size 0 for boot partition to keep image bootable.
The --native-sysroot option is used to specify the path to the native sysroot
containing the tools(parted, resize2fs) to use.
"""
wic_plugins_help = """
NAME