<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/image.bbclass, branch uninative-1.3</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>image: add do_image_qa task to run QA checks on the constructed image</title>
<updated>2016-07-20T09:24:56+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-07-14T13:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=c9bef2ecf1a30159d11781184829f41844a58c13'/>
<id>c9bef2ecf1a30159d11781184829f41844a58c13</id>
<content type='text'>
This task runs all functions in IMAGE_QA_COMMANDS after the image
construction has completed in order to validate the resulting image.

Image sanity checks should either be Python functions which raise
bb.build.FuncFailed on failure or shell functions with return a
non-zero exit code.

Python functions may instead raise an oe.utils.ImageQAFailed
Exception which takes an extra argument, a description of the
failure.

   python image_check_python_ok () {
       if True:
           raise bb.build.FuncFailed('This check always fails')
       else:
           bb.note("Nothing to see here")
   }

   image_check_shell_ok () {
       if true
           exit 1
       else
           exit 0
       fi
   }

[YOCTO #9448]

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&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>
This task runs all functions in IMAGE_QA_COMMANDS after the image
construction has completed in order to validate the resulting image.

Image sanity checks should either be Python functions which raise
bb.build.FuncFailed on failure or shell functions with return a
non-zero exit code.

Python functions may instead raise an oe.utils.ImageQAFailed
Exception which takes an extra argument, a description of the
failure.

   python image_check_python_ok () {
       if True:
           raise bb.build.FuncFailed('This check always fails')
       else:
           bb.note("Nothing to see here")
   }

   image_check_shell_ok () {
       if true
           exit 1
       else
           exit 0
       fi
   }

[YOCTO #9448]

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>classes/image: implement progress support for do_rootfs</title>
<updated>2016-07-07T12:29:01+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-06-23T12:06:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=370f08d434480c1790950e40db8f7687da78cb14'/>
<id>370f08d434480c1790950e40db8f7687da78cb14</id>
<content type='text'>
Use the new task progress functionality to report progress during
do_rootfs. This is a little coarse and ideally we would have some
progress within the installation section, but it's better than
nothing.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.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>
Use the new task progress functionality to report progress during
do_rootfs. This is a little coarse and ideally we would have some
progress within the installation section, but it's better than
nothing.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>classes/image: don't chdir when creating symlinks</title>
<updated>2016-06-15T17:09:47+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2016-06-13T19:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=2fdf06fbe986d742f6bb13e9348b50e9aab03139'/>
<id>2fdf06fbe986d742f6bb13e9348b50e9aab03139</id>
<content type='text'>
There's no need to chdir() when creating image symlinks, and using chdir()
changes the state for future tasks.

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>
There's no need to chdir() when creating image symlinks, and using chdir()
changes the state for future tasks.

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>image.bbclass: do exact match for rootfs type</title>
<updated>2016-06-14T11:56:33+00:00</updated>
<author>
<name>Zhenhua Luo</name>
<email>zhenhua.luo@nxp.com</email>
</author>
<published>2016-06-13T11:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=46bc438374de74af76d288520c6252c9b7840767'/>
<id>46bc438374de74af76d288520c6252c9b7840767</id>
<content type='text'>
Do exact match for rootfs type, instead of pattern match, to avoid
unexpected build error due to redundant rootfs type build.

E.g. when building ext2.gz.u-boot, both .gz.u-boot and .u-boot are matched,
the following build error will appear, actually .u-boot is not needed.
| mkimage: Can't open .../core-image-minimal-&lt;machine&gt;-&lt;yyyymmddhhmmss&gt;.rootfs.ext2.gz: No such file or directory

Signed-off-by: Zhenhua Luo &lt;zhenhua.luo@nxp.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>
Do exact match for rootfs type, instead of pattern match, to avoid
unexpected build error due to redundant rootfs type build.

E.g. when building ext2.gz.u-boot, both .gz.u-boot and .u-boot are matched,
the following build error will appear, actually .u-boot is not needed.
| mkimage: Can't open .../core-image-minimal-&lt;machine&gt;-&lt;yyyymmddhhmmss&gt;.rootfs.ext2.gz: No such file or directory

Signed-off-by: Zhenhua Luo &lt;zhenhua.luo@nxp.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image/image_types.bbclass: fix fatal error during cpio debugfs creation</title>
<updated>2016-06-12T22:46:45+00:00</updated>
<author>
<name>André Draszik</name>
<email>adraszik@tycoint.com</email>
</author>
<published>2016-06-10T15:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=659ae1d7df28115429f6f31450fad6d1f86e3031'/>
<id>659ae1d7df28115429f6f31450fad6d1f86e3031</id>
<content type='text'>
If /init is just a symlink to /sbin/init, debugfs creation
fails with the following error:

ERROR: Error: The image creation script '&lt;...&gt;/debugfs.create_image.cpio' returned 1:
touch: cannot touch '&lt;...&gt;/cpio_append/init': Permission denied
WARNING: exit code 1 from a shell command.

ERROR: Function failed: do_rootfs

The reason is that IMAGE_CMD_cpio() is run twice on the same
WORKDIR. The first run creates a symlink in WORKDIR/cpio_append/init
to point to /sbin/init, while the 2nd run then tries to 'touch'
that link, which will fail, of course since /sbin/init is not
usually writable by non-root users.

Fix this by providing knowledge to the IMAGE_CMD_xxx() scripts
with regards to the fact that they are being executed in the
context of debugfs creation. The IMAGE_CMD_cpio() can now be
intelligent in the sense that it can avoid all additional symlink
handling during the debugfs run. The symlinks do not need to
be part of the debugfs, so we can skip that part altogether
in that case.

Signed-off-by: André Draszik &lt;adraszik@tycoint.com&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>
If /init is just a symlink to /sbin/init, debugfs creation
fails with the following error:

ERROR: Error: The image creation script '&lt;...&gt;/debugfs.create_image.cpio' returned 1:
touch: cannot touch '&lt;...&gt;/cpio_append/init': Permission denied
WARNING: exit code 1 from a shell command.

ERROR: Function failed: do_rootfs

The reason is that IMAGE_CMD_cpio() is run twice on the same
WORKDIR. The first run creates a symlink in WORKDIR/cpio_append/init
to point to /sbin/init, while the 2nd run then tries to 'touch'
that link, which will fail, of course since /sbin/init is not
usually writable by non-root users.

Fix this by providing knowledge to the IMAGE_CMD_xxx() scripts
with regards to the fact that they are being executed in the
context of debugfs creation. The IMAGE_CMD_cpio() can now be
intelligent in the sense that it can avoid all additional symlink
handling during the debugfs run. The symlinks do not need to
be part of the debugfs, so we can skip that part altogether
in that case.

Signed-off-by: André Draszik &lt;adraszik@tycoint.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image.bbclass: additional output in create_symlinks</title>
<updated>2016-05-22T15:09:22+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2016-05-18T16:24:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=d2b4da7d21ce5295442bd2d5c760e64cf843aabb'/>
<id>d2b4da7d21ce5295442bd2d5c760e64cf843aabb</id>
<content type='text'>
When a symlink does not get created, it is useful for debugging to log
what would have been created and why it was skipped.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;eduard.bartosh@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&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>
When a symlink does not get created, it is useful for debugging to log
what would have been created and why it was skipped.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;eduard.bartosh@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image.bbclass: support duplicate compression types</title>
<updated>2016-05-22T15:09:22+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2016-05-18T16:24:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=85855af359c2c3bfc1eaa942c95f1f7d7cc6698e'/>
<id>85855af359c2c3bfc1eaa942c95f1f7d7cc6698e</id>
<content type='text'>
When a derived distro adds a certain type, say zip, to
COMPRESSIONTYPES and later OE-core does the same, we end up with the
type being listed twice, and that would have undesired effects
(commands generated twice).

So to support such loosely coupled extension, we de-duplicated the
list of types first.

Alternatively, such a situation could also be treated as error. But that
seems unnecessary because typically commands for the same type will also
do the same thing.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;eduard.bartosh@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&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>
When a derived distro adds a certain type, say zip, to
COMPRESSIONTYPES and later OE-core does the same, we end up with the
type being listed twice, and that would have undesired effects
(commands generated twice).

So to support such loosely coupled extension, we de-duplicated the
list of types first.

Alternatively, such a situation could also be treated as error. But that
seems unnecessary because typically commands for the same type will also
do the same thing.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;eduard.bartosh@intel.com&gt;
Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Fix IMAGE_FEATURES determinism issue</title>
<updated>2016-05-11T09:08:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-09T13:09:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=b08344e28dd33e3af5596007b11185d04fce255e'/>
<id>b08344e28dd33e3af5596007b11185d04fce255e</id>
<content type='text'>
remain_features uses a dict which means the order is not deterministic. This
can lead to the task hash changing depending on the state of the memory at
parse time. This is particularly noticeable under python v3.

Since the dict is helpful in constructing the data, pass the data through
sort() so the order is always deterministic.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
remain_features uses a dict which means the order is not deterministic. This
can lead to the task hash changing depending on the state of the memory at
parse time. This is particularly noticeable under python v3.

Since the dict is helpful in constructing the data, pass the data through
sort() so the order is always deterministic.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image.bbclass: don't execute compression commands multiple times</title>
<updated>2016-04-29T06:53:57+00:00</updated>
<author>
<name>Alexander D. Kanevskiy</name>
<email>kad@kad.name</email>
</author>
<published>2016-04-21T09:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=94f61c2682e5cfd819ac84535650c3e0a654415a'/>
<id>94f61c2682e5cfd819ac84535650c3e0a654415a</id>
<content type='text'>
In case of chained conversion methods are used via COMPRESS_CMD_*
there is chance that some of steps would be executed multiple times.

[YOCTO #9482]

Signed-off-by: Alexander D. Kanevskiy &lt;kad@kad.name&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>
In case of chained conversion methods are used via COMPRESS_CMD_*
there is chance that some of steps would be executed multiple times.

[YOCTO #9482]

Signed-off-by: Alexander D. Kanevskiy &lt;kad@kad.name&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image.bbclass: don't emit redundant IMAGE_CMD_xxx functions</title>
<updated>2016-04-29T06:53:57+00:00</updated>
<author>
<name>Andre McCurdy</name>
<email>armccurdy@gmail.com</email>
</author>
<published>2016-04-15T03:47:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=118c1ca4d8d62162e87caf287f96d90707ee5903'/>
<id>118c1ca4d8d62162e87caf287f96d90707ee5903</id>
<content type='text'>
IMAGE_CMD_xxx commands are always inlined within do_image_xxx.

When IMAGE_CMD_xxx is defined as a function (e.g. IMAGE_CMD_btrfs,
IMAGE_CMD_cpio, etc), a redundant copy of the function will be emitted
by default. Remove IMAGE_CMD_xxx 'func' flags to prevent that.

Signed-off-by: Andre McCurdy &lt;armccurdy@gmail.com&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>
IMAGE_CMD_xxx commands are always inlined within do_image_xxx.

When IMAGE_CMD_xxx is defined as a function (e.g. IMAGE_CMD_btrfs,
IMAGE_CMD_cpio, etc), a redundant copy of the function will be emitted
by default. Remove IMAGE_CMD_xxx 'func' flags to prevent that.

Signed-off-by: Andre McCurdy &lt;armccurdy@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
