dev-manual: Updated Wic Kicstart examples.

(From yocto-docs rev: b5393e416c779aa9d4f5116cdea8d5fd09c21bd1)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2017-10-09 12:31:18 -07:00
committed by Richard Purdie
parent 3823b6edd3
commit e746cc1c65

View File

@@ -4844,7 +4844,7 @@
contained in an Openembedded kickstart file
(<filename>.wks</filename>) specified either directly on
the command line or as one of a selection of canned
<filename>.wks</filename> files as shown with the
kickstart files as shown with the
<filename>wic list images</filename> command in the
"<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
section.
@@ -4869,16 +4869,14 @@
This section provides some background information on Wic,
describes what you need to have in
place to run the tool, provides instruction on how to use
the <filename>wic</filename> utility,
and provides several examples.
the Wic utility, and provides several examples.
</para>
<section id='wic-background'>
<title>Background</title>
<para>
This section provides some background on the
<filename>wic</filename> utility.
This section provides some background on the Wic utility.
While none of this information is required to use
Wic, you might find it interesting.
<itemizedlist>
@@ -4920,9 +4918,9 @@
<title>Requirements</title>
<para>
In order to use the <filename>wic</filename> utility
with the OpenEmbedded Build system, your system needs
to meet the following requirements:
In order to use the Wic utility with the OpenEmbedded Build
system, your system needs to meet the following
requirements:
<itemizedlist>
<listitem><para>The Linux distribution on your
development host must support the Yocto Project.
@@ -4937,6 +4935,13 @@
<filename>cp</filename>, must be installed on your
development host system.
</para></listitem>
<listitem><para>
You must have sourced the build environment
setup script (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
found in the
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para></listitem>
<listitem><para>
You need to have the build artifacts already
available, which typically means that you must
@@ -4947,22 +4952,16 @@
in order to create an image using
Wic, the current version of
Wic requires the artifacts
in the form generated by the build system.
in the form generated by the OpenEmbedded build
system.
</para></listitem>
<listitem><para>
You must build several native tools, which are tools
You must build several native tools, which are
built to run on the build system:
<literallayout class='monospaced'>
$ bitbake parted-native dosfstools-native mtools-native
</literallayout>
</para></listitem>
<listitem><para>
You must have sourced the build environment
setup script (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
found in the
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para></listitem>
</itemizedlist>
</para>
</section>
@@ -4982,13 +4981,16 @@
</para>
<para>
Currently, Wic supports two commands:
<filename>create</filename> and <filename>list</filename>.
You can get help for these commands as follows:
Currently, Wic supports seven commands:
<filename>cp</filename>, <filename>create</filename>,
<filename>help</filename>, <filename>list</filename>,
<filename>ls</filename>, <filename>rm</filename>, and
<filename>write</filename>.
You can get help for these commands as follows with
<replaceable>command</replaceable> being one of the
supported commands:
<literallayout class='monospaced'>
$ wic help <replaceable>command</replaceable>
with <replaceable>command</replaceable> being either
<filename>create</filename> or <filename>list</filename>.
</literallayout>
</para>
@@ -5007,15 +5009,29 @@
</para>
<para>
You can find out more about the images
Wic creates using the existing
kickstart files with the following form of the command:
You can find out more about the images Wic creates using
the existing kickstart files with the following form of
the command:
<literallayout class='monospaced'>
$ wic list <replaceable>image</replaceable> help
</literallayout>
with <filename><replaceable>image</replaceable></filename>
being either <filename>directdisk</filename> or
<filename>mkefidisk</filename>.
For <replaceable>image</replaceable>, you can provide
any of the following:
<literallayout class='monospaced'>
beaglebone
mpc8315e-rdb
genericx86
edgerouter
qemux86-directdisk
directdisk-gpt
mkefidisk
directdisk
systemd-bootdisk
mkhybridiso
sdimage-bootpart
directdisk-multi-rootfs
directdisk-bootloader-config
</literallayout>
</para>
</section>
@@ -5031,7 +5047,7 @@
<listitem><para>
<emphasis>Raw Mode:</emphasis>
You explicitly specify build artifacts through
command-line arguments.
<filename>wic</filename> command-line arguments.
</para></listitem>
<listitem><para>
<emphasis>Cooked Mode:</emphasis>
@@ -5039,6 +5055,8 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
setting and image name are used to automatically
locate and provide the build artifacts.
You just supply a kickstart file and the name
of the image from which to use artifacts.
</para></listitem>
</itemizedlist>
</para>
@@ -5046,61 +5064,69 @@
<para>
Regardless of the mode you use, you need to have the build
artifacts ready and available.
Additionally, the environment must be set up using the
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
script found in the
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para>
<section id='raw-mode'>
<title>Raw Mode</title>
<para>
Running Wic in raw mode allows you to specify all the
partitions through the <filename>wic</filename>
command line.
The primary use for raw mode is if you have built
your kernel outside of the Yocto Project
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
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.
<filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>).
</para>
<para>
The general form of the
<filename>wic</filename> command in raw mode is:
<literallayout class='monospaced'>
$ wic create <replaceable>image_name</replaceable>.wks [<replaceable>options</replaceable>] [...]
$ wic create <replaceable>wks_file</replaceable> <replaceable>options</replaceable> ...
Where:
<replaceable>image_name</replaceable>.wks
<replaceable>wks_file</replaceable>:
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.
-o <replaceable>OUTDIR</replaceable>, --outdir=<replaceable>OUTDIR</replaceable>
The name of a directory in which to create image.
-i <replaceable>PROPERTIES_FILE</replaceable>, --infile=<replaceable>PROPERTIES_FILE</replaceable>
The name of a file containing the values for image
properties as a JSON file.
-e <replaceable>IMAGE_NAME</replaceable>, --image-name=<replaceable>IMAGE_NAME</replaceable>
The name of the image from which to use the artifacts
(e.g. <filename>core-image-sato</filename>).
-r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir=<replaceable>ROOTFS_DIR</replaceable>
The path to the <filename>/rootfs</filename> directory to use as the
<filename>.wks</filename> rootfs source.
-b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir=<replaceable>BOOTIMG_DIR</replaceable>
The path to the directory containing the boot artifacts
(e.g. <filename>/EFI</filename> or <filename>/syslinux</filename>) to use as the <filename>.wks</filename> bootimg
source.
-k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir=<replaceable>KERNEL_DIR</replaceable>
The path to the directory containing the kernel to use
in the <filename>.wks</filename> boot image.
-n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot=<replaceable>NATIVE_SYSROOT</replaceable>
The path to the native sysroot containing the tools to use
to build the image.
-s, --skip-build-check
Skips the build check.
-D, --debug
Output debug information.
optional arguments:
-h, --help show this help message and exit
-o <replaceable>OUTDIR</replaceable>, --outdir <replaceable>OUTDIR</replaceable>
name of directory to create image in
-e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
name of the image to use the artifacts from e.g. core-
image-sato
-r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir <replaceable>ROOTFS_DIR</replaceable>
path to the /rootfs dir to use as the .wks rootfs
source
-b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir <replaceable>BOOTIMG_DIR</replaceable>
path to the dir containing the boot artifacts (e.g.
/EFI or /syslinux dirs) to use as the .wks bootimg
source
-k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir <replaceable>KERNEL_DIR</replaceable>
path to the dir containing the kernel to use in the
.wks bootimg
-n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot <replaceable>NATIVE_SYSROOT</replaceable>
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 <replaceable>VARS_DIR</replaceable>, --vars <replaceable>VARS_DIR</replaceable>
directory with &lt;image&gt;.env files that store bitbake
variables
-D, --debug output debug information
</literallayout>
<note>
You do not need root privileges to run
@@ -5115,26 +5141,37 @@
<title>Cooked Mode</title>
<para>
The general form of the <filename>wic</filename> command
using Cooked Mode is:
Running Wic in cooked mode leverages off artifacts in
Build Directory.
In other words, you do not have to specify kernel or
root filesystem locations as part of the command.
All you need to provide is a kickstart file and the
name of the image from which to use artifacts by using
the "-e" option.
Wic looks in the Build Directory (e.g.
<filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>)
for artifacts.
</para>
<para>
The general form of the <filename>wic</filename>
command using Cooked Mode is as follows:
<literallayout class='monospaced'>
$ wic create <replaceable>kickstart_file</replaceable> -e <replaceable>image_name</replaceable>
$ wic create <replaceable>wks_file</replaceable> -e <replaceable>IMAGE_NAME</replaceable>
Where:
<replaceable>kickstart_file</replaceable>
An OpenEmbedded kickstart file. You can provide your own
custom file or a supplied file.
<replaceable>wks_file</replaceable>:
An OpenEmbedded kickstart file. You can provide
your own custom file or use a file from a set of
existing files provided with the Yocto Project
release.
<replaceable>image_name</replaceable>
Specifies the image built using the OpenEmbedded build
system.
required argument:
-e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
name of the image to use the artifacts from e.g. core-
image-sato
</literallayout>
This form is the simplest and most user-friendly, as it
does not require specifying all individual parameters.
All you need to provide is your own
<filename>.wks</filename> file or one provided with the
release.
</para>
</section>
</section>
@@ -5143,14 +5180,33 @@
<title>Using an Existing Kickstart File</title>
<para>
If you do not want to create your own
<filename>.wks</filename> file, you can use an existing
file provided by the Wic installation.
Use the following command to list the available files:
If you do not want to create your own kickstart file, you
can use an existing file provided by the Wic installation.
As shipped, kickstart files can be found in the
Yocto Project
<ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
in the following two locations:
<literallayout class='monospaced'>
poky/meta-yocto-bsp/wic
poky/scripts/lib/wic/canned-wks
</literallayout>
Use the following command to list the available kickstart
files:
<literallayout class='monospaced'>
$ wic list images
directdisk Create a 'pcbios' direct disk image
mkefidisk Create an EFI disk image
beaglebone Create SD card image for Beaglebone
mpc8315e-rdb Create SD card image for MPC8315E-RDB
genericx86 Create an EFI disk image for genericx86*
edgerouter Create SD card image for Edgerouter
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
directdisk-gpt Create a 'pcbios' direct disk image
mkefidisk Create an EFI disk image
directdisk Create a 'pcbios' direct disk image
systemd-bootdisk Create an EFI disk image with systemd-boot
mkhybridiso Create a hybrid ISO image
sdimage-bootpart Create SD card image with a boot partition
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
</literallayout>
When you use an existing file, you do not have to use the
<filename>.wks</filename> extension.
@@ -5164,20 +5220,16 @@
<para>
Here are the actual partition language commands
used in the <filename>mkefidisk.wks</filename> file to
used in the <filename>genericx86.wks</filename> file to
generate an image:
<literallayout class='monospaced'>
# short-description: Create an EFI disk image
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media.
part /boot --source bootimg-efi --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
# short-description: Create an EFI disk image for genericx86*
# long-description: Creates a partitioned EFI disk image for genericx86* machines
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
</literallayout>
</para>
</section>
@@ -5187,7 +5239,7 @@
<para>
This section provides several examples that show how to use
the <filename>wic</filename> utility.
the Wic utility.
All the examples assume the list of requirements in the
"<link linkend='wic-requirements'>Requirements</link>"
section have been met.
@@ -5203,42 +5255,36 @@
<filename>mkefidisk</filename> kickstart file:
<literallayout class='monospaced'>
$ wic create mkefidisk -e core-image-minimal
Checking basic build environment...
Done.
Creating image(s)...
Info: The new image(s) can be found here:
<replaceable>current_directory</replaceable>/build/mkefidisk-201310230946-sda.direct
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/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/rootfs
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimg
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
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
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
INFO: The image(s) were created using OE kickstart file:
/home/scottrif/poky/scripts/lib/wic/canned-wks/mkefidisk.wks
</literallayout>
The previous example shows the easiest way to create
an image by running in Cooked Mode and using the
<filename>-e</filename> option with an existing
kickstart file.
All that is necessary is to specify the image used to
generate the artifacts.
Your <filename>local.conf</filename> needs to have the
an image by running in cooked mode and supplying
a kickstart file and the "-e" option to point to the
existing build artifacts.
Your <filename>local.conf</filename> file needs to have
the
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
variable set to the machine you are using, which is
"minnow" in this example.
"qemux86" in this example.
</para>
<para>
The output specifies the exact image created as well as
where it was created, which is in the current
directory by default.
The output also names the artifacts used and the exact
<filename>.wks</filename> script that was used to
generate the image.
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
@@ -5249,16 +5295,16 @@
<para>
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 the resulting media.
built your image, and boot from the media.
You can write the image by using
<filename>bmaptool</filename> or
<filename>dd</filename>:
<literallayout class='monospaced'>
$ oe-run-native bmaptool copy build/mkefidisk-201310230946-sda.direct /dev/sd<replaceable>X</replaceable>
$ oe-run-native bmaptool copy build/mkefidisk-201710061409-sda.direct /dev/sd<replaceable>X</replaceable>
</literallayout>
or
<literallayout class='monospaced'>
$ sudo dd if=build/mkefidisk-201310230946-sda.direct of=/dev/sd<replaceable>X</replaceable>
$ sudo dd if=build/mkefidisk-201710061409-sda.direct of=/dev/sd<replaceable>X</replaceable>
</literallayout>
<note>
For more information on how to use the
@@ -5274,22 +5320,25 @@
<title>Using a Modified Kickstart File</title>
<para>
Because partitioned image creation is
driven by the kickstart file, it is easy to affect
image creation by changing the parameters in the file.
Because partitioned image creation is driven by the
kickstart file, it is easy to affect image creation by
changing the parameters in the file.
This next example demonstrates that through modification
of the <filename>directdisk</filename> kickstart file.
of the <filename>directdisk-gpt</filename> kickstart
file.
</para>
<para>
As mentioned earlier, you can use the command
<filename>wic list images</filename> to show the list
of existing kickstart files.
The directory in which these files reside is
<filename>scripts/lib/image/canned-wks/</filename>
located in the
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
Because the available files reside in this directory,
The directory in which the
<filename>directdisk-gpt.wks</filename> file resides is
<filename>scripts/lib/image/canned-wks/</filename>,
which is located in the
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>).
Because available files reside in this directory,
you can create and add your own custom files to the
directory.
Subsequent use of the
@@ -5299,104 +5348,77 @@
<para>
In this example, the existing
<filename>directdisk</filename> file already does most
of what is needed.
<filename>directdisk-gpt</filename> file already does
most of what is needed.
However, for the hardware in this example, the image
will need to boot from <filename>sdb</filename> instead
of <filename>sda</filename>, which is what the
<filename>directdisk</filename> kickstart file uses.
<filename>directdisk-gpt</filename> kickstart file
uses.
</para>
<para>
The example begins by making a copy of the
<filename>directdisk.wks</filename> file in the
<filename>directdisk-gpt.wks</filename> file in the
<filename>scripts/lib/image/canned-wks</filename>
directory and then by changing the lines that specify
the target disk from which to boot.
<literallayout class='monospaced'>
$ cp /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks \
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
$ cp /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
/home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
</literallayout>
Next, the example modifies the
<filename>directdisksdb.wks</filename> file and changes
all instances of "<filename>--ondisk sda</filename>"
to "<filename>--ondisk sdb</filename>".
<filename>directdisksdb-gpt.wks</filename> file and
changes all instances of
"<filename>--ondisk sda</filename>" to
"<filename>--ondisk sdb</filename>".
The example changes the following two lines and leaves
the remaining lines untouched:
<literallayout class='monospaced'>
part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024
part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid
</literallayout>
Once the lines are changed, the example generates the
<filename>directdisksdb</filename> image.
<filename>directdisksdb-gpt</filename> image.
The command points the process at the
<filename>core-image-minimal</filename> artifacts for
the Next Unit of Computing (nuc)
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
the <filename>local.conf</filename>.
<literallayout class='monospaced'>
$ wic create directdisksdb -e core-image-minimal
Checking basic build environment...
Done.
$ wic create directdisksdb-gpt -e core-image-minimal
INFO: Building wic-tools...
.
.
.
Initialising tasks: 100% |#######################################| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1161 tasks of which 1157 didn't need to be rerun and all succeeded.
INFO: Creating image(s)...
Creating image(s)...
Info: The new image(s) can be found here:
<replaceable>current_directory</replaceable>/build/directdisksdb-201310231131-sdb.direct
INFO: The new image(s) can be found here:
./directdisksdb-gpt-201710090938-sdb.direct
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /home/scottrif/poky/build/tmp.wic.hk3wl6zn/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
ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/nuc-poky-linux/core-image-minimal/1.0-r0/rootfs
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/share
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/src/kernel
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
INFO: The image(s) were created using OE kickstart file:
/home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
</literallayout>
Continuing with the example, you can now directly
<filename>dd</filename> the image to a USB stick, or
whatever media for which you built your image,
and boot the resulting media:
<literallayout class='monospaced'>
$ sudo dd if=build/directdisksdb-201310231131-sdb.direct of=/dev/sdb
86018+0 records in
86018+0 records out
44041216 bytes (44 MB) copied, 13.0734 s, 3.4 MB/s
[trz at empanada tmp]$ sudo eject /dev/sdb
</literallayout>
</para>
</section>
<section id='creating-an-image-based-on-core-image-minimal-and-crownbay-noemgd'>
<title>Creating an Image Based on <filename>core-image-minimal</filename> and <filename>crownbay-noemgd</filename></title>
<para>
This example creates an image based on
<filename>core-image-minimal</filename> and a
<filename>crownbay-noemgd</filename>
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
that works right out of the box.
<literallayout class='monospaced'>
$ wic create directdisk -e core-image-minimal
Checking basic build environment...
Done.
Creating image(s)...
Info: The new image(s) can be found here:
<replaceable>current_directory</replaceable>/build/directdisk-201309252350-sda.direct
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks
$ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb
140966+0 records in
140966+0 records out
72174592 bytes (72 MB, 69 MiB) copied, 78.0282 s, 925 kB/s
$ sudo eject /dev/sdb
</literallayout>
</para>
</section>
@@ -5412,26 +5434,25 @@
somewhere other than the default output directory,
which is the current directory:
<literallayout class='monospaced'>
$ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir \
/home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs \
--bootimg-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share \
--kernel-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel \
--native-sysroot /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
$ wic create /home/scottrif/my_yocto/test.wks -o /home/scottrif/testwic \
--rootfs-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
--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
Creating image(s)...
INFO: Creating image(s)...
Info: The new image(s) can be found here:
/home/trz/testwic/build/test-201309260032-sda.direct
INFO: The new image(s) can be found here:
/home/scottrif/testwic/test-201710091445-sdb.direct
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /home/scottrif/testwic/tmp.wic.x4wipbmb/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
ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
The image(s) were created using OE kickstart file:
/home/trz/test.wks
INFO: The image(s) were created using OE kickstart file:
/home/scottrif/my_yocto/test.wks
</literallayout>
For this example,
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>