<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/kernel-yocto.bbclass, branch thud</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-yocto.bbclass: fix "referenced before assignment" error</title>
<updated>2018-09-27T22:39:28+00:00</updated>
<author>
<name>Max Kellermann</name>
<email>max.kellermann@gmail.com</email>
</author>
<published>2018-09-24T08:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=9602c03e8701c972f544001415efa92877622f57'/>
<id>9602c03e8701c972f544001415efa92877622f57</id>
<content type='text'>
If "scc --configs" fails, do_kernel_configcheck() crashes like this:

      0338:    try:
      0339:        configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
      0340:    except subprocess.CalledProcessError:
  *** 0341:        bb.fatal( "Cannot gather config fragments for audit: %s" % configs)
      0342:
      0343:    try:
      0344:        subprocess.check_call(['kconf_check', '--report', '-o',
      0345:                '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
 Exception: UnboundLocalError: local variable 'configs' referenced before assignment

This crash bug was introduced by commit
21de5cc43cfedc703e5bc0515507a6dae36afb74

Signed-off-by: Max Kellermann &lt;max.kellermann@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>
If "scc --configs" fails, do_kernel_configcheck() crashes like this:

      0338:    try:
      0339:        configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
      0340:    except subprocess.CalledProcessError:
  *** 0341:        bb.fatal( "Cannot gather config fragments for audit: %s" % configs)
      0342:
      0343:    try:
      0344:        subprocess.check_call(['kconf_check', '--report', '-o',
      0345:                '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
 Exception: UnboundLocalError: local variable 'configs' referenced before assignment

This crash bug was introduced by commit
21de5cc43cfedc703e5bc0515507a6dae36afb74

Signed-off-by: Max Kellermann &lt;max.kellermann@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: restore BSP audit visibility</title>
<updated>2018-08-28T09:27:15+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2018-08-24T14:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=4933b686b0f75d6841630917a2d90832df41cac7'/>
<id>4933b686b0f75d6841630917a2d90832df41cac7</id>
<content type='text'>
During the re-working of kernel fragments and status output cleanup the
visibility for BSP level errors was dropped/removed.

The audit phase can detect errors, redefinition and invalid
configuration fragments. We control the visibility of these reports via
the existing KCONF_BSP_AUDIT_LEVEL variable.

By default, errors and invalid configuration values will be displayed as
a warning. If redefinition values are to be shown the audit level must
be raised above the deafult value of '2'. We inhibit these by default,
since there are many valid reasons why a BSP will change a default /
base config .. and showing them offers no value to the BSP user.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
During the re-working of kernel fragments and status output cleanup the
visibility for BSP level errors was dropped/removed.

The audit phase can detect errors, redefinition and invalid
configuration fragments. We control the visibility of these reports via
the existing KCONF_BSP_AUDIT_LEVEL variable.

By default, errors and invalid configuration values will be displayed as
a warning. If redefinition values are to be shown the audit level must
be raised above the deafult value of '2'. We inhibit these by default,
since there are many valid reasons why a BSP will change a default /
base config .. and showing them offers no value to the BSP user.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>classes/kernel-yocto: Cleanup getstatusoutput usage</title>
<updated>2018-08-28T09:27:15+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-08-24T14:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=21de5cc43cfedc703e5bc0515507a6dae36afb74'/>
<id>21de5cc43cfedc703e5bc0515507a6dae36afb74</id>
<content type='text'>
Replace usage of os.utils.getstatusoutput() with direct subprocess
calls. Pass a modified environment and working directory where necessary
to bypass the need to execute in a shell.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
Replace usage of os.utils.getstatusoutput() with direct subprocess
calls. Pass a modified environment and working directory where necessary
to bypass the need to execute in a shell.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directives</title>
<updated>2018-08-14T10:36:22+00:00</updated>
<author>
<name>Jaewon Lee</name>
<email>jaewon.lee@xilinx.com</email>
</author>
<published>2018-07-30T21:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=4eceae7e3e6dab935e2cf49b75148139192fc6e7'/>
<id>4eceae7e3e6dab935e2cf49b75148139192fc6e7</id>
<content type='text'>
The devtool-source class moves all local files specified in SRC_URI to
an oe-local-files directory. When using devtool and a recipe space kernel-meta,
devtool modify throws an error because the paths the kernel-yocto class
is looking for feature directories in, don't include the oe-local-files
directory which devtool is using.

This patch checks for feature directories in oe-local-files,
and if present, adds that path to include directives.

[YOCTO #12855]

Signed-off-by: Jaewon Lee &lt;jaewon.lee@xilinx.com&gt;
Signed-off-by: Alejandro Enedino Hernandez Samaniego &lt;alejandr@xilinx.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>
The devtool-source class moves all local files specified in SRC_URI to
an oe-local-files directory. When using devtool and a recipe space kernel-meta,
devtool modify throws an error because the paths the kernel-yocto class
is looking for feature directories in, don't include the oe-local-files
directory which devtool is using.

This patch checks for feature directories in oe-local-files,
and if present, adds that path to include directives.

[YOCTO #12855]

Signed-off-by: Jaewon Lee &lt;jaewon.lee@xilinx.com&gt;
Signed-off-by: Alejandro Enedino Hernandez Samaniego &lt;alejandr@xilinx.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: specify dependencies for compilation for config tasks</title>
<updated>2018-06-08T10:11:22+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2018-06-07T02:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=ff1bdd75d50f0ebac3d599e461685ace29559a82'/>
<id>ff1bdd75d50f0ebac3d599e461685ace29559a82</id>
<content type='text'>
With recent kernels (i.e. 4.17+) the configuration phase of the kernel
will check for capabilities/options of the compiler for CVE and other
mitigation support.

For a general kernel, we want to ensure that CC is fully defined when
the config targets are invoked (so the proper compiler will be checked).

For linux-yocto, we also need to specify the compiler/tools dependencies
for the configme task since it executes before configure and hence the
main kernel build DEPENDS will not always be in the sysroot before it
executes. Without those dependencies the kernel will be incorrectly
configured (i.e. bison is missing) or the configuration will fail the
mitigation tests.

[YOCTO #12757]

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
With recent kernels (i.e. 4.17+) the configuration phase of the kernel
will check for capabilities/options of the compiler for CVE and other
mitigation support.

For a general kernel, we want to ensure that CC is fully defined when
the config targets are invoked (so the proper compiler will be checked).

For linux-yocto, we also need to specify the compiler/tools dependencies
for the configme task since it executes before configure and hence the
main kernel build DEPENDS will not always be in the sysroot before it
executes. Without those dependencies the kernel will be incorrectly
configured (i.e. bison is missing) or the configuration will fail the
mitigation tests.

[YOCTO #12757]

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: check git config during checkout</title>
<updated>2018-03-03T17:08:29+00:00</updated>
<author>
<name>Justin Bronder</name>
<email>jsbronder@cold-front.org</email>
</author>
<published>2018-02-09T21:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=0e3a9bed988b5fd4de770fe8cd1160b9f6c8c365'/>
<id>0e3a9bed988b5fd4de770fe8cd1160b9f6c8c365</id>
<content type='text'>
Initialize the git config prior creating a git repository in a plain
directory.

Signed-off-by: Justin Bronder &lt;jsbronder@cold-front.org&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initialize the git config prior creating a git repository in a plain
directory.

Signed-off-by: Justin Bronder &lt;jsbronder@cold-front.org&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: make SRC_URI defconfig removal more specific</title>
<updated>2018-01-26T23:15:47+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2018-01-23T19:44:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=fd2678190db6575dc909104b60c284d0c41f605f'/>
<id>fd2678190db6575dc909104b60c284d0c41f605f</id>
<content type='text'>
commit 7e98c295c1bb511e [kernel-yocto: ensure that only a single
defconfig is processed] has an overly broad replacement strategy
for 'defconfig' and hence will chop up any fragment name that
happens to contain that string.

If we change the processing to split on whitespace and drop
any full work 'defconfig' fragments, we'll get the behaviour
we want (no duplicate defconfigs, but fragments with defconfig
in their name are fine).

[YOCTO #12487]

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7e98c295c1bb511e [kernel-yocto: ensure that only a single
defconfig is processed] has an overly broad replacement strategy
for 'defconfig' and hence will chop up any fragment name that
happens to contain that string.

If we change the processing to split on whitespace and drop
any full work 'defconfig' fragments, we'll get the behaviour
we want (no duplicate defconfigs, but fragments with defconfig
in their name are fine).

[YOCTO #12487]

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: ensure that only a single defconfig is processed</title>
<updated>2017-12-10T22:41:44+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2017-12-04T15:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=7e98c295c1bb511ece51b5f8c97f26c173ddaf76'/>
<id>7e98c295c1bb511ece51b5f8c97f26c173ddaf76</id>
<content type='text'>
As a follow up to the changes to ensure that KBUILD_DEFCONFIG will
always get its defconfig into the processing, we also should ensure that
we don't get both a KBUILD_DEFCONFIG and a SRC_URI defconfig in the
configuration queue. If both are in the configuration queue, we end up
with competing values and a potentially long running check of 5000+
options x 2 against the final .config.

By removing the defconfig found from the SRC_URI when one is found
via KBUILD_DEFCONFIG, we ensure that only one will be processed.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
As a follow up to the changes to ensure that KBUILD_DEFCONFIG will
always get its defconfig into the processing, we also should ensure that
we don't get both a KBUILD_DEFCONFIG and a SRC_URI defconfig in the
configuration queue. If both are in the configuration queue, we end up
with competing values and a potentially long running check of 5000+
options x 2 against the final .config.

By removing the defconfig found from the SRC_URI when one is found
via KBUILD_DEFCONFIG, we ensure that only one will be processed.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: Stop the build if defconfig is missing</title>
<updated>2017-12-10T22:41:44+00:00</updated>
<author>
<name>Saul Wold</name>
<email>sgw@linux.intel.com</email>
</author>
<published>2017-12-04T15:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=44ff06635e7f575e67b7ebba5d6900b8ddbc4a06'/>
<id>44ff06635e7f575e67b7ebba5d6900b8ddbc4a06</id>
<content type='text'>
The bberror does not stop the build correctly, this should be a
bbfatal_log to ensure the failure correctly stops the build and logs
the failure.

Part of
[YOCTO #12162]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
The bberror does not stop the build correctly, this should be a
bbfatal_log to ensure the failure correctly stops the build and logs
the failure.

Part of
[YOCTO #12162]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-yocto: ensure sccs variable is set when using KBUILD_DEFCONFIG</title>
<updated>2017-12-10T22:41:44+00:00</updated>
<author>
<name>Saul Wold</name>
<email>sgw@linux.intel.com</email>
</author>
<published>2017-12-04T15:39:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=b63cc051f1eb58c768f49db2c04843336e62d3df'/>
<id>b63cc051f1eb58c768f49db2c04843336e62d3df</id>
<content type='text'>
When using KBUILD_DEFCONFIG, $sccs should be set to the $WORKDIR/defconfig
regardless if it compares or is copied. Otherwise $sccs is not set and the
defconfig is not found correctly.

Part of
[YOCTO #12162]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.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>
When using KBUILD_DEFCONFIG, $sccs should be set to the $WORKDIR/defconfig
regardless if it compares or is copied. Otherwise $sccs is not set and the
defconfig is not found correctly.

Part of
[YOCTO #12162]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
