summaryrefslogtreecommitdiffstats
path: root/scripts/yocto-kernel
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@intel.com>2013-03-12 02:25:46 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-17 23:10:28 (GMT)
commit934f2ed2539e046f91a234d30fc4da71ffbe28a0 (patch)
treed23b6fdda5c60c2ac29df1f1a923b6bb93786603 /scripts/yocto-kernel
parent0bfe83edbb65f94fca8028be0ca20fdfec5ffc81 (diff)
downloadpoky-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-xscripts/yocto-kernel27
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):
221 yocto_kernel_feature_rm(scripts_path, args[0]) 221 yocto_kernel_feature_rm(scripts_path, args[0])
222 222
223 223
224def yocto_kernel_available_features_list_subcommand(args, usage_str):
225 """
226 Command-line handling for listing all the kernel features
227 available for use in a BSP. This includes the features present in
228 the meta branch(es) of the pointed-to repo(s) as well as the local
229 features added in recipe-space to the current BSP as well. The
230 real work is done by bsp.kernel.yocto_kernel_available_features_list().
231 """
232 logging.debug("yocto_kernel_feature_available_features_list_subcommand")
233
234 parser = optparse.OptionParser(usage = usage_str)
235
236 (options, args) = parser.parse_args(args)
237
238 if len(args) != 1:
239 logging.error("Wrong number of arguments, exiting\n")
240 parser.print_help()
241 sys.exit(1)
242
243 yocto_kernel_available_features_list(scripts_path, args[0])
244
245
224subcommands = { 246subcommands = {
225 "config-list": [yocto_kernel_config_list_subcommand, 247 "config-list": [yocto_kernel_config_list_subcommand,
226 yocto_kernel_config_list_usage, 248 yocto_kernel_config_list_usage,
@@ -249,6 +271,9 @@ subcommands = {
249 "feature-rm": [yocto_kernel_feature_rm_subcommand, 271 "feature-rm": [yocto_kernel_feature_rm_subcommand,
250 yocto_kernel_feature_rm_usage, 272 yocto_kernel_feature_rm_usage,
251 yocto_kernel_feature_rm_help], 273 yocto_kernel_feature_rm_help],
274 "features-list": [yocto_kernel_available_features_list_subcommand,
275 yocto_kernel_available_features_list_usage,
276 yocto_kernel_available_features_list_help],
252} 277}
253 278
254 279
@@ -281,7 +306,7 @@ def main():
281 sc = 0 306 sc = 0
282 307
283 if args[sc] == "config" or args[sc] == "patch" or \ 308 if args[sc] == "config" or args[sc] == "patch" or \
284 args[sc] == "feature": 309 args[sc] == "feature" or args[sc] == "features":
285 if len(args) < 2 + sc: 310 if len(args) < 2 + sc:
286 parser.print_help() 311 parser.print_help()
287 sys.exit(1) 312 sys.exit(1)