'wic'- OpenEmbedded Image Creator
cover 'wic'- OpenEmbedded Image Creator
This patchset implements a new command named 'wic' (for OpenEmbedded Image Creator). Please see [YOCTO #3847] for extensive background on what's implemented here.
This is 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 more interesting aspect of the current patchset though is that the replaced (this patchset doesn't actually replace those scripts, however) scripts are 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.).
Though this patchset 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 #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.
The current patchset has successfully been used to generate and boot images from core-image-minimal build artifacts using the 'mkefidisk' kickstart file (in scripts/lib/image/canned-wks) on minnow and the 'directdisk' kickstart file using both core-image-minimal and core-image-sato artifacts for crownbay.
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 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.
It can be used in 'raw' mode, where artifacts are explicitly specified via command-line arguments (see example below), or it can be used in a more easily usable 'cooked' mode which 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> | --outdir <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
NAME
wic create - Create a new OpenEmbedded image
SYNOPSIS
wic create <wks file or image name> [-o <DIRNAME> | --outdir
<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]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE kickstart commands' found in the <wks file>.
In order to do this, wic needs to know the locations of the various build artifacts required to build the image.
Users can explicitly specify the build artifact locations using the -r, -b, -k, and -n options. See below for details on where the corresponding artifacts are typically found in a normal OpenEmbedded build.
Alternatively, users can use the -e option to have 'mic' determine those locations for a given image. If the -e option is used, the user needs to have set the appropriate MACHINE variable in local.conf, and have sourced the build environment.
The -e option is used to specify the name of the image to use the artifacts from e.g. core-image-sato.
The -r option is used to specify the path to the /rootfs dir to use as the .wks rootfs source.
The -b option is used to specify the path to the dir containing the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the .wks bootimg source.
The -k option is used to specify the path to the dir containing the kernel to use in the .wks bootimg.
The -n option is used to specify the path to the native sysroot containing the tools to use to build the image.
The -s option is used to skip the build check. The build check is a simple sanity check used to determine whether the user has sourced the build environment so that the -e option can operate correctly. If the user has specified the build artifact locations explicitly, 'wic' assumes the user knows what he or she is doing and skips the build check.
When 'wic -e' is used, the locations for the build artifacts values are determined by 'wic -e' from the output of the 'bitbake -e' command given an image name e.g. 'core-image-minimal' and a given machine set in local.conf. In that case, the image is created as if the following 'bitbake -e' variables were used:
-r: IMAGE_ROOTFS
-k: STAGING_KERNEL_DIR
-n: STAGING_DIR_NATIVE
-b: HDDDIR and STAGING_DATA_DIR (handlers decide which to
use)
If 'wic -e' is not used, the user needs to select the appropriate value for -b (as well as -r, -k, and -n).
The -o option can be used to place the image in a directory with a different name and location.
As an alternative to the wks file, the image-specific properties that define the values that will be used to generate a particular image can be specified on the command-line using the -i option and supplying a JSON object consisting of the set of name:value pairs needed by image creation.
The set of properties available for a given image type can be listed using the 'wic list' command.
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: /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
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, I can create a 'mkefidisk' image in the same way (notice that I'm using a different machine - because I'm using the -e option, I needed to change the MACHINE in my 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
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/minnow/usr/src/kernel
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
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/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
Creating image(s)...
Info: The new image(s) can be found here:
/home/trz/testwic/build/test-201309260032-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/test.wks
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 --ondisk sda --fstype=efi --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
bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
The initial 'wic' implementation here supports only the basic kickstart partitioning commands: 'partition' (or 'part' for short) and 'bootloader'.
Currently, only the options used in the 'canned' scripts (in scripts/lib/image/canned-wks) are supported.
They're listed below and mostly follow the syntax and meaning of the standard kickstart options for those commands:
http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
For the 'partition' ('part') command, here are the supported options:
--source
bootimg
rootfs
--ondisk sda
--size size (in mB)
--fstype
msdos
efi
ext4
ext3
ext2
btrfs
swap
--label label
--active
---align (in kB)
The --source option is a wic-specific option that can currently have one of two values, 'bootimg' or 'rootfs'.
If '--source rootfs' is used, it tells the wic command to create a partition as large as needed to fill with the contents of /rootfs (specified by the -r 'wic' option) and to fill it with the contents of /rootfs.
If '--source bootimg' is used, it tells the wic command to create a partition as large as needed to fill with the contents of the boot partition (specified by the -b 'wic' option). Exactly what those contents are depend on the value of the --fstype option for that partition. If '--fstype=efi' is specified, the boot artifacts contained in HDDDIR are used, and if '--fstype=msdos' is specified, the boot artifacts found in STAGING_DATADIR are used.
The '--align' option is a mic-specific option that says to start a partition on an x kB boundary.
For the 'bootloader' command, these are the supported options:
--timeout
--append
Future updates will implement more options - using anything not explicitly supported can result in unpredicable results.
The following changes since commit b049d532f6e0ab9e458e486f81b00be47ee69acf:
testimage: Exclude BB_ORIGENV variable (2013-09-26 17:27:02 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-v1
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-v1
Tom Zanussi (3):
wic: Initial code for wic (OpenEmbedded Image Creator)
wic: Add mic w/pykickstart
wic: Add OpenEmbedded-specific implementation
scripts/lib/image/__init__.py | 22 + scripts/lib/image/canned-wks/directdisk.wks | 10 + scripts/lib/image/canned-wks/mkefidisk.wks | 11 + scripts/lib/image/config/wic.conf | 7 + scripts/lib/image/engine.py | 280 ++++ scripts/lib/image/help.py | 311 ++++ scripts/lib/mic/3rdparty/pykickstart/base.py | 466 ++++++ .../mic/3rdparty/pykickstart/commands/__init__.py | 26 + .../3rdparty/pykickstart/commands/authconfig.py | 40 + .../mic/3rdparty/pykickstart/commands/autopart.py | 119 ++ .../mic/3rdparty/pykickstart/commands/autostep.py | 55 + .../3rdparty/pykickstart/commands/bootloader.py | 265 ++++ .../mic/3rdparty/pykickstart/commands/clearpart.py | 86 ++ .../mic/3rdparty/pykickstart/commands/device.py | 125 ++ .../3rdparty/pykickstart/commands/deviceprobe.py | 40 + .../3rdparty/pykickstart/commands/displaymode.py | 68 + .../mic/3rdparty/pykickstart/commands/dmraid.py | 91 ++ .../3rdparty/pykickstart/commands/driverdisk.py | 184 +++ .../lib/mic/3rdparty/pykickstart/commands/fcoe.py | 114 ++ .../mic/3rdparty/pykickstart/commands/firewall.py | 193 +++ .../mic/3rdparty/pykickstart/commands/firstboot.py | 62 + .../lib/mic/3rdparty/pykickstart/commands/group.py | 88 ++ .../3rdparty/pykickstart/commands/ignoredisk.py | 139 ++ .../3rdparty/pykickstart/commands/interactive.py | 58 + .../lib/mic/3rdparty/pykickstart/commands/iscsi.py | 133 ++ .../mic/3rdparty/pykickstart/commands/iscsiname.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/key.py | 64 + .../mic/3rdparty/pykickstart/commands/keyboard.py | 55 + .../lib/mic/3rdparty/pykickstart/commands/lang.py | 60 + .../3rdparty/pykickstart/commands/langsupport.py | 58 + .../mic/3rdparty/pykickstart/commands/lilocheck.py | 54 + .../mic/3rdparty/pykickstart/commands/logging.py | 66 + .../mic/3rdparty/pykickstart/commands/logvol.py | 304 ++++ .../3rdparty/pykickstart/commands/mediacheck.py | 53 + .../mic/3rdparty/pykickstart/commands/method.py | 186 +++ .../mic/3rdparty/pykickstart/commands/monitor.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/mouse.py | 70 + .../mic/3rdparty/pykickstart/commands/multipath.py | 111 ++ .../mic/3rdparty/pykickstart/commands/network.py | 363 +++++ .../mic/3rdparty/pykickstart/commands/partition.py | 353 +++++ .../lib/mic/3rdparty/pykickstart/commands/raid.py | 365 +++++ .../mic/3rdparty/pykickstart/commands/reboot.py | 79 + .../lib/mic/3rdparty/pykickstart/commands/repo.py | 249 +++ .../mic/3rdparty/pykickstart/commands/rescue.py | 68 + .../mic/3rdparty/pykickstart/commands/rootpw.py | 93 ++ .../mic/3rdparty/pykickstart/commands/selinux.py | 64 + .../mic/3rdparty/pykickstart/commands/services.py | 71 + .../lib/mic/3rdparty/pykickstart/commands/skipx.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/sshpw.py | 105 ++ .../mic/3rdparty/pykickstart/commands/timezone.py | 86 ++ .../mic/3rdparty/pykickstart/commands/updates.py | 60 + .../mic/3rdparty/pykickstart/commands/upgrade.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/user.py | 173 +++ .../lib/mic/3rdparty/pykickstart/commands/vnc.py | 114 ++ .../mic/3rdparty/pykickstart/commands/volgroup.py | 102 ++ .../mic/3rdparty/pykickstart/commands/xconfig.py | 184 +++ .../mic/3rdparty/pykickstart/commands/zerombr.py | 69 + .../lib/mic/3rdparty/pykickstart/commands/zfcp.py | 134 ++ scripts/lib/mic/3rdparty/pykickstart/constants.py | 57 + scripts/lib/mic/3rdparty/pykickstart/errors.py | 103 ++ .../mic/3rdparty/pykickstart/handlers/control.py | 1307 ++++++++++++++++ .../lib/mic/3rdparty/pykickstart/handlers/f10.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f11.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f12.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f13.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f14.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f15.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f16.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f7.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f8.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f9.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc6.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel6.py | 24 + scripts/lib/mic/3rdparty/pykickstart/ko.py | 37 + scripts/lib/mic/3rdparty/pykickstart/options.py | 204 +++ scripts/lib/mic/3rdparty/pykickstart/parser.py | 702 +++++++++ scripts/lib/mic/3rdparty/pykickstart/sections.py | 244 +++ .../3rdparty/pykickstart/urlgrabber/__init__.py | 53 + .../3rdparty/pykickstart/urlgrabber/byterange.py | 463 ++++++ .../mic/3rdparty/pykickstart/urlgrabber/grabber.py | 1477 ++++++++++++++++++ .../3rdparty/pykickstart/urlgrabber/keepalive.py | 617 ++++++++ .../mic/3rdparty/pykickstart/urlgrabber/mirror.py | 458 ++++++ .../3rdparty/pykickstart/urlgrabber/progress.py | 530 +++++++ .../3rdparty/pykickstart/urlgrabber/sslfactory.py | 90 ++ scripts/lib/mic/3rdparty/pykickstart/version.py | 197 +++ scripts/lib/mic/__init__.py | 4 + scripts/lib/mic/__version__.py | 1 + scripts/lib/mic/bootstrap.py | 279 ++++ scripts/lib/mic/chroot.py | 343 +++++ scripts/lib/mic/conf.py | 201 +++ scripts/lib/mic/creator.py | 351 +++++ scripts/lib/mic/imager/baseimager.py | 1265 ++++++++++++++++ scripts/lib/mic/imager/direct.py | 472 ++++++ scripts/lib/mic/imager/fs.py | 99 ++ scripts/lib/mic/imager/livecd.py | 750 +++++++++ scripts/lib/mic/imager/liveusb.py | 308 ++++ scripts/lib/mic/imager/loop.py | 418 ++++++ scripts/lib/mic/imager/raw.py | 501 +++++++ scripts/lib/mic/kickstart/__init__.py | 892 +++++++++++ .../lib/mic/kickstart/custom_commands/__init__.py | 17 + .../lib/mic/kickstart/custom_commands/desktop.py | 95 ++ .../mic/kickstart/custom_commands/installerfw.py | 63 + .../lib/mic/kickstart/custom_commands/micboot.py | 49 + .../mic/kickstart/custom_commands/micpartition.py | 57 + .../lib/mic/kickstart/custom_commands/micrepo.py | 127 ++ .../lib/mic/kickstart/custom_commands/partition.py | 370 +++++ scripts/lib/mic/msger.py | 309 ++++ scripts/lib/mic/plugin.py | 102 ++ scripts/lib/mic/pluginbase.py | 101 ++ scripts/lib/mic/plugins/backend/yumpkgmgr.py | 490 ++++++ scripts/lib/mic/plugins/backend/zypppkgmgr.py | 973 ++++++++++++ scripts/lib/mic/plugins/hook/empty_hook.py | 3 + scripts/lib/mic/plugins/imager/direct_plugin.py | 92 ++ scripts/lib/mic/plugins/imager/fs_plugin.py | 143 ++ scripts/lib/mic/plugins/imager/livecd_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/liveusb_plugin.py | 260 ++++ scripts/lib/mic/plugins/imager/loop_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/raw_plugin.py | 275 ++++ scripts/lib/mic/rt_util.py | 223 +++ scripts/lib/mic/test | 1 + scripts/lib/mic/utils/BmapCreate.py | 298 ++++ scripts/lib/mic/utils/Fiemap.py | 252 ++++ scripts/lib/mic/utils/cmdln.py | 1586 ++++++++++++++++++++ scripts/lib/mic/utils/errors.py | 71 + scripts/lib/mic/utils/fs_related.py | 1057 +++++++++++++ scripts/lib/mic/utils/gpt_parser.py | 331 ++++ scripts/lib/mic/utils/grabber.py | 97 ++ scripts/lib/mic/utils/misc.py | 1067 +++++++++++++ scripts/lib/mic/utils/oe/__init__.py | 22 + scripts/lib/mic/utils/oe/misc.py | 108 ++ scripts/lib/mic/utils/partitionedfs.py | 776 ++++++++++ scripts/lib/mic/utils/proxy.py | 183 +++ scripts/lib/mic/utils/rpmmisc.py | 600 ++++++++ scripts/lib/mic/utils/runner.py | 109 ++ scripts/wic | 185 +++ 141 files changed, 30983 insertions(+) create mode 100644 scripts/lib/image/__init__.py create mode 100644 scripts/lib/image/canned-wks/directdisk.wks create mode 100644 scripts/lib/image/canned-wks/mkefidisk.wks create mode 100644 scripts/lib/image/config/wic.conf create mode 100644 scripts/lib/image/engine.py create mode 100644 scripts/lib/image/help.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/base.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/device.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/group.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/key.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lang.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/logging.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/method.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/network.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/partition.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/raid.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/repo.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/services.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/updates.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/user.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/constants.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/errors.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/control.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/ko.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/options.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/parser.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/sections.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/version.py create mode 100644 scripts/lib/mic/__init__.py create mode 100644 scripts/lib/mic/__version__.py create mode 100644 scripts/lib/mic/bootstrap.py create mode 100644 scripts/lib/mic/chroot.py create mode 100644 scripts/lib/mic/conf.py create mode 100644 scripts/lib/mic/creator.py create mode 100644 scripts/lib/mic/imager/__init__.py create mode 100644 scripts/lib/mic/imager/baseimager.py create mode 100644 scripts/lib/mic/imager/direct.py create mode 100644 scripts/lib/mic/imager/fs.py create mode 100644 scripts/lib/mic/imager/livecd.py create mode 100644 scripts/lib/mic/imager/liveusb.py create mode 100644 scripts/lib/mic/imager/loop.py create mode 100644 scripts/lib/mic/imager/raw.py create mode 100644 scripts/lib/mic/kickstart/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/desktop.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/installerfw.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micboot.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micpartition.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micrepo.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/partition.py create mode 100644 scripts/lib/mic/msger.py create mode 100644 scripts/lib/mic/plugin.py create mode 100644 scripts/lib/mic/pluginbase.py create mode 100644 scripts/lib/mic/plugins/backend/yumpkgmgr.py create mode 100755 scripts/lib/mic/plugins/backend/zypppkgmgr.py create mode 100644 scripts/lib/mic/plugins/hook/.py create mode 100644 scripts/lib/mic/plugins/hook/empty_hook.py create mode 100644 scripts/lib/mic/plugins/imager/direct_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/fs_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/livecd_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/liveusb_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/loop_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/raw_plugin.py create mode 100644 scripts/lib/mic/rt_util.py create mode 100644 scripts/lib/mic/test create mode 100644 scripts/lib/mic/utils/BmapCreate.py create mode 100644 scripts/lib/mic/utils/Fiemap.py create mode 100644 scripts/lib/mic/utils/__init__.py create mode 100644 scripts/lib/mic/utils/cmdln.py create mode 100644 scripts/lib/mic/utils/errors.py create mode 100644 scripts/lib/mic/utils/fs_related.py create mode 100644 scripts/lib/mic/utils/gpt_parser.py create mode 100644 scripts/lib/mic/utils/grabber.py create mode 100644 scripts/lib/mic/utils/misc.py create mode 100644 scripts/lib/mic/utils/oe/__init__.py create mode 100644 scripts/lib/mic/utils/oe/misc.py create mode 100644 scripts/lib/mic/utils/partitionedfs.py create mode 100644 scripts/lib/mic/utils/proxy.py create mode 100644 scripts/lib/mic/utils/rpmmisc.py create mode 100644 scripts/lib/mic/utils/runner.py create mode 100755 scripts/wic
Signature · 1 line
1.7.11.4
PATCH 1/3 wic: Initial code for wic (OpenEmbedded Image Creator)
Initial implementation of the 'wic' command.
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 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.
'wic' is based loosely on the 'mic' (Meego Image Creator) framework, but heavily modified to make direct use of OpenEmbedded build artifacts instead of package installation and configuration, things already incorporated int the OE artifacts.
The name 'wic' comes from 'oeic' with the 'oe' diphthong promoted to the letter 'w', because 'oeic' is impossible to remember or pronounce.
This covers the mechanics of invoking and providing help for the command and sub-commands; it contains hooks for future commits to connect with the actual functionality, once implemented.
Help is integrated into the 'wic' command - see that for details on usage.
--- scripts/lib/image/__init__.py | 22 +++ scripts/lib/image/engine.py | 256 ++++++++++++++++++++++++++++++++++ scripts/lib/image/help.py | 311 ++++++++++++++++++++++++++++++++++++++++++ scripts/wic | 185 +++++++++++++++++++++++++ 4 files changed, 774 insertions(+) create mode 100644 scripts/lib/image/__init__.py create mode 100644 scripts/lib/image/engine.py create mode 100644 scripts/lib/image/help.py create mode 100755 scripts/wic
scripts/lib/image/__init__.py new file +22 -0
@@ -0,0 +1,22 @@ +# +# OpenEmbedded Image tools library +# +# Copyright (c) 2013, Intel Corporation. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# AUTHORS +# Tom Zanussi <tom.zanussi (at] linux.intel.com> +#
scripts/lib/image/engine.py new file +256 -0
256 lines not on this page · raw message
scripts/lib/image/help.py new file +311 -0
311 lines not on this page · raw message
scripts/wic new file +185 -0
185 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 2/3 wic: Add mic w/pykickstart
This is the starting point for the implemention described in [YOCTO 3847] which came to the conclusion that it would make sense to use kickstart syntax to implement image creation in OpenEmbedded. I subsequently realized that there was an existing tool that already implemented image creation using kickstart syntax, the Tizen/Meego mic tool. As such, it made sense to use that as a starting point - this commit essentially just copies the relevant Python code from the MIC tool to the scripts/lib dir, where it can be accessed by the previously created wic tool.
Most of this will be removed or renamed by later commits, since we're initially focusing on partitioning only. Care should be taken so that we can easily add back any additional functionality should we decide later to expand the tool, though (we may also want to contribute our local changes to the mic tool to the Tizen project if it makes sense, and therefore should avoid gratuitous changes to the original code if possible).
Added the /mic subdir from Tizen mic repo as a starting point:
git clone git://review.tizen.org/tools/mic.git
For reference, the top commit:
commit 20164175ddc234a17b8a12c33d04b012347b1530
Author: Gui Chen <[email protected]>
Date: Sun Jun 30 22:32:16 2013 -0400
bump up to 0.19.2
Also added the /plugins subdir, moved to under the /mic subdir (to match the default plugin_dir location in mic.conf.in, which was renamed to yocto-image.conf (moved and renamed by later patches) and put into /scripts.
--- scripts/lib/mic/3rdparty/pykickstart/base.py | 466 ++++++ .../mic/3rdparty/pykickstart/commands/__init__.py | 26 + .../3rdparty/pykickstart/commands/authconfig.py | 40 + .../mic/3rdparty/pykickstart/commands/autopart.py | 119 ++ .../mic/3rdparty/pykickstart/commands/autostep.py | 55 + .../3rdparty/pykickstart/commands/bootloader.py | 265 ++++ .../mic/3rdparty/pykickstart/commands/clearpart.py | 86 ++ .../mic/3rdparty/pykickstart/commands/device.py | 125 ++ .../3rdparty/pykickstart/commands/deviceprobe.py | 40 + .../3rdparty/pykickstart/commands/displaymode.py | 68 + .../mic/3rdparty/pykickstart/commands/dmraid.py | 91 ++ .../3rdparty/pykickstart/commands/driverdisk.py | 184 +++ .../lib/mic/3rdparty/pykickstart/commands/fcoe.py | 114 ++ .../mic/3rdparty/pykickstart/commands/firewall.py | 193 +++ .../mic/3rdparty/pykickstart/commands/firstboot.py | 62 + .../lib/mic/3rdparty/pykickstart/commands/group.py | 88 ++ .../3rdparty/pykickstart/commands/ignoredisk.py | 139 ++ .../3rdparty/pykickstart/commands/interactive.py | 58 + .../lib/mic/3rdparty/pykickstart/commands/iscsi.py | 133 ++ .../mic/3rdparty/pykickstart/commands/iscsiname.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/key.py | 64 + .../mic/3rdparty/pykickstart/commands/keyboard.py | 55 + .../lib/mic/3rdparty/pykickstart/commands/lang.py | 60 + .../3rdparty/pykickstart/commands/langsupport.py | 58 + .../mic/3rdparty/pykickstart/commands/lilocheck.py | 54 + .../mic/3rdparty/pykickstart/commands/logging.py | 66 + .../mic/3rdparty/pykickstart/commands/logvol.py | 304 ++++ .../3rdparty/pykickstart/commands/mediacheck.py | 53 + .../mic/3rdparty/pykickstart/commands/method.py | 186 +++ .../mic/3rdparty/pykickstart/commands/monitor.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/mouse.py | 70 + .../mic/3rdparty/pykickstart/commands/multipath.py | 111 ++ .../mic/3rdparty/pykickstart/commands/network.py | 363 +++++ .../mic/3rdparty/pykickstart/commands/partition.py | 353 +++++ .../lib/mic/3rdparty/pykickstart/commands/raid.py | 365 +++++ .../mic/3rdparty/pykickstart/commands/reboot.py | 79 + .../lib/mic/3rdparty/pykickstart/commands/repo.py | 249 +++ .../mic/3rdparty/pykickstart/commands/rescue.py | 68 + .../mic/3rdparty/pykickstart/commands/rootpw.py | 93 ++ .../mic/3rdparty/pykickstart/commands/selinux.py | 64 + .../mic/3rdparty/pykickstart/commands/services.py | 71 + .../lib/mic/3rdparty/pykickstart/commands/skipx.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/sshpw.py | 105 ++ .../mic/3rdparty/pykickstart/commands/timezone.py | 86 ++ .../mic/3rdparty/pykickstart/commands/updates.py | 60 + .../mic/3rdparty/pykickstart/commands/upgrade.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/user.py | 173 +++ .../lib/mic/3rdparty/pykickstart/commands/vnc.py | 114 ++ .../mic/3rdparty/pykickstart/commands/volgroup.py | 102 ++ .../mic/3rdparty/pykickstart/commands/xconfig.py | 184 +++ .../mic/3rdparty/pykickstart/commands/zerombr.py | 69 + .../lib/mic/3rdparty/pykickstart/commands/zfcp.py | 134 ++ scripts/lib/mic/3rdparty/pykickstart/constants.py | 57 + scripts/lib/mic/3rdparty/pykickstart/errors.py | 103 ++ .../mic/3rdparty/pykickstart/handlers/control.py | 1307 ++++++++++++++++ .../lib/mic/3rdparty/pykickstart/handlers/f10.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f11.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f12.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f13.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f14.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f15.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f16.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f7.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f8.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f9.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc6.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel6.py | 24 + scripts/lib/mic/3rdparty/pykickstart/ko.py | 37 + scripts/lib/mic/3rdparty/pykickstart/options.py | 204 +++ scripts/lib/mic/3rdparty/pykickstart/parser.py | 702 +++++++++ scripts/lib/mic/3rdparty/pykickstart/sections.py | 244 +++ .../3rdparty/pykickstart/urlgrabber/__init__.py | 53 + .../3rdparty/pykickstart/urlgrabber/byterange.py | 463 ++++++ .../mic/3rdparty/pykickstart/urlgrabber/grabber.py | 1477 ++++++++++++++++++ .../3rdparty/pykickstart/urlgrabber/keepalive.py | 617 ++++++++ .../mic/3rdparty/pykickstart/urlgrabber/mirror.py | 458 ++++++ .../3rdparty/pykickstart/urlgrabber/progress.py | 530 +++++++ .../3rdparty/pykickstart/urlgrabber/sslfactory.py | 90 ++ scripts/lib/mic/3rdparty/pykickstart/version.py | 197 +++ scripts/lib/mic/__init__.py | 4 + scripts/lib/mic/__version__.py | 1 + scripts/lib/mic/bootstrap.py | 279 ++++ scripts/lib/mic/chroot.py | 343 +++++ scripts/lib/mic/conf.py | 239 +++ scripts/lib/mic/creator.py | 354 +++++ scripts/lib/mic/imager/baseimager.py | 1335 ++++++++++++++++ scripts/lib/mic/imager/fs.py | 99 ++ scripts/lib/mic/imager/livecd.py | 750 +++++++++ scripts/lib/mic/imager/liveusb.py | 308 ++++ scripts/lib/mic/imager/loop.py | 418 ++++++ scripts/lib/mic/imager/raw.py | 501 +++++++ scripts/lib/mic/kickstart/__init__.py | 892 +++++++++++ .../lib/mic/kickstart/custom_commands/__init__.py | 12 + .../lib/mic/kickstart/custom_commands/desktop.py | 95 ++ .../mic/kickstart/custom_commands/installerfw.py | 63 + .../lib/mic/kickstart/custom_commands/micboot.py | 49 + .../lib/mic/kickstart/custom_commands/micrepo.py | 127 ++ .../lib/mic/kickstart/custom_commands/partition.py | 57 + scripts/lib/mic/msger.py | 309 ++++ scripts/lib/mic/plugin.py | 98 ++ scripts/lib/mic/pluginbase.py | 101 ++ scripts/lib/mic/plugins/backend/yumpkgmgr.py | 490 ++++++ scripts/lib/mic/plugins/backend/zypppkgmgr.py | 973 ++++++++++++ scripts/lib/mic/plugins/hook/empty_hook.py | 3 + scripts/lib/mic/plugins/imager/fs_plugin.py | 143 ++ scripts/lib/mic/plugins/imager/livecd_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/liveusb_plugin.py | 260 ++++ scripts/lib/mic/plugins/imager/loop_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/raw_plugin.py | 275 ++++ scripts/lib/mic/rt_util.py | 223 +++ scripts/lib/mic/test | 1 + scripts/lib/mic/utils/BmapCreate.py | 298 ++++ scripts/lib/mic/utils/Fiemap.py | 252 ++++ scripts/lib/mic/utils/cmdln.py | 1586 ++++++++++++++++++++ scripts/lib/mic/utils/errors.py | 71 + scripts/lib/mic/utils/fs_related.py | 1029 +++++++++++++ scripts/lib/mic/utils/gpt_parser.py | 331 ++++ scripts/lib/mic/utils/grabber.py | 97 ++ scripts/lib/mic/utils/misc.py | 1067 +++++++++++++ scripts/lib/mic/utils/partitionedfs.py | 790 ++++++++++ scripts/lib/mic/utils/proxy.py | 183 +++ scripts/lib/mic/utils/rpmmisc.py | 600 ++++++++ scripts/lib/mic/utils/runner.py | 109 ++ scripts/yocto-image.conf | 35 + 130 files changed, 29216 insertions(+) create mode 100644 scripts/lib/mic/3rdparty/pykickstart/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/base.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/device.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/group.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/key.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lang.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/logging.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/method.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/network.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/partition.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/raid.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/repo.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/services.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/updates.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/user.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/constants.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/errors.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/control.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/ko.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/options.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/parser.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/sections.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/version.py create mode 100644 scripts/lib/mic/__init__.py create mode 100644 scripts/lib/mic/__version__.py create mode 100644 scripts/lib/mic/bootstrap.py create mode 100644 scripts/lib/mic/chroot.py create mode 100644 scripts/lib/mic/conf.py create mode 100644 scripts/lib/mic/creator.py create mode 100644 scripts/lib/mic/imager/__init__.py create mode 100644 scripts/lib/mic/imager/baseimager.py create mode 100644 scripts/lib/mic/imager/fs.py create mode 100644 scripts/lib/mic/imager/livecd.py create mode 100644 scripts/lib/mic/imager/liveusb.py create mode 100644 scripts/lib/mic/imager/loop.py create mode 100644 scripts/lib/mic/imager/raw.py create mode 100644 scripts/lib/mic/kickstart/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/desktop.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/installerfw.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micboot.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micrepo.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/partition.py create mode 100644 scripts/lib/mic/msger.py create mode 100644 scripts/lib/mic/plugin.py create mode 100644 scripts/lib/mic/pluginbase.py create mode 100644 scripts/lib/mic/plugins/backend/yumpkgmgr.py create mode 100755 scripts/lib/mic/plugins/backend/zypppkgmgr.py create mode 100644 scripts/lib/mic/plugins/hook/.py create mode 100644 scripts/lib/mic/plugins/hook/empty_hook.py create mode 100644 scripts/lib/mic/plugins/imager/fs_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/livecd_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/liveusb_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/loop_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/raw_plugin.py create mode 100644 scripts/lib/mic/rt_util.py create mode 100644 scripts/lib/mic/test create mode 100644 scripts/lib/mic/utils/BmapCreate.py create mode 100644 scripts/lib/mic/utils/Fiemap.py create mode 100644 scripts/lib/mic/utils/__init__.py create mode 100644 scripts/lib/mic/utils/cmdln.py create mode 100644 scripts/lib/mic/utils/errors.py create mode 100644 scripts/lib/mic/utils/fs_related.py create mode 100644 scripts/lib/mic/utils/gpt_parser.py create mode 100644 scripts/lib/mic/utils/grabber.py create mode 100644 scripts/lib/mic/utils/misc.py create mode 100644 scripts/lib/mic/utils/partitionedfs.py create mode 100644 scripts/lib/mic/utils/proxy.py create mode 100644 scripts/lib/mic/utils/rpmmisc.py create mode 100644 scripts/lib/mic/utils/runner.py create mode 100644 scripts/yocto-image.conf
[
Patch contents have been removed - too large to post. You can see the patch contents here:
Signature · 1 line
1.7.11.4
PATCH 3/3 wic: Add OpenEmbedded-specific implementation
In reply to Tom ZanussiReuses the mic/livecd infrastructure but heavily subclasses and modifies it to adapt to the special needs of building images from existing OpenEmbedded build artifacts.
In addition to the OE-specific mic objects and modifications to the underlying infrastructure, this adds a mechanism to allow OE kickstart files to be 'canned' and made available to users via the 'wic list images' command.
Two initial OE kickstart files have been added as canned .wks files:
directdisk, which implements the same thing as the images created by directdisk.bbclass, and mkefidisk, which can essentially be used as a replacement for mkefidisk.sh. Of course, since creation of these images are now driven by .wks files rather than being hard-coded into class files or scripts, they can be easily modified to generate different variations on those images. They also don't require root priveleges, since they don't use mount to create the images. They don't however write to media like mkefidisk.sh does, but rather create images that can be written onto media.
--- scripts/lib/image/canned-wks/directdisk.wks | 10 + scripts/lib/image/canned-wks/mkefidisk.wks | 11 + scripts/lib/image/config/wic.conf | 7 + scripts/lib/image/engine.py | 24 ++ scripts/lib/mic/conf.py | 54 +-- scripts/lib/mic/creator.py | 3 - scripts/lib/mic/imager/baseimager.py | 82 +--- scripts/lib/mic/imager/direct.py | 472 +++++++++++++++++++++ scripts/lib/mic/kickstart/__init__.py | 6 +- .../lib/mic/kickstart/custom_commands/__init__.py | 7 +- .../mic/kickstart/custom_commands/micpartition.py | 57 +++ .../lib/mic/kickstart/custom_commands/partition.py | 389 +++++++++++++++-- scripts/lib/mic/plugin.py | 6 +- scripts/lib/mic/plugins/imager/direct_plugin.py | 92 ++++ scripts/lib/mic/utils/fs_related.py | 30 +- scripts/lib/mic/utils/misc.py | 4 +- scripts/lib/mic/utils/oe/__init__.py | 22 + scripts/lib/mic/utils/oe/misc.py | 108 +++++ scripts/lib/mic/utils/partitionedfs.py | 94 ++-- scripts/yocto-image.conf | 35 -- 20 files changed, 1253 insertions(+), 260 deletions(-) create mode 100644 scripts/lib/image/canned-wks/directdisk.wks create mode 100644 scripts/lib/image/canned-wks/mkefidisk.wks create mode 100644 scripts/lib/image/config/wic.conf create mode 100644 scripts/lib/mic/imager/direct.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/micpartition.py create mode 100644 scripts/lib/mic/plugins/imager/direct_plugin.py create mode 100644 scripts/lib/mic/utils/oe/__init__.py create mode 100644 scripts/lib/mic/utils/oe/misc.py delete mode 100644 scripts/yocto-image.conf
scripts/lib/image/canned-wks/directdisk.wks new file +10 -0
@@ -0,0 +1,10 @@ +# short-description: Create a 'pcbios' direct disk image +# long-description: Creates a partitioned legacy BIOS disk image that the user +# can directly dd to boot media. + + +part /boot --source bootimg --ondisk sda --fstype=msdos --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" +
scripts/lib/image/canned-wks/mkefidisk.wks new file +11 -0
@@ -0,0 +1,11 @@ +# 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 --ondisk sda --fstype=efi --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 + +bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
scripts/lib/image/config/wic.conf new file +7 -0
@@ -0,0 +1,7 @@ +[common] +; general settings +distro_name = OpenEmbedded + +[create] +; settings for create subcommand +runtime=native
scripts/lib/image/engine.py +24 -0
@@ -37,6 +37,12 @@ import subprocess import shutil import os, sys, errno +from mic import msger, creator +from mic.utils import cmdln, misc, errors +from mic.conf import configmgr +from mic.plugin import pluginmgr +from mic.__version__ import VERSION +from mic.utils.oe.misc import * def verify_build_env():
@@ -216,6 +222,24 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" sys.exit(1) + direct_args = list() + direct_args.insert(0, oe_builddir) + direct_args.insert(0, image_output_dir) + direct_args.insert(0, wks_file) + direct_args.insert(0, rootfs_dir) + direct_args.insert(0, bootimg_dir) + direct_args.insert(0, kernel_dir) + direct_args.insert(0, native_sysroot) + direct_args.insert(0, hdddir) + direct_args.insert(0, staging_data_dir) + direct_args.insert(0, "direct") + + cr = creator.Creator() + + cr.main(direct_args) + + print "\nThe image(s) were created using OE kickstart file:\n %s" % wks_file + def wic_list(args, scripts_path, properties_file): """
scripts/lib/mic/conf.py +8 -46
83 lines not on this page · raw message
scripts/lib/mic/creator.py +0 -3
@@ -293,9 +293,6 @@ class Creator(cmdln.Cmdln): if len(argv) == 1: return ['help', argv[0]] - if os.geteuid() != 0: - raise msger.error("Root permission is required, abort") - return argv def do_auto(self, subcmd, opts, *args):
scripts/lib/mic/imager/baseimager.py +6 -76
119 lines not on this page · raw message
scripts/lib/mic/imager/direct.py new file +472 -0
472 lines not on this page · raw message
scripts/lib/mic/kickstart/__init__.py +3 -3
@@ -99,11 +99,11 @@ def read_kickstart(path): commandMap[using_version]["desktop"] = desktop.Mic_Desktop commandMap[using_version]["repo"] = micrepo.Mic_Repo commandMap[using_version]["bootloader"] = micboot.Mic_Bootloader - commandMap[using_version]["part"] = partition.Mic_Partition - commandMap[using_version]["partition"] = partition.Mic_Partition + commandMap[using_version]["part"] = partition.Wic_Partition + commandMap[using_version]["partition"] = partition.Wic_Partition commandMap[using_version]["installerfw"] = installerfw.Mic_installerfw dataMap[using_version]["RepoData"] = micrepo.Mic_RepoData - dataMap[using_version]["PartData"] = partition.Mic_PartData + dataMap[using_version]["PartData"] = partition.Wic_PartData superclass = ksversion.returnClassForVersion(version=using_version) class KSHandlers(superclass):
scripts/lib/mic/kickstart/custom_commands/__init__.py +6 -1
@@ -1,12 +1,17 @@ from desktop import Mic_Desktop from micrepo import Mic_Repo, Mic_RepoData -from partition import Mic_Partition +from micpartition import Mic_Partition +from micpartition import Mic_PartData from installerfw import Mic_installerfw +from partition import Wic_Partition __all__ = ( "Mic_Desktop", "Mic_Repo", "Mic_RepoData", "Mic_Partition", + "Mic_PartData", "Mic_installerfw", + "Wic_Partition", + "Wic_PartData", )
scripts/lib/mic/kickstart/custom_commands/micpartition.py new file +57 -0
57 lines not on this page · raw message
scripts/lib/mic/kickstart/custom_commands/partition.py +351 -38
408 lines not on this page · raw message
scripts/lib/mic/plugin.py +5 -1
@@ -40,7 +40,11 @@ class PluginMgr(object): return cls._instance def __init__(self): - self.plugin_dir = configmgr.common['plugin_dir'] + mic_path = os.path.dirname(__file__) + eos = mic_path.find('scripts') + len('scripts') + scripts_path = mic_path[:eos] + + self.plugin_dir = scripts_path + "/lib/mic/plugins" def append_dirs(self, dirs): for path in dirs:
scripts/lib/mic/plugins/imager/direct_plugin.py new file +92 -0
92 lines not on this page · raw message
scripts/lib/mic/utils/fs_related.py +29 -1
@@ -29,7 +29,7 @@ import uuid from mic import msger from mic.utils import runner from mic.utils.errors import * - +from mic.utils.oe.misc import * def find_binary_inchroot(binary, chroot): paths = ["/usr/sbin",
@@ -280,6 +280,34 @@ class RawDisk(Disk): def exists(self): return True + +class DiskImage(Disk): + """ + A Disk backed by a file. + """ + def __init__(self, image_file, size): + Disk.__init__(self, size) + self.image_file = image_file + + def exists(self): + return os.path.exists(self.image_file) + + def create(self): + if self.device is not None: + return + + blocks = self.size / 1024 + if self.size - blocks * 1024: + blocks += 1 + + # create disk image + dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=1" % \ + (self.image_file, blocks) + rc, out = exec_cmd(dd_cmd) + + self.device = self.image_file + + class LoopbackDisk(Disk): """A Disk backed by a file via the loop module.""" def __init__(self, lofile, size):
scripts/lib/mic/utils/misc.py +2 -2
@@ -512,8 +512,8 @@ def uncompress_squashfs(squashfsimg, outdir): if (rc != 0): raise SquashfsError("Failed to uncompress %s." % squashfsimg) -def mkdtemp(dir = "/var/tmp", prefix = "mic-tmp-"): - """ FIXME: use the dir in mic.conf instead """ +def mkdtemp(dir = "/var/tmp", prefix = "wic-tmp-"): + """ FIXME: use the dir in wic.conf instead """ makedirs(dir) return tempfile.mkdtemp(dir = dir, prefix = prefix)
scripts/lib/mic/utils/oe/__init__.py new file +22 -0
@@ -0,0 +1,22 @@ +# +# OpenEmbedded mic utils library +# +# Copyright (c) 2013, Intel Corporation. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# AUTHORS +# Tom Zanussi <tom.zanussi (at] linux.intel.com> +#
scripts/lib/mic/utils/oe/misc.py new file +108 -0
108 lines not on this page · raw message
scripts/lib/mic/utils/partitionedfs.py +40 -54
126 lines not on this page · raw message
scripts/yocto-image.conf deleted +0 -35
@@ -1,35 +0,0 @@ -[common] -; general settings -distro_name = Tizen - -plugin_dir = @PREFIX@/lib/mic/plugins - -[create] -; settings for create subcommand -tmpdir= /var/tmp/mic -cachedir= /var/tmp/mic/cache -outdir= ./mic-output -runtime=bootstrap - -pkgmgr = auto - -# to set global proxy for repos -#proxy = http://proxy.yourcompany.com:8080/ -#no_proxy = localhost,127.0.0.0/8,.yourcompany.com - -# prefix will be added in front of generated files -#name_prefix = output - -# to skip all ssl verification for repos -#ssl_verify = no - -[convert] -; settings for convert subcommand - -[chroot] -; settings for chroot subcommand - -[bootstrap] -rootdir=/var/tmp/mic-bootstrap -packages=mic-bootstrap-x86-arm -
Signature · 1 line
1.7.11.4
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
In reply to Tom ZanussiHello Tom,
Quoted 19 lines · Tom Zanussi
Initial implementation of the 'wic' command.
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 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.
'wic' is based loosely on the 'mic' (Meego Image Creator) framework, but heavily modified to make direct use of OpenEmbedded build artifacts instead of package installation and configuration, things already incorporated int the OE artifacts.
The name 'wic' comes from 'oeic' with the 'oe' diphthong promoted to the letter 'w', because 'oeic' is impossible to remember or pronounce.
Quoted 8 lines
This covers the mechanics of invoking and providing help for the command and sub-commands; it contains hooks for future commits to connect with the actual functionality, once implemented.
Help is integrated into the 'wic' command - see that for details on usage.
Signed-off-by Tom Zanussi <[email protected]>
Could you please elaborate why to make a new command instead of using the class system?
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
Hi Otavio,
Quoted 27 lines · Otavio Salvador
Hello Tom,
Quoted 23 lines · Tom Zanussi
Initial implementation of the 'wic' command.
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 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.
'wic' is based loosely on the 'mic' (Meego Image Creator) framework, but heavily modified to make direct use of OpenEmbedded build artifacts instead of package installation and configuration, things already incorporated int the OE artifacts.
The name 'wic' comes from 'oeic' with the 'oe' diphthong promoted to the letter 'w', because 'oeic' is impossible to remember or pronounce.
This covers the mechanics of invoking and providing help for the command and sub-commands; it contains hooks for future commits to connect with the actual functionality, once implemented.
Quoted 8 lines
Quoted 4 lines
Help is integrated into the 'wic' command - see that for details on usage.
Signed-off-by Tom Zanussi <[email protected]>Could you please elaborate why to make a new command instead of using the class system?
This isn't an either/or thing - the initial requirements were that the overall deployment effort end up being something that would be usable both from an external tool as well as from within the class system.
This just happens to be the initial (easier) part of that, the external tool, and I expect in 1.6 to be doing a lot of the harder part, integration with the build system.
The most important part, I think, is that this provides a high-level user-oriented 'language' (the kickstart files) that users can use to define custom images, rather than having to muck around in class files or variable settings, or write specialized scripts such as mkefidisk.sh for example.
Making that available from a standalone tool such as 'wic' is straightforward, doing the same from within the build system will require more thought and work, but that's what I'm hoping to do in 1.6...
Tom
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
Quoted 9 lines · Tom Zanussi
Hi Otavio,
Quoted 6 lines · Otavio Salvador
Hello Tom,
Quoted 2 lines · Tom Zanussi
Initial implementation of the 'wic' command.
Quoted 8 lines
<snip>
Quoted 3 lines
Could you please elaborate why to make a new command instead of using the class system?
This isn't an either/or thing - the initial requirements were that the overall deployment effort end up being something that would be usable both from an external tool as well as from within the class system.
What do you mean when you say "within the class system" here ?
* A tool using only (kickstart for image cfg, partitioning et.c.) + (tmp/deploy/ipk|rpm|deb) as input data for image creation ?
Just my five cents,
I would like to see reproducible image creation from both the bitbake/OE build env and the nativesdk SDK build env. This would require a common interface for input distribution data, It naturally feels like this interface should be the package repository. i.e. if X is not packaged as class-target, it can't be included on the generated image.
Also, if X is required to generate the image, it should be packaged as class-nativesdk.
afaict, the standalone wic tool uses a hybrid approach, using OpenEmbedded build artifacts + a package repository as input for rootfs generation. What is the long term plan for wic in regards to the above ?
Br,
David
Quoted 29 lines
This just happens to be the initial (easier) part of that, the external tool, and I expect in 1.6 to be doing a lot of the harder part, integration with the build system.
The most important part, I think, is that this provides a high-level user-oriented 'language' (the kickstart files) that users can use to define custom images, rather than having to muck around in class files or variable settings, or write specialized scripts such as
mkefidisk.shfor example.Making that available from a standalone tool such as 'wic' is straightforward, doing the same from within the build system will require more thought and work, but that's what I'm hoping to do in 1.6...
Tom
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
Quoted 15 lines · David Nyström
Quoted 14 lines · Tom Zanussi
Hi Otavio,
Quoted 6 lines · Otavio Salvador
Hello Tom,
Quoted 2 lines · Tom Zanussi
Initial implementation of the 'wic' command.
<snip>
Quoted 3 lines
Could you please elaborate why to make a new command instead of using the class system?
Quoted 8 lines
Quoted 3 lines
This isn't an either/or thing - the initial requirements were that the overall deployment effort end up being something that would be usable both from an external tool as well as from within the class system.
What do you mean when you say "within the class system" here ?
* A tool using only (kickstart for image cfg, partitioninget.c.) + (tmp/deploy/ipk|rpm|deb) as input data for image creation ?
For me, 'within the class system' just covers what I originally outlined in the analysis (Bug 3847 - New partitioning description and tooling), basically providing a more flexible alternative/eventual replacement for things like boot-directdisk.class/image-vmdk.bbclass and mkefidisk.sh, and the IMAGE_FSTYPEs mechanism used all over the place for creating custom images. At this point, that's the scope of it for me - I'm not even sure yet where the kickstart interface will hook into things or exactly how it will presented to users - that's for 1.6. What I do know is that the current wic functionality should be sufficient and that it's pretty well modularized - the 'wic' command itself is just a thin wrapper that gathers info from the user e.g. paths to the build artifacts and a kickstart file and invokes the image creator through a well-defined entry point.
For current work (and presumably also when integrated into the class system), I'm directly using the target rootfs - my first versions actually just used the rootfs image e.g. xx.ext3, but because I needed access to the filesystem for e.g. generating the fstab, and can't do a loop mount because it requires root, that's what the tool uses.
Using tmp/deploy/ipk|rpm|deb as input for image creation is a step beyond what I had scoped out for this immediate task - things like image configuration and package selection from package repositories/feeds are things I believe other people are interested in; using kickstart/mic as the underlying infrastructure for those additional capabilities at first glance seems that it might also make sense in those cases, since those things are already implemented in some form, but I haven't looked deeply and that's probably something for those who have the need/interest to determine...
Quoted 11 lines
Just my five cents,
I would like to see reproducible image creation from both the bitbake/OE build env and the nativesdk SDK build env.
This would require a common interface for input distribution data, It naturally feels like this interface should be the package repository. i.e. if X is not packaged as class-target, it can't be included on the generated image.
Also, if X is required to generate the image, it should be packaged as class-nativesdk.
Quoted 3 lines
afaict, the standalone wic tool uses a hybrid approach, using OpenEmbedded build artifacts + a package repository as input for rootfs generation.
Yeah, that's what the tool currently uses, but as you say, some more thought towards a common interface needs to be done. I originally had this for the --source param to the 'part commmand':
parser.add_option("-s", "--source", action = "append",
default = True, help = "define additional wks sources
[sourcename=/path/to/source], referenced in .wks part commands as --source sourcename")
For the current wic code, I punted on trying to come up with something more general purpose like this (and as you can see it's not really general purpose, in my case just allowing multiple filesystem sources and not very well thought out at that), and simply defined 'rootfs' to mean the entire /rootfs passed in using the -r option.
I think there needs to be a way to specify arbitrary (user-defined as well) sources and those sources could really be anything, including package repositories in whatever form you need them to be. I don't have the answer at the moment, just that there needs to be a generic mechanism for providing and making use of arbitrary sources - any input you could provide for the use cases it sounds like you've given more thought to handling would help move that along...
Thanks,
Tom
Quoted 35 lines
What is the long term plan for wic in regards to the above ?
Br,
DavidQuoted 29 lines
This just happens to be the initial (easier) part of that, the external tool, and I expect in 1.6 to be doing a lot of the harder part, integration with the build system.
The most important part, I think, is that this provides a high-level user-oriented 'language' (the kickstart files) that users can use to define custom images, rather than having to muck around in class files or variable settings, or write specialized scripts such as
mkefidisk.shfor example.Making that available from a standalone tool such as 'wic' is straightforward, doing the same from within the build system will require more thought and work, but that's what I'm hoping to do in 1.6...
Tom
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
Quoted 45 lines · Tom Zanussi
Quoted 15 lines · David Nyström
Quoted 14 lines · Tom Zanussi
Hi Otavio,
Quoted 6 lines · Otavio Salvador
Hello Tom,
Quoted 2 lines · Tom Zanussi
Initial implementation of the 'wic' command.
<snip>
Quoted 3 lines
Could you please elaborate why to make a new command instead of using the class system?
Quoted 8 lines
Quoted 3 lines
This isn't an either/or thing - the initial requirements were that the overall deployment effort end up being something that would be usable both from an external tool as well as from within the class system.
What do you mean when you say "within the class system" here ?
* A tool using only (kickstart for image cfg, partitioninget.c.) + (tmp/deploy/ipk|rpm|deb) as input data for image creation ?For me, 'within the class system' just covers what I originally outlined in the analysis (Bug 3847 - New partitioning description and tooling), basically providing a more flexible alternative/eventual replacement for things like boot-directdisk.class/image-vmdk.bbclass and
mkefidisk.sh, and theIMAGE_FSTYPEsmechanism used all over the place for creating custom images. At this point, that's the scope of it for me - I'm not even sure yet where the kickstart interface will hook into things or exactly how it will presented to users - that's for 1.6. What I do know is that the current wic functionality should be sufficient and that it's pretty well modularized - the 'wic' command itself is just a thin wrapper that gathers info from the user e.g. paths to the build artifacts and a kickstart file and invokes the image creator through a well-defined entry point.For current work (and presumably also when integrated into the class system), I'm directly using the target rootfs - my first versions actually just used the rootfs image e.g. xx.ext3, but because I needed access to the filesystem for e.g. generating the fstab, and can't do a loop mount because it requires root, that's what the tool uses.
Quoted 9 lines
Using tmp/deploy/ipk|rpm|deb as input for image creation is a step beyond what I had scoped out for this immediate task - things like image configuration and package selection from package repositories/feeds are things I believe other people are interested in; using kickstart/mic as the underlying infrastructure for those additional capabilities at first glance seems that it might also make sense in those cases, since those things are already implemented in some form, but I haven't looked deeply and that's probably something for those who have the need/interest to determine...
I started hacking on a simple test to evaluate dependencies et.c. for SDK rootfs + image generation from a repo, similiar to "mic-chroot".
https://github.com/nysan/rootfs-sandbox , dep: (oe-core master-next)
some postinst hooks are OE dependent and require special attention, and there is also the need to expand the nativesdk with some postinst dependencies to avoid host contamination. et.c.
When I saw the wic/kickstart patches, my hope was that we could, long term, share the codebase between the nativeSDK 'mic-like-interface', and bitbake/OE 'mic-like-interface', since functionality probably will be overlapping.
The nativeSDK 'mic-like-interface' would naturally only have the package repo + wks as input data.
Br,
David
Quoted 79 lines
Quoted 11 lines
Just my five cents,
I would like to see reproducible image creation from both the bitbake/OE build env and the nativesdk SDK build env.
This would require a common interface for input distribution data, It naturally feels like this interface should be the package repository. i.e. if X is not packaged as class-target, it can't be included on the generated image.
Also, if X is required to generate the image, it should be packaged as class-nativesdk.Quoted 3 lines
afaict, the standalone wic tool uses a hybrid approach, using OpenEmbedded build artifacts + a package repository as input for rootfs generation.
Yeah, that's what the tool currently uses, but as you say, some more thought towards a common interface needs to be done. I originally had this for the --source param to the 'part commmand':
parser.add_option("-s", "--source", action = "append",
default = True, help = "define additional wks sources
[sourcename=/path/to/source], referenced in .wks part commands as --source sourcename")For the current wic code, I punted on trying to come up with something more general purpose like this (and as you can see it's not really general purpose, in my case just allowing multiple filesystem sources and not very well thought out at that), and simply defined 'rootfs' to mean the entire /rootfs passed in using the -r option.
I think there needs to be a way to specify arbitrary (user-defined as well) sources and those sources could really be anything, including package repositories in whatever form you need them to be. I don't have the answer at the moment, just that there needs to be a generic mechanism for providing and making use of arbitrary sources - any input you could provide for the use cases it sounds like you've given more thought to handling would help move that along...
Thanks,
Tom
Quoted 35 lines
What is the long term plan for wic in regards to the above ?
Br,
DavidQuoted 29 lines
This just happens to be the initial (easier) part of that, the external tool, and I expect in 1.6 to be doing a lot of the harder part, integration with the build system.
The most important part, I think, is that this provides a high-level user-oriented 'language' (the kickstart files) that users can use to define custom images, rather than having to muck around in class files or variable settings, or write specialized scripts such as
mkefidisk.shfor example.Making that available from a standalone tool such as 'wic' is straightforward, doing the same from within the build system will require more thought and work, but that's what I'm hoping to do in 1.6...
Tom
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] wic: Initial code for wic (OpenEmbedded Image Creator)
Quoted 65 lines · David Nyström
Quoted 45 lines · Tom Zanussi
Quoted 15 lines · David Nyström
Quoted 14 lines · Tom Zanussi
Hi Otavio,
Quoted 6 lines · Otavio Salvador
Hello Tom,
Quoted 2 lines · Tom Zanussi
Initial implementation of the 'wic' command.
<snip>
Quoted 3 lines
Could you please elaborate why to make a new command instead of using the class system?
Quoted 8 lines
Quoted 3 lines
This isn't an either/or thing - the initial requirements were that the overall deployment effort end up being something that would be usable both from an external tool as well as from within the class system.
What do you mean when you say "within the class system" here ?
* A tool using only (kickstart for image cfg, partitioninget.c.) + (tmp/deploy/ipk|rpm|deb) as input data for image creation ?For me, 'within the class system' just covers what I originally outlined in the analysis (Bug 3847 - New partitioning description and tooling), basically providing a more flexible alternative/eventual replacement for things like boot-directdisk.class/image-vmdk.bbclass and
mkefidisk.sh, and theIMAGE_FSTYPEsmechanism used all over the place for creating custom images. At this point, that's the scope of it for me - I'm not even sure yet where the kickstart interface will hook into things or exactly how it will presented to users - that's for 1.6. What I do know is that the current wic functionality should be sufficient and that it's pretty well modularized - the 'wic' command itself is just a thin wrapper that gathers info from the user e.g. paths to the build artifacts and a kickstart file and invokes the image creator through a well-defined entry point.For current work (and presumably also when integrated into the class system), I'm directly using the target rootfs - my first versions actually just used the rootfs image e.g. xx.ext3, but because I needed access to the filesystem for e.g. generating the fstab, and can't do a loop mount because it requires root, that's what the tool uses.
Quoted 9 lines
Using tmp/deploy/ipk|rpm|deb as input for image creation is a step beyond what I had scoped out for this immediate task - things like image configuration and package selection from package repositories/feeds are things I believe other people are interested in; using kickstart/mic as the underlying infrastructure for those additional capabilities at first glance seems that it might also make sense in those cases, since those things are already implemented in some form, but I haven't looked deeply and that's probably something for those who have the need/interest to determine...
I started hacking on a simple test to evaluate dependencies
et.c. for SDK rootfs + image generation from a repo, similiar to "mic-chroot".https://github.com/nysan/rootfs-sandbox , dep: (oe-core master-next)
some postinst hooks are OE dependent and require special attention, and there is also the need to expand the nativesdk with some postinst dependencies to avoid host contamination.
et.c.
Quoted 8 lines
When I saw the wic/kickstart patches, my hope was that we could, long term, share the codebase between the nativeSDK 'mic-like-interface', and bitbake/OE 'mic-like-interface', since functionality probably will be overlapping.
The nativeSDK 'mic-like-interface' would naturally only have the package repo + wks as input data.
Looking at your code, it definitely seems there could be a good fit, if I understand it correctly.
As I understand it, you allow users to interactively specify packages to include in an image and then generate the image.
If I were going to take a first stab at using the wic infrastructure for this, I'd probably have the interactive tool start off by having the user specify a kickstart file and, instead of a pointer to the rootfs as -r does with 'wic', a pointer to the package repo.
The initial kickstart file would have an initial set of packages that would automatically be added, using the standard kickstart package selection syntax e.g.
%packages
@packagegroup-core-boot
%end
http://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_3._Package_Selection
Your interactive wrapper would allow the user to select and add packages from the package repo, which would be dynamically added to the %packages section of the kickstart file.
Once done, all the packages selected to go into the image would generate the rootfs at an internally known temporary location that would just be passed to the existing image creation code in place of the -r option, which is a previously solved problem ;-)
Well, there would be a lot more details involved but at a high level, that's one way I could see it working...
Tom
Quoted 87 lines
Br,
DavidQuoted 38 lines
Quoted 11 lines
Just my five cents,
I would like to see reproducible image creation from both the bitbake/OE build env and the nativesdk SDK build env.
This would require a common interface for input distribution data, It naturally feels like this interface should be the package repository. i.e. if X is not packaged as class-target, it can't be included on the generated image.
Also, if X is required to generate the image, it should be packaged as class-nativesdk.Quoted 3 lines
afaict, the standalone wic tool uses a hybrid approach, using OpenEmbedded build artifacts + a package repository as input for rootfs generation.
Yeah, that's what the tool currently uses, but as you say, some more thought towards a common interface needs to be done. I originally had this for the --source param to the 'part commmand':
parser.add_option("-s", "--source", action = "append",
default = True, help = "define additional wks sources
[sourcename=/path/to/source], referenced in .wks part commands as --source sourcename")For the current wic code, I punted on trying to come up with something more general purpose like this (and as you can see it's not really general purpose, in my case just allowing multiple filesystem sources and not very well thought out at that), and simply defined 'rootfs' to mean the entire /rootfs passed in using the -r option.
I think there needs to be a way to specify arbitrary (user-defined as well) sources and those sources could really be anything, including package repositories in whatever form you need them to be. I don't have the answer at the moment, just that there needs to be a generic mechanism for providing and making use of arbitrary sources - any input you could provide for the use cases it sounds like you've given more thought to handling would help move that along...
Quoted 41 lines
Thanks,
Tom
Quoted 35 lines
What is the long term plan for wic in regards to the above ?
Br,
DavidQuoted 29 lines
This just happens to be the initial (easier) part of that, the external tool, and I expect in 1.6 to be doing a lot of the harder part, integration with the build system.
The most important part, I think, is that this provides a high-level user-oriented 'language' (the kickstart files) that users can use to define custom images, rather than having to muck around in class files or variable settings, or write specialized scripts such as
mkefidisk.shfor example.Making that available from a standalone tool such as 'wic' is straightforward, doing the same from within the build system will require more thought and work, but that's what I'm hoping to do in 1.6...
Tom
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 4 lines · Tom Zanussi
This patchset implements a new command named 'wic' (for OpenEmbedded Image Creator). Please see [YOCTO #3847] for extensive background on what's implemented here.
Nice !
Would it be possible to add the MIC as a recipe for native and nativesdk, with wic patches applied(easier to maintain), and could also enable wic to use a package repo when built for nativesdk.
Br,
David
Quoted 73 lines
This is 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 more interesting aspect of the current patchset though is that the replaced (this patchset doesn't actually replace those scripts, however) scripts are 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.).Though this patchset 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 #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.
The current patchset has successfully been used to generate and boot images from core-image-minimal build artifacts using the 'mkefidisk' kickstart file (in
scripts/lib/image/canned-wks) on minnow and the 'directdisk' kickstart file using both core-image-minimal and core-image-sato artifacts for crownbay.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 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.
It can be used in 'raw' mode, where artifacts are explicitly specified via command-line arguments (see example below), or it can be used in a more easily usable 'cooked' mode which 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-envTo 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 imageYou 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 helpCreates 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:
Quoted 7 lines
$ wic createUsage:
Create a new OpenEmbedded image
usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir
<DIRNAME>]
Quoted 3 lines
[-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]
Quoted 107 lines
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 createNAME
wic create - Create a new OpenEmbedded imageSYNOPSIS
wic create <wks file or image name> [-o <DIRNAME> | --outdir <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]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE kickstart commands' found in the <wks file>.In order to do this, wic needs to know the locations of the various build artifacts required to build the image.
Users can explicitly specify the build artifact locations using the -r, -b, -k, and -n options. See below for details on where the corresponding artifacts are typically found in a normal OpenEmbedded build.
Alternatively, users can use the -e option to have 'mic' determine those locations for a given image. If the -e option is used, the user needs to have set the appropriate MACHINE variable in local.conf, and have sourced the build environment.
The -e option is used to specify the name of the image to use the artifacts from e.g. core-image-sato.
The -r option is used to specify the path to the /rootfs dir to use as the .wks rootfs source.
The -b option is used to specify the path to the dir containing the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the .wks bootimg source.
The -k option is used to specify the path to the dir containing the kernel to use in the .wks bootimg.
The -n option is used to specify the path to the native sysroot containing the tools to use to build the image.
The -s option is used to skip the build check. The build check is a simple sanity check used to determine whether the user has sourced the build environment so that the -e option can operate correctly. If the user has specified the build artifact locations explicitly, 'wic' assumes the user knows what he or she is doing and skips the build check.
When 'wic -e' is used, the locations for the build artifacts values are determined by 'wic -e' from the output of the 'bitbake -e' command given an image name e.g. 'core-image-minimal' and a given machine set in local.conf. In that case, the image is created as if the following 'bitbake -e' variables were used:
-r:
IMAGE_ROOTFS
-k:STAGING_KERNEL_DIR
-n:STAGING_DIR_NATIVE
-b: HDDDIR andSTAGING_DATA_DIR(handlers decide which to
use)If 'wic -e' is not used, the user needs to select the appropriate value for -b (as well as -r, -k, and -n).
The -o option can be used to place the image in a directory with a different name and location.
As an alternative to the wks file, the image-specific properties that define the values that will be used to generate a particular image can be specified on the command-line using the -i option and supplying a JSON object consisting of the set of name:value pairs needed by image creation.
The set of properties available for a given image type can be listed using the 'wic list' command.
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-minimalChecking basic build environment...
Done.
Quoted 8 lines
Creating image(s)...
Info: The new image(s) can be found here:
/var/tmp/wic/build/directdisk-201309252350-sda.directThe 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
Quoted 1 line
BOOTIMG_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
Quoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
Quoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
Quoted 16 lines
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wksThe 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, I can create a 'mkefidisk' image in the same way (notice that I'm using a different machine - because I'm using the -e option, I needed to change the MACHINE in my local.conf):
$ wic create mkefidisk -e core-image-minimal Checking basic build environment... Done.
Quoted 8 lines
Creating image(s)...
Info: The new image(s) can be found here:
/var/tmp/wic/build/mkefidisk-201309260027-sda.directThe 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
Quoted 1 line
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
Quoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
Quoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
Quoted 11 lines
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wksHere'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/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
Quoted 9 lines
Creating image(s)...
Info: The new image(s) can be found here:
/home/trz/testwic/build/test-201309260032-sda.directThe 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
Quoted 1 line
BOOTIMG_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
Quoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
Quoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
Quoted 8 lines
The image(s) were created using OE kickstart file:
/home/trz/test.wksFinally, 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:
Quoted 5 lines
# 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 --ondisk sda --fstype=efi --label msdos
--active --align 1024
Quoted 2 lines
part / --source rootfs --ondisk sda --fstype=ext3 --label platform
--align 1024
Quoted 4 lines
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"
Quoted 54 lines
The initial 'wic' implementation here supports only the basic kickstart partitioning commands: 'partition' (or 'part' for short) and 'bootloader'.
Currently, only the options used in the 'canned' scripts (in
scripts/lib/image/canned-wks) are supported.They're listed below and mostly follow the syntax and meaning of the standard kickstart options for those commands:
http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloaderFor the 'partition' ('part') command, here are the supported options:
--source
bootimg
rootfs
--ondisk sda
--size size (in mB)
--fstype
msdos
efi
ext4
ext3
ext2
btrfs
swap
--label label
--active
---align (in kB)The --source option is a wic-specific option that can currently have one of two values, 'bootimg' or 'rootfs'.
If '--source rootfs' is used, it tells the wic command to create a partition as large as needed to fill with the contents of /rootfs (specified by the -r 'wic' option) and to fill it with the contents of /rootfs.
If '--source bootimg' is used, it tells the wic command to create a partition as large as needed to fill with the contents of the boot partition (specified by the -b 'wic' option). Exactly what those contents are depend on the value of the --fstype option for that partition. If '--fstype=efi' is specified, the boot artifacts contained in HDDDIR are used, and if '--fstype=msdos' is specified, the boot artifacts found in
STAGING_DATADIRare used.The '--align' option is a mic-specific option that says to start a partition on an x kB boundary.
For the 'bootloader' command, these are the supported options:
Quoted 8 lines
--timeout
--appendFuture updates will implement more options - using anything not explicitly supported can result in unpredicable results.
The following changes since commit
b049d532f6e0ab9e458e486f81b00be47ee69acf:
Quoted 7 lines
testimage: Exclude
BB_ORIGENVvariable (2013-09-26 17:27:02 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.gittzanussi/wic-v1
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-v1
Quoted 59 lines
Tom Zanussi (3):
wic: Initial code for wic (OpenEmbedded Image Creator)
wic: Add mic w/pykickstart
wic: Add OpenEmbedded-specific implementationscripts/lib/image/__init__.py | 22 + scripts/lib/image/canned-wks/directdisk.wks | 10 + scripts/lib/image/canned-wks/mkefidisk.wks | 11 + scripts/lib/image/config/wic.conf | 7 + scripts/lib/image/engine.py | 280 ++++ scripts/lib/image/help.py | 311 ++++ scripts/lib/mic/3rdparty/pykickstart/base.py | 466 ++++++ .../mic/3rdparty/pykickstart/commands/__init__.py | 26 + .../3rdparty/pykickstart/commands/authconfig.py | 40 + .../mic/3rdparty/pykickstart/commands/autopart.py | 119 ++ .../mic/3rdparty/pykickstart/commands/autostep.py | 55 + .../3rdparty/pykickstart/commands/bootloader.py | 265 ++++ .../mic/3rdparty/pykickstart/commands/clearpart.py | 86 ++ .../mic/3rdparty/pykickstart/commands/device.py | 125 ++ .../3rdparty/pykickstart/commands/deviceprobe.py | 40 + .../3rdparty/pykickstart/commands/displaymode.py | 68 + .../mic/3rdparty/pykickstart/commands/dmraid.py | 91 ++ .../3rdparty/pykickstart/commands/driverdisk.py | 184 +++ .../lib/mic/3rdparty/pykickstart/commands/fcoe.py | 114 ++ .../mic/3rdparty/pykickstart/commands/firewall.py | 193 +++ .../mic/3rdparty/pykickstart/commands/firstboot.py | 62 + .../lib/mic/3rdparty/pykickstart/commands/group.py | 88 ++ .../3rdparty/pykickstart/commands/ignoredisk.py | 139 ++ .../3rdparty/pykickstart/commands/interactive.py | 58 + .../lib/mic/3rdparty/pykickstart/commands/iscsi.py | 133 ++ .../mic/3rdparty/pykickstart/commands/iscsiname.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/key.py | 64 + .../mic/3rdparty/pykickstart/commands/keyboard.py | 55 + .../lib/mic/3rdparty/pykickstart/commands/lang.py | 60 + .../3rdparty/pykickstart/commands/langsupport.py | 58 + .../mic/3rdparty/pykickstart/commands/lilocheck.py | 54 + .../mic/3rdparty/pykickstart/commands/logging.py | 66 + .../mic/3rdparty/pykickstart/commands/logvol.py | 304 ++++ .../3rdparty/pykickstart/commands/mediacheck.py | 53 + .../mic/3rdparty/pykickstart/commands/method.py | 186 +++ .../mic/3rdparty/pykickstart/commands/monitor.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/mouse.py | 70 + .../mic/3rdparty/pykickstart/commands/multipath.py | 111 ++ .../mic/3rdparty/pykickstart/commands/network.py | 363 +++++ .../mic/3rdparty/pykickstart/commands/partition.py | 353 +++++ .../lib/mic/3rdparty/pykickstart/commands/raid.py | 365 +++++ .../mic/3rdparty/pykickstart/commands/reboot.py | 79 + .../lib/mic/3rdparty/pykickstart/commands/repo.py | 249 +++ .../mic/3rdparty/pykickstart/commands/rescue.py | 68 + .../mic/3rdparty/pykickstart/commands/rootpw.py | 93 ++ .../mic/3rdparty/pykickstart/commands/selinux.py | 64 + .../mic/3rdparty/pykickstart/commands/services.py | 71 + .../lib/mic/3rdparty/pykickstart/commands/skipx.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/sshpw.py | 105 ++ .../mic/3rdparty/pykickstart/commands/timezone.py | 86 ++ .../mic/3rdparty/pykickstart/commands/updates.py | 60 + .../mic/3rdparty/pykickstart/commands/upgrade.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/user.py | 173 +++
Quoted 8 lines
.../lib/mic/3rdparty/pykickstart/commands/vnc.py | 114 ++ .../mic/3rdparty/pykickstart/commands/volgroup.py | 102 ++ .../mic/3rdparty/pykickstart/commands/xconfig.py | 184 +++ .../mic/3rdparty/pykickstart/commands/zerombr.py | 69 + .../lib/mic/3rdparty/pykickstart/commands/zfcp.py | 134 ++ scripts/lib/mic/3rdparty/pykickstart/constants.py | 57 + scripts/lib/mic/3rdparty/pykickstart/errors.py | 103 ++ .../mic/3rdparty/pykickstart/handlers/control.py | 1307
++++++++++++++++
Quoted 17 lines
.../lib/mic/3rdparty/pykickstart/handlers/f10.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f11.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f12.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f13.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f14.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f15.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f16.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f7.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f8.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f9.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc6.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel5.py | 24 +
Quoted 8 lines
.../lib/mic/3rdparty/pykickstart/handlers/rhel6.py | 24 + scripts/lib/mic/3rdparty/pykickstart/ko.py | 37 + scripts/lib/mic/3rdparty/pykickstart/options.py | 204 +++ scripts/lib/mic/3rdparty/pykickstart/parser.py | 702 +++++++++ scripts/lib/mic/3rdparty/pykickstart/sections.py | 244 +++ .../3rdparty/pykickstart/urlgrabber/__init__.py | 53 + .../3rdparty/pykickstart/urlgrabber/byterange.py | 463 ++++++ .../mic/3rdparty/pykickstart/urlgrabber/grabber.py | 1477
++++++++++++++++++
Quoted 4 lines
.../3rdparty/pykickstart/urlgrabber/keepalive.py | 617 ++++++++ .../mic/3rdparty/pykickstart/urlgrabber/mirror.py | 458 ++++++ .../3rdparty/pykickstart/urlgrabber/progress.py | 530 +++++++ .../3rdparty/pykickstart/urlgrabber/sslfactory.py | 90 ++
Quoted 8 lines
scripts/lib/mic/3rdparty/pykickstart/version.py | 197 +++ scripts/lib/mic/__init__.py | 4 + scripts/lib/mic/__version__.py | 1 + scripts/lib/mic/bootstrap.py | 279 ++++ scripts/lib/mic/chroot.py | 343 +++++ scripts/lib/mic/conf.py | 201 +++ scripts/lib/mic/creator.py | 351 +++++ scripts/lib/mic/imager/baseimager.py | 1265
++++++++++++++++
Quoted 23 lines
scripts/lib/mic/imager/direct.py | 472 ++++++ scripts/lib/mic/imager/fs.py | 99 ++ scripts/lib/mic/imager/livecd.py | 750 +++++++++ scripts/lib/mic/imager/liveusb.py | 308 ++++ scripts/lib/mic/imager/loop.py | 418 ++++++ scripts/lib/mic/imager/raw.py | 501 +++++++ scripts/lib/mic/kickstart/__init__.py | 892 +++++++++++ .../lib/mic/kickstart/custom_commands/__init__.py | 17 + .../lib/mic/kickstart/custom_commands/desktop.py | 95 ++ .../mic/kickstart/custom_commands/installerfw.py | 63 + .../lib/mic/kickstart/custom_commands/micboot.py | 49 + .../mic/kickstart/custom_commands/micpartition.py | 57 + .../lib/mic/kickstart/custom_commands/micrepo.py | 127 ++ .../lib/mic/kickstart/custom_commands/partition.py | 370 +++++ scripts/lib/mic/msger.py | 309 ++++ scripts/lib/mic/plugin.py | 102 ++ scripts/lib/mic/pluginbase.py | 101 ++ scripts/lib/mic/plugins/backend/yumpkgmgr.py | 490 ++++++ scripts/lib/mic/plugins/backend/zypppkgmgr.py | 973 ++++++++++++ scripts/lib/mic/plugins/hook/empty_hook.py | 3 + scripts/lib/mic/plugins/imager/direct_plugin.py | 92 ++ scripts/lib/mic/plugins/imager/fs_plugin.py | 143 ++ scripts/lib/mic/plugins/imager/livecd_plugin.py | 255 ++++
Quoted 8 lines
scripts/lib/mic/plugins/imager/liveusb_plugin.py | 260 ++++ scripts/lib/mic/plugins/imager/loop_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/raw_plugin.py | 275 ++++ scripts/lib/mic/rt_util.py | 223 +++ scripts/lib/mic/test | 1 + scripts/lib/mic/utils/BmapCreate.py | 298 ++++ scripts/lib/mic/utils/Fiemap.py | 252 ++++ scripts/lib/mic/utils/cmdln.py | 1586
++++++++++++++++++++
Quoted 14 lines
scripts/lib/mic/utils/errors.py | 71 + scripts/lib/mic/utils/fs_related.py | 1057 +++++++++++++ scripts/lib/mic/utils/gpt_parser.py | 331 ++++ scripts/lib/mic/utils/grabber.py | 97 ++ scripts/lib/mic/utils/misc.py | 1067 +++++++++++++ scripts/lib/mic/utils/oe/__init__.py | 22 + scripts/lib/mic/utils/oe/misc.py | 108 ++ scripts/lib/mic/utils/partitionedfs.py | 776 ++++++++++ scripts/lib/mic/utils/proxy.py | 183 +++ scripts/lib/mic/utils/rpmmisc.py | 600 ++++++++ scripts/lib/mic/utils/runner.py | 109 ++ scripts/wic | 185 +++ 141 files changed, 30983 insertions(+) create mode 100644 scripts/lib/image/__init__.py
Quoted 8 lines
create mode 100644 scripts/lib/image/canned-wks/directdisk.wks create mode 100644 scripts/lib/image/canned-wks/mkefidisk.wks create mode 100644 scripts/lib/image/config/wic.conf create mode 100644 scripts/lib/image/engine.py create mode 100644 scripts/lib/image/help.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/base.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/device.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/group.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/key.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lang.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/logging.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/logvol.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/method.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/monitor.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/mouse.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/multipath.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/network.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/partition.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/raid.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/reboot.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/repo.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/rescue.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/selinux.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/services.py
Quoted 3 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/skipx.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/timezone.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/updates.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.py
Quoted 3 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/user.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/vnc.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.py
Quoted 4 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/constants.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/errors.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/control.py
Quoted 15 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f16.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py
Quoted 8 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/ko.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/options.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/parser.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/sections.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py
Quoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py
Quoted 11 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/version.py create mode 100644 scripts/lib/mic/__init__.py create mode 100644 scripts/lib/mic/__version__.py create mode 100644 scripts/lib/mic/bootstrap.py create mode 100644 scripts/lib/mic/chroot.py create mode 100644 scripts/lib/mic/conf.py create mode 100644 scripts/lib/mic/creator.py create mode 100644 scripts/lib/mic/imager/__init__.py create mode 100644 scripts/lib/mic/imager/baseimager.py create mode 100644 scripts/lib/mic/imager/direct.py create mode 100644 scripts/lib/mic/imager/fs.py
Quoted 8 lines
create mode 100644 scripts/lib/mic/imager/livecd.py create mode 100644 scripts/lib/mic/imager/liveusb.py create mode 100644 scripts/lib/mic/imager/loop.py create mode 100644 scripts/lib/mic/imager/raw.py create mode 100644 scripts/lib/mic/kickstart/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/__init__.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/desktop.py create mode 100644
scripts/lib/mic/kickstart/custom_commands/installerfw.py
Quoted 2 lines
create mode 100644 scripts/lib/mic/kickstart/custom_commands/micboot.py create mode 100644
scripts/lib/mic/kickstart/custom_commands/micpartition.py
Quoted 41 lines
create mode 100644 scripts/lib/mic/kickstart/custom_commands/micrepo.py create mode 100644 scripts/lib/mic/kickstart/custom_commands/partition.py create mode 100644 scripts/lib/mic/msger.py create mode 100644 scripts/lib/mic/plugin.py create mode 100644 scripts/lib/mic/pluginbase.py create mode 100644 scripts/lib/mic/plugins/backend/yumpkgmgr.py create mode 100755 scripts/lib/mic/plugins/backend/zypppkgmgr.py create mode 100644 scripts/lib/mic/plugins/hook/.py create mode 100644 scripts/lib/mic/plugins/hook/empty_hook.py create mode 100644 scripts/lib/mic/plugins/imager/direct_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/fs_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/livecd_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/liveusb_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/loop_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/raw_plugin.py create mode 100644 scripts/lib/mic/rt_util.py create mode 100644 scripts/lib/mic/test create mode 100644 scripts/lib/mic/utils/BmapCreate.py create mode 100644 scripts/lib/mic/utils/Fiemap.py create mode 100644 scripts/lib/mic/utils/__init__.py create mode 100644 scripts/lib/mic/utils/cmdln.py create mode 100644 scripts/lib/mic/utils/errors.py create mode 100644 scripts/lib/mic/utils/fs_related.py create mode 100644 scripts/lib/mic/utils/gpt_parser.py create mode 100644 scripts/lib/mic/utils/grabber.py create mode 100644 scripts/lib/mic/utils/misc.py create mode 100644 scripts/lib/mic/utils/oe/__init__.py create mode 100644 scripts/lib/mic/utils/oe/misc.py create mode 100644 scripts/lib/mic/utils/partitionedfs.py create mode 100644 scripts/lib/mic/utils/proxy.py create mode 100644 scripts/lib/mic/utils/rpmmisc.py create mode 100644 scripts/lib/mic/utils/runner.py create mode 100755 scripts/wic--
1.7.11.4_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 6 lines · David Nystrom
Quoted 3 lines · Tom Zanussi
This patchset implements a new command named 'wic' (for OpenEmbedded Image Creator). Please see [YOCTO #3847] for extensive background
Quoted 9 lines
on
Quoted 1 line
what's implemented here.
Nice !
Would it be possible to add the MIC as a recipe for native and nativesdk, with wic patches applied(easier to maintain), and could also enable wic to use a package repo when built for nativesdk.
Yes, I think something like that would make sense - for 1.5, the design goal was to make it a completely standalone thing, with any integration work and other enhancements coming in 1.6...
Tom
Quoted 806 lines
Br,
DavidQuoted 10 lines
This is 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 more interesting aspect of the current patchset though is that the replaced (this patchset doesn't actually replace those scripts, however) scripts are 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.).Quoted 2 lines
Though this patchset only uses the kickstart syntax related to partitioning and bootloaders and only for creating images, because
the
Quoted 13 lines
code is based on the mic/pykickstart code, future deployment efforts such as those partially described by [YOCTO #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.
The current patchset has successfully been used to generate and boot images from core-image-minimal build artifacts using the 'mkefidisk' kickstart file (in
scripts/lib/image/canned-wks) on minnow and the 'directdisk' kickstart file using both core-image-minimal and core-image-sato artifacts for crownbay.Quoted 3 lines
The 'wic' command generates partitioned images from existing OpenEmbedded build artifacts. Image generation is driven by partitioning commands contained in an 'Openembedded
kickstart' (.wks)
Quoted 2 lines
file specified either directly on the command-line or as one of a selection of canned .wks files (see 'wic list images'). When
applied
Quoted 5 lines
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.
It can be used in 'raw' mode, where artifacts are explicitly
specified
Quoted 1 line
via command-line arguments (see example below), or it can be used in
a
Quoted 6 lines
more easily usable 'cooked' mode which 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
Quoted 3 lines
files available via the 'wic list images' command (example below).
In any case, the prerequisite for generating any image is to have
the
Quoted 1 line
build artifacts already available. The below examples assume the
user
Quoted 2 lines
has already build a 'core-image-minimal' for a specific machine (future versions won't require this redundant step, but for now
that's
Quoted 7 lines
typically how build artifacts get generated).
The other prerequisite is to source the build environment:
$ source oe-init-build-envTo start out with, we'll generate an image from one of the
canned .wks
Quoted 7 lines
files. The following generates a list of availailable images:
$ wic list images mkefidisk Create an EFI disk image directdisk Create a 'pcbios' direct disk imageYou can get more information about any of the available images by
typing
Quoted 9 lines
'wic list xxx help', where 'xxx' is one of the image names:
$ wic list mkefidisk helpCreates 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
Quoted 9 lines
of 'wic create' command and its parameters:
$ wic createUsage:
Create a new OpenEmbedded image
usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir
<DIRNAME>]
Quoted 1 line
[-i <JSON PROPERTY FILE> | --infile <JSON
PROPERTY_FILE>]Quoted 1 line
[-e | --image-name] [-r, --rootfs-dir] [-b,--bootimg-dir]
Quoted 1 line
[-k, --kernel-dir] [-n, --native-sysroot] [-s,--skip-build-check]
Quoted 2 lines
This command creates an OpenEmbedded image based on the 'OE
kickstart
Quoted 10 lines
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
Quoted 22 lines
by adding 'help' to the above:
$ wic help createNAME
wic create - Create a new OpenEmbedded imageSYNOPSIS
wic create <wks file or image name> [-o <DIRNAME> | --outdir <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]
DESCRIPTION
This command creates an OpenEmbedded image based on the 'OE kickstart commands' found in the <wks file>.In order to do this, wic needs to know the locations of the various build artifacts required to build the image.
Quoted 6 lines
Users can explicitly specify the build artifact locations using the -r, -b, -k, and -n options. See below for details on where the corresponding artifacts are typically found in a normal OpenEmbedded build.
Alternatively, users can use the -e option to have 'mic'
determine
Quoted 1 line
those locations for a given image. If the -e option is used,
the
Quoted 4 lines
user needs to have set the appropriate MACHINE variable in local.conf, and have sourced the build environment.
The -e option is used to specify the name of the image to use
the
Quoted 9 lines
artifacts from e.g. core-image-sato.
The -r option is used to specify the path to the /rootfs dir to use as the .wks rootfs source.
The -b option is used to specify the path to the dir containing the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the .wks bootimg source.
Quoted 7 lines
The -k option is used to specify the path to the dir containing the kernel to use in the .wks bootimg.
The -n option is used to specify the path to the native sysroot containing the tools to use to build the image.
The -s option is used to skip the build check. The build check
is
Quoted 3 lines
a simple sanity check used to determine whether the user has sourced the build environment so that the -e option can operate correctly. If the user has specified the build artifact
locations
Quoted 5 lines
explicitly, 'wic' assumes the user knows what he or she is doing and skips the build check.
When 'wic -e' is used, the locations for the build artifacts values are determined by 'wic -e' from the output of the
'bitbake
Quoted 11 lines
-e' command given an image name e.g. 'core-image-minimal' and a given machine set in local.conf. In that case, the image is created as if the following 'bitbake -e' variables were used:
-r:
IMAGE_ROOTFS
-k:STAGING_KERNEL_DIR
-n:STAGING_DIR_NATIVE
-b: HDDDIR andSTAGING_DATA_DIR(handlers decide which to
use)If 'wic -e' is not used, the user needs to select the
appropriate
Quoted 3 lines
value for -b (as well as -r, -k, and -n).
The -o option can be used to place the image in a directory with
a
Quoted 4 lines
different name and location.
As an alternative to the wks file, the image-specific properties that define the values that will be used to generate a
particular
Quoted 1 line
image can be specified on the command-line using the -i option
and
Quoted 1 line
supplying a JSON object consisting of the set of name:value
pairs
Quoted 6 lines
needed by image creation.
The set of properties available for a given image type can be listed using the 'wic list' command.
So, the easiest way to create an image is to use the -e option with
a
Quoted 1 line
canned .wks file. To use the -e option, you need to specify the
image
Quoted 1 line
used to generate the artifacts and you actually need to have the
MACHINE
Quoted 2 lines
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
Quoted 8 lines
a directdisk image, pointing the process at the core-image-minimal artifacts for the current MACHINE:
$ wic create directdisk -e core-image-minimalChecking basic build environment...
Done.Quoted 8 lines
Creating image(s)...
Info: The new image(s) can be found here:
/var/tmp/wic/build/directdisk-201309252350-sda.directThe 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/rootfsQuoted 1 line
BOOTIMG_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/shareQuoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernelQuoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernelQuoted 3 lines
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wksQuoted 2 lines
The output shows the name and location of the image created, and so
that
Quoted 4 lines
you know exactly what was used to generate the image, each of the artifacts and the kickstart file used.
Similarly, I can create a 'mkefidisk' image in the same way (notice
that
Quoted 7 lines
I'm using a different machine - because I'm using the -e option, I needed to change the MACHINE in my local.conf):
$ wic create mkefidisk -e core-image-minimal Checking basic build environment... Done.Quoted 8 lines
Creating image(s)...
Info: The new image(s) can be found here:
/var/tmp/wic/build/mkefidisk-201309260027-sda.directThe 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/rootfsQuoted 1 line
BOOTIMG_DIR:
/home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimgQuoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernelQuoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernelQuoted 3 lines
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wksQuoted 3 lines
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
Quoted 1 line
also uses the -o option to have wic create the output somewhere
other
Quoted 4 lines
than the default
/var/tmp/wic:$ 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-linuxQuoted 9 lines
Creating image(s)...
Info: The new image(s) can be found here:
/home/trz/testwic/build/test-201309260032-sda.directThe 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/rootfsQuoted 1 line
BOOTIMG_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/shareQuoted 1 line
KERNEL_DIR:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernelQuoted 1 line
NATIVE_SYSROOT:
/home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernelQuoted 6 lines
The image(s) were created using OE kickstart file:
/home/trz/test.wksFinally, here's an example of the actual partition language commands used to generate the mkefidisk image i.e. these are the contents of
the
Quoted 4 lines
mkefidisk.wks OE kickstart file:
# short-description: Create an EFI disk image
# long-description: Creates a partitioned EFI disk image that theuser
Quoted 3 lines
# can directly dd to boot media.part /boot --source bootimg --ondisk sda --fstype=efi --label msdos
--active --align 1024
Quoted 2 lines
part / --source rootfs --ondisk sda --fstype=ext3 --label platform
--align 1024
Quoted 4 lines
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"Quoted 3 lines
The initial 'wic' implementation here supports only the basic kickstart partitioning commands: 'partition' (or 'part' for short)
and
Quoted 5 lines
'bootloader'.
Currently, only the options used in the 'canned' scripts (in
scripts/lib/image/canned-wks) are supported.Quoted 7 lines
They're listed below and mostly follow the syntax and meaning of the standard kickstart options for those commands:
http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloaderFor the 'partition' ('part') command, here are the supported
options:
Quoted 18 lines
--source
bootimg
rootfs
--ondisk sda
--size size (in mB)
--fstype
msdos
efi
ext4
ext3
ext2
btrfs
swap
--label label
--active
---align (in kB)Quoted 6 lines
The --source option is a wic-specific option that can currently have one of two values, 'bootimg' or 'rootfs'.
If '--source rootfs' is used, it tells the wic command to create a partition as large as needed to fill with the contents of /rootfs (specified by the -r 'wic' option) and to fill it with the contents
of
Quoted 15 lines
/rootfs.
If '--source bootimg' is used, it tells the wic command to create a partition as large as needed to fill with the contents of the boot partition (specified by the -b 'wic' option). Exactly what those contents are depend on the value of the --fstype option for that partition. If '--fstype=efi' is specified, the boot artifacts contained in HDDDIR are used, and if '--fstype=msdos' is specified, the boot artifacts found in
STAGING_DATADIRare used.The '--align' option is a mic-specific option that says to start a partition on an x kB boundary.
For the 'bootloader' command, these are the supported options:
Quoted 8 lines
--timeout
--appendFuture updates will implement more options - using anything not explicitly supported can result in unpredicable results.
The following changes since commit
b049d532f6e0ab9e458e486f81b00be47ee69acf:Quoted 7 lines
testimage: Exclude
BB_ORIGENVvariable (2013-09-26 17:27:02 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.gittzanussi/wic-v1http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-v1
Quoted 59 lines
Tom Zanussi (3):
wic: Initial code for wic (OpenEmbedded Image Creator)
wic: Add mic w/pykickstart
wic: Add OpenEmbedded-specific implementationscripts/lib/image/__init__.py | 22 + scripts/lib/image/canned-wks/directdisk.wks | 10 + scripts/lib/image/canned-wks/mkefidisk.wks | 11 + scripts/lib/image/config/wic.conf | 7 + scripts/lib/image/engine.py | 280 ++++ scripts/lib/image/help.py | 311 ++++ scripts/lib/mic/3rdparty/pykickstart/base.py | 466 ++++++ .../mic/3rdparty/pykickstart/commands/__init__.py | 26 + .../3rdparty/pykickstart/commands/authconfig.py | 40 + .../mic/3rdparty/pykickstart/commands/autopart.py | 119 ++ .../mic/3rdparty/pykickstart/commands/autostep.py | 55 + .../3rdparty/pykickstart/commands/bootloader.py | 265 ++++ .../mic/3rdparty/pykickstart/commands/clearpart.py | 86 ++ .../mic/3rdparty/pykickstart/commands/device.py | 125 ++ .../3rdparty/pykickstart/commands/deviceprobe.py | 40 + .../3rdparty/pykickstart/commands/displaymode.py | 68 + .../mic/3rdparty/pykickstart/commands/dmraid.py | 91 ++ .../3rdparty/pykickstart/commands/driverdisk.py | 184 +++ .../lib/mic/3rdparty/pykickstart/commands/fcoe.py | 114 ++ .../mic/3rdparty/pykickstart/commands/firewall.py | 193 +++ .../mic/3rdparty/pykickstart/commands/firstboot.py | 62 + .../lib/mic/3rdparty/pykickstart/commands/group.py | 88 ++ .../3rdparty/pykickstart/commands/ignoredisk.py | 139 ++ .../3rdparty/pykickstart/commands/interactive.py | 58 + .../lib/mic/3rdparty/pykickstart/commands/iscsi.py | 133 ++ .../mic/3rdparty/pykickstart/commands/iscsiname.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/key.py | 64 + .../mic/3rdparty/pykickstart/commands/keyboard.py | 55 + .../lib/mic/3rdparty/pykickstart/commands/lang.py | 60 + .../3rdparty/pykickstart/commands/langsupport.py | 58 + .../mic/3rdparty/pykickstart/commands/lilocheck.py | 54 + .../mic/3rdparty/pykickstart/commands/logging.py | 66 + .../mic/3rdparty/pykickstart/commands/logvol.py | 304 ++++ .../3rdparty/pykickstart/commands/mediacheck.py | 53 + .../mic/3rdparty/pykickstart/commands/method.py | 186 +++ .../mic/3rdparty/pykickstart/commands/monitor.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/mouse.py | 70 + .../mic/3rdparty/pykickstart/commands/multipath.py | 111 ++ .../mic/3rdparty/pykickstart/commands/network.py | 363 +++++ .../mic/3rdparty/pykickstart/commands/partition.py | 353 +++++ .../lib/mic/3rdparty/pykickstart/commands/raid.py | 365 +++++ .../mic/3rdparty/pykickstart/commands/reboot.py | 79 + .../lib/mic/3rdparty/pykickstart/commands/repo.py | 249 +++ .../mic/3rdparty/pykickstart/commands/rescue.py | 68 + .../mic/3rdparty/pykickstart/commands/rootpw.py | 93 ++ .../mic/3rdparty/pykickstart/commands/selinux.py | 64 + .../mic/3rdparty/pykickstart/commands/services.py | 71 + .../lib/mic/3rdparty/pykickstart/commands/skipx.py | 54 + .../lib/mic/3rdparty/pykickstart/commands/sshpw.py | 105 ++ .../mic/3rdparty/pykickstart/commands/timezone.py | 86 ++ .../mic/3rdparty/pykickstart/commands/updates.py | 60 + .../mic/3rdparty/pykickstart/commands/upgrade.py | 106 ++ .../lib/mic/3rdparty/pykickstart/commands/user.py | 173 +++Quoted 8 lines
.../lib/mic/3rdparty/pykickstart/commands/vnc.py | 114 ++ .../mic/3rdparty/pykickstart/commands/volgroup.py | 102 ++ .../mic/3rdparty/pykickstart/commands/xconfig.py | 184 +++ .../mic/3rdparty/pykickstart/commands/zerombr.py | 69 + .../lib/mic/3rdparty/pykickstart/commands/zfcp.py | 134 ++ scripts/lib/mic/3rdparty/pykickstart/constants.py | 57 + scripts/lib/mic/3rdparty/pykickstart/errors.py | 103 ++ .../mic/3rdparty/pykickstart/handlers/control.py | 1307++++++++++++++++
Quoted 17 lines
.../lib/mic/3rdparty/pykickstart/handlers/f10.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f11.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f12.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f13.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f14.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f15.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f16.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f7.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f8.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/f9.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc5.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/fc6.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel3.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel4.py | 24 + .../lib/mic/3rdparty/pykickstart/handlers/rhel5.py | 24 +Quoted 8 lines
.../lib/mic/3rdparty/pykickstart/handlers/rhel6.py | 24 + scripts/lib/mic/3rdparty/pykickstart/ko.py | 37 + scripts/lib/mic/3rdparty/pykickstart/options.py | 204 +++ scripts/lib/mic/3rdparty/pykickstart/parser.py | 702 +++++++++ scripts/lib/mic/3rdparty/pykickstart/sections.py | 244 +++ .../3rdparty/pykickstart/urlgrabber/__init__.py | 53 + .../3rdparty/pykickstart/urlgrabber/byterange.py | 463 ++++++ .../mic/3rdparty/pykickstart/urlgrabber/grabber.py | 1477++++++++++++++++++
Quoted 4 lines
.../3rdparty/pykickstart/urlgrabber/keepalive.py | 617 ++++++++ .../mic/3rdparty/pykickstart/urlgrabber/mirror.py | 458 ++++++ .../3rdparty/pykickstart/urlgrabber/progress.py | 530 +++++++ .../3rdparty/pykickstart/urlgrabber/sslfactory.py | 90 ++Quoted 8 lines
scripts/lib/mic/3rdparty/pykickstart/version.py | 197 +++ scripts/lib/mic/__init__.py | 4 + scripts/lib/mic/__version__.py | 1 + scripts/lib/mic/bootstrap.py | 279 ++++ scripts/lib/mic/chroot.py | 343 +++++ scripts/lib/mic/conf.py | 201 +++ scripts/lib/mic/creator.py | 351 +++++ scripts/lib/mic/imager/baseimager.py | 1265++++++++++++++++
Quoted 7 lines
scripts/lib/mic/imager/direct.py | 472 ++++++ scripts/lib/mic/imager/fs.py | 99 ++ scripts/lib/mic/imager/livecd.py | 750 +++++++++ scripts/lib/mic/imager/liveusb.py | 308 ++++ scripts/lib/mic/imager/loop.py | 418 ++++++ scripts/lib/mic/imager/raw.py | 501 +++++++ scripts/lib/mic/kickstart/__init__.py | 892+++++++++++
Quoted 4 lines
.../lib/mic/kickstart/custom_commands/__init__.py | 17 + .../lib/mic/kickstart/custom_commands/desktop.py | 95 ++ .../mic/kickstart/custom_commands/installerfw.py | 63 + .../lib/mic/kickstart/custom_commands/micboot.py | 49 +Quoted 8 lines
.../mic/kickstart/custom_commands/micpartition.py | 57 + .../lib/mic/kickstart/custom_commands/micrepo.py | 127 ++ .../lib/mic/kickstart/custom_commands/partition.py | 370 +++++ scripts/lib/mic/msger.py | 309 ++++ scripts/lib/mic/plugin.py | 102 ++ scripts/lib/mic/pluginbase.py | 101 ++ scripts/lib/mic/plugins/backend/yumpkgmgr.py | 490 ++++++ scripts/lib/mic/plugins/backend/zypppkgmgr.py | 973++++++++++++
Quoted 4 lines
scripts/lib/mic/plugins/hook/empty_hook.py | 3 + scripts/lib/mic/plugins/imager/direct_plugin.py | 92 ++ scripts/lib/mic/plugins/imager/fs_plugin.py | 143 ++ scripts/lib/mic/plugins/imager/livecd_plugin.py | 255 ++++Quoted 8 lines
scripts/lib/mic/plugins/imager/liveusb_plugin.py | 260 ++++ scripts/lib/mic/plugins/imager/loop_plugin.py | 255 ++++ scripts/lib/mic/plugins/imager/raw_plugin.py | 275 ++++ scripts/lib/mic/rt_util.py | 223 +++ scripts/lib/mic/test | 1 + scripts/lib/mic/utils/BmapCreate.py | 298 ++++ scripts/lib/mic/utils/Fiemap.py | 252 ++++ scripts/lib/mic/utils/cmdln.py | 1586++++++++++++++++++++
Quoted 2 lines
scripts/lib/mic/utils/errors.py | 71 + scripts/lib/mic/utils/fs_related.py | 1057+++++++++++++
Quoted 3 lines
scripts/lib/mic/utils/gpt_parser.py | 331 ++++ scripts/lib/mic/utils/grabber.py | 97 ++ scripts/lib/mic/utils/misc.py | 1067+++++++++++++
Quoted 3 lines
scripts/lib/mic/utils/oe/__init__.py | 22 + scripts/lib/mic/utils/oe/misc.py | 108 ++ scripts/lib/mic/utils/partitionedfs.py | 776++++++++++
Quoted 6 lines
scripts/lib/mic/utils/proxy.py | 183 +++ scripts/lib/mic/utils/rpmmisc.py | 600 ++++++++ scripts/lib/mic/utils/runner.py | 109 ++ scripts/wic | 185 +++ 141 files changed, 30983 insertions(+) create mode 100644 scripts/lib/image/__init__.pyQuoted 8 lines
create mode 100644 scripts/lib/image/canned-wks/directdisk.wks create mode 100644 scripts/lib/image/canned-wks/mkefidisk.wks create mode 100644 scripts/lib/image/config/wic.conf create mode 100644 scripts/lib/image/engine.py create mode 100644 scripts/lib/image/help.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/__init__.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/base.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/__init__.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/autopart.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/autostep.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/device.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/firewall.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/group.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/interactive.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/key.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/lang.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/lilocheck.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/logging.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/logvol.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/mediacheck.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/method.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/monitor.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/mouse.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/multipath.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/network.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/partition.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/raid.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/reboot.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/repo.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/rescue.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/rootpw.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/selinux.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/services.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/skipx.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/sshpw.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/timezone.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/updates.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/upgrade.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/user.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/vnc.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/volgroup.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/xconfig.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/zerombr.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/commands/zfcp.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/constants.pyQuoted 2 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/errors.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/__init__.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/control.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f10.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f11.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f12.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f13.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f14.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f15.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f16.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f7.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f8.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/f9.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.pyQuoted 5 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/ko.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/options.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/parser.py create mode 100644 scripts/lib/mic/3rdparty/pykickstart/sections.py create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.pyQuoted 1 line
create mode 100644
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.pyQuoted 9 lines
create mode 100644 scripts/lib/mic/3rdparty/pykickstart/version.py create mode 100644 scripts/lib/mic/__init__.py create mode 100644 scripts/lib/mic/__version__.py create mode 100644 scripts/lib/mic/bootstrap.py create mode 100644 scripts/lib/mic/chroot.py create mode 100644 scripts/lib/mic/conf.py create mode 100644 scripts/lib/mic/creator.py create mode 100644 scripts/lib/mic/imager/__init__.py create mode 100644 scripts/lib/mic/imager/baseimager.pyQuoted 8 lines
create mode 100644 scripts/lib/mic/imager/direct.py create mode 100644 scripts/lib/mic/imager/fs.py create mode 100644 scripts/lib/mic/imager/livecd.py create mode 100644 scripts/lib/mic/imager/liveusb.py create mode 100644 scripts/lib/mic/imager/loop.py create mode 100644 scripts/lib/mic/imager/raw.py create mode 100644 scripts/lib/mic/kickstart/__init__.py create mode 100644
scripts/lib/mic/kickstart/custom_commands/__init__.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/desktop.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/installerfw.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/micboot.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/micpartition.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/micrepo.pyQuoted 1 line
create mode 100644
scripts/lib/mic/kickstart/custom_commands/partition.pyQuoted 39 lines
create mode 100644 scripts/lib/mic/msger.py create mode 100644 scripts/lib/mic/plugin.py create mode 100644 scripts/lib/mic/pluginbase.py create mode 100644 scripts/lib/mic/plugins/backend/yumpkgmgr.py create mode 100755 scripts/lib/mic/plugins/backend/zypppkgmgr.py create mode 100644 scripts/lib/mic/plugins/hook/.py create mode 100644 scripts/lib/mic/plugins/hook/empty_hook.py create mode 100644 scripts/lib/mic/plugins/imager/direct_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/fs_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/livecd_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/liveusb_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/loop_plugin.py create mode 100644 scripts/lib/mic/plugins/imager/raw_plugin.py create mode 100644 scripts/lib/mic/rt_util.py create mode 100644 scripts/lib/mic/test create mode 100644 scripts/lib/mic/utils/BmapCreate.py create mode 100644 scripts/lib/mic/utils/Fiemap.py create mode 100644 scripts/lib/mic/utils/__init__.py create mode 100644 scripts/lib/mic/utils/cmdln.py create mode 100644 scripts/lib/mic/utils/errors.py create mode 100644 scripts/lib/mic/utils/fs_related.py create mode 100644 scripts/lib/mic/utils/gpt_parser.py create mode 100644 scripts/lib/mic/utils/grabber.py create mode 100644 scripts/lib/mic/utils/misc.py create mode 100644 scripts/lib/mic/utils/oe/__init__.py create mode 100644 scripts/lib/mic/utils/oe/misc.py create mode 100644 scripts/lib/mic/utils/partitionedfs.py create mode 100644 scripts/lib/mic/utils/proxy.py create mode 100644 scripts/lib/mic/utils/rpmmisc.py create mode 100644 scripts/lib/mic/utils/runner.py create mode 100755 scripts/wic--
1.7.11.4_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 3 lines · Tom Zanussi
This patchset implements a new command named 'wic' (for OpenEmbedded Image Creator). Please see [YOCTO #3847] for extensive background on what's implemented here.
Wow Tom, this is really AWESOME work! And thanks for the excellent detailed description of the current system which you documented in [YOCTO #3847]!
One question comes to mind: if I have a package which installs files to two (or more) different directories and I have decided (for whatever reason) that those directories should be on separate partitions, is this supported?
Quoted 9 lines · Trevor Woerner
Quoted 3 lines · Tom Zanussi
This patchset implements a new command named 'wic' (for OpenEmbedded Image Creator). Please see [YOCTO #3847] for extensive background on what's implemented here.
Wow Tom, this is really AWESOME work! And thanks for the excellent detailed description of the current system which you documented in [YOCTO #3847]!
Thanks!
Quoted 4 lines
One question comes to mind: if I have a package which installs files to two (or more) different directories and I have decided (for whatever reason) that those directories should be on separate partitions, is this supported?
No, the current code doesn't, but what I had planned on doing was adding hyphenated suffixes onto the --source rootfs param which would be treated as subdividing the rootfs (passed in using -r) and creating separate partitions with those contents e.g.
--source rootfs-home
--source rootfs-usr-local
So in the above, the contents of /home would be split out into a separate partition (and subtracted from rootfs) as well as /usr/local, and fstab entries would be created to mount those partitions as /home and /usr/local...
Tom
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core