4.13.6.1. Generate an Image using an Existing Kickstart File

This example runs in Cooked Mode and uses the mkefidisk kickstart file:

     $ wic create mkefidisk -e core-image-minimal
     INFO: Building wic-tools...
               .
               .
               .
     INFO: The new image(s) can be found here:
       ./mkefidisk-201710061409-sda.direct

     The following build artifacts were used to create the image(s):
       ROOTFS_DIR:                   /home/scottrif/poky/build/tmp.wic.r4hkds0b/rootfs_copy
       BOOTIMG_DIR:                  /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
       KERNEL_DIR:                   /home/scottrif/poky/build/tmp/deploy/images/qemux86
       NATIVE_SYSROOT:               /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native

     INFO: The image(s) were created using OE kickstart file:
       /home/scottrif/poky/scripts/lib/wic/canned-wks/mkefidisk.wks
                    

The previous example shows the easiest way to create an image by running in cooked mode and supplying a kickstart file and the "-e" option to point to the existing build artifacts. Your local.conf file needs to have the MACHINE variable set to the machine you are using, which is "qemux86" in this example.

Once the image builds, the output provides image location, artifact use, and kickstart file information.

Note

You should always verify the details provided in the output to make sure that the image was indeed created exactly as expected.

Continuing with the example, you can now write the image to a USB stick, or whatever media for which you built your image, and boot from the media. You can write the image by using bmaptool or dd:

     $ oe-run-native bmaptool copy build/mkefidisk-201710061409-sda.direct /dev/sdX
                    

or

     $ sudo dd if=build/mkefidisk-201710061409-sda.direct of=/dev/sdX
                    

Note

For more information on how to use the bmaptool to flash a device with an image, see the "Flashing Images Using bmaptool" section.