Lines Matching +full:partition +full:- +full:file +full:- +full:system
3 # SPDX-License-Identifier: GPL-2.0-only
35 pager.communicate(hlp.encode('utf-8'))
67 Dispatch to subcommand handler borrowed from combo-layer.
94 usage: wic [--version] | [--help] | [COMMAND [ARGS]]
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]
125 commands' found in the <wks file>.
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]
147 kickstart commands' found in the <wks file>.
153 the -r, -b, -k, and -n options. See below for details on where
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
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
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
182 sourced the build environment so that the -e option can operate
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
217 using this option the final fstab file will be same that in rootfs and
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.
228 wic list source-plugins
239 The third form enumerates all the available --sources (source
248 wic list - List available OpenEmbedded images and source plugins
253 wic list 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
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
297 wic ls <image>:<vfat or ext* partition>
298 wic ls <image>:<vfat or ext* partition><path>
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
312 Second and third form list directory content of the partition:
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
344 Copy files and directories to/from the vfat or ext* partition
346 usage: wic cp <src> <dest> [--native-sysroot <path>]
348 source/destination image in format <image>:<partition>[<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
364 wic cp <src> <dest>:<partition>
365 wic cp <src>:<partition> <dest>
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
374 The first form of it copies file or directory to the root directory of
375 the partition:
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
390 The second form of the command copies file or directory to the specified directory
391 on the partition:
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
405 The third form of the command copies file or directory from the specified directory
406 on the partition to local:
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
432 wic rm <src> <image>:<partition><path>
433 wic rm <src> <image>:<partition><path> --native-sysroot <path>
434 wic rm -r <image>:<partition><path>
437 This command removes files or directories from the vfat or ext* partition of the
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
471 recursively,this only applies to ext* partition.
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.
505 <partition>:<size>[,<partition>:<size>...] for one or more partitions.
506 Specifying size 0 will keep partition unmodified.
507 Note: Resizing boot partition can result in non-bootable image for non-EFI images. It is
508 recommended to use size 0 for boot partition to keep image bootable.
510 The --native-sysroot option is used to specify the path to the native sysroot
517 wic plugins - Overview and API
529 .wks files using the --source keyword to a particular plugin
530 implementation that populates a corresponding partition.
533 scripts/lib/wic/pluginbase.py) and the plugin file containing it
538 layers - any plugins found in a scripts/lib/wic/plugins/source/
542 When the wic implementation needs to invoke a partition-specific
544 the --source param given to that partition. For example, if the
545 partition is set up like this:
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'
569 --source plugins. Any methods not implemented by a SourcePlugin
575 partition. In other words, it 'prepares' the final partition
579 Called after the partition is created. It is useful to add post
580 operations e.g. signing the partition.
584 create custom configuration files for a partition, for
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
621 (.wks) file (see 'wic help kickstart') specified either directly
622 on the command-line or as one of a selection of canned .wks files
625 directly written onto media and used on a particular system.
628 definition incomplete - its purpose is to allow the generation of
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
654 command-line arguments (see example below).
661 the command-line, but the user can also choose from a set of
667 the user has already build a 'core-image-minimal' for a specific
673 $ source oe-init-build-env
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]
708 kickstart commands' found in the <wks file>.
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
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
738 /var/tmp/wic/build/directdisk-201309252350-sda.direct
747 The image(s) were created using OE kickstart file:
748 .../scripts/lib/wic/canned-wks/directdisk.wks
752 of the artifacts and the kickstart file used.
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
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
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
792 The image(s) were created using OE kickstart file:
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"
803 Finally, here's an example of the actual partition language
805 contents of the mkefidisk.wks OE kickstart file:
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).
836 partitioning commands: partition (or part for short) and
843 https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#part-or-partition
844 https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#bootloader
848 * 'part' or 'partition'
850 This command creates a partition on the system and uses the
855 The <mountpoint> is where the partition will be mounted and
860 swap: The partition will be used as swap space.
862 If a <mountpoint> is not specified the partition will be created
868 --ondrive, --ondisk, --use-uuid or --use-label partition options must
869 be used for each partition that specifies a mountpoint. Note that with
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
890 partition. The most common value for this option
894 If '--source rootfs' is used, it tells the wic
895 command to create a partition as large as needed
897 filesystem pointed to by the '-r' wic command-line
899 '-e' command-line option). The filesystem type
900 that will be used to create the partition is driven
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
905 wic command to create a partition as large as
907 partition that will be generated by the specified
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
917 to be used to specify size of empty partition.
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
943 will be copied into the /etc/fstab file of the
944 installed system and should be enclosed in
948 --fspassno: Specifies the order in which filesystem checks are done
951 /etc/fstab file of the installed system. If not
954 --label label: Specifies the label to give to the filesystem
955 to be made on the partition. If the given
957 a new label is created for the partition.
959 --use-label: This option is specific to wic. It makes wic to use the
960 label in /etc/fstab to specify a partition. If the
961 --use-label and --use-uuid are used at the same time,
964 on the root partition since it requires an initramfs to
967 --active: Marks the partition as active.
969 --align (in KBytes): This option is specific to wic and says
970 to start a partition on an x KBytes
973 --offset: This option is specific to wic that says to place a partition
974 at exactly the specified offset. If the partition cannot be
981 --no-table: This option is specific to wic. Space will be
982 reserved for the partition and it will be
984 partition table. It may be useful for
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
1014 '/etc/fstab' stock file for the given partition.
1016 --extra-space: This option is specific to wic. It adds extra
1018 of the partition. The final size can go
1019 beyond the size specified by --size.
1021 with --fixed-size option.
1023 --overhead-factor: This option is specific to wic. The
1024 size of the partition is multiplied by
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
1034 List of partition type GUIDS can be found here:
1037 --use-uuid: This option is specific to wic. It makes wic to generate
1038 random globally unique identifier (GUID) for the partition
1039 and use it in bootloader configuration to specify root partition.
1041 --uuid: This option is specific to wic. It specifies partition UUID.
1042 It's useful if preconfigured partition UUID is added to kernel command line
1043 in bootloader configuration before running wic. In this case .wks file can
1046 --fsuuid: This option is specific to wic. It specifies filesystem UUID.
1048 in bootloader configuration before running wic. In this case .wks file can
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',
1062 'logical'. For msdos partition tables, this option specifies
1063 the partition type.
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
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
1086 the bootloader. This file must be located in the
1087 canned-wks folder or could be the full path to the
1088 file. Using this option will override any other
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
1106 into original .wks file.
1110 include <file>
1112 The <file> is either path to the file or its name. If name is
1113 specified wic will try to find file in the directories with canned
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