* [PATCH 1/5] wic: Error on parted non-zero error code
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
@ 2014-07-15 15:43 ` Tom Zanussi
2014-07-15 15:43 ` [PATCH 2/5] wic: Add vfat support Tom Zanussi
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
The current code uses msger.debug() to note errors, effectively
squelching them if --debug isn't used. Apparently this is because it
can return non-zero for some loop device failures. We don't care
about loop devices, and not paying attention to the error code
actually results in invalid images, so error out on parted failures as
we should be.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
scripts/lib/mic/utils/partitionedfs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
index 6607466..593cf1f 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -272,7 +272,7 @@ class PartitionedMount(Mount):
# parted always fails to reload part table with loop devices. This
# prevents us from distinguishing real errors based on return
# code.
- msger.debug("WARNING: parted returned '%s' instead of 0" % rc)
+ msger.error("WARNING: parted returned '%s' instead of 0 (use --debug for details)" % rc)
def __create_partition(self, device, parttype, fstype, start, size):
""" Create a partition on an image described by the 'device' object. """
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] wic: Add vfat support
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
2014-07-15 15:43 ` [PATCH 1/5] wic: Error on parted non-zero error code Tom Zanussi
@ 2014-07-15 15:43 ` Tom Zanussi
2014-07-15 15:43 ` [PATCH 3/5] wic: Add wic overview to help system Tom Zanussi
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
Add vfat as a supported rootfs type (in addition to the current
ext2/3/4 and btrfs support).
vfat partitions can now be created using --source rootfs along with
--fstype=vfat, or without --source but specifying a --size.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
.../lib/mic/kickstart/custom_commands/partition.py | 74 ++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 75ad6ad..4662bdd 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -186,6 +186,11 @@ class Wic_PartData(Mic_PartData):
rootfs_dir, native_sysroot,
pseudo)
+ elif self.fstype.startswith("vfat"):
+ return self.prepare_rootfs_vfat(cr_workdir, oe_builddir,
+ rootfs_dir, native_sysroot,
+ pseudo)
+
def prepare_rootfs_ext(self, cr_workdir, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
@@ -270,6 +275,53 @@ class Wic_PartData(Mic_PartData):
self.size = rootfs_size
self.source_file = rootfs
+ def prepare_rootfs_vfat(self, cr_workdir, oe_builddir, rootfs_dir,
+ native_sysroot, pseudo):
+ """
+ Prepare content for a vfat rootfs partition.
+ """
+ image_rootfs = rootfs_dir
+ rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
+
+ du_cmd = "du -bks %s" % image_rootfs
+ rc, out = exec_cmd(du_cmd)
+ blocks = int(out.split()[0])
+
+ extra_blocks = self.get_extra_block_count(blocks)
+
+ if extra_blocks < BOOTDD_EXTRA_SPACE:
+ extra_blocks = BOOTDD_EXTRA_SPACE
+
+ blocks += extra_blocks
+
+ msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+ (extra_blocks, self.mountpoint, blocks))
+
+ # Ensure total sectors is an integral number of sectors per
+ # track or mcopy will complain. Sectors are 512 bytes, and we
+ # generate images with 32 sectors per track. This calculation is
+ # done in blocks, thus the mod by 16 instead of 32.
+ blocks += (16 - (blocks % 16))
+
+ dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (rootfs, blocks)
+ exec_native_cmd(dosfs_cmd, native_sysroot)
+
+ mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, image_rootfs)
+ rc, out = exec_native_cmd(mcopy_cmd, native_sysroot)
+ if rc:
+ msger.error("ERROR: mcopy returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % rc)
+
+ chmod_cmd = "chmod 644 %s" % rootfs
+ exec_cmd(chmod_cmd)
+
+ # get the rootfs size in the right units for kickstart (Mb)
+ du_cmd = "du -Lbms %s" % rootfs
+ rc, out = exec_cmd(du_cmd)
+ rootfs_size = out.split()[0]
+
+ self.set_size(rootfs_size)
+ self.set_source_file(rootfs)
+
def prepare_empty_partition(self, cr_workdir, oe_builddir, native_sysroot):
"""
Prepare an empty partition.
@@ -280,6 +332,9 @@ class Wic_PartData(Mic_PartData):
elif self.fstype.startswith("btrfs"):
return self.prepare_empty_partition_btrfs(cr_workdir, oe_builddir,
native_sysroot)
+ elif self.fstype.startswith("vfat"):
+ return self.prepare_empty_partition_vfat(cr_workdir, oe_builddir,
+ native_sysroot)
def prepare_empty_partition_ext(self, cr_workdir, oe_builddir,
native_sysroot):
@@ -322,6 +377,25 @@ class Wic_PartData(Mic_PartData):
return 0
+ def prepare_empty_partition_vfat(self, cr_workdir, oe_builddir,
+ native_sysroot):
+ """
+ Prepare an empty vfat partition.
+ """
+ fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+
+ blocks = self.size * 1024
+
+ dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (fs, blocks)
+ exec_native_cmd(dosfs_cmd, native_sysroot)
+
+ chmod_cmd = "chmod 644 %s" % fs
+ exec_cmd(chmod_cmd)
+
+ self.source_file = fs
+
+ return 0
+
def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
"""
Prepare a swap partition.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/5] wic: Updates to add vfat support and more help topics
@ 2014-07-15 15:43 Tom Zanussi
2014-07-15 15:43 ` [PATCH 1/5] wic: Error on parted non-zero error code Tom Zanussi
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
This patchset adds vfat support as requested in YOCTO #6513, and also
adds a couple new help topics: a wic overview and the start of a wic
kickstart reference.
It also fixes a couple usability bugs noted along the way.
The following changes since commit 1dcdd877c7946be4c0b1203deb14e2f842f9d0c2:
bitbake: toasterui: fix build - project identification (2014-07-14 14:10:03 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-vfat-updates
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-vfat-updates
Tom Zanussi (5):
wic: Error on parted non-zero error code
wic: Add vfat support
wic: Add wic overview to help system
wic: Add kickstart reference to help system
wic: Error on zero-sized partitions
scripts/lib/image/canned-wks/directdisk.wks | 2 +-
scripts/lib/image/help.py | 323 +++++++++++++++++++++
.../lib/mic/kickstart/custom_commands/partition.py | 76 +++++
scripts/lib/mic/utils/partitionedfs.py | 2 +-
scripts/wic | 24 +-
5 files changed, 416 insertions(+), 11 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/5] wic: Add wic overview to help system
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
2014-07-15 15:43 ` [PATCH 1/5] wic: Error on parted non-zero error code Tom Zanussi
2014-07-15 15:43 ` [PATCH 2/5] wic: Add vfat support Tom Zanussi
@ 2014-07-15 15:43 ` Tom Zanussi
2014-07-15 15:43 ` [PATCH 4/5] wic: Add kickstart reference " Tom Zanussi
2014-07-15 15:43 ` [PATCH 5/5] wic: Error on zero-sized partitions Tom Zanussi
4 siblings, 0 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
Add a general overview of wic to the help system as 'wic overview',
along with some introductory examples.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
scripts/lib/image/help.py | 209 ++++++++++++++++++++++++++++++++++++++++++++++
scripts/wic | 21 +++--
2 files changed, 221 insertions(+), 9 deletions(-)
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index a4f27ab..bf2f773 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -88,6 +88,7 @@ wic_usage = """
list List available values for options and image properties
Help topics:
+ overview wic overview - General overview of wic
plugins wic plugins - Overview and API
See 'wic help <COMMAND or HELP TOPIC>' for more information on a specific
@@ -422,3 +423,211 @@ DESCRIPTION
with the actual methods. Please see the implementation for
examples and details.
"""
+
+wic_overview_help = """
+
+NAME
+ wic overview - General overview of wic
+
+DESCRIPTION
+ The 'wic' command generates partitioned images from existing
+ OpenEmbedded build artifacts. Image generation is driven by
+ partitioning commands contained in an 'Openembedded kickstart'
+ (.wks) file (see 'wic help kickstart') specified either directly
+ on the command-line or as one of a selection of canned .wks files
+ (see 'wic list images'). When applied to a given set of build
+ artifacts, the result is an image or set of images that can be
+ directly written onto media and used on a particular system.
+
+ The 'wic' command and the infrastructure it's based is by
+ definition incomplete - it's designed to allow the generation of
+ customized images, and as such was designed to be completely
+ extensible via a plugin interface (see 'wic help plugins').
+
+ Background and Motivation
+
+ wic is meant to be a completely independent standalone utility
+ that initially provides easier-to-use and more flexible
+ replacements for a couple bits of existing functionality in
+ oe-core: directdisk.bbclass and mkefidisk.sh. The difference
+ between wic and those examples is that with wic the functionality
+ of those scripts is implemented by a general-purpose partitioning
+ 'language' based on Redhat kickstart syntax (with the underlying
+ code borrowed from Tizen mic, which in turn was borrowed from
+ Meego mic, in turn borrowed from Fedora livecd, etc.).
+
+ The initial motivation and design considerations that lead to the
+ current tool are described exhaustively in Yocto Bug #3847
+ (https://bugzilla.yoctoproject.org/show_bug.cgi?id=3847).
+
+ Though the current wic tool only uses the kickstart syntax related
+ to partitioning and bootloaders and only for creating images,
+ because the code is based on the mic/pykickstart code, future
+ deployment efforts such as those partially described by Yocto Bug
+ #4106 (https://bugzilla.yoctoproject.org/show_bug.cgi?id=4106),
+ but also others including package selection (from e.g. binary
+ feeds) and deployment configuration of users/network/services,
+ etc, could be implemented under this framework, considering that
+ all of those are implemented in some form by the base system.
+
+ Implementation and Examples
+
+ wic can be used in two different modes, depending on how much
+ control the user needs in specifying the Openembedded build
+ artifacts that will be used in creating the image: 'raw' and
+ 'cooked'.
+
+ If used in 'raw' mode, artifacts are explicitly specified via
+ command-line arguments (see example below).
+
+ The more easily usable 'cooked' mode uses the current MACHINE
+ setting and a specified image name to automatically locate the
+ artifacts used to create the image.
+
+ OE kickstart files (.wks) can of course be specified directly on
+ the command-line, but the user can also choose from a set of
+ 'canned' .wks files available via the 'wic list images' command
+ (example below).
+
+ In any case, the prerequisite for generating any image is to have
+ the build artifacts already available. The below examples assume
+ the user has already build a 'core-image-minimal' for a specific
+ machine (future versions won't require this redundant step, but
+ for now that's typically how build artifacts get generated).
+
+ The other prerequisite is to source the build environment:
+
+ $ source oe-init-build-env
+
+ To start out with, we'll generate an image from one of the canned
+ .wks files. The following generates a list of availailable
+ images:
+
+ $ wic list images
+ mkefidisk Create an EFI disk image
+ directdisk Create a 'pcbios' direct disk image
+
+ You can get more information about any of the available images by
+ typing 'wic list xxx help', where 'xxx' is one of the image names:
+
+ $ wic list mkefidisk help
+
+ Creates a partitioned EFI disk image that the user can directly dd
+ to boot media.
+
+ At any time, you can get help on the 'wic' command or any
+ subcommand (currently 'list' and 'create'). For instance, to get
+ the description of 'wic create' command and its parameters:
+
+ $ wic create
+
+ Usage:
+
+ Create a new OpenEmbedded image
+
+ usage: wic create <wks file or image name> [-o <DIRNAME> | ...]
+ [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
+ [-e | --image-name] [-r, --rootfs-dir] [-b, --bootimg-dir]
+ [-k, --kernel-dir] [-n, --native-sysroot] [-s, --skip-build-check]
+
+ This command creates an OpenEmbedded image based on the 'OE
+ kickstart commands' found in the <wks file>.
+
+ The -o option can be used to place the image in a directory
+ with a different name and location.
+
+ See 'wic help create' for more detailed instructions.
+ ...
+
+ As mentioned in the command, you can get even more detailed
+ information by adding 'help' to the above:
+
+ $ wic help create
+
+ So, the easiest way to create an image is to use the -e option
+ with a canned .wks file. To use the -e option, you need to
+ specify the image used to generate the artifacts and you actually
+ need to have the MACHINE used to build them specified in your
+ local.conf (these requirements aren't necessary if you aren't
+ using the -e options.) Below, we generate a directdisk image,
+ pointing the process at the core-image-minimal artifacts for the
+ current MACHINE:
+
+ $ wic create directdisk -e core-image-minimal
+
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/directdisk-201309252350-sda.direct
+
+ The following build artifacts were used to create the image(s):
+
+ ROOTFS_DIR: ...
+ BOOTIMG_DIR: ...
+ KERNEL_DIR: ...
+ NATIVE_SYSROOT: ...
+
+ The image(s) were created using OE kickstart file:
+ .../scripts/lib/image/canned-wks/directdisk.wks
+
+ The output shows the name and location of the image created, and
+ so that you know exactly what was used to generate the image, each
+ of the artifacts and the kickstart file used.
+
+ Similarly, you can create a 'mkefidisk' image in the same way
+ (notice that this example uses a different machine - because it's
+ using the -e option, you need to change the MACHINE in your
+ local.conf):
+
+ $ wic create mkefidisk -e core-image-minimal
+ Checking basic build environment...
+ Done.
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /var/tmp/wic/build/mkefidisk-201309260027-sda.direct
+
+ ...
+
+ Here's an example that doesn't take the easy way out and manually
+ specifies each build artifact, along with a non-canned .wks file,
+ and also uses the -o option to have wic create the output
+ somewhere other than the default /var/tmp/wic:
+
+ $ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir
+ /home/trz/yocto/build/tmp/work/crownbay/core-image-minimal/1.0-r0/rootfs
+ --bootimg-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/share
+ --kernel-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/src/kernel
+ --native-sysroot /home/trz/yocto/build/tmp/sysroots/x86_64-linux
+
+ Creating image(s)...
+
+ Info: The new image(s) can be found here:
+ /home/trz/testwic/build/test-201309260032-sda.direct
+
+ ...
+
+ Finally, here's an example of the actual partition language
+ commands used to generate the mkefidisk image i.e. these are the
+ contents of the mkefidisk.wks OE kickstart file:
+
+ # 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 --fstype=efi --active
+
+ part / --source rootfs --ondisk sda --fstype=ext3 --label platform
+
+ part swap --ondisk sda --size 44 --label swap1 --fstype=swap
+
+ bootloader --timeout=10 --append="rootwait console=ttyPCH0,115200"
+
+ You can get a complete listing and description of all the
+ kickstart commands available for use in .wks files from 'wic help
+ kickstart'.
+"""
diff --git a/scripts/wic b/scripts/wic
index ac3ed16..5453750 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -240,15 +240,18 @@ wic_help_topic_usage = """
"""
subcommands = {
- "create": [wic_create_subcommand,
- wic_create_usage,
- wic_create_help],
- "list": [wic_list_subcommand,
- wic_list_usage,
- wic_list_help],
- "plugins": [wic_help_topic_subcommand,
- wic_help_topic_usage,
- wic_plugins_help],
+ "create": [wic_create_subcommand,
+ wic_create_usage,
+ wic_create_help],
+ "list": [wic_list_subcommand,
+ wic_list_usage,
+ wic_list_help],
+ "plugins": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_plugins_help],
+ "overview": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_overview_help],
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] wic: Add kickstart reference to help system
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
` (2 preceding siblings ...)
2014-07-15 15:43 ` [PATCH 3/5] wic: Add wic overview to help system Tom Zanussi
@ 2014-07-15 15:43 ` Tom Zanussi
2014-07-15 15:43 ` [PATCH 5/5] wic: Error on zero-sized partitions Tom Zanussi
4 siblings, 0 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
Add a 'wic kickstart' help section to make it easy for users to access
the kickstart reference without having to go to an external website.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
scripts/lib/image/canned-wks/directdisk.wks | 2 +-
scripts/lib/image/help.py | 114 ++++++++++++++++++++++++++++
scripts/wic | 27 ++++---
3 files changed, 130 insertions(+), 13 deletions(-)
diff --git a/scripts/lib/image/canned-wks/directdisk.wks b/scripts/lib/image/canned-wks/directdisk.wks
index 397a929..62dcab1 100644
--- a/scripts/lib/image/canned-wks/directdisk.wks
+++ b/scripts/lib/image/canned-wks/directdisk.wks
@@ -3,7 +3,7 @@
# can directly dd to boot media.
-part /boot --source bootimg-pcbios --ondisk sda --fstype=msdos --label boot --active --align 1024
+part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index bf2f773..a7e7830 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -631,3 +631,117 @@ DESCRIPTION
kickstart commands available for use in .wks files from 'wic help
kickstart'.
"""
+
+wic_kickstart_help = """
+
+NAME
+ wic kickstart - wic kickstart reference
+
+DESCRIPTION
+ This section provides the definitive reference to the wic
+ kickstart language. It also provides documentation on the list of
+ --source plugins available for use from the 'part' command (see
+ the 'Platform-specific Plugins' section below).
+
+ The current wic implementation supports only the basic kickstart
+ partitioning commands: partition (or part for short) and
+ bootloader.
+
+ The following is a listing of the commands, their syntax, and
+ meanings. The commands are based on the Fedora kickstart
+ documentation but with modifications to reflect wic capabilities.
+
+ http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
+ http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
+
+ Commands
+
+ * 'part' or 'partition'
+
+ This command creates a partition on the system and uses the
+ following syntax:
+
+ part <mountpoint>
+
+ The <mountpoint> is where the partition will be mounted and
+ must take of one of the following forms:
+
+ /<path>: For example: /, /usr, or /home
+
+ swap: The partition will be used as swap space.
+
+ The following are supported 'part' options:
+
+ --size: The minimum partition size in MBytes. Specify an
+ integer value such as 500. Do not append the number
+ with "MB". You do not need this option if you use
+ --source.
+
+ --source: This option is a wic-specific option that names the
+ source of the data that will populate the
+ partition. The most common value for this option
+ is 'rootfs', but can be any value which maps to a
+ valid 'source plugin' (see 'wic help plugins').
+
+ If '--source rootfs' is used, it tells the wic
+ command to create a partition as large as needed
+ and to fill it with the contents of the root
+ filesystem pointed to by the '-r' wic command-line
+ option (or the equivalent rootfs derived from the
+ '-e' command-line option). The filesystem type
+ that will be used to create the partition is driven
+ by the value of the --fstype option specified for
+ the partition (see --fstype below).
+
+ If --source <plugin-name>' is used, it tells the
+ wic command to create a partition as large as
+ needed and to fill with the contents of the
+ partition that will be generated by the specified
+ plugin name using the data pointed to by the '-r'
+ wic command-line option (or the equivalent rootfs
+ derived from the '-e' command-line option).
+ Exactly what those contents and filesystem type end
+ up being are depend on the given plugin
+ implementation.
+
+ --ondisk or --ondrive: Forces the partition to be created on
+ a particular disk.
+
+ --fstype: Sets the file system type for the partition. These
+ apply to partitions created using '--source rootfs' (see
+ --source above). Valid values are:
+
+ ext2
+ ext3
+ ext4
+ btrfs
+ swap
+
+ --label label: Specifies the label to give to the filesystem
+ to be made on the partition. If the given
+ label is already in use by another filesystem,
+ a new label is created for the partition.
+
+ --active: Marks the partition as active.
+
+ --align (in KBytes): This option is specific to wic and says
+ to start a partition on an x KBytes
+ boundary.
+
+ * bootloader
+
+ This command allows the user to specify various bootloader
+ options. The following are supported 'bootloader' options:
+
+ --timeout: Specifies the number of seconds before the
+ bootloader times out and boots the default option.
+
+ --append: Specifies kernel parameters. These will be added to
+ bootloader command-line - for example, the syslinux
+ APPEND or grub kernel command line.
+
+ Note that bootloader functionality and boot partitions are
+ implemented by the various --source plugins that implement
+ bootloader functionality; the bootloader command essentially
+ provides a means of modifying bootloader configuration.
+"""
diff --git a/scripts/wic b/scripts/wic
index 5453750..15cc9b3 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -240,18 +240,21 @@ wic_help_topic_usage = """
"""
subcommands = {
- "create": [wic_create_subcommand,
- wic_create_usage,
- wic_create_help],
- "list": [wic_list_subcommand,
- wic_list_usage,
- wic_list_help],
- "plugins": [wic_help_topic_subcommand,
- wic_help_topic_usage,
- wic_plugins_help],
- "overview": [wic_help_topic_subcommand,
- wic_help_topic_usage,
- wic_overview_help],
+ "create": [wic_create_subcommand,
+ wic_create_usage,
+ wic_create_help],
+ "list": [wic_list_subcommand,
+ wic_list_usage,
+ wic_list_help],
+ "plugins": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_plugins_help],
+ "overview": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_overview_help],
+ "kickstart": [wic_help_topic_subcommand,
+ wic_help_topic_usage,
+ wic_kickstart_help],
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] wic: Error on zero-sized partitions
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
` (3 preceding siblings ...)
2014-07-15 15:43 ` [PATCH 4/5] wic: Add kickstart reference " Tom Zanussi
@ 2014-07-15 15:43 ` Tom Zanussi
4 siblings, 0 replies; 6+ messages in thread
From: Tom Zanussi @ 2014-07-15 15:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Tom Zanussi
It doesn't make sense to create zero-sized partitions so assume user
error and notify the user they should be using a non-zero --size for
partitions that don't specify a --source.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
scripts/lib/mic/kickstart/custom_commands/partition.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 4662bdd..06f29a9 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -122,6 +122,8 @@ class Wic_PartData(Mic_PartData):
partition command parameters.
"""
if not self.source:
+ if not self.size:
+ msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint)
if self.fstype and self.fstype == "swap":
self.prepare_swap_partition(cr_workdir, oe_builddir,
native_sysroot)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-15 15:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 15:43 [PATCH 0/5] wic: Updates to add vfat support and more help topics Tom Zanussi
2014-07-15 15:43 ` [PATCH 1/5] wic: Error on parted non-zero error code Tom Zanussi
2014-07-15 15:43 ` [PATCH 2/5] wic: Add vfat support Tom Zanussi
2014-07-15 15:43 ` [PATCH 3/5] wic: Add wic overview to help system Tom Zanussi
2014-07-15 15:43 ` [PATCH 4/5] wic: Add kickstart reference " Tom Zanussi
2014-07-15 15:43 ` [PATCH 5/5] wic: Error on zero-sized partitions Tom Zanussi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.