<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/devtool, branch yocto-5.0.6</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0.6</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0.6'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-07-09T13:02:55+00:00</updated>
<entry>
<title>devtool: ide-sdk: correct help typo</title>
<updated>2024-07-09T13:02:55+00:00</updated>
<author>
<name>Antonin Godard</name>
<email>antoningodard@pm.me</email>
</author>
<published>2024-05-06T00:43:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8cd04cd9a0b78e5dc3383b8d85d729785b211be9'/>
<id>urn:sha1:8cd04cd9a0b78e5dc3383b8d85d729785b211be9</id>
<content type='text'>
(From OE-Core rev: 149f79c877f476eabafc667629f89af335fcae34)

Signed-off-by: Antonin Godard &lt;antoningodard@pm.me&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 50e043387a2f0f9a5c2f7a5f914c465c830d329b)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>devtool: sync: Fix Execution error</title>
<updated>2024-06-19T15:34:58+00:00</updated>
<author>
<name>Vincent Kriek</name>
<email>vincent@coelebs.dev</email>
</author>
<published>2024-04-14T18:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=99d16e4c35ba622707e1fddeda53a3a233c2b301'/>
<id>urn:sha1:99d16e4c35ba622707e1fddeda53a3a233c2b301</id>
<content type='text'>
When executing devtool sync on a recipe that was extract with devtool
extract earlier the following error occured:

    Traceback (most recent call last):
    [...]
    bb.process.ExecutionError: Execution of 'git fetch file:///home/vin/projects/poky/build/tmp/work/all-poky-linux/netbase/6.4/devtooltmp-figt1jmr/workdir/netbase devtool:devtool' failed with exit code 128:
    fatal: refusing to fetch into branch 'refs/heads/devtool' checked out at '/home/vin/projects/poky/build/netbase-src'

Fix this by adding --update-head-ok and --force to git fetch so it will
override the current head even if it is checked out and has changes.
Possible existing changes in the devtool branch can be retrieved by
checking out the devtool.bak branch

(From OE-Core rev: ee712c8b3c32fedd6af0521d2e34ea655f8cd5ca)

Signed-off-by: Vincent Kriek &lt;vincent@coelebs.dev&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
(cherry picked from commit 4c89b061003a0f4143c6d3838e39fc2643edc8d6)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>devtool: modify: Catch git submodule error for go code</title>
<updated>2024-06-19T15:34:58+00:00</updated>
<author>
<name>Anton Almqvist</name>
<email>antonal@axis.com</email>
</author>
<published>2024-06-12T02:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=10e6cc830c75a2fd30f7b0efef84cdf614198cfa'/>
<id>urn:sha1:10e6cc830c75a2fd30f7b0efef84cdf614198cfa</id>
<content type='text'>
One of the git submodule commands failed for source extracted for
recipes using go.bbclass.  The root cause is probably the path set up
by go_do_unpack which makes S and gitroot not match.

This patch does not fix the root problem, but at least it is no worse
than before the git submodule support.

The extracted source will still have two .git folders, one in S
created by devtool and one in the go path which will contain the tru
git history.

[ YOCTO #15483 ]

(From OE-Core rev: 1dc639353658496db5c5df802c0259e87fe2ca0f)

Signed-off-by: Anton Almqvist &lt;antonal@axis.com&gt;
Signed-off-by: Ola x Nilsson &lt;olani@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit fe242408af40dd1f6e47d9b2b232bdc76756c80a)
Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>devtool: standard: update-recipe/finish: fix update localfile in another layer</title>
<updated>2024-06-05T12:57:12+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2024-05-15T18:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d00c23ef3e8b868a6f6ce3a22ed95e25fd6187b5'/>
<id>urn:sha1:d00c23ef3e8b868a6f6ce3a22ed95e25fd6187b5</id>
<content type='text'>
When trying to use devtool update-recipe/finish on another layer, with modified
local file we have the following error:

  Traceback (most recent call last):
    File "&lt;..&gt;/poky/scripts/devtool", line 350, in &lt;module&gt;
      ret = main()
            ^^^^^^
    File "&lt;..&gt;/poky/scripts/devtool", line 337, in main
      ret = args.func(args, config, basepath, workspace)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "&lt;..&gt;/poky/scripts/lib/devtool/standard.py", line 1968, in update_recipe
      updated, _, _ = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "&lt;..&gt;/poky/scripts/lib/devtool/standard.py", line 1930, in _update_recipe
      updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir, force_patch_refresh)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "&lt;..&gt;/poky/scripts/lib/devtool/standard.py", line 1747, in _update_recipe_patch
      patchdir = param.get('patchdir', ".")
                 ^^^^^^^^^
  AttributeError: 'str' object has no attribute 'get'

This was introduced when adding support for git submodules.
No selftest case exists to catch this, so a selftest will be
added in another commit.

(From OE-Core rev: de7ca9f800e15e10271502da7e51e3ae08e0c85b)

(From OE-Core rev: b4fb19df1746d04c9534feff58a9e534705d46df)

Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Jeff Harris &lt;jefftharris@gmail.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>devtool: standard: throws appropriate error if source is in detached HEAD</title>
<updated>2024-04-12T16:27:53+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2024-04-10T07:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=834e91ce53511b564b8752fe8f4b9fa1ab22ec72'/>
<id>urn:sha1:834e91ce53511b564b8752fe8f4b9fa1ab22ec72</id>
<content type='text'>
If source is in detached HEAD, we get the following error when using
detvool finish command:

    [...]
    File "&lt;...&gt;/poky/scripts/lib/devtool/standard.py", line 1938, in _update_recipe
      bb.process.run('git checkout %s' % startbranch, cwd=srctree)
    File "&lt;...&gt;/poky/bitbake/lib/bb/process.py", line 189, in run
      raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
  bb.process.ExecutionError: Execution of 'git checkout (HEAD detached at 9bbf87e)' failed with exit code 2:
  /bin/sh: -c: line 1: syntax error near unexpected token `('
  /bin/sh: -c: line 1: `git checkout (HEAD detached at 9bbf87e)'

Check this and throws an appropriate error in this case

(From OE-Core rev: d9c686b5ff9f591ec6b928ed539084c02df4c8a5)

Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: ide-sdk prefer sources from workspace</title>
<updated>2024-02-27T11:38:46+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2024-02-25T20:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c82c57621be1447ff2bceb89f232de05b2b6f3a3'/>
<id>urn:sha1:c82c57621be1447ff2bceb89f232de05b2b6f3a3</id>
<content type='text'>
Improve the previous commit:
- log an error if some assumptions are not true
- Use TARGET_DBGSRC_DIR variable
- Do the same for ide none

Why the additional source mapping is required:

For example the cmake-example recipe refers to sources like this:
./recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-readelf \
  -wi image/usr/bin/cmake-example | grep -B1 DW_AT_comp_dir
    ...
    &lt;560&gt;   DW_AT_name        : (indirect line string, offset: 0x1da):
    /usr/src/debug/cmake-example/1.0/oe-local-files/cpp-example.cpp
    ...

Another example is powertop:
./recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-readelf \
  -wi image/usr/sbin/powertop | grep -B1 DW_AT_comp_dir
    ...
    &lt;561&gt;   DW_AT_name        : (indirect line string, offset: 0x1da):
    /usr/src/debug/powertop/2.15/src/devlist.cpp
    ...

For recipes with local files this works. The oe-local-files folder is
not available in the rootfs-dbg and therefore the sources are first
found in the workspace folder. GDB searches for source files in various
places:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Source-Path.html
However, for the powertop example the sources opened in the editor are
from the rootfs-dbg instead of from the workspace.

Bitbake calls the compiler with
  -fmacro-prefix-map=${S}=${TARGET_DBGSRC_DIR}
where TARGET_DBGSRC_DIR defaults to "/usr/src/debug/${PN}/${PV}".

A source map which maps the recipe specific path from TARGET_DBGSRC_DIR
to the workspace fixes this.
The already existing source map for /usr/src/debug applies for all other
recipes. It finds the sources (read only) in the rootfs-dbg folder.

(From OE-Core rev: 06601632c1879cb80276f9b36de91fb7808311a5)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: ide-sdk source mapping for vscode</title>
<updated>2024-02-27T11:38:46+00:00</updated>
<author>
<name>Enguerrand de Ribaucourt</name>
<email>enguerrand.de-ribaucourt@savoirfairelinux.com</email>
</author>
<published>2024-02-25T20:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a5b75e29ff1163f433a707506161943289e98d6c'/>
<id>urn:sha1:a5b75e29ff1163f433a707506161943289e98d6c</id>
<content type='text'>
When launching the debug configuration, the source files from the debug
rootfs were openened in the editor instead of the local workspace files.
We add an exception to properly map them to the file being developed and
compiled by the IDE integration. This also more closely matches what the
user would expect compared to native development.

This is also true for the devtool fallback mode.

(From OE-Core rev: 24db2b8d0d7104960c1cdb2c7ee5216c830a6754)

Signed-off-by: Enguerrand de Ribaucourt &lt;enguerrand.de-ribaucourt@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: ide-sdk launch.json per recipe only</title>
<updated>2024-02-27T11:38:46+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2024-02-25T20:47:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4c6f3bbc773f10bbfc9c45a7468c0f18d384ac16'/>
<id>urn:sha1:4c6f3bbc773f10bbfc9c45a7468c0f18d384ac16</id>
<content type='text'>
If multiple recipes are processed at once, the launch.json and the
tasks.json of the second recipe contains also the configurations for the
binaries of the first recipe.

Example:
  devtool ide-sdk powertop cmake-example oe-selftest-image
generated a launch and a tasks configuration for the cmake-example
recipe which also offers debugging the powertop binary.

(From OE-Core rev: 63986b2c40d90fe96cdc6a46aa649efcf17f6ac2)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: ide-sdk python 3.12 escaping</title>
<updated>2024-02-24T16:10:23+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2024-02-22T18:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4e3b6c24d504bd5a8334bd011397cdec8732858f'/>
<id>urn:sha1:4e3b6c24d504bd5a8334bd011397cdec8732858f</id>
<content type='text'>
scripts/lib/devtool/ide_sdk.py:709: SyntaxWarning: invalid escape sequence '\.'
  re_so = re.compile('.*\.so[.0-9]*$')

scripts/lib/devtool/ide_plugins/__init__.py:87: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "test -f \$TEMP_DIR/pid &amp;&amp; exit 0; "

scripts/lib/devtool/ide_plugins/__init__.py:88: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "mkdir -p \$TEMP_DIR; "

scripts/lib/devtool/ide_plugins/__init__.py:89: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "%s --multi :%s &gt; \$TEMP_DIR/log 2&gt;&amp;1 &amp; " % (

scripts/lib/devtool/ide_plugins/__init__.py:91: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_start += "echo \$! &gt; \$TEMP_DIR/pid;"

scripts/lib/devtool/ide_plugins/__init__.py:94: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_stop += "test -f \$TEMP_DIR/pid &amp;&amp; kill \$(cat \$TEMP_DIR/pid); "

scripts/lib/devtool/ide_plugins/__init__.py:95: SyntaxWarning: invalid escape sequence '\$'
  gdbserver_cmd_stop += "rm -rf \$TEMP_DIR; "

(From OE-Core rev: e8c64921de7206bf617fc42433286867ae3c931d)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: ide: define compilerPath for meson projects</title>
<updated>2024-02-23T14:29:03+00:00</updated>
<author>
<name>Enguerrand de Ribaucourt</name>
<email>enguerrand.de-ribaucourt@savoirfairelinux.com</email>
</author>
<published>2024-02-22T10:29:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e2f8ed72dd4dc01e2d3a9ce7b1debc0015c623c2'/>
<id>urn:sha1:e2f8ed72dd4dc01e2d3a9ce7b1debc0015c623c2</id>
<content type='text'>
The compile_commands.json file output by meson uses the compiler as if
present in the $PATH. However, when using an IDE, the $PATH used by
bitbake is not there.

The vscode-cpptools now allows to define the compilerPath in addition
to replace the one from compile_commands.json.

(From OE-Core rev: d9f5c27c8beee07c7cbbed11f5d45058e7315846)

Signed-off-by: Enguerrand de Ribaucourt &lt;enguerrand.de-ribaucourt@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
