Lines Matching +full:build +full:- +full:user +full:- +full:plugins
3 # SPDX-License-Identifier: GPL-2.0-only
35 pager.communicate(hlp.encode('utf-8'))
55 result += '\n\n%s PLUGINS\n\n' % plugin_type.upper()
67 Dispatch to subcommand handler borrowed from combo-layer.
94 usage: wic [--version] | [--help] | [COMMAND [ARGS]]
99 list List available canned images and source plugins
102 overview wic overview - General overview of wic
103 plugins wic plugins - Overview and API
104 kickstart wic kickstart - wic kickstart reference
118 usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
119 [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
120 [-r, --rootfs-dir] [-b, --bootimg-dir]
121 [-k, --kernel-dir] [-n, --native-sysroot] [-f, --build-rootfs]
122 [-c, --compress-with] [-m, --bmap]
127 The -o option can be used to place the image in a directory with a
136 wic create - Create a new OpenEmbedded image
139 wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
140 [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
141 [-r, --rootfs-dir] [-b, --bootimg-dir]
142 [-k, --kernel-dir] [-n, --native-sysroot] [-f, --build-rootfs]
143 [-c, --compress-with] [-m, --bmap] [--no-fstab-update]
150 various build artifacts required to build the image.
152 Users can explicitly specify the build artifact locations using
153 the -r, -b, -k, and -n options. See below for details on where
155 OpenEmbedded build.
157 Alternatively, users can use the -e option to have 'wic' determine
158 those locations for a given image. If the -e option is used, the
159 user needs to have set the appropriate MACHINE variable in
160 local.conf, and have sourced the build environment.
162 The -e option is used to specify the name of the image to use the
163 artifacts from e.g. core-image-sato.
165 The -r option is used to specify the path to the /rootfs dir to
168 The -b option is used to specify the path to the dir containing
172 The -k option is used to specify the path to the dir containing
175 The -n option is used to specify the path to the native sysroot
176 containing the tools to use to build the image.
178 The -f option is used to build rootfs by running "bitbake <image>"
180 The -s option is used to skip the build check. The build check is
181 a simple sanity check used to determine whether the user has
182 sourced the build environment so that the -e option can operate
183 correctly. If the user has specified the build artifact locations
184 explicitly, 'wic' assumes the user knows what he or she is doing
185 and skips the build check.
187 The -D option is used to display debug information detailing
193 When 'wic -e' is used, the locations for the build artifacts
194 values are determined by 'wic -e' from the output of the 'bitbake
195 -e' command given an image name e.g. 'core-image-minimal' and a
197 created as if the following 'bitbake -e' variables were used:
199 -r: IMAGE_ROOTFS
200 -k: STAGING_KERNEL_DIR
201 -n: STAGING_DIR_NATIVE
202 -b: empty (plugin-specific handlers must determine this)
204 If 'wic -e' is not used, the user needs to select the appropriate
205 value for -b (as well as -r, -k, and -n).
207 The -o option can be used to place the image in a directory with a
210 The -c option is used to specify compressor utility to compress
213 The -m option is used to produce .bmap file for the image. This file
216 The --no-fstab-update option is used to doesn't change fstab file. When
218 wic doesn't update file, e.g adding a new mount point. User can control
219 the fstab file content in base-files recipe.
224 List available OpenEmbedded images and source plugins
228 wic list source-plugins
232 plugins.
239 The third form enumerates all the available --sources (source
240 plugins).
248 wic list - List available OpenEmbedded images and source plugins
253 wic list source-plugins
258 source plugins.
262 into the /scripts/lib/wic/canned-wks directory).
267 The third form enumerates all the available --sources (source
268 plugins). The contents of a given partition are driven by code
269 defined in 'source plugins'. Users specify a specific plugin via
270 the --source parameter of the partition .wks command. Normally
272 sources listed by the 'list source-plugins' command. Users can
273 also add their own source plugins - see 'wic help plugins' for
281 usage: wic ls <image>[:<partition>[<path>]] [--native-sysroot <path>]
293 wic ls - List contents of partitioned image or partition
299 wic ls <image>:<vfat or ext* partition><path> --native-sysroot <path>
307 $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic
313 $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
315 Volume Serial Number is 2DF2-5F02
318 efi <DIR> 2017-05-11 10:54
319 startup nsh 26 2017-05-11 10:54
320 vmlinuz 6922288 2017-05-11 10:54
325 $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/EFI/boot/
327 Volume Serial Number is 2DF2-5F02
330 . <DIR> 2017-05-11 10:54
331 .. <DIR> 2017-05-11 10:54
332 grub cfg 679 2017-05-11 10:54
333 bootx64 efi 571392 2017-05-11 10:54
337 The -n option is used to specify the path to the native sysroot
346 usage: wic cp <src> <dest> [--native-sysroot <path>]
351 - from local to vfat or ext* partitions of partitioned image
352 - from vfat or ext* partitions of partitioned image to local
361 wic cp - copy files and directories to/from the vfat or ext* partitions
366 wic cp <src> <dest-image>:<partition><path>
367 wic cp <src> <dest-image>:<partition><path> --native-sysroot <path>
371 - from local to vfat or ext* partitions of partitioned image
372 - from vfat or ext* partitions of partitioned image to local
376 $ wic cp test.wks tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
377 $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
379 Volume Serial Number is DB4C-FD4C
382 efi <DIR> 2017-05-24 18:15
383 loader <DIR> 2017-05-24 18:15
384 startup nsh 26 2017-05-24 18:15
385 vmlinuz 6926384 2017-05-24 18:15
386 test wks 628 2017-05-24 21:22
392 $ wic cp test tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
393 $ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
395 Volume Serial Number is DB4C-FD4C
398 . <DIR> 2017-05-24 18:15
399 .. <DIR> 2017-05-24 18:15
400 boot <DIR> 2017-05-24 18:15
401 test <DIR> 2017-05-24 21:27
407 $ wic cp tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/vmlinuz test
409 The -n option is used to specify the path to the native sysroot
417 usage: wic rm <image>:<partition><path> [--native-sysroot <path>]
429 wic rm - remove files or directories from the vfat or ext* partitions
433 wic rm <src> <image>:<partition><path> --native-sysroot <path>
434 wic rm -r <image>:<partition><path>
440 $ wic ls ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
442 Volume Serial Number is 11D0-DE21
445 libcom32 c32 186500 2017-06-02 15:15
446 libutil c32 24148 2017-06-02 15:15
447 syslinux cfg 209 2017-06-02 15:15
448 vesamenu c32 27104 2017-06-02 15:15
449 vmlinuz 6926384 2017-06-02 15:15
453 $ wic rm ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/libutil.c32
455 $ wic ls ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
457 Volume Serial Number is 11D0-DE21
460 libcom32 c32 186500 2017-06-02 15:15
461 syslinux cfg 209 2017-06-02 15:15
462 vesamenu c32 27104 2017-06-02 15:15
463 vmlinuz 6926384 2017-06-02 15:15
467 The -n option is used to specify the path to the native sysroot
470 The -r option is used to remove directories and their contents
478 usage: wic write <image> <target device> [--expand [rules]] [--native-sysroot <path>]
489 wic write - write an image to a device
493 wic write <image> <target> --expand auto
494 wic write <image> <target> --expand 1:100M,2:300M
495 wic write <image> <target> --native-sysroot <path>
500 $ wic write ./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic /dev/sdb
502 The --expand option is used to resize image partitions.
503 --expand auto expands partitions to occupy all free space available on the target device.
507 Note: Resizing boot partition can result in non-bootable image for non-EFI images. It is
510 The --native-sysroot option is used to specify the path to the native sysroot
517 wic plugins - Overview and API
520 plugins allow wic functionality to be extended and specialized by
522 currently restricted to 'source' plugins.
524 'Source' plugins provide a mechanism to customize various aspects
528 Source plugins provide a mechanism for mapping values specified in
529 .wks files using the --source keyword to a particular plugin
534 is added to scripts/lib/wic/plugins/source/ to make the plugin
537 Source plugins can also be implemented and added by external
538 layers - any plugins found in a scripts/lib/wic/plugins/source/
539 or lib/wic/plugins/source/ directory in an external layer will
542 When the wic implementation needs to invoke a partition-specific
544 the --source param given to that partition. For example, if the
547 part /boot --source bootimg-pcbios ...
550 matching bootimg-pcbios .name class member would be used.
553 a '--source bootimg-pcbios' usage, along with an example method
555 invoke an implementation-specific partition-preparation function:
558 name = 'bootimg-pcbios'
565 plugins must be derived from SourcePlugin.
569 --source plugins. Any methods not implemented by a SourcePlugin
594 Special content-staging hook called before
597 Typically, a partition will just use the passed-in
603 get_bitbake_var() allows you to access non-standard
607 This scheme is extensible - adding more hooks is a simple matter
615 wic overview - General overview of wic
619 OpenEmbedded build artifacts. Image generation is driven by
622 on the command-line or as one of a selection of canned .wks files
623 (see 'wic list images'). When applied to a given set of build
628 definition incomplete - its purpose is to allow the generation of
630 extensible via a plugin interface (see 'wic help plugins').
635 that initially provides easier-to-use and more flexible
637 oe-core: directdisk.bbclass and mkefidisk.sh. The difference
639 of those scripts is implemented by a general-purpose partitioning
649 control the user needs in specifying the Openembedded build
654 command-line arguments (see example below).
661 the command-line, but the user can also choose from a set of
666 the build artifacts already available. The below examples assume
667 the user has already build a 'core-image-minimal' for a specific
669 for now that's typically how build artifacts get generated).
671 The other prerequisite is to source the build environment:
673 $ source oe-init-build-env
688 Creates a partitioned EFI disk image that the user can directly dd
701 usage: wic create <wks file or image name> [-o <DIRNAME> | ...]
702 [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
703 [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
704 [-r, --rootfs-dir] [-b, --bootimg-dir] [-k, --kernel-dir]
705 [-n, --native-sysroot] [-f, --build-rootfs]
710 The -o option can be used to place the image in a directory
721 So, the easiest way to create an image is to use the -e option
722 with a canned .wks file. To use the -e option, you need to
724 need to have the MACHINE used to build them specified in your
726 using the -e options.) Below, we generate a directdisk image,
727 pointing the process at the core-image-minimal artifacts for the
730 $ wic create directdisk -e core-image-minimal
732 Checking basic build environment...
738 /var/tmp/wic/build/directdisk-201309252350-sda.direct
740 The following build artifacts were used to create the image(s):
748 .../scripts/lib/wic/canned-wks/directdisk.wks
755 (notice that this example uses a different machine - because it's
756 using the -e option, you need to change the MACHINE in your
759 $ wic create mkefidisk -e core-image-minimal
760 Checking basic build environment...
766 /var/tmp/wic/build/mkefidisk-201309260027-sda.direct
771 specifies each build artifact, along with a non-canned .wks file,
772 and also uses the -o option to have wic create the output
775 $ wic create ./test.wks -o ./out --rootfs-dir
776 tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
777 --bootimg-dir tmp/sysroots/qemux86-64/usr/share
778 --kernel-dir tmp/deploy/images/qemux86-64
779 --native-sysroot tmp/sysroots/x86_64-linux
784 out/build/test-201507211313-sda.direct
786 The following build artifacts were used to create the image(s):
787 ROOTFS_DIR: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
788 BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share
789 KERNEL_DIR: tmp/deploy/images/qemux86-64
790 NATIVE_SYSROOT: tmp/sysroots/x86_64-linux
797 part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
798 part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
800 … bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"
807 # short-description: Create an EFI disk image
808 # long-description: Creates a partitioned EFI disk image that the user
811 part /boot --source bootimg-efi --ondisk sda --fstype=efi --active
813 part / --source rootfs --ondisk sda --fstype=ext3 --label platform
815 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
817 bootloader --timeout=10 --append="rootwait console=ttyPCH0,115200"
827 wic kickstart - wic kickstart reference
832 --source plugins available for use from the 'part' command (see
833 the 'Platform-specific Plugins' section below).
843 https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#part-or-partition
844 https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#bootloader
868 --ondrive, --ondisk, --use-uuid or --use-label partition options must
870 --use-{uuid,label} and non-root <mountpoint>, including swap, the mount
877 --size: The minimum partition size. Specify an integer value
880 You do not need this option if you use --source.
882 --fixed-size: Exact partition size. Value format is the same
883 as for --size option. This option cannot be
884 specified along with --size. If partition data
885 is larger than --fixed-size and error will be
888 --source: This option is a wic-specific option that names the
892 valid 'source plugin' (see 'wic help plugins').
894 If '--source rootfs' is used, it tells the wic
897 filesystem pointed to by the '-r' wic command-line
899 '-e' command-line option). The filesystem type
901 by the value of the --fstype option specified for
902 the partition (see --fstype below).
904 If --source <plugin-name>' is used, it tells the
908 plugin name using the data pointed to by the '-r'
909 wic command-line option (or the equivalent rootfs
910 derived from the '-e' command-line option).
915 If --source option is not used, the wic command
916 will create empty partition. --size parameter has
919 --sourceparams: This option is specific to wic. Supply additional
923 --ondisk or --ondrive: Forces the partition to be created on
926 --fstype: Sets the file system type for the partition. These
927 apply to partitions created using '--source rootfs' (see
928 --source above). Valid values are:
941 --fsoptions: Specifies a free-form string of options to be
948 --fspassno: Specifies the order in which filesystem checks are done
954 --label label: Specifies the label to give to the filesystem
959 --use-label: This option is specific to wic. It makes wic to use the
961 --use-label and --use-uuid are used at the same time,
967 --active: Marks the partition as active.
969 --align (in KBytes): This option is specific to wic and says
973 --offset: This option is specific to wic that says to place a partition
975 placed at the specified offset, the image build will fail.
981 --no-table: This option is specific to wic. Space will be
987 --exclude-path: This option is specific to wic. It excludes the given
993 --include-path: This option is specific to wic. It adds the contents
997 the same logic as the rootfs-dir argument and the
1007 --change-directory: This option is specific to wic. It changes to the
1013 --no-fstab-update: This option is specific to wic. It does not update the
1016 --extra-space: This option is specific to wic. It adds extra
1019 beyond the size specified by --size.
1021 with --fixed-size option.
1023 --overhead-factor: This option is specific to wic. The
1027 This option cannot be used with --fixed-size
1030 --part-name: This option is specific to wic. It specifies name for GPT partitions.
1032 --part-type: This option is specific to wic. It specifies partition
1037 --use-uuid: This option is specific to wic. It makes wic to generate
1041 --uuid: This option is specific to wic. It specifies partition UUID.
1046 --fsuuid: This option is specific to wic. It specifies filesystem UUID.
1051 --system-id: This option is specific to wic. It specifies partition system id. It's useful
1052 for the harware that requires non-default partition system ids. The parameter
1055 --mkfs-extraopts: This option specifies extra options to pass to mkfs utility.
1057 '-S 512' for mkfs.fat or '-F -i 8192' for mkfs.ext. Those options will
1058 not take effect when --mkfs-extraopts is used. This should be taken into
1059 account when using --mkfs-extraopts.
1061 --type: This option is specific to wic. Valid values are 'primary',
1065 --hidden: This option is specific to wic. This option sets the
1068 --mbr: This option is specific to wic. This option is used with the
1069 gpt-hybrid partition type that uses both a GPT partition and
1075 This command allows the user to specify various bootloader
1078 --timeout: Specifies the number of seconds before the
1081 --append: Specifies kernel parameters. These will be added to
1082 bootloader command-line - for example, the syslinux
1085 --configfile: Specifies a user defined configuration file for
1087 canned-wks folder or could be the full path to the
1091 --ptable: Specifies the partition table format. Valid values are
1092 'msdos', 'gpt', 'gpt-hybrid'.
1094 --source: Specifies the source plugin. If not specified, the
1095 --source value will be copied from the partition that has
1099 implemented by the various --source plugins that implement
1105 This command allows the user to include the content of .wks file
1120 wic help - display a help topic
1130 Usage: wic [--version]
1141 list - List available canned images and source plugins
1142 ls - List contents of partitioned image or partition
1143 rm - Remove files or directories from the vfat or ext* partitions
1144 help - Show help for a wic COMMAND or TOPIC
1145 write - Write an image to a device
1146 cp - Copy files and directories to the vfat or ext* partitions
1147 create - Create a new OpenEmbedded image
1151 overview - Presents an overall overview of Wic
1152 plugins - Presents an overview and API for Wic plugins
1153 kickstart - Presents a Wic kickstart file reference
1158 $ wic --version
1171 the /scripts/lib/wic/canned-wks directory.
1174 $ wic create mkefidisk -e core-image-minimal
1177 core-image-minimal build in standard BitBake locations