diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2013-03-11 21:25:46 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-17 23:10:28 +0000 |
commit | 934f2ed2539e046f91a234d30fc4da71ffbe28a0 (patch) | |
tree | d23b6fdda5c60c2ac29df1f1a923b6bb93786603 /scripts/yocto-kernel | |
parent | 0bfe83edbb65f94fca8028be0ca20fdfec5ffc81 (diff) | |
download | ast2050-yocto-poky-934f2ed2539e046f91a234d30fc4da71ffbe28a0.zip ast2050-yocto-poky-934f2ed2539e046f91a234d30fc4da71ffbe28a0.tar.gz |
yocto-kernel: add support for listing available kernel features
Add a yocto-kernel command allowing users to list all the kernel
features available to a BSP. This includes the features contained in
linux-yocto meta branches as well as recipe-space features defined
locally to the BSP.
(From meta-yocto rev: 12f3af8d92456ad9212170decdbe102fc78b58f6)
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/yocto-kernel')
-rwxr-xr-x | scripts/yocto-kernel | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/scripts/yocto-kernel b/scripts/yocto-kernel index 72b4071..a66a727 100755 --- a/scripts/yocto-kernel +++ b/scripts/yocto-kernel @@ -221,6 +221,28 @@ def yocto_kernel_feature_rm_subcommand(args, usage_str): yocto_kernel_feature_rm(scripts_path, args[0]) +def yocto_kernel_available_features_list_subcommand(args, usage_str): + """ + Command-line handling for listing all the kernel features + available for use in a BSP. This includes the features present in + the meta branch(es) of the pointed-to repo(s) as well as the local + features added in recipe-space to the current BSP as well. The + real work is done by bsp.kernel.yocto_kernel_available_features_list(). + """ + logging.debug("yocto_kernel_feature_available_features_list_subcommand") + + parser = optparse.OptionParser(usage = usage_str) + + (options, args) = parser.parse_args(args) + + if len(args) != 1: + logging.error("Wrong number of arguments, exiting\n") + parser.print_help() + sys.exit(1) + + yocto_kernel_available_features_list(scripts_path, args[0]) + + subcommands = { "config-list": [yocto_kernel_config_list_subcommand, yocto_kernel_config_list_usage, @@ -249,6 +271,9 @@ subcommands = { "feature-rm": [yocto_kernel_feature_rm_subcommand, yocto_kernel_feature_rm_usage, yocto_kernel_feature_rm_help], + "features-list": [yocto_kernel_available_features_list_subcommand, + yocto_kernel_available_features_list_usage, + yocto_kernel_available_features_list_help], } @@ -281,7 +306,7 @@ def main(): sc = 0 if args[sc] == "config" or args[sc] == "patch" or \ - args[sc] == "feature": + args[sc] == "feature" or args[sc] == "features": if len(args) < 2 + sc: parser.print_help() sys.exit(1) |