summaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/kernel.py
Commit message (Collapse)AuthorAgeFilesLines
* yocto-kernel: make BBLAYERS parsing more robustTom Zanussi2013-07-131-14/+24
| | | | | | | | | | | | | This allows the BBLAYERS parsing code to handle cases where BBLAYERS is spread across multiple assignments or all on a single line, within double or single quotes. Fixes [YOCTO #3746]. (From meta-yocto rev: 4ab26d9e655bab0069ffe9b135557d943cf1f524) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: enforce exact match for BBLAYERSTom Zanussi2013-07-051-1/+2
| | | | | | | | | | | | | | | The current code uses .startswith to find BBLAYERS, which causes false positives when other variables such as BBLAYERS_NON_REMOVABLE exist. This forces an exact match instead of a partial match. Fixes [YOCTO #4743]. (From meta-yocto rev: c039def50ca6c02cb1b66fd4bf76664de42c068e) 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>
* yocto_kernel: modify the msg when adding duplicate itemsNing Zhang2013-06-041-1/+1
| | | | | | | | | | | | | | | | Privious check-in "yocto_kernel: check current items before add a new one" had been merged before I apply the feedback from Zanussi, Tom. Now fix it as a new patch. This fix modify the output message when customer adding duplicate items. [YOCTO #4558] (From meta-yocto rev: 530c6efa85b1798d30db4c6c83a748b100b8c1c3) Signed-off-by: Ning Zhang <ning.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto_kernel: check current items before add a new oneNing Zhang2013-05-301-11/+21
| | | | | | | | | | | | | | | | | When use "yocto-kernel config add" to add the same config many times, all of these are list when use "yocto-kernel config list" to check. This fix modify routine yocto_kernel_config_add, if the new added components already exist in current configuration, just igore them. Now, one config could only be added one time. [YOCTO #4558] (From meta-yocto rev: 655ccc5ed77b52fb62dab5f6cfdf3de39b1bf055) Signed-off-by: Ning Zhang <ning.zhang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: add support for destroying recipe-space kernel featuresTom Zanussi2013-03-171-0/+79
| | | | | | | | | | | | Add a yocto-kernel command allowing users to destroy a recipe-space kernel feature local to a particular BSP. The removed feature is subsequently no longer available for the normal feature addition and removal yocto-kernel commands. (From meta-yocto rev: faa18f56d9412694f2c8e0b0c09e751cb7f3a743) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: add support for creating recipe-space kernel featuresTom Zanussi2013-03-171-1/+102
| | | | | | | | | | | | | Add a yocto-kernel command allowing users to create a recipe-space kernel feature local to a particular BSP. The new feature is subsequently available for the normal feature addition and removal yocto-kernel commands used with features defined in the meta branch of linux-yocto kernel repos. (From meta-yocto rev: 13abcd93b9e1591bc45ff5f9eb17b8feb9ac9ae5) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: add support for printing kernel feature descriptionsTom Zanussi2013-03-171-0/+50
| | | | | | | | | | Add a yocto-kernel command allowing users to print the description and compatibility of a given kernel feature. (From meta-yocto rev: 73b4f1a8d156af6810cdde3af672d6286a7071e7) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: add support for listing available kernel featuresTom Zanussi2013-03-171-0/+107
| | | | | | | | | | | | 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>
* yocto-kernel: add support for kernel feature add/rm/listTom Zanussi2013-03-171-0/+99
| | | | | | | | | | | | | | | | | | | | Add yocto-kernel commands allowing users to add, remove, and list kernel features with respect to a given BSP. Features managed by these commands modify a special machine-user-features.scc file associated with the kernel recipe (.bbappend) of a yocto-bsp-generated BSP. This is analagous to the implementation of similar support for bare config items and patches already implemented for yocto-bsp-generated BSPs. Future patches will add support for providing a list of eligible features as defined by linux-yocto kernels and locally-defined (recipe-space) kernel features. (From meta-yocto rev: ae68d906c5c9854f2cd7ee0870556fbfbd7d94d0) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: qualify user files with machine nameBrian A. Lloyd2013-01-251-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bblayer abstraction makes it where multiple layers can be configured and used at the same time. Some layers make changes to support a specific machine, and should not have any affect when other machines are in use. For linux-yocto, all bsps are created with a user-config.cfg and user-config.cfg and user-patches.scc. This means that those files will be pulled from the first location found, which might correspond to files customized for a different machine. Instead of using the names user-config.cfg and user-patches.scc, I propose a machine specific name be used such as {{=machine}}user-patches.scc and {{=machine}}user-config.cfg. This would necessitate that all references changed to these new names, which would affect the yocto-bsp and yocto-kernel scripts. With this change, it would be possible to have multiple machine BSPs searched at the same time and to select which to build against by using a command like MACHINE=qmeux86 bitbake core-image-sato to override the default. Note many of the standard BSPs do not seem to suffer this problem as they do not use the common files user-config.cfg and user-patches.scc that the yocto-* scripts depend upon. Additions by Tom Zanussi: - renamed user-config.cfg to {{=machine}}-user-config.cfg everywhere - renamed user-patches.scc to {{=machine}}-user-patches.scc everywhere - added the user-config/patches SRC_URI items to the qemu -rt kernel recipes - fixed conflicts due to the new open_user_file() helper function - updated user filename conflicts caused by directory renaming - updated custom kernel files to match Fixes [YOCTO #3731] (From meta-yocto rev: c20bef60aa8d52971fb061d4b8d473ad19c03180) Signed-off-by: Brian A. Lloyd <brian.lloyd@familyhonor.net> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: add support for PRs of the form rN to pr_inc()Tom Zanussi2012-12-131-4/+8
| | | | | | | | | | With the addition of custom kernel support, we also need to handle the normal PR format found in .bb files. (From meta-yocto rev: e17570b6bbd36a731f546f800ef5f271ed5c3697) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: remove patch-related SRC_URI processingTom Zanussi2012-12-131-193/+34
| | | | | | | | | | | | We no longer have to include patches in the SRC_URI, since things now work using only patch in the .scc file, so remove anything to do with maintaining patches in the SRC_URI and fix up all previous users of that code. (From meta-yocto rev: 8f3cd1f80f898d963797bc96b3fe599f7f8ea343) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: handle SRC_URIs in .bb filesTom Zanussi2012-12-131-17/+34
| | | | | | | | | | | Previously we assumed we were always dealing with .bbappends. With custom kernels, we now have SRC_URIs in .bb files, so add .bb files to the list of file types we examine and modify. (From meta-yocto rev: 4200c5c99b7d61e05b0d9d1580e267e7d6d49760) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: remove assumption that kernel has a versionTom Zanussi2012-12-131-0/+2
| | | | | | | | | | Kernels don't need to have a PREFERRED_VERSION, so remove that assumption from the code that looks for the kernel definition. (From meta-yocto rev: 2ea9d54ac5ebd80b5306851d62411960f3293ede) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: don't list comments in config and patch listingsTom Zanussi2012-12-131-2/+2
| | | | | | | | | | | After adding comments to the config and patch templates, I noticed they were displayed as items, which they shouldn't be. This prevents them from being displayed. (From meta-yocto rev: 4cd0bde48cd17468923bba80b88d187014cda1a3) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-kernel: create open_user_file() wrapper functionTom Zanussi2012-12-131-17/+28
| | | | | | | | | | | | | | With the addition of custom kernels, we can no longer rely on a hard-coded /files directory for BSPs - we need to be able to find the user_config/patches files in a number of different directories. We now hide the search inside a new open_user_file() function that accomplishes the same thing as before but with a more flexible scope. (From meta-yocto rev: 26a7032553e8d8691239368f0f994f948db06eed) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: add 'custom' choice to kernels()Tom Zanussi2012-12-131-0/+2
| | | | | | | | | | | Add a synthetic choice for linux-yocto-custom to the list of available kernels. Choosing this will lead the user down the path of options needed to specify a custom kernel. (From meta-yocto rev: 220ad83b5ccc241d7b5b2c3321f2a6a59813e3d6) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Fix git url parsing, allowing for local mirrorsDarren Hart2012-10-241-4/+10
| | | | | | | | | | | | | | | | | | | | | | | The git URLs used in bitbake recipes are not compatible directly with git. In bitbake-speak, all git URLs start with git:// and the protocol is optionally specified in the SRC_URI. Local git mirrors are specified like so: git:///path/to/local/mirror.git;protocol=file The URL that git requires would be: file:///path/to/local/mirror.git Update the yocto-bsp kernel.py to make the necessary adjustment when parsing the SRC_URI to extract the git URL. (From meta-yocto rev: 30506f51cc95f0994cf54144295832e931d15f61) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tom Zanussi <tom.zanussi@intel.com> CC: evadeflow@gmail.com Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: allow branch display filteringTom Zanussi2012-08-251-0/+19
| | | | | | | | | | | Add a "branches_base" property that can be used to allow only matching branches to be returned from all_branches(). (From meta-yocto rev: c3481e22fc4690ff5e449f9c16c2453fa964205d) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.py: replace os.popen with subprocess.PopenRobert Yang2012-06-051-2/+3
| | | | | | | | | | | | Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
* yocto-kernel: use BUILDDIR to find bblayers.confTom Zanussi2012-05-061-1/+6
| | | | | | | | | | | The current code assumes that builddir == srcdir/build, which it obviously isn't sometimes. Use BUILDDIR to get the actual builddir being used. Fixes [YOCTO #2219]. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: enable property value display of nested propertiesTom Zanussi2012-04-141-1/+1
| | | | | | | | | | | Previous versions of yocto-bsp mapped every input element to a unique variable name, which is what the current property value display code expects. When that was changed to a nested form, the display code wasn't updated to match - this updated does that. Fixes [YOCTO #2222] Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
* yocto-bsp: add kernel interfaceTom Zanussi2012-03-221-0/+723
Yocto BSP kernel-related functions, for interacting with the kernel tools and implementing the machinery behind the 'yocto-kernel' command. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>