4.13.4.1. Raw Mode

Running Wic in raw mode allows you to specify all the partitions through the wic command line. The primary use for raw mode is if you have built your kernel outside of the Yocto Project Build Directory. In other words, you can point to arbitrary kernel, root filesystem locations, and so forth. Contrast this behavior with cooked mode where Wic looks in the Build Directory (e.g. tmp/deploy/images/machine).

The general form of the wic command in raw mode is:

     $ wic create wks_file options ...

       Where:

          wks_file:
             An OpenEmbedded kickstart file.  You can provide
             your own custom file or use a file from a set of
             existing files as described by further options.

          optional arguments:
            -h, --help            show this help message and exit
            -o OUTDIR, --outdir OUTDIR
                                  name of directory to create image in
            -e IMAGE_NAME, --image-name IMAGE_NAME
                                  name of the image to use the artifacts from e.g. core-
                                  image-sato
            -r ROOTFS_DIR, --rootfs-dir ROOTFS_DIR
                                  path to the /rootfs dir to use as the .wks rootfs
                                  source
            -b BOOTIMG_DIR, --bootimg-dir BOOTIMG_DIR
                                  path to the dir containing the boot artifacts (e.g.
                                  /EFI or /syslinux dirs) to use as the .wks bootimg
                                  source
            -k KERNEL_DIR, --kernel-dir KERNEL_DIR
                                  path to the dir containing the kernel to use in the
                                  .wks bootimg
            -n NATIVE_SYSROOT, --native-sysroot NATIVE_SYSROOT
                                  path to the native sysroot containing the tools to use
                                  to build the image
            -s, --skip-build-check
                                  skip the build check
            -f, --build-rootfs    build rootfs
            -c {gzip,bzip2,xz}, --compress-with {gzip,bzip2,xz}
                                  compress image with specified compressor
            -m, --bmap            generate .bmap
            --no-fstab-update     Do not change fstab file.
            -v VARS_DIR, --vars VARS_DIR
                                  directory with <image>.env files that store bitbake
                                  variables
            -D, --debug           output debug information
                    

Note

You do not need root privileges to run Wic. In fact, you should not run as root when using the utility.