Commit Graph

24 Commits

Author SHA1 Message Date
Tom Zanussi 104166c804 yocto-kernel: Use variable-substituted BBLAYERS
The current find_bblayers() code finds and parses the BBLAYERS
variable manually, and therefore doesn't handle variable substitution,
which causes problems if used.

This change makes find_bblayers() use the variable-substituted
BBLAYERS instead.

Fixes [YOCTO #5106]

(From meta-yocto rev: 1629ac04e909143dc2c275c256094cb44c6cc43c)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 16:07:46 +01:00
Tom Zanussi 74e403705e yocto-kernel: make BBLAYERS parsing more robust
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>
2013-07-13 18:23:39 +01:00
Tom Zanussi f8c8c7d78a yocto-kernel: enforce exact match for BBLAYERS
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>
2013-07-05 15:40:30 +01:00
Ning Zhang 96edb2002a yocto_kernel: modify the msg when adding duplicate items
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>
2013-06-04 11:47:23 +01:00
Ning Zhang 7285246deb yocto_kernel: check current items before add a new one
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>
2013-05-30 20:59:14 +01:00
Tom Zanussi 8c9320cc92 yocto-kernel: add support for destroying recipe-space kernel features
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>
2013-03-17 23:10:28 +00:00
Tom Zanussi 5edc7af428 yocto-kernel: add support for creating recipe-space kernel features
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>
2013-03-17 23:10:28 +00:00
Tom Zanussi 2518215438 yocto-kernel: add support for printing kernel feature descriptions
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>
2013-03-17 23:10:28 +00:00
Tom Zanussi 934f2ed253 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>
2013-03-17 23:10:28 +00:00
Tom Zanussi 0bfe83edbb yocto-kernel: add support for kernel feature add/rm/list
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>
2013-03-17 23:10:28 +00:00
Brian A. Lloyd ffff37f8f9 yocto-bsp: qualify user files with machine name
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>
2013-01-25 14:12:36 +00:00
Tom Zanussi 0be41d6e30 yocto-kernel: add support for PRs of the form rN to pr_inc()
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>
2012-12-13 16:54:35 +00:00
Tom Zanussi 76b2ef26e7 yocto-bsp: remove patch-related SRC_URI processing
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>
2012-12-13 16:54:34 +00:00
Tom Zanussi 8a1d25cdce yocto-kernel: handle SRC_URIs in .bb files
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>
2012-12-13 16:54:34 +00:00
Tom Zanussi 6c7f426663 yocto-kernel: remove assumption that kernel has a version
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>
2012-12-13 16:54:34 +00:00
Tom Zanussi 5fc9990ef6 yocto-kernel: don't list comments in config and patch listings
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>
2012-12-13 16:54:34 +00:00
Tom Zanussi be93447bef yocto-kernel: create open_user_file() wrapper function
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>
2012-12-13 16:54:33 +00:00
Tom Zanussi 4dc96e3629 yocto-bsp: add 'custom' choice to kernels()
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>
2012-12-13 16:54:32 +00:00
Darren Hart 952b879de5 yocto-bsp: Fix git url parsing, allowing for local mirrors
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>
2012-10-24 12:48:24 +01:00
Tom Zanussi 7be26836ca yocto-bsp: allow branch display filtering
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>
2012-08-25 14:47:02 +01:00
Robert Yang 0efe773c17 kernel.py: replace os.popen with subprocess.Popen
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>
2012-06-05 22:49:19 +01:00
Tom Zanussi c0d92e51a1 yocto-kernel: use BUILDDIR to find bblayers.conf
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>
2012-05-06 10:00:31 +01:00
Tom Zanussi 6f527e23e0 yocto-bsp: enable property value display of nested properties
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>
2012-04-14 22:58:14 +01:00
Tom Zanussi 1e40e8a230 yocto-bsp: add kernel interface
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>
2012-03-22 19:21:15 +00:00