[OE-core] [PATCH 1/3] devtool: drop S = WORKDIR workaround

2024-09-22 Thread Adrian Freihofer
to drop it now! Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/devtool.py | 5 scripts/lib/devtool/ide_sdk.py | 38 - 2 files changed, 43 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases

[OE-core] [PATCH 2/3] devtool: menuconfig remove useless code

2024-09-22 Thread Adrian Freihofer
When I tried to understand whether oe-local-files is actually still needed here, I found some useless lines that can be dropped. Signed-off-by: Adrian Freihofer --- scripts/lib/devtool/menuconfig.py | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/lib/devtool

[OE-core] [PATCH 3/3] devtool: drop useless variables

2024-09-22 Thread Adrian Freihofer
Drop some unused code. The actual intention was to look for remnants of S = WORKDIR, which required the extra complicated oe-local-files directory. The remaining code dealing with oe-local-files still seems to be useful. Signed-off-by: Adrian Freihofer --- scripts/lib/devtool/standard.py | 3

[OE-core] [PATCH 0/3] some cleanup for s = workdir

2024-09-22 Thread Adrian Freihofer
% reliable way. In any case, it was much more fun to write this remove commit than to write the commit that added this function :-). While investigating this issue, I found some lines that also seemed useless. Adrian Freihofer (3): devtool: drop S = WORKDIR workaround devtool: menuconfig remove

[OE-core] [PATCH] cml1: add do_savedefconfig

2024-09-04 Thread Adrian Freihofer
From: Adrian Freihofer Move the do_savedefconfig task definition from u-boot and kernel to cml1.bbclass. There are more recipes which use the kbuild framework and benefit from a do_savedefconfig task. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/cml1.bbclass | 7 +++ meta

[OE-core] [PATCH v2 2/3] devtool: modify kernel adds append twice

2024-09-03 Thread Adrian Freihofer
From: Adrian Freihofer Drop the redundant generation of the do_configure:append section for the kernel. The same append is generated twice: if bb.data.inherits_class('kernel', rd): f.write('\ndo_configure:append() {\n' 'cp ${B}/.config ${S}/.config.baselin

[OE-core] [PATCH v2 3/3] devtool: remove obsolete SRCTREECOVEREDTASKS handling

2024-09-03 Thread Adrian Freihofer
From: Adrian Freihofer devtool modify generates a bbappend for kernel recipes which contains: SRCTREECOVEREDTASKS="\ do_fetch \ do_kernel_checkout \ do_kernel_configcheck \ do_unpack \ do_validate_branches \ " do_patch[noexec] = "1" If the linux-

[OE-core] [PATCH v2 1/3] uboot-config: fix devtool modify with kernel-fitimage

2024-09-03 Thread Adrian Freihofer
From: Adrian Freihofer How to reproduce: - UBOOT_CONFIG must be used. With UBOOT_MACHINE it works fine. A simple example based on oe-core is to modify the beaglebone-yocto.conf file like this: -UBOOT_MACHINE = "am335x_evm_defconfig" +UBOOT_CONFIG = "foo"

Re: [OE-core] [PATCH 3/3] devtool: remove obsolete SRCTREECOVEREDTASKS handling

2024-09-03 Thread Adrian Freihofer
On Tue, 2024-09-03 at 07:15 +0100, Richard Purdie wrote: > On Mon, 2024-09-02 at 22:31 +0200, Adrian Freihofer via > lists.openembedded.org wrote: > > From: Adrian Freihofer > > > > The kernel-yocto.bbclass defines some tasks tasks and it also adds > > these > &

[OE-core] [PATCH 3/3] devtool: remove obsolete SRCTREECOVEREDTASKS handling

2024-09-02 Thread Adrian Freihofer
From: Adrian Freihofer The kernel-yocto.bbclass defines some tasks tasks and it also adds these tasks to the SRCTREECOVEREDTASKS list. There is no need for devtool to duplicate this code and override what the kernel-yocto.bbclass already does. devtool modify generates a linux-yocto.6.6.bbappend

[OE-core] [PATCH 1/3] uboot-config: fix devtool modify with kernel-fitimage

2024-09-02 Thread Adrian Freihofer
From: Adrian Freihofer How to reproduce: - UBOOT_CONFIG must be used. With UBOOT_MACHINE it works fine. A simple example based on oe-core is to modify the beaglebone-yocto.conf file like this: -UBOOT_MACHINE = "am335x_evm_defconfig" +UBOOT_CONFIG = "foo"

[OE-core] [PATCH 2/3] devtool: modify kernel adds append twice

2024-09-02 Thread Adrian Freihofer
From: Adrian Freihofer Drop the redundant generation of the do_configure:append section for the kernel. The same append is generated twice: if bb.data.inherits_class('kernel', rd): f.write('\ndo_configure:append() {\n' 'cp ${B}/.config ${S}/.config.baselin

Re: [OE-core] [PATCH 4/4] kernel-fitimage: run unbundled fitimage after deploy

2024-08-23 Thread Adrian Freihofer
the delay in getting to this, > I > keep hoping someone else will help with this kind of review but it is > very time consuming and I suspect nobody has quite the right set of > knowledge to make it easier. > > On Mon, 2024-08-19 at 17:17 +0200, Adrian Freihofer via > lists.openemb

Re: [OE-core] [PATCH 3/4] kernel: refactor fitimage

2024-08-23 Thread Adrian Freihofer via lists.openembedded.org
On Mon, 2024-08-19 at 17:17 +0200, Adrian Freihofer wrote: > From: Adrian Freihofer > > * do_bundle_initramfs only when needed >   With INITRAMFS_IMAGE_BUNDLE = "1" the kernel Makefile is used to >   bundle the kernel binary and the initramfs. This works only when >

[OE-core] [PATCH 4/4] kernel-fitimage: run unbundled fitimage after deploy

2024-08-19 Thread Adrian Freihofer
From: Adrian Freihofer Without this change, the kernel is always rebuilt if something changes in the initramfs. If the kernel is rebuilt with an empty TMPDIR, the process starts by fetching the large kernel git repository and recompiling it from scratch. This is very inefficient. This cannot be

[OE-core] [PATCH 3/4] kernel: refactor fitimage

2024-08-19 Thread Adrian Freihofer
From: Adrian Freihofer * do_bundle_initramfs only when needed With INITRAMFS_IMAGE_BUNDLE = "1" the kernel Makefile is used to bundle the kernel binary and the initramfs. This works only when the build folder of the kernel is available. Building with sstate but with an em

[OE-core] [PATCH 2/4] kernel-fitimage: refactor fitimage_assemble

2024-08-19 Thread Adrian Freihofer
From: Adrian Freihofer Make the fitimage_assemble function usable with absolute paths for the generated its and the fitImage file. Later on this will allow to take the linux.bin and the DTB files from the sstated deploy derectory and write the generated files to a separate folder with

[OE-core] [PATCH 1/4] kernel: refactor linux compression

2024-08-19 Thread Adrian Freihofer
From: Adrian Freihofer This is a step to avoid unecessary kernel rebuilds when the initramfs changes but not the kernel itself. In case of an unbundled fitImage the kernel should be staged in the sstate instead of re-compiled. The uboot_prep_kimage function generates the kernel binary which

[OE-core] [PATCH v4 0/4] Use the kernel from sstate when building fitImages

2024-08-19 Thread Adrian Freihofer
ter do_deploy - do_assemble_fitimage_initramfs is not executed - do_bundle_initramfs is not executed - It works for fitImage in KERNEL_IMAGETYPE as well as for fitImage in KERNEL_IMAGETYPES - For builds with fitImage and bundled initramfs: No changes - For builds with fitIma

[OE-core] [PATCH 3/4] kernel: refactor fitimage

2024-08-12 Thread Adrian Freihofer
From: Adrian Freihofer * do_bundle_initramfs only when needed With INITRAMFS_IMAGE_BUNDLE = "1" the kernel Makefile is used to bundle the kernel binary and the initramfs. This works only when the build folder of the kernel is available. Building with sstate but with an em

[OE-core] [PATCH 1/4] kernel: refactor linux compression

2024-08-12 Thread Adrian Freihofer
From: Adrian Freihofer This is a step to avoid unecessary kernel rebuilds when the initramfs changes but not the kernel itself. In case of an unbundled fitImage the kernel should be staged in the sstate instead of re-compiled. The uboot_prep_kimage function generates the kernel binary which

[OE-core] [PATCH 4/4] kernel-fitimage: run unbundled fitimage after deploy

2024-08-12 Thread Adrian Freihofer
From: Adrian Freihofer Without this change, the kernel is always rebuilt if something changes in the initramfs. If the kernel is rebuilt with an empty TMPDIR, the process starts by fetching the large kernel git repository and recompiling it from scratch. This is very inefficient. This cannot be

[OE-core] [PATCH 2/4] kernel-fitimage: refactor fitimage_assemble

2024-08-12 Thread Adrian Freihofer
From: Adrian Freihofer Make the fitimage_assemble function usable with absolute paths for the generated its and the fitImage file. Later on this will allow to take the linux.bin and the DTB files from the sstated deploy derectory and write the generated files to a separate folder with

[OE-core] [PATCH v3 0/4] Use the kernel from sstate when building fitImages

2024-08-12 Thread Adrian Freihofer
uot;fitimage, initramfs, unbundled" cat << EOF > build/conf/auto.conf KERNEL_IMAGETYPE = "Image" KERNEL_IMAGETYPES += " fitImage " KERNEL_CLASSES = " kernel-fitimage " IMAGE_FSTYPES += "cpio.gz" INITRAMFS_IMAGE = "core-image-minimal-initramfs" IN

[OE-core] [PATCH] pybootchartgui.py: python 3.12+ regexes

2024-07-21 Thread Adrian Freihofer
From: Adrian Freihofer $ ./scripts/pybootchartgui/pybootchartgui.py ./scripts/pybootchartgui/pybootchartgui/parsing.py:460: SyntaxWarning: invalid escape sequence '\d' disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') ./scripts/pybootcha

Re: [OE-core] [PATCH v2 0/6] Use the kernel from sstate when building fitImages

2024-07-18 Thread Adrian Freihofer
On Thu, 2024-07-18 at 11:28 +0100, Jose Quaresma wrote: > > > Adrian Freihofer via lists.openembedded.org > escreveu (quinta, > 18/07/2024 à(s) 09:00): > > Hi Martin > > > > Thank you for looking at my patches. > > > > On Mon, 2024-07-15 at 16:3

Re: [OE-core] [PATCH v2 0/6] Use the kernel from sstate when building fitImages

2024-07-18 Thread Adrian Freihofer
On Thu, 2024-07-18 at 10:39 +0200, Martin Jansa wrote: > On Thu, Jul 18, 2024 at 10:00 AM Adrian Freihofer > wrote: > > > > Hi Martin > > > > Thank you for looking at my patches. > > > > On Mon, 2024-07-15 at 16:32 +0200, Martin Jansa wrote: > &

Re: [OE-core] [PATCH v2 0/6] Use the kernel from sstate when building fitImages

2024-07-18 Thread Adrian Freihofer
Hi Martin Thank you for looking at my patches. On Mon, 2024-07-15 at 16:32 +0200, Martin Jansa wrote: > Doesn't it still rebuild from scratch when IMAGE_VERSION_SUFFIX > changes? I wonder why this happens in WebOS. I think that this line kernel_do_deploy[vardepsexclude] = "DATETIME" prevents suc

Re: [OE-core][PATCH 2/6] classes/spdx-common: Move common SPDX to new class

2024-07-17 Thread Adrian Freihofer
On Mon, 2024-06-10 at 15:41 -0600, Joshua Watt via lists.openembedded.org wrote: > Moves SPDX code that can be shared between different SPDX versions > into > a common class > > Signed-off-by: Joshua Watt > --- >  meta/classes/create-spdx-2.2.bbclass | 259 ++--- > -- >  meta/c

Re: [OE-core] [PATCH v2 0/6] Use the kernel from sstate when building fitImages

2024-07-15 Thread Adrian Freihofer
task-depends Task dependeny changes Configuration: image, fitimage, initramfs, unbundled KERNEL_IMAGETYPE = "Image" KERNEL_IMAGETYPES += " fitImage " KERNEL_CLASSES = " kernel-fitimage " IMAGE_FSTYPES += "cpio.gz" INITRAMFS_IMAGE = "core-image-minimal-initramfs" branch: master depe

[OE-core] [PATCH 4/6] kernel-fitimage: refactor fitimage_assemble

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer Make the fitimage_assemble function usable with absolute paths for the generated its and the fitImage file. Later on this will allow to take the linux.bin and the DTB files from the sstated deploy derectory and write the generated files to a separate folder with

[OE-core] [PATCH 2/6] kernel-fitimage: fix external dtb check

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables dtb_path ends up as "/" which is available on most Unix systems but probably not the dtb_path which is needed here. Checking for a file makes more sense and also solves the issue with the "

[OE-core] [PATCH 1/6] kernel-fitimage: fix intentation

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer white space changes only. - python part should be 4 spaces, not 8. - use tabs for shell Signed-off-by: Adrian Freihofer --- meta/classes-recipe/kernel-fitimage.bbclass | 64 ++--- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/meta

[OE-core] [PATCH v2 0/6] Use the kernel from sstate when building fitImages

2024-07-15 Thread Adrian Freihofer
age, initramfs, unbundled" cat << EOF > build/conf/auto.conf KERNEL_IMAGETYPE:forcevariable = "fitImage" KERNEL_CLASSES = " kernel-fitimage " IMAGE_FSTYPES += "cpio.gz" INITRAMFS_IMAGE = "core-image-minimal-initramfs" EOF run_bitbake_per_branch

[OE-core] [PATCH 5/6] kernel: refactor fitimage

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer * do_bundle_initramfs only when needed With INITRAMFS_IMAGE_BUNDLE = "1" the kernel Makefile is used to bundle the kernel binary and the initramfs. This works only when the build folder of the kernel is available. Building with sstate but with an em

[OE-core] [PATCH 6/6] kernel-fitimage: run unbundled fitimage after deploy

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer Without this change, the kernel is always rebuilt if something changes in the initramfs. If the kernel is rebuilt with an empty TMPDIR, the process starts by fetching the large kernel git repository and recompiling it from scratch. This is very inefficient. This cannot be

[OE-core] [PATCH 3/6] kernel: refactor linux compression

2024-07-15 Thread Adrian Freihofer
From: Adrian Freihofer This is a step to avoid unecessary kernel rebuilds when the initramfs changes but not the kernel itself. In case of an unbundled fitImage the kernel should be staged in the sstate instead of re-compiled. The uboot_prep_kimage function generates the kernel binary which

Re: [OE-core] [PATCH 09/14] kernel-fitimage: refactor do_assemble_fitimage_initramfs

2024-07-10 Thread Adrian Freihofer
On Tue, 2024-07-09 at 15:08 -0500, Mark Hatle wrote: > > > On 7/4/24 2:09 AM, Adrian Freihofer wrote: > > From: Adrian Freihofer > > > > Make the fitimage_assemble function usable with absolute paths for > > the > > generated its and the fitImage file. &g

Re: [OE-core] [PATCH 07/14] kernel-fitimage: fix external dtb check

2024-07-10 Thread Adrian Freihofer
On Tue, 2024-07-09 at 14:48 -0500, Mark Hatle wrote: > > > On 7/4/24 2:09 AM, Adrian Freihofer wrote: > > From: Adrian Freihofer > > > > If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty > > variables > > dtb_path ends up as "/" which i

Re: [OE-core] [PATCH 00/14] Use the kernel from sstate when building fitImages

2024-07-10 Thread Adrian Freihofer
On Wed, 2024-07-10 at 10:46 +0100, Richard Purdie wrote: > On Thu, 2024-07-04 at 09:09 +0200, Adrian Freihofer via > lists.openembedded.org wrote: > > If the KERNEL_IMAGETYPES(S) contains fitImage, the kernel is always > > rebuilt when something changes in the initra

[OE-core] [PATCH 08/14] kernel: execute do_bundle_initramfs only when needed

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer With INITRAMFS_IMAGE_BUNDLE = "1" the kernel Makefile is used to bundle the kernel binary and the initramfs. This works only when the build folder of the kernel is available. Building with sstate but with an empty TMPDIR requires to rebuild the kernel from scratc

[OE-core] [PATCH 14/14] DO NOT MERGE: explanation and testing

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer These patches are a bit complicated to explain. This extra commit provides some additional documentation with some task graph diagrams in html format. The html file was generated by the shell script which is also added to this commit. (Notes are added manually.) Signed

[OE-core] [PATCH 11/14] kernel-fitimage: fix intentation

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer python part should be 4 spaces, not 8. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/kernel-fitimage.bbclass | 52 ++--- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes

[OE-core] [PATCH 12/14] kernel-fitimage: run unbundled fitimage after deploy

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Generate the fitImage with unbundled initramfs after do_deploy. This allows to use the kernel image from the sstate of the do_deploy task. Without this change, the kernel is always rebuilt if something changes in the initramfs, which happens frequently. If the kernel is

[OE-core] [PATCH 13/14] image: depends do_deploy_fitimage_unbundled

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer If a fitImage kernel with unbundled initramfs is built the final deploy task is now do_deploy_fitimage_unbundled. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/image.bbclass | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta

[OE-core] [PATCH 01/14] oe-selftest: wic fix deps of test_efi_plugin_unified_kernel_image_qemu

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer oe-selftest wic.Wic2.test_efi_plugin_unified_kernel_image_qemu failed with: AssertionError: Command 'bitbake core-image-minimal core-image-minimal-initramfs ovmf' returned non-zero exit status 1: bitbake reported: FileNotFoundError: [Errno 2] No su

[OE-core] [PATCH 02/14] oe-selftest: fitimage refactor u-boot-tools-native

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Eliminate code duplication with a new function. Use get_bb_var instead of bitbake -e | grep. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/fitimage.py | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/meta

[OE-core] [PATCH 10/14] kernel-fitimage: refactor creation of linux.bin

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Assembling the fitImage with initramfs requires the linux.bin and the corresponding DTB files. To avoid that the kernel gets re-built from scratch whenever the initramfs changes, these files must be sstate cached after the kernel is built, before the fitImage gets

[OE-core] [PATCH 09/14] kernel-fitimage: refactor do_assemble_fitimage_initramfs

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Make the fitimage_assemble function usable with absolute paths for the generated its and the fitImage file. Later on this will allow to take the linux.bin and the DTB files from the sstated deploy derectory and write the generated files to a separate folder with

[OE-core] [PATCH 06/14] kernel-fitimage: fix handling of empty default dtb

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Fix error in run.do_assemble_fitimage_initramfs.2779256: line 238: [: =: unary operator expected if FIT_CONF_DEFAULT_DTB is empty. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/kernel-fitimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1

[OE-core] [PATCH 05/14] oe-selftest: fitimage fix test_initramfs_bundle

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer It looks like most of the assertions of this tests were by-passed because of combinations of invalid regexes and inverted assert statement. Try to fix. Use the variables from the kernel recipe instead of potentially invalid values from get_bb_vars with undefined recipe

[OE-core] [PATCH 07/14] kernel-fitimage: fix external dtb check

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables dtb_path ends up as "/" which is available on most Unix systems but probably not the dtb_path which is needed here. Checking for a file makes more sense and also solves the issue with the "

[OE-core] [PATCH 04/14] oe-selftest: fitimage cleanup asserts

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Use more specific assert statements to make the code more readable and the error messages more verbose. Cleanup the asserts of the test case test_initramfs_bundle. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/fitimage.py | 76

[OE-core] [PATCH 00/14] Use the kernel from sstate when building fitImages

2024-07-04 Thread Adrian Freihofer
w the changes in the kernel's task dependencies. I hope this simplifies the re-view of this patch series. Adrian Freihofer (14): oe-selftest: wic fix deps of test_efi_plugin_unified_kernel_image_qemu oe-selftest: fitimage refactor u-boot-tools-native oe-selftest: fitimage drop test-mkim

[OE-core] [PATCH 03/14] oe-selftest: fitimage drop test-mkimage-wrapper

2024-07-04 Thread Adrian Freihofer
From: Adrian Freihofer Rather than writing hints into log files and verify the hints can be found, the tests should verify that the artifacts in the deploy folder are correctly signed. This is a much better test. u-boot-tools provide a utility fit_check_sign which can verify the signatures in

Re: [OE-core] [PATCH v2 2/5] devtool: code: Add source mapping for debug source files

2024-02-25 Thread Adrian Freihofer
On Thu, 2024-02-22 at 16:51 +0100, Enguerrand de Ribaucourt wrote: > > > On 22/02/2024 14:00, adrian.freiho...@gmail.com wrote: > > On Wed, 2024-02-21 at 15:56 +0100, Enguerrand de Ribaucourt wrote: > > > > > > > > > On 21/02/2024 15:12, Enguerrand de Ribaucourt wrote: > > > > > > > > > > > >

[OE-core] [PATCH 4/4] oe-selftest devtool: ide-sdk tests

2024-02-25 Thread Adrian Freihofer
Improve the GDB related tests. Verify GDB finds the correct source files. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/devtool.py | 42 +++-- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta

[OE-core] [PATCH 2/4] devtool: ide-sdk source mapping for vscode

2024-02-25 Thread Adrian Freihofer
From: Enguerrand de Ribaucourt 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

[OE-core] [PATCH 3/4] devtool: ide-sdk prefer sources from workspace

2024-02-25 Thread Adrian Freihofer
C_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. Signed-off-by: Adrian Freihofer --- scripts/lib/devtool/ide_plugins/__init__.py | 19 +-- scripts/l

[OE-core] [PATCH 1/4] devtool: ide-sdk launch.json per recipe only

2024-02-25 Thread Adrian Freihofer
-example recipe which also offers debugging the powertop binary. Signed-off-by: Adrian Freihofer --- scripts/lib/devtool/ide_plugins/ide_code.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool

[OE-core] [PATCH 0/4] devtool ide-sdk source mappings

2024-02-25 Thread Adrian Freihofer
therefore not yet detected. The commit "devtool: ide-sdk launch.json per recipe only" is a fix for an issue which was discoverd during testing. Adrian Freihofer (3): devtool: ide-sdk launch.json per recipe only devtool: ide-sdk prefer sources from workspace oe-selftest devtool: ide

[OE-core] [PATCH] devtool: ide-sdk python 3.12 escaping

2024-02-22 Thread Adrian Freihofer
py:94: SyntaxWarning: invalid escape sequence '\$' gdbserver_cmd_stop += "test -f \$TEMP_DIR/pid && kill \$(cat \$TEMP_DIR/pid); " scripts/lib/devtool/ide_plugins/__init__.py:95: SyntaxWarning: invalid escape sequence '\$' gdbserver_cmd_stop += "rm

Re: [OE-core] [PATCH v2 2/5] devtool: code: Add source mapping for debug source files

2024-02-22 Thread Adrian Freihofer
On Wed, 2024-02-21 at 15:56 +0100, Enguerrand de Ribaucourt wrote: > > > On 21/02/2024 15:12, Enguerrand de Ribaucourt wrote: > > > > > > On 20/02/2024 10:01, adrian.freiho...@gmail.com wrote: > > > On Mon, 2024-02-19 at 17:55 +0100, Enguerrand de Ribaucourt > > > wrote: > > > > When launching

[OE-core] [kirkstone][PATCH v2 13/13] scripts: python 3.12 regex

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literal

[OE-core] [kirkstone][PATCH v2 12/13] meta/recipes: python 3.12 regex

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off

[OE-core] [kirkstone][PATCH v2 11/13] meta/lib/oeqa: python 3.12 regex

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off

[OE-core] [kirkstone][PATCH v2 09/13] oeqa/selftest/oelib/buildhistory: git default branch

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^ File "/usr/lib/pytho

[OE-core] [kirkstone][PATCH v2 10/13] feature-microblaze-versions.inc: python 3.12 regex

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer feature

[OE-core] [kirkstone][PATCH v2 08/13] oeqa/selftest/recipetool: expect meson.bb

2024-02-21 Thread Adrian Freihofer
Latest recipetool from master branch generates a pyhton3-meson.bb recipe while the older version from kirkstone generates a meson.bb. Change the test to pass with meson.bb. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 4 ++-- 1 file changed, 2 insertions

[OE-core] [kirkstone][PATCH v2 06/13] oeqa/selftest/recipetool: fix for python 3.12

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source

[OE-core] [kirkstone][PATCH v2 07/13] oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml

2024-02-21 Thread Adrian Freihofer
.toml. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 29 -- 1 file changed, 16 insertions(+), 13 deletions(-) diff

[OE-core] [kirkstone][PATCH v2 05/13] oeqa: replace deprecated assertEquals

2024-02-21 Thread Adrian Freihofer
From: Adrian Freihofer assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master

[OE-core] [kirkstone][PATCH v2 03/13] populate_sdk_ext: use ConfigParser instead of SafeConfigParser

2024-02-21 Thread Adrian Freihofer
From: Ross Burton SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Cherry-picked from master: 71b3e7f71727137b4b996cc4160c9cc1581824b8 Signed-off-by: Adrian Freihofer

[OE-core] [kirkstone][PATCH v2 04/13] runqemu: add qmp socket support

2024-02-21 Thread Adrian Freihofer
gs without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer --- scripts/runqemu | 11 +++ 1 file changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index b7d7c7b4e7..b8c5adcbec 100755 --- a/scripts/runqemu +++

[OE-core] [kirkstone][PATCH v2 02/13] scripts/runqemu: fix regex escape sequences

2024-02-21 Thread Adrian Freihofer
ed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer --- scripts/runqemu | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 729b

[OE-core] [kirkstone][PATCH v2 01/13] recipetool/create_buildsys_python: use importlib instead of imp

2024-02-21 Thread Adrian Freihofer
rom master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer --- scripts/lib/recipetool/create_buildsys_python.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5686a62d3f..

[OE-core] [kirkstone][PATCH v2 00/13] python 3.12 related fixes

2024-02-21 Thread Adrian Freihofer
ate_github test_recipetool_create_github_tarball or if this depends on the host machine. Adrian Freihofer (8): oeqa: replace deprecated assertEquals oeqa/selftest/recipetool: fix for python 3.12 oeqa/selftest/recipetool: expect meson.bb oeqa/selftest/oelib/buildhistory: git default branch

Re: [OE-core] [PATCH v2 5/5] devtool: code: Provide a generic C++ configuration

2024-02-20 Thread Adrian Freihofer
Hi Enguerrand I would really like to stay on the path with tests. This patch changes code which is covered by tests without tests. Lets develop the autotools support as a separate patch series. There are three parts needed: - Extend the cpp-example with autotools support (already on my branch) -

Re: [OE-core] [PATCH v2 3/5] devtool: ide: vscode: Configure read-only files

2024-02-20 Thread Adrian Freihofer
On Mon, 2024-02-19 at 17:55 +0100, Enguerrand de Ribaucourt wrote: > When debugging or browsing files, the user may fall into external > sources from other packages in the sysroot or dbg-rootfs. Modifying > them > will only lead to confusion since they will be overwritten by Yocto. > The > user sho

Re: [OE-core] [PATCH v2 1/5] devtool: ide_sdk: Use bitbake's python3 for generated scripts

2024-02-20 Thread Adrian Freihofer
On Mon, 2024-02-19 at 17:55 +0100, Enguerrand de Ribaucourt wrote: > The generated scripts use the sys.path configuration found inside > bitbake. It can be a different python version than the one used on > the > host through the IDE. > > For instance, when running the generated script > deploy_tar

Re: [OE-core] [PATCH v2 2/5] devtool: code: Add source mapping for debug source files

2024-02-20 Thread Adrian Freihofer
On Mon, 2024-02-19 at 17:55 +0100, Enguerrand de Ribaucourt wrote: > 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 >

Re: [OE-core] [PATCH 3/6] devtool: code: Add source mapping for debug source files

2024-02-15 Thread Adrian Freihofer
On Thu, 2024-02-15 at 18:04 +0100, Enguerrand de Ribaucourt wrote: > 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 >

Re: [OE-core] [PATCH 6/6] devtool: code: Provide a generic C++ configuration

2024-02-15 Thread Adrian Freihofer
On Thu, 2024-02-15 at 18:04 +0100, Enguerrand de Ribaucourt wrote: > By default, the cpptools VSCode extension will use the host's headers > and flags for linting. This results in a lot of include errors and > misleading definitions. Even though this generic configuration > doesn't > include all th

Re: [OE-core] [PATCH 1/6] devtool: ide: Fix topdir exception for fallback mode

2024-02-15 Thread Adrian Freihofer
On Thu, 2024-02-15 at 18:04 +0100, Enguerrand de Ribaucourt wrote: > An exception was raised because we did not have the topdir attribute > which was used in fallback mode (non cmake/meson recipes). > > Already in the merge queue in Adrian's latest patches. > --- >  scripts/lib/devtool/ide_sdk.py

[OE-core] [PATCH v4 1/2] vscode: drop .vscode folder

2024-02-15 Thread Adrian Freihofer
5ff688fe29. But we still need another solution where the settings.json file is not in Git. Discussion is here: https://github.com/yoctoproject/vscode-bitbake/issues/95 Signed-off-by: Adrian Freihofer --- .gitignore| 1 - .vscode/settings.json | 32

[OE-core] [PATCH v4 2/2] oe-init-build-env: generate .vscode from template

2024-02-15 Thread Adrian Freihofer
override the oe-setup-vscode script by another layer with a custom implementation. Signed-off-by: Adrian Freihofer --- oe-init-build-env | 6 +++ scripts/oe-setup-vscode | 93 + 2 files changed, 99 insertions(+) create mode 100755 scripts/oe-setup-vsc

[OE-core] [PATCH v4 0/2] oe-init-build-env: generate .vscode from template

2024-02-15 Thread Adrian Freihofer
removing the settings.json from git would lead to other issues as already described in the commit message of 5ff688fe29. And the plugin needs manual configuration. Discussion is here: https://github.com/yoctoproject/vscode-bitbake/issues/95 Adrian Freihofer (2): vscode: drop .vscode folder oe-init

[OE-core] [kirkstone][PATCH 00/12] python 3.12 related fixes

2024-02-15 Thread Adrian Freihofer
creates a recipe named meson.bb, not a recipe pyhton3-meson.bb. Not sure if another is a patch required which fixes two test cases: test_recipetool_create_github test_recipetool_create_github_tarball or if this depends on the host machine. Adrian Freihofer (7): oeqa: replace deprecated

[OE-core] [kirkstone][PATCH 12/12] scripts: python 3.12 regex

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literal

[OE-core] [kirkstone][PATCH 11/12] meta/recipes: python 3.12 regex

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off

[OE-core] [kirkstone][PATCH 10/12] meta/lib/oeqa: python 3.12 regex

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off

[OE-core] [kirkstone][PATCH 09/12] feature-microblaze-versions.inc: python 3.12 regex

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer feature

[OE-core] [kirkstone][PATCH 07/12] oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml

2024-02-15 Thread Adrian Freihofer
.toml. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 29 -- 1 file changed, 16 insertions(+), 13 deletions(-) diff

[OE-core] [kirkstone][PATCH 08/12] oeqa/selftest/oelib/buildhistory: git default branch

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^ File "/usr/lib/pytho

[OE-core] [kirkstone][PATCH 04/12] runqemu: add qmp socket support

2024-02-15 Thread Adrian Freihofer
gs without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer --- scripts/runqemu | 11 +++ 1 file changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index b7d7c7b4e7..b8c5adcbec 100755 --- a/scripts/runqemu +++

[OE-core] [kirkstone][PATCH 06/12] oeqa/selftest/recipetool: fix for python 3.12

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source

[OE-core] [kirkstone][PATCH 05/12] oeqa: replace deprecated assertEquals

2024-02-15 Thread Adrian Freihofer
From: Adrian Freihofer assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master

[OE-core] [kirkstone][PATCH 01/12] recipetool/create_buildsys_python: use importlib instead of imp

2024-02-15 Thread Adrian Freihofer
rom master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer --- scripts/lib/recipetool/create_buildsys_python.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5686a62d3f..

[OE-core] [kirkstone][PATCH 03/12] populate_sdk_ext: use ConfigParser instead of SafeConfigParser

2024-02-15 Thread Adrian Freihofer
From: Ross Burton SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Cherry-picked from master: 71b3e7f71727137b4b996cc4160c9cc1581824b8 Signed-off-by: Adrian Freihofer

[OE-core] [kirkstone][PATCH 02/12] scripts/runqemu: fix regex escape sequences

2024-02-15 Thread Adrian Freihofer
ed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer --- scripts/runqemu | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 729b

  1   2   3   4   5   >