<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/kernel-module-split.bbclass, branch fido</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>kernel-module-split.bbclass: Avoid bogus recommends for modules ending with -dev</title>
<updated>2015-03-24T17:52:40+00:00</updated>
<author>
<name>Andreas Oberritter</name>
<email>obi@opendreambox.org</email>
</author>
<published>2015-03-23T15:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=dc20323cfe6f3f5a880dfeb02e9463ffa3db1ad9'/>
<id>dc20323cfe6f3f5a880dfeb02e9463ffa3db1ad9</id>
<content type='text'>
Example: lirc-dev.ko -&gt; kernel-module-lirc-dev

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Example: lirc-dev.ko -&gt; kernel-module-lirc-dev

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split.bbclass: fix autoloading from postinst script</title>
<updated>2015-03-24T10:08:48+00:00</updated>
<author>
<name>Andreas Oberritter</name>
<email>obi@opendreambox.org</email>
</author>
<published>2015-03-23T15:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=2e3768075878b8fc0f7642cae89ab7b9d03fe52c'/>
<id>2e3768075878b8fc0f7642cae89ab7b9d03fe52c</id>
<content type='text'>
When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
"modprobe None" to get appended to the postinst script.

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using KERNEL_MODULE_AUTOLOAD, autoload was empty, causing
"modprobe None" to get appended to the postinst script.

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/image/depmodwrapper: Fixups for depmod</title>
<updated>2015-01-23T14:31:56+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2015-01-20T13:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=b851504dcf5e147c9efb1c7b6a4d22c1a1a87cd7'/>
<id>b851504dcf5e147c9efb1c7b6a4d22c1a1a87cd7</id>
<content type='text'>
With the rpm package backend enabled, running:

bitbake &lt;image&gt;
bitbake virtual/kernel -c clean
bitbake &lt;image&gt; -c rootfs -f

results in an image with incorrect kernel module dependency information.
The problem is that the System.map and kernel-abiversion files are needed
for depmod and after the recent kernel changes, these are no longer in
sstate.

Its reasonable to require the kernel to unpack/build if you're
about to build a module against it. It is not reasonable to require this
just to build a rootfs.

Therefore stash the needed files specifically for depmod.

Also fix some STAGING_KERNEL_DIR references which were incorrect, found
whilst sorting through his change.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the rpm package backend enabled, running:

bitbake &lt;image&gt;
bitbake virtual/kernel -c clean
bitbake &lt;image&gt; -c rootfs -f

results in an image with incorrect kernel module dependency information.
The problem is that the System.map and kernel-abiversion files are needed
for depmod and after the recent kernel changes, these are no longer in
sstate.

Its reasonable to require the kernel to unpack/build if you're
about to build a module against it. It is not reasonable to require this
just to build a rootfs.

Therefore stash the needed files specifically for depmod.

Also fix some STAGING_KERNEL_DIR references which were incorrect, found
whilst sorting through his change.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: move source and build output to work-shared</title>
<updated>2015-01-16T09:13:02+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2015-01-15T11:54:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=6a1ff0e7eacef595738f2fed086986fd622ec32a'/>
<id>6a1ff0e7eacef595738f2fed086986fd622ec32a</id>
<content type='text'>
commit 3b3f7e785e279 [kernel: Rearrange for 1.8] began the process of
moving the kernel source and build artefacts out of sstate control and
into a shared location.

This changed triggered some workflow issues, as well as bugs related
to the kernel source containing build output, and hence being dirty and
breaking kernel rebuilds.

To solve these issues, and to make it clear that the kernel is not under
sstate control, we move the source and build outputs to:

  work-shared/MACHINE/kernel-source
  work-shared/MACHINE/kernel-build-artifacts

Where kernel-build-artifacts is the kernel build output and
kernel-source is kept "pristine". The build-artifacts contain everything
that is required to build external modules against the kernel source,
and includes the defconfig, the kernel-abiversion, System.map files and
output from "make scripts".

External module builds should either pass O= on the command line, or
set KBUILD_OUTPUT to point to the build-artifacts. module-base.bbclass
takes care of setting KBUILD_OUTPUT, so most existing external module
recipes are transparently adapted to the new source/build layout.

recipes that depend on the kernel source must have a depedency on the
do_shared_workdir task:

 do_configure[depends] += "virtual/kernel:do_shared_workdir"

With this dependency added, the STAGING_KERNEL_DIR will be populated and
available to the rest of the build.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3b3f7e785e279 [kernel: Rearrange for 1.8] began the process of
moving the kernel source and build artefacts out of sstate control and
into a shared location.

This changed triggered some workflow issues, as well as bugs related
to the kernel source containing build output, and hence being dirty and
breaking kernel rebuilds.

To solve these issues, and to make it clear that the kernel is not under
sstate control, we move the source and build outputs to:

  work-shared/MACHINE/kernel-source
  work-shared/MACHINE/kernel-build-artifacts

Where kernel-build-artifacts is the kernel build output and
kernel-source is kept "pristine". The build-artifacts contain everything
that is required to build external modules against the kernel source,
and includes the defconfig, the kernel-abiversion, System.map files and
output from "make scripts".

External module builds should either pass O= on the command line, or
set KBUILD_OUTPUT to point to the build-artifacts. module-base.bbclass
takes care of setting KBUILD_OUTPUT, so most existing external module
recipes are transparently adapted to the new source/build layout.

recipes that depend on the kernel source must have a depedency on the
do_shared_workdir task:

 do_configure[depends] += "virtual/kernel:do_shared_workdir"

With this dependency added, the STAGING_KERNEL_DIR will be populated and
available to the rest of the build.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split.bbclass: Allow autoloading multiple modules or modules where basename != module name</title>
<updated>2014-07-23T20:44:22+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2014-07-21T21:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=e9cd8ba3dda624615b68c601eac04427d9483f14'/>
<id>e9cd8ba3dda624615b68c601eac04427d9483f14</id>
<content type='text'>
* new KERNEL_MODULE_AUTOLOAD syntax doesn't support modules where basename and
  module name don't match (usually - and _), e.g.:

  module_autoload_bq27x00_battery = "bq27x00-battery"

* sometimes it's useful to load modules in particular order and
  module_autoload allowed to just list multiple modules, e.g.:

  module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-s3c24xx snd_soc_s3c24xx_i2s snd-soc-dfbmcs320 snd-soc-wm8753 snd-soc-neo1973-wm8753"
  or
  module_autoload_g_ether = "s3c2410_udc g_ether"

  restore this possibility which is useful for incorrect dependencies
  between modules

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* new KERNEL_MODULE_AUTOLOAD syntax doesn't support modules where basename and
  module name don't match (usually - and _), e.g.:

  module_autoload_bq27x00_battery = "bq27x00-battery"

* sometimes it's useful to load modules in particular order and
  module_autoload allowed to just list multiple modules, e.g.:

  module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-s3c24xx snd_soc_s3c24xx_i2s snd-soc-dfbmcs320 snd-soc-wm8753 snd-soc-neo1973-wm8753"
  or
  module_autoload_g_ether = "s3c2410_udc g_ether"

  restore this possibility which is useful for incorrect dependencies
  between modules

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split: Fix KERNEL_MODULE_AUTOLOAD handling</title>
<updated>2014-06-18T09:39:41+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-06-18T09:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=f30d12b4fbfe7d6b581598efa9ceca69dcfb4294'/>
<id>f30d12b4fbfe7d6b581598efa9ceca69dcfb4294</id>
<content type='text'>
Addresses the problem:

The stack trace of python calls that resulted in this exception/failure was:
File: 'split_kernel_module_packages', lineno: 164, function: &lt;module&gt;
     0160:        if len(os.listdir(dir)) == 0:
     0161:            os.rmdir(dir)
     0162:
     0163:
 *** 0164:split_kernel_module_packages(d)
     0165:
File: 'split_kernel_module_packages', lineno: 150, function: split_kernel_module_packages
     0146:     0147:    postinst = d.getVar('pkg_postinst_modules', True)
     0148:    postrm = d.getVar('pkg_postrm_modules', True)
     0149:
 *** 0150:    modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
     0151:    if modules:
     0152:        metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE', True)
     0153:        d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
     0154:
File: 'package.bbclass', lineno: 148, function: do_split_packages
     0144:                d.setVar('pkg_postrm_' + pkg, postrm)
     0145:        else:
     0146:            d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
     0147:        if callable(hook):
 *** 0148:            hook(f, pkg, file_regex, output_pattern, m.group(1))
     0149:
     0150:    d.setVar('PACKAGES', ' '.join(packages))
     0151:    return split_packages
     0152:
File: 'split_kernel_module_packages', lineno: 109, function: frob_metadata
File "split_kernel_module_packages", line 109, in frob_metadata

Exception: AttributeError: 'NoneType' object has no attribute 'split'

ERROR: Function failed: split_kernel_module_packages

[YOCTO #6461]

[a revised version of a patch from Nitin Kamble]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addresses the problem:

The stack trace of python calls that resulted in this exception/failure was:
File: 'split_kernel_module_packages', lineno: 164, function: &lt;module&gt;
     0160:        if len(os.listdir(dir)) == 0:
     0161:            os.rmdir(dir)
     0162:
     0163:
 *** 0164:split_kernel_module_packages(d)
     0165:
File: 'split_kernel_module_packages', lineno: 150, function: split_kernel_module_packages
     0146:     0147:    postinst = d.getVar('pkg_postinst_modules', True)
     0148:    postrm = d.getVar('pkg_postrm_modules', True)
     0149:
 *** 0150:    modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
     0151:    if modules:
     0152:        metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE', True)
     0153:        d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
     0154:
File: 'package.bbclass', lineno: 148, function: do_split_packages
     0144:                d.setVar('pkg_postrm_' + pkg, postrm)
     0145:        else:
     0146:            d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
     0147:        if callable(hook):
 *** 0148:            hook(f, pkg, file_regex, output_pattern, m.group(1))
     0149:
     0150:    d.setVar('PACKAGES', ' '.join(packages))
     0151:    return split_packages
     0152:
File: 'split_kernel_module_packages', lineno: 109, function: frob_metadata
File "split_kernel_module_packages", line 109, in frob_metadata

Exception: AttributeError: 'NoneType' object has no attribute 'split'

ERROR: Function failed: split_kernel_module_packages

[YOCTO #6461]

[a revised version of a patch from Nitin Kamble]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split: Add support for KERNEL_MODULE_AUTOLOAD and KERNEL_MODULE_PROBECONF</title>
<updated>2014-06-16T14:30:49+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-06-13T15:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=6f8b5be646be0f3e15e215907547f11d2a23d81b'/>
<id>6f8b5be646be0f3e15e215907547f11d2a23d81b</id>
<content type='text'>
The current module_autoload_* and module_conf_* variables are error
both ugly and error prone. They aren't registered in the task checksums
so changes to them aren't reflected in the build. This turns out to
be near impossible to fix with the current variable format in any
sensible way :(.

This patch replace module_autoload with the list of variables in
KERNEL_MODULE_AUTOLOAD which is a much simpler and usable API. An
error is printed if an old style variable is encountered. It should
be simple to convert to this.

module_conf_* are harder to deal with since there is data associated
with it, it isn't simply a flag. We need a list of variables that are set
in order to be able to correctly handle the task checksum so we add
KERNEL_MODULE_PROBECONF for this purpose and error if the user hasn't
added a module to it when they should have.

[YOCTO #5786]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current module_autoload_* and module_conf_* variables are error
both ugly and error prone. They aren't registered in the task checksums
so changes to them aren't reflected in the build. This turns out to
be near impossible to fix with the current variable format in any
sensible way :(.

This patch replace module_autoload with the list of variables in
KERNEL_MODULE_AUTOLOAD which is a much simpler and usable API. An
error is printed if an old style variable is encountered. It should
be simple to convert to this.

module_conf_* are harder to deal with since there is data associated
with it, it isn't simply a flag. We need a list of variables that are set
in order to be able to correctly handle the task checksum so we add
KERNEL_MODULE_PROBECONF for this purpose and error if the user hasn't
added a module to it when they should have.

[YOCTO #5786]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split: Remove extraneous call to depmod from module postinst</title>
<updated>2014-01-10T15:13:47+00:00</updated>
<author>
<name>Phil Blundell</name>
<email>pb@pbcl.net</email>
</author>
<published>2014-01-10T12:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=e8db81e4655ab7535db04aa3c8d7f9868ced6039'/>
<id>e8db81e4655ab7535db04aa3c8d7f9868ced6039</id>
<content type='text'>
During rootfs construction, image.bbclass will call depmod after all the
modules are installed.  There's no need to run it from the postinst when
operating in offline root mode.

Signed-off-by: Phil Blundell &lt;pb@pbcl.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During rootfs construction, image.bbclass will call depmod after all the
modules are installed.  There's no need to run it from the postinst when
operating in offline root mode.

Signed-off-by: Phil Blundell &lt;pb@pbcl.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image/kernel-module-split/eglibc-ld.inc: Remove has_key() usage</title>
<updated>2013-05-09T13:04:19+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-05-07T12:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=3dff13793e875ff58cc38c4a960caca9b6969843'/>
<id>3dff13793e875ff58cc38c4a960caca9b6969843</id>
<content type='text'>
The has_key() attribute has been removed in python 3 since there is better
syntax available. Use the improved syntax.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The has_key() attribute has been removed in python 3 since there is better
syntax available. Use the improved syntax.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-module-split: append space to RDEPENDS</title>
<updated>2013-03-07T11:13:09+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2013-03-06T00:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=5ff26f61b6860e56c255b2b6a2b0215be75b1db9'/>
<id>5ff26f61b6860e56c255b2b6a2b0215be75b1db9</id>
<content type='text'>
* it was generating invalid RDEPENDS when KERNEL_MODULES_META_PACKAGE had
  RDEPENDS set already without trailing space

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* it was generating invalid RDEPENDS when KERNEL_MODULES_META_PACKAGE had
  RDEPENDS set already without trailing space

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
