diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-07-11 15:51:27 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-16 10:20:48 +0100 |
commit | d08c2ce0d67179cd3e37a23650c839c479d43750 (patch) | |
tree | 0ab42304493e2b63a807656157ace281a972d381 /scripts | |
parent | d8b65a55d204763d67cb8bff8fd449ea2323a856 (diff) | |
download | poky-d08c2ce0d67179cd3e37a23650c839c479d43750.tar.gz |
wic: Add kickstart reference to help system
Add a 'wic kickstart' help section to make it easy for users to access
the kickstart reference without having to go to an external website.
(From OE-Core rev: 136137ec1c124aee89d2120abded60a5cf0562b0)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/image/canned-wks/directdisk.wks | 2 | ||||
-rw-r--r-- | scripts/lib/image/help.py | 114 | ||||
-rwxr-xr-x | scripts/wic | 27 |
3 files changed, 130 insertions, 13 deletions
diff --git a/scripts/lib/image/canned-wks/directdisk.wks b/scripts/lib/image/canned-wks/directdisk.wks index 397a929c74..62dcab15ce 100644 --- a/scripts/lib/image/canned-wks/directdisk.wks +++ b/scripts/lib/image/canned-wks/directdisk.wks | |||
@@ -3,7 +3,7 @@ | |||
3 | # can directly dd to boot media. | 3 | # can directly dd to boot media. |
4 | 4 | ||
5 | 5 | ||
6 | part /boot --source bootimg-pcbios --ondisk sda --fstype=msdos --label boot --active --align 1024 | 6 | part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 |
7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 | 7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 |
8 | 8 | ||
9 | bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0" | 9 | bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0" |
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py index bf2f773266..a7e7830a65 100644 --- a/scripts/lib/image/help.py +++ b/scripts/lib/image/help.py | |||
@@ -631,3 +631,117 @@ DESCRIPTION | |||
631 | kickstart commands available for use in .wks files from 'wic help | 631 | kickstart commands available for use in .wks files from 'wic help |
632 | kickstart'. | 632 | kickstart'. |
633 | """ | 633 | """ |
634 | |||
635 | wic_kickstart_help = """ | ||
636 | |||
637 | NAME | ||
638 | wic kickstart - wic kickstart reference | ||
639 | |||
640 | DESCRIPTION | ||
641 | This section provides the definitive reference to the wic | ||
642 | kickstart language. It also provides documentation on the list of | ||
643 | --source plugins available for use from the 'part' command (see | ||
644 | the 'Platform-specific Plugins' section below). | ||
645 | |||
646 | The current wic implementation supports only the basic kickstart | ||
647 | partitioning commands: partition (or part for short) and | ||
648 | bootloader. | ||
649 | |||
650 | The following is a listing of the commands, their syntax, and | ||
651 | meanings. The commands are based on the Fedora kickstart | ||
652 | documentation but with modifications to reflect wic capabilities. | ||
653 | |||
654 | http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition | ||
655 | http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader | ||
656 | |||
657 | Commands | ||
658 | |||
659 | * 'part' or 'partition' | ||
660 | |||
661 | This command creates a partition on the system and uses the | ||
662 | following syntax: | ||
663 | |||
664 | part <mountpoint> | ||
665 | |||
666 | The <mountpoint> is where the partition will be mounted and | ||
667 | must take of one of the following forms: | ||
668 | |||
669 | /<path>: For example: /, /usr, or /home | ||
670 | |||
671 | swap: The partition will be used as swap space. | ||
672 | |||
673 | The following are supported 'part' options: | ||
674 | |||
675 | --size: The minimum partition size in MBytes. Specify an | ||
676 | integer value such as 500. Do not append the number | ||
677 | with "MB". You do not need this option if you use | ||
678 | --source. | ||
679 | |||
680 | --source: This option is a wic-specific option that names the | ||
681 | source of the data that will populate the | ||
682 | partition. The most common value for this option | ||
683 | is 'rootfs', but can be any value which maps to a | ||
684 | valid 'source plugin' (see 'wic help plugins'). | ||
685 | |||
686 | If '--source rootfs' is used, it tells the wic | ||
687 | command to create a partition as large as needed | ||
688 | and to fill it with the contents of the root | ||
689 | filesystem pointed to by the '-r' wic command-line | ||
690 | option (or the equivalent rootfs derived from the | ||
691 | '-e' command-line option). The filesystem type | ||
692 | that will be used to create the partition is driven | ||
693 | by the value of the --fstype option specified for | ||
694 | the partition (see --fstype below). | ||
695 | |||
696 | If --source <plugin-name>' is used, it tells the | ||
697 | wic command to create a partition as large as | ||
698 | needed and to fill with the contents of the | ||
699 | partition that will be generated by the specified | ||
700 | plugin name using the data pointed to by the '-r' | ||
701 | wic command-line option (or the equivalent rootfs | ||
702 | derived from the '-e' command-line option). | ||
703 | Exactly what those contents and filesystem type end | ||
704 | up being are depend on the given plugin | ||
705 | implementation. | ||
706 | |||
707 | --ondisk or --ondrive: Forces the partition to be created on | ||
708 | a particular disk. | ||
709 | |||
710 | --fstype: Sets the file system type for the partition. These | ||
711 | apply to partitions created using '--source rootfs' (see | ||
712 | --source above). Valid values are: | ||
713 | |||
714 | ext2 | ||
715 | ext3 | ||
716 | ext4 | ||
717 | btrfs | ||
718 | swap | ||
719 | |||
720 | --label label: Specifies the label to give to the filesystem | ||
721 | to be made on the partition. If the given | ||
722 | label is already in use by another filesystem, | ||
723 | a new label is created for the partition. | ||
724 | |||
725 | --active: Marks the partition as active. | ||
726 | |||
727 | --align (in KBytes): This option is specific to wic and says | ||
728 | to start a partition on an x KBytes | ||
729 | boundary. | ||
730 | |||
731 | * bootloader | ||
732 | |||
733 | This command allows the user to specify various bootloader | ||
734 | options. The following are supported 'bootloader' options: | ||
735 | |||
736 | --timeout: Specifies the number of seconds before the | ||
737 | bootloader times out and boots the default option. | ||
738 | |||
739 | --append: Specifies kernel parameters. These will be added to | ||
740 | bootloader command-line - for example, the syslinux | ||
741 | APPEND or grub kernel command line. | ||
742 | |||
743 | Note that bootloader functionality and boot partitions are | ||
744 | implemented by the various --source plugins that implement | ||
745 | bootloader functionality; the bootloader command essentially | ||
746 | provides a means of modifying bootloader configuration. | ||
747 | """ | ||
diff --git a/scripts/wic b/scripts/wic index 5453750703..15cc9b31ef 100755 --- a/scripts/wic +++ b/scripts/wic | |||
@@ -240,18 +240,21 @@ wic_help_topic_usage = """ | |||
240 | """ | 240 | """ |
241 | 241 | ||
242 | subcommands = { | 242 | subcommands = { |
243 | "create": [wic_create_subcommand, | 243 | "create": [wic_create_subcommand, |
244 | wic_create_usage, | 244 | wic_create_usage, |
245 | wic_create_help], | 245 | wic_create_help], |
246 | "list": [wic_list_subcommand, | 246 | "list": [wic_list_subcommand, |
247 | wic_list_usage, | 247 | wic_list_usage, |
248 | wic_list_help], | 248 | wic_list_help], |
249 | "plugins": [wic_help_topic_subcommand, | 249 | "plugins": [wic_help_topic_subcommand, |
250 | wic_help_topic_usage, | 250 | wic_help_topic_usage, |
251 | wic_plugins_help], | 251 | wic_plugins_help], |
252 | "overview": [wic_help_topic_subcommand, | 252 | "overview": [wic_help_topic_subcommand, |
253 | wic_help_topic_usage, | 253 | wic_help_topic_usage, |
254 | wic_overview_help], | 254 | wic_overview_help], |
255 | "kickstart": [wic_help_topic_subcommand, | ||
256 | wic_help_topic_usage, | ||
257 | wic_kickstart_help], | ||
255 | } | 258 | } |
256 | 259 | ||
257 | 260 | ||