mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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:
committed by
Richard Purdie
parent
3823b6edd3
commit
e746cc1c65
@@ -4844,7 +4844,7 @@
|
|||||||
contained in an Openembedded kickstart file
|
contained in an Openembedded kickstart file
|
||||||
(<filename>.wks</filename>) specified either directly on
|
(<filename>.wks</filename>) specified either directly on
|
||||||
the command line or as one of a selection of canned
|
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
|
<filename>wic list images</filename> command in the
|
||||||
"<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
|
"<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
|
||||||
section.
|
section.
|
||||||
@@ -4869,16 +4869,14 @@
|
|||||||
This section provides some background information on Wic,
|
This section provides some background information on Wic,
|
||||||
describes what you need to have in
|
describes what you need to have in
|
||||||
place to run the tool, provides instruction on how to use
|
place to run the tool, provides instruction on how to use
|
||||||
the <filename>wic</filename> utility,
|
the Wic utility, and provides several examples.
|
||||||
and provides several examples.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='wic-background'>
|
<section id='wic-background'>
|
||||||
<title>Background</title>
|
<title>Background</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section provides some background on the
|
This section provides some background on the Wic utility.
|
||||||
<filename>wic</filename> utility.
|
|
||||||
While none of this information is required to use
|
While none of this information is required to use
|
||||||
Wic, you might find it interesting.
|
Wic, you might find it interesting.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@@ -4920,9 +4918,9 @@
|
|||||||
<title>Requirements</title>
|
<title>Requirements</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In order to use the <filename>wic</filename> utility
|
In order to use the Wic utility with the OpenEmbedded Build
|
||||||
with the OpenEmbedded Build system, your system needs
|
system, your system needs to meet the following
|
||||||
to meet the following requirements:
|
requirements:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The Linux distribution on your
|
<listitem><para>The Linux distribution on your
|
||||||
development host must support the Yocto Project.
|
development host must support the Yocto Project.
|
||||||
@@ -4937,6 +4935,13 @@
|
|||||||
<filename>cp</filename>, must be installed on your
|
<filename>cp</filename>, must be installed on your
|
||||||
development host system.
|
development host system.
|
||||||
</para></listitem>
|
</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>
|
<listitem><para>
|
||||||
You need to have the build artifacts already
|
You need to have the build artifacts already
|
||||||
available, which typically means that you must
|
available, which typically means that you must
|
||||||
@@ -4947,22 +4952,16 @@
|
|||||||
in order to create an image using
|
in order to create an image using
|
||||||
Wic, the current version of
|
Wic, the current version of
|
||||||
Wic requires the artifacts
|
Wic requires the artifacts
|
||||||
in the form generated by the build system.
|
in the form generated by the OpenEmbedded build
|
||||||
|
system.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<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:
|
built to run on the build system:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake parted-native dosfstools-native mtools-native
|
$ bitbake parted-native dosfstools-native mtools-native
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></listitem>
|
</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>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -4982,13 +4981,16 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Currently, Wic supports two commands:
|
Currently, Wic supports seven commands:
|
||||||
<filename>create</filename> and <filename>list</filename>.
|
<filename>cp</filename>, <filename>create</filename>,
|
||||||
You can get help for these commands as follows:
|
<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'>
|
<literallayout class='monospaced'>
|
||||||
$ wic help <replaceable>command</replaceable>
|
$ wic help <replaceable>command</replaceable>
|
||||||
with <replaceable>command</replaceable> being either
|
|
||||||
<filename>create</filename> or <filename>list</filename>.
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -5007,15 +5009,29 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can find out more about the images
|
You can find out more about the images Wic creates using
|
||||||
Wic creates using the existing
|
the existing kickstart files with the following form of
|
||||||
kickstart files with the following form of the command:
|
the command:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wic list <replaceable>image</replaceable> help
|
$ wic list <replaceable>image</replaceable> help
|
||||||
</literallayout>
|
</literallayout>
|
||||||
with <filename><replaceable>image</replaceable></filename>
|
For <replaceable>image</replaceable>, you can provide
|
||||||
being either <filename>directdisk</filename> or
|
any of the following:
|
||||||
<filename>mkefidisk</filename>.
|
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -5031,7 +5047,7 @@
|
|||||||
<listitem><para>
|
<listitem><para>
|
||||||
<emphasis>Raw Mode:</emphasis>
|
<emphasis>Raw Mode:</emphasis>
|
||||||
You explicitly specify build artifacts through
|
You explicitly specify build artifacts through
|
||||||
command-line arguments.
|
<filename>wic</filename> command-line arguments.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
<emphasis>Cooked Mode:</emphasis>
|
<emphasis>Cooked Mode:</emphasis>
|
||||||
@@ -5039,6 +5055,8 @@
|
|||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
||||||
setting and image name are used to automatically
|
setting and image name are used to automatically
|
||||||
locate and provide the build artifacts.
|
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>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
@@ -5046,61 +5064,69 @@
|
|||||||
<para>
|
<para>
|
||||||
Regardless of the mode you use, you need to have the build
|
Regardless of the mode you use, you need to have the build
|
||||||
artifacts ready and available.
|
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>
|
</para>
|
||||||
|
|
||||||
<section id='raw-mode'>
|
<section id='raw-mode'>
|
||||||
<title>Raw Mode</title>
|
<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>
|
<para>
|
||||||
The general form of the
|
The general form of the
|
||||||
<filename>wic</filename> command in raw mode is:
|
<filename>wic</filename> command in raw mode is:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wic create <replaceable>image_name</replaceable>.wks [<replaceable>options</replaceable>] [...]
|
$ wic create <replaceable>wks_file</replaceable> <replaceable>options</replaceable> ...
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
<replaceable>image_name</replaceable>.wks
|
<replaceable>wks_file</replaceable>:
|
||||||
An OpenEmbedded kickstart file. You can provide
|
An OpenEmbedded kickstart file. You can provide
|
||||||
your own custom file or use a file from a set of
|
your own custom file or use a file from a set of
|
||||||
existing files as described by further options.
|
existing files as described by further options.
|
||||||
|
|
||||||
-o <replaceable>OUTDIR</replaceable>, --outdir=<replaceable>OUTDIR</replaceable>
|
optional arguments:
|
||||||
The name of a directory in which to create image.
|
-h, --help show this help message and exit
|
||||||
|
-o <replaceable>OUTDIR</replaceable>, --outdir <replaceable>OUTDIR</replaceable>
|
||||||
-i <replaceable>PROPERTIES_FILE</replaceable>, --infile=<replaceable>PROPERTIES_FILE</replaceable>
|
name of directory to create image in
|
||||||
The name of a file containing the values for image
|
-e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
|
||||||
properties as a JSON file.
|
name of the image to use the artifacts from e.g. core-
|
||||||
|
image-sato
|
||||||
-e <replaceable>IMAGE_NAME</replaceable>, --image-name=<replaceable>IMAGE_NAME</replaceable>
|
-r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir <replaceable>ROOTFS_DIR</replaceable>
|
||||||
The name of the image from which to use the artifacts
|
path to the /rootfs dir to use as the .wks rootfs
|
||||||
(e.g. <filename>core-image-sato</filename>).
|
source
|
||||||
|
-b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir <replaceable>BOOTIMG_DIR</replaceable>
|
||||||
-r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir=<replaceable>ROOTFS_DIR</replaceable>
|
path to the dir containing the boot artifacts (e.g.
|
||||||
The path to the <filename>/rootfs</filename> directory to use as the
|
/EFI or /syslinux dirs) to use as the .wks bootimg
|
||||||
<filename>.wks</filename> rootfs source.
|
source
|
||||||
|
-k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir <replaceable>KERNEL_DIR</replaceable>
|
||||||
-b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir=<replaceable>BOOTIMG_DIR</replaceable>
|
path to the dir containing the kernel to use in the
|
||||||
The path to the directory containing the boot artifacts
|
.wks bootimg
|
||||||
(e.g. <filename>/EFI</filename> or <filename>/syslinux</filename>) to use as the <filename>.wks</filename> bootimg
|
-n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot <replaceable>NATIVE_SYSROOT</replaceable>
|
||||||
source.
|
path to the native sysroot containing the tools to use
|
||||||
|
to build the image
|
||||||
-k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir=<replaceable>KERNEL_DIR</replaceable>
|
-s, --skip-build-check
|
||||||
The path to the directory containing the kernel to use
|
skip the build check
|
||||||
in the <filename>.wks</filename> boot image.
|
-f, --build-rootfs build rootfs
|
||||||
|
-c {gzip,bzip2,xz}, --compress-with {gzip,bzip2,xz}
|
||||||
-n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot=<replaceable>NATIVE_SYSROOT</replaceable>
|
compress image with specified compressor
|
||||||
The path to the native sysroot containing the tools to use
|
-m, --bmap generate .bmap
|
||||||
to build the image.
|
--no-fstab-update Do not change fstab file.
|
||||||
|
-v <replaceable>VARS_DIR</replaceable>, --vars <replaceable>VARS_DIR</replaceable>
|
||||||
-s, --skip-build-check
|
directory with <image>.env files that store bitbake
|
||||||
Skips the build check.
|
variables
|
||||||
|
-D, --debug output debug information
|
||||||
-D, --debug
|
|
||||||
Output debug information.
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
<note>
|
||||||
You do not need root privileges to run
|
You do not need root privileges to run
|
||||||
@@ -5115,26 +5141,37 @@
|
|||||||
<title>Cooked Mode</title>
|
<title>Cooked Mode</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The general form of the <filename>wic</filename> command
|
Running Wic in cooked mode leverages off artifacts in
|
||||||
using Cooked Mode is:
|
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'>
|
<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:
|
Where:
|
||||||
|
|
||||||
<replaceable>kickstart_file</replaceable>
|
<replaceable>wks_file</replaceable>:
|
||||||
An OpenEmbedded kickstart file. You can provide your own
|
An OpenEmbedded kickstart file. You can provide
|
||||||
custom file or a supplied file.
|
your own custom file or use a file from a set of
|
||||||
|
existing files provided with the Yocto Project
|
||||||
|
release.
|
||||||
|
|
||||||
<replaceable>image_name</replaceable>
|
required argument:
|
||||||
Specifies the image built using the OpenEmbedded build
|
-e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
|
||||||
system.
|
name of the image to use the artifacts from e.g. core-
|
||||||
|
image-sato
|
||||||
</literallayout>
|
</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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -5143,14 +5180,33 @@
|
|||||||
<title>Using an Existing Kickstart File</title>
|
<title>Using an Existing Kickstart File</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you do not want to create your own
|
If you do not want to create your own kickstart file, you
|
||||||
<filename>.wks</filename> file, you can use an existing
|
can use an existing file provided by the Wic installation.
|
||||||
file provided by the Wic installation.
|
As shipped, kickstart files can be found in the
|
||||||
Use the following command to list the available files:
|
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'>
|
<literallayout class='monospaced'>
|
||||||
$ wic list images
|
$ wic list images
|
||||||
directdisk Create a 'pcbios' direct disk image
|
beaglebone Create SD card image for Beaglebone
|
||||||
mkefidisk Create an EFI disk image
|
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>
|
</literallayout>
|
||||||
When you use an existing file, you do not have to use the
|
When you use an existing file, you do not have to use the
|
||||||
<filename>.wks</filename> extension.
|
<filename>.wks</filename> extension.
|
||||||
@@ -5164,20 +5220,16 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here are the actual partition language commands
|
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:
|
generate an image:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
# short-description: Create an EFI disk image
|
# short-description: Create an EFI disk image for genericx86*
|
||||||
# long-description: Creates a partitioned EFI disk image that the user
|
# long-description: Creates a partitioned EFI disk image for genericx86* machines
|
||||||
# can directly dd to boot media.
|
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 /boot --source bootimg-efi --ondisk sda --label msdos --active --align 1024
|
|
||||||
|
|
||||||
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
|
|
||||||
|
|
||||||
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
|
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>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -5187,7 +5239,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section provides several examples that show how to use
|
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
|
All the examples assume the list of requirements in the
|
||||||
"<link linkend='wic-requirements'>Requirements</link>"
|
"<link linkend='wic-requirements'>Requirements</link>"
|
||||||
section have been met.
|
section have been met.
|
||||||
@@ -5203,42 +5255,36 @@
|
|||||||
<filename>mkefidisk</filename> kickstart file:
|
<filename>mkefidisk</filename> kickstart file:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wic create mkefidisk -e core-image-minimal
|
$ wic create mkefidisk -e core-image-minimal
|
||||||
Checking basic build environment...
|
INFO: Building wic-tools...
|
||||||
Done.
|
.
|
||||||
|
.
|
||||||
Creating image(s)...
|
.
|
||||||
|
INFO: The new image(s) can be found here:
|
||||||
Info: The new image(s) can be found here:
|
./mkefidisk-201710061409-sda.direct
|
||||||
<replaceable>current_directory</replaceable>/build/mkefidisk-201310230946-sda.direct
|
|
||||||
|
|
||||||
The following build artifacts were used to create the image(s):
|
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
|
ROOTFS_DIR: /home/scottrif/poky/build/tmp.wic.r4hkds0b/rootfs_copy
|
||||||
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
|
BOOTIMG_DIR: /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
|
||||||
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
|
KERNEL_DIR: /home/scottrif/poky/build/tmp/deploy/images/qemux86
|
||||||
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
|
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:
|
INFO: The image(s) were created using OE kickstart file:
|
||||||
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
|
/home/scottrif/poky/scripts/lib/wic/canned-wks/mkefidisk.wks
|
||||||
</literallayout>
|
</literallayout>
|
||||||
The previous example shows the easiest way to create
|
The previous example shows the easiest way to create
|
||||||
an image by running in Cooked Mode and using the
|
an image by running in cooked mode and supplying
|
||||||
<filename>-e</filename> option with an existing
|
a kickstart file and the "-e" option to point to the
|
||||||
kickstart file.
|
existing build artifacts.
|
||||||
All that is necessary is to specify the image used to
|
Your <filename>local.conf</filename> file needs to have
|
||||||
generate the artifacts.
|
the
|
||||||
Your <filename>local.conf</filename> needs to have the
|
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
||||||
variable set to the machine you are using, which is
|
variable set to the machine you are using, which is
|
||||||
"minnow" in this example.
|
"qemux86" in this example.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The output specifies the exact image created as well as
|
Once the image builds, the output provides image
|
||||||
where it was created, which is in the current
|
location, artifact use, and kickstart file information.
|
||||||
directory by default.
|
|
||||||
The output also names the artifacts used and the exact
|
|
||||||
<filename>.wks</filename> script that was used to
|
|
||||||
generate the image.
|
|
||||||
<note>
|
<note>
|
||||||
You should always verify the details provided in the
|
You should always verify the details provided in the
|
||||||
output to make sure that the image was indeed
|
output to make sure that the image was indeed
|
||||||
@@ -5249,16 +5295,16 @@
|
|||||||
<para>
|
<para>
|
||||||
Continuing with the example, you can now write the
|
Continuing with the example, you can now write the
|
||||||
image to a USB stick, or whatever media for which you
|
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
|
You can write the image by using
|
||||||
<filename>bmaptool</filename> or
|
<filename>bmaptool</filename> or
|
||||||
<filename>dd</filename>:
|
<filename>dd</filename>:
|
||||||
<literallayout class='monospaced'>
|
<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>
|
</literallayout>
|
||||||
or
|
or
|
||||||
<literallayout class='monospaced'>
|
<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>
|
</literallayout>
|
||||||
<note>
|
<note>
|
||||||
For more information on how to use the
|
For more information on how to use the
|
||||||
@@ -5274,22 +5320,25 @@
|
|||||||
<title>Using a Modified Kickstart File</title>
|
<title>Using a Modified Kickstart File</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Because partitioned image creation is
|
Because partitioned image creation is driven by the
|
||||||
driven by the kickstart file, it is easy to affect
|
kickstart file, it is easy to affect image creation by
|
||||||
image creation by changing the parameters in the file.
|
changing the parameters in the file.
|
||||||
This next example demonstrates that through modification
|
This next example demonstrates that through modification
|
||||||
of the <filename>directdisk</filename> kickstart file.
|
of the <filename>directdisk-gpt</filename> kickstart
|
||||||
|
file.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As mentioned earlier, you can use the command
|
As mentioned earlier, you can use the command
|
||||||
<filename>wic list images</filename> to show the list
|
<filename>wic list images</filename> to show the list
|
||||||
of existing kickstart files.
|
of existing kickstart files.
|
||||||
The directory in which these files reside is
|
The directory in which the
|
||||||
<filename>scripts/lib/image/canned-wks/</filename>
|
<filename>directdisk-gpt.wks</filename> file resides is
|
||||||
located in the
|
<filename>scripts/lib/image/canned-wks/</filename>,
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
|
which is located in the
|
||||||
Because the available files reside in this directory,
|
<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
|
you can create and add your own custom files to the
|
||||||
directory.
|
directory.
|
||||||
Subsequent use of the
|
Subsequent use of the
|
||||||
@@ -5299,104 +5348,77 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
In this example, the existing
|
In this example, the existing
|
||||||
<filename>directdisk</filename> file already does most
|
<filename>directdisk-gpt</filename> file already does
|
||||||
of what is needed.
|
most of what is needed.
|
||||||
However, for the hardware in this example, the image
|
However, for the hardware in this example, the image
|
||||||
will need to boot from <filename>sdb</filename> instead
|
will need to boot from <filename>sdb</filename> instead
|
||||||
of <filename>sda</filename>, which is what the
|
of <filename>sda</filename>, which is what the
|
||||||
<filename>directdisk</filename> kickstart file uses.
|
<filename>directdisk-gpt</filename> kickstart file
|
||||||
|
uses.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The example begins by making a copy of the
|
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>
|
<filename>scripts/lib/image/canned-wks</filename>
|
||||||
directory and then by changing the lines that specify
|
directory and then by changing the lines that specify
|
||||||
the target disk from which to boot.
|
the target disk from which to boot.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cp /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks \
|
$ cp /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
|
||||||
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
|
/home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Next, the example modifies the
|
Next, the example modifies the
|
||||||
<filename>directdisksdb.wks</filename> file and changes
|
<filename>directdisksdb-gpt.wks</filename> file and
|
||||||
all instances of "<filename>--ondisk sda</filename>"
|
changes all instances of
|
||||||
to "<filename>--ondisk sdb</filename>".
|
"<filename>--ondisk sda</filename>" to
|
||||||
|
"<filename>--ondisk sdb</filename>".
|
||||||
The example changes the following two lines and leaves
|
The example changes the following two lines and leaves
|
||||||
the remaining lines untouched:
|
the remaining lines untouched:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024
|
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>
|
</literallayout>
|
||||||
Once the lines are changed, the example generates the
|
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
|
The command points the process at the
|
||||||
<filename>core-image-minimal</filename> artifacts for
|
<filename>core-image-minimal</filename> artifacts for
|
||||||
the Next Unit of Computing (nuc)
|
the Next Unit of Computing (nuc)
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
||||||
the <filename>local.conf</filename>.
|
the <filename>local.conf</filename>.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wic create directdisksdb -e core-image-minimal
|
$ wic create directdisksdb-gpt -e core-image-minimal
|
||||||
Checking basic build environment...
|
INFO: Building wic-tools...
|
||||||
Done.
|
.
|
||||||
|
.
|
||||||
|
.
|
||||||
|
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:
|
||||||
|
./directdisksdb-gpt-201710090938-sdb.direct
|
||||||
Info: The new image(s) can be found here:
|
|
||||||
<replaceable>current_directory</replaceable>/build/directdisksdb-201310231131-sdb.direct
|
|
||||||
|
|
||||||
The following build artifacts were used to create the image(s):
|
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
|
INFO: The image(s) were created using OE kickstart file:
|
||||||
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/share
|
/home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
|
||||||
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
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Continuing with the example, you can now directly
|
Continuing with the example, you can now directly
|
||||||
<filename>dd</filename> the image to a USB stick, or
|
<filename>dd</filename> the image to a USB stick, or
|
||||||
whatever media for which you built your image,
|
whatever media for which you built your image,
|
||||||
and boot the resulting media:
|
and boot the resulting media:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ sudo dd if=build/directdisksdb-201310231131-sdb.direct of=/dev/sdb
|
$ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb
|
||||||
86018+0 records in
|
140966+0 records in
|
||||||
86018+0 records out
|
140966+0 records out
|
||||||
44041216 bytes (44 MB) copied, 13.0734 s, 3.4 MB/s
|
72174592 bytes (72 MB, 69 MiB) copied, 78.0282 s, 925 kB/s
|
||||||
[trz at empanada tmp]$ sudo eject /dev/sdb
|
$ 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
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -5412,26 +5434,25 @@
|
|||||||
somewhere other than the default output directory,
|
somewhere other than the default output directory,
|
||||||
which is the current directory:
|
which is the current directory:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir \
|
$ wic create /home/scottrif/my_yocto/test.wks -o /home/scottrif/testwic \
|
||||||
/home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs \
|
--rootfs-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
|
||||||
--bootimg-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share \
|
--bootimg-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share \
|
||||||
--kernel-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel \
|
--kernel-dir /home/scottrif/poky/build/tmp/deploy/images/qemux86 \
|
||||||
--native-sysroot /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
|
--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:
|
INFO: The new image(s) can be found here:
|
||||||
/home/trz/testwic/build/test-201309260032-sda.direct
|
/home/scottrif/testwic/test-201710091445-sdb.direct
|
||||||
|
|
||||||
The following build artifacts were used to create the image(s):
|
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
|
INFO: The image(s) were created using OE kickstart file:
|
||||||
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
|
/home/scottrif/my_yocto/test.wks
|
||||||
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
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
For this example,
|
For this example,
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
|
||||||
|
|||||||
Reference in New Issue
Block a user