From patchwork Sun Jan 26 12:48:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 56128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56F94C0218D for ; Sun, 26 Jan 2025 12:48:23 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web11.29136.1737895693610777616 for ; Sun, 26 Jan 2025 04:48:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NpbEJfDA; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so37494515e9.1 for ; Sun, 26 Jan 2025 04:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737895692; x=1738500492; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OZtIqVMFasQDdMWJGkT2E7XlcXSDJCN4lprsOhBxcho=; b=NpbEJfDAqofZvp862+84p4eHZ/JqNRn6F6TrBhexD1wSCYa2RHen0FHoH36cttB/HV lzwmYSpDRpdD4fB4yXgRs6t+P/NwNmoe7PPVExv1wHyQEfgzeQ6IE0fmVlsjXF6D5pBj I2pT1PY447BWtCUMguy541EW5iGFoaeepHgXpb1buHviEqJZhFC0RKcTXtDH3VKZuy0L uEReAGPGi/9pE1mhDQJNWXulVftso9DUNquKDKPyiKA12dnBGVDqptLkzDUlqxm1soAy I3tcgLhNiaQSI1HLFVldkJw+DiR63wmy7VSU6tOk48ejZuAqk1uvPoKbFo6sus3ehCej WozA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737895692; x=1738500492; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OZtIqVMFasQDdMWJGkT2E7XlcXSDJCN4lprsOhBxcho=; b=h2K1io7mCePDQHD5nLWYzuxhEUHZTy7AlB9hhpk5y8uAz6UjIAPh42s8Eih3MFHsvp 9/ZlE6H9TmmLPI5n8siZWdOal9dVKrWhuMD3hsDnYNjh2rdnpz7PsVJMn8nl+Z0gkQ0B XjA/pNlilAS/PtU9pJoP0GIp1mD57pxHInoftdT1Cm/UhPmkjk1K4OT2kMwjALy9fpgC 3+AX0FzTGsjY61Kpepf8Jhvh053ZaWTV/Ons1ntrD0YzH1jmfidxEikdR6VoWfmzG5DY GIBnak1Cie6lSToVotAQH1qODN7hq5zeN5GdUvsjtQpbLsrfMV4LViJa1iDGzNkYRYYL lwdQ== X-Gm-Message-State: AOJu0YwPowHrnzNYtdyAjD3SrVr7WyGqdSYjSoe23GPGp/+vh1nbzHcn laEVmoR5RG+hwOHATJxceHe0/8pv+mImfOmwi1VgBZoE/ydvrnhCx4fEnQ== X-Gm-Gg: ASbGncvtYFveoHbNTSviJ41+PQOfH+MvJcG+RrAB2OGTWR/Jc0Ja0dkxE/cMWL8WMeD 0sfdKmAsEFaS8VBgOU6O0kzn9zqoEVi1oIOxLz6+xjQwma3DKyeam6/40F3yA2NHNQo/D7YB9c5 9bi16b1KYbTx2MwJ4e70de2CBQOUmJ1pFmC8sDwTCXQYJfrotJbb7iD9WSgTeKMIYTCy+roZSS7 V3uvd890pj/WNCuS0wVymw4jtq6VM1qZNIg5evOKZx23gUOO3/hBZVkGTpeL63rumSowCbpaqN1 mTH4LfnmglKTH3MC4ESjPgmUqio= X-Google-Smtp-Source: AGHT+IFcrPI2n0xX91D1ovMdzSq3VUAYp5bdesynw+cMTBuBf5Ggk6GzdR1LAWZ1yib0pv+qK3VWOw== X-Received: by 2002:a05:600c:4f84:b0:434:a90b:94fe with SMTP id 5b1f17b1804b1-438913ca9bamr359192105e9.10.1737895691691; Sun, 26 Jan 2025 04:48:11 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48a906sm95938295e9.18.2025.01.26.04.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 04:48:10 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Richard Purdie Subject: [scarthgap,styhead][PATCH 1/5] devtool: modify support debug-builds Date: Sun, 26 Jan 2025 13:48:02 +0100 Message-ID: <20250126124806.1453644-2-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250126124806.1453644-1-adrian.freihofer@siemens.com> References: <20250126124806.1453644-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 26 Jan 2025 12:48:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210280 Add a new option --debug-builds to automatically add DEBUG_BUILD = “1” to the bbappend file of this recipe. This is especially useful when invoking devtool modify before invoking devtool ide-sdk to perform a remote debugging session. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 05161942b7..908869cc4f 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1031,6 +1031,8 @@ def modify(args, config, basepath, workspace): if branch == args.branch: continue f.write('# patches_%s: %s\n' % (branch, ','.join(branch_patches[branch]))) + if args.debug_build: + f.write('\nDEBUG_BUILD = "1"\n') update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn]) @@ -2396,6 +2398,7 @@ def register_commands(subparsers, context): parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")') parser_modify.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations') parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true") + parser_modify.add_argument('--debug-build', action="store_true", help='Add DEBUG_BUILD = "1" to the modified recipe') parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup) parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe', From patchwork Sun Jan 26 12:48:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 56130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 654C4C02191 for ; Sun, 26 Jan 2025 12:48:23 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web10.29395.1737895694720345788 for ; Sun, 26 Jan 2025 04:48:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nNxQppwP; spf=pass (domain: gmail.com, ip: 209.85.128.46, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43624b2d453so38412665e9.2 for ; Sun, 26 Jan 2025 04:48:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737895693; x=1738500493; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8Ctn7NvOOTY0sZwX1b2/2TR4cWSg+Kh59AnRbU6xPxI=; b=nNxQppwPbZjg2YRIlLPUZz+YPnfUT7RWLgyGlWOhE/X7XLQxSGAn4YMHoON4cMmZof SON2cmhzWL4FwL3emTsc5fuEMKYeks94SvEZDqWeFnbXSwWwgtgvxttUb4Gm6GAzOoxb mlLj8ZHh95RhrnMpERrGnQe/sOZ2UsMosbZX/m5vYjbJR7QBHnK36EKNQ+WeLINpzpzK QksALoDcdL2kavdIW4YOCUtOybLz9N0oRVitF2ahAx7ODGkQgZko4kBYAaabER80FGj3 Z1P1SJBkgWddSJtUAaV0RtUZ2KuK7YGXaib4EYnnZ6G7aBgKyaboVqqRheKZdx8wqQ+l dQDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737895693; x=1738500493; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8Ctn7NvOOTY0sZwX1b2/2TR4cWSg+Kh59AnRbU6xPxI=; b=Yhj/aM/j/n1aELj26MQxbc7sdH4tjKTQT7t1/3Exli7qkVLYT4cU2Z0MsbXmKM/a9/ RsMwGZhV4SAESNFhWwsIkhzQ9xUhRCxMmj5oIFXwJr1lS+3BTilWlyybGGgALRNP6w1F 6Ap0mbN43oA4Nwg2rcdu5C9gbyndwMoWF0acskDzigmnISHXzLK8lv9GQ81SAuOmGnc+ 9noBJRvNZptup/CGpDi/EMplSaUiS/OGBFHmoNqEuzQCzA0tSH2QmikwOIigLzebJNI7 tWbTp3be9zUDykWbFYEiGvU2O4HqbmAlOwntVkrtJnk7RoEuKQeqSOquobtDC5CDezDn 3wlg== X-Gm-Message-State: AOJu0YxM6DwT5Z9Hrl3BSp9qerqhfTUXUTmqo+lJ6vErWr5S/I4f9G/J O/Vv7+OiQPyRCYh/UQYL+MXAjAOZVzX+bqB8mF7uXjHGCTajIHBHgUaKGQ== X-Gm-Gg: ASbGncuMThMkp0foAKG5CHE/v+CsB0u2/pQSPgjwLyxL2ddcPUlian3SEp2Qe+YSxuO UU531NGlk3ldEnaZBRsF/8TefNnqxt5M7v5yNe6l3NSYfgZdzAvLf7ByAWo76QK1BESynmqr30j T5c751M5scBnzoiRTD1odX7PdT8ycMfXjn8nGabqdQPUmQpCMH2kWofhIbeQSsBv7F/BDTYfa2q 5huxPvtIfQtT7KSuI2gMOMTQkaoEeNQkkqyCMZxSWdO53vF4eEe2IyOGKWu1JByBT9lXcqp+IcI vMuM+xefJVRaPll+7R2Eu0B7vx0= X-Google-Smtp-Source: AGHT+IGwxKYwN/R4sqtw2Y55VjybSxbCBArOxW6meZzlz9lTIuUMCAjzWL5VkKeiqozndcoa9TG5tQ== X-Received: by 2002:a05:600c:1987:b0:434:f753:6012 with SMTP id 5b1f17b1804b1-438913f2f4emr368750685e9.17.1737895692702; Sun, 26 Jan 2025 04:48:12 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48a906sm95938295e9.18.2025.01.26.04.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 04:48:12 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Richard Purdie Subject: [scarthgap,styhead][PATCH 2/5] devtool: ide-sdk sort cmake preset Date: Sun, 26 Jan 2025 13:48:03 +0100 Message-ID: <20250126124806.1453644-3-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250126124806.1453644-1-adrian.freihofer@siemens.com> References: <20250126124806.1453644-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 26 Jan 2025 12:48:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210281 Sort the keys of the generated CMakeUserPreset.json file to make it easier to search and compare. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- scripts/lib/devtool/ide_sdk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 65873b088d..eee5425aa7 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -493,7 +493,7 @@ class RecipeModified: vars = (key for key in d.keys() if not key.startswith( "__") and not d.getVarFlag(key, "func", False)) - for var in vars: + for var in sorted(vars): func = d.getVarFlag(var, "func", False) if d.getVarFlag(var, 'python', False) and func: continue @@ -545,7 +545,7 @@ class RecipeModified: cache_vars = {} oecmake_args = d.getVar('OECMAKE_ARGS').split() extra_oecmake = d.getVar('EXTRA_OECMAKE').split() - for param in oecmake_args + extra_oecmake: + for param in sorted(oecmake_args + extra_oecmake): d_pref = "-D" if param.startswith(d_pref): param = param[len(d_pref):] From patchwork Sun Jan 26 12:48:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 56131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6547BC0218F for ; Sun, 26 Jan 2025 12:48:23 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.web10.29397.1737895697054733198 for ; Sun, 26 Jan 2025 04:48:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UfukfzED; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-43635796b48so22587655e9.0 for ; Sun, 26 Jan 2025 04:48:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737895695; x=1738500495; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Hg6BpZMxb+pcWWGbamsXngDjIY6+IEVUiHYk+8prPJ8=; b=UfukfzEDRnTIkUOXBv7eRopdoKU2HsfAGdsxqUmnsnJQ1UGNipCHe52rGO1UDrRWdz O9hZcFsBOGnwxSKdY2YBVl/U8AnEPjEsVyhF0sTh4bMq2uUwUyEUSUNd/KY9N45Ts0HY luhD8wa8E+iljeqn/DByVMD5SKEyQey/IT9hAvwaCBbvB0V9frvHFYCc8Tr86VGjwLMi P626V09dKFuyS4bRE8GMEdahaeKxNrqqRyytx3VE/5xZgg/XOE5LJgiFMRuFX1AO6NUw DihzOw0D8+WC7QI/TcPTgdK/JKvZ8YDAijeFMiD+MmRTe6n5LVW2tQh+Ky/SVTJIiHlB 7u4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737895695; x=1738500495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hg6BpZMxb+pcWWGbamsXngDjIY6+IEVUiHYk+8prPJ8=; b=tNu88rhUwF66ukCn1lhWCabAVLv70+Jeaz+7qZapnlRDJ+pVtWW6jmdkFKuoTwcVhD kVaDvQiSZSF0xLdKAHaTWA7Mal2eDAb7RRh7TzRqVRQL5y9cAohExJiYVSpPrXFNAEd/ ex3PEr5fl3GfwkkMevAd2jxWSX3ImuK+lWQNuPRRhvTg6RRorP0GZMrDeJyE3F7diF6b ybjDgyYbtOUFSDCTXfo2lm0ThBOGYq+VB8rCvOinfJFE0YVYtebfR20aszeFVyr10Q/7 fIR9a4Ow1OM9QEIXEO/bn5Z+HdJcBx01gOnxiqU6lC56YxX1+S2B16VeAsHJUBg0ArGR WEsQ== X-Gm-Message-State: AOJu0YydPkH0Pgzf+hJSSseP+Uj7dz8mmmzu3J/nWmeyOZZ5bLGMbQbg 722dhQ2J5MHK9NeOoA3awa8PCFQOyv3uwfRw0hzyWWsf3iN0qDGmEW7HdQ== X-Gm-Gg: ASbGncuvWLfZZ9zc9v6pTsp/2oIz8HixSHAbp29y81UEAnoTHz4liFGbrAVqMs6hYrA kNz4dCK0wv4wIK5mqkavgngYqp5HpBolVXfgZgjd7n0RR3vgi7+MdficZ5+kEdBUupmD1+VzAVA H2jeoxKU8q0MhPqZC7xKsmozsD6/ZFFeV0Dpjb8BBo7sv1aw2DaVhHbewJD7/NL9r6Geyf7qm7z fTiaFKmfuugR+d00INZtyISknIDqb7UAUiUbbmeVzkoqQFuoc2szLc6amND5XFY9IZHuZqPXYoK yn5YjyZfiDsXuc5vsat5Ih/R3Jw= X-Google-Smtp-Source: AGHT+IEHI2+ImSygUGsit7Q/LwVVb2pbQ2BjmX2miWQXE4shtpANHRyH6+cFLuY1tG1zR5HOf7GTAQ== X-Received: by 2002:a05:600c:154a:b0:42c:baf1:4c7 with SMTP id 5b1f17b1804b1-438bd061259mr85426165e9.4.1737895695038; Sun, 26 Jan 2025 04:48:15 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48a906sm95938295e9.18.2025.01.26.04.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 04:48:13 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Richard Purdie Subject: [scarthgap,styhead][PATCH 3/5] devtool: ide-sdk recommend DEBUG_BUILD Date: Sun, 26 Jan 2025 13:48:04 +0100 Message-ID: <20250126124806.1453644-4-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250126124806.1453644-1-adrian.freihofer@siemens.com> References: <20250126124806.1453644-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 26 Jan 2025 12:48:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210282 The debug_build_config function was never called. Compiling with debug optimized compiler flags was not working. Even with the --debug-build-config flag set, the build configuration from the recipe was used. The devtool ide-sdk --debug-build-config approach didn't work very well anyway. The problem is that changing the bbappend file doesn't work while bitbake uses the bbappend file. As a workaround, it would be possible to parse the recipe, get DEBUG_BUILD and the path to the append file, exit tinfoil, change the bbappend file, reopen tinfoil and do what ide-sdk is supposed to do. Such an implementation would be complicated and slow. Therefore, the code that was originally supposed to implement this is removed from ide-sdk and the new --debug-build function of devtool modify is used instead. Additionally, a hint should be given on how to manually add DEBUG_BUILD = '1' to bbappend. This is compatible with the VSCode Bitbake plug-in, which does not support this parameter anyway. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- scripts/lib/devtool/ide_sdk.py | 50 ++++++---------------------------- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index eee5425aa7..5e4c543275 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -288,6 +288,7 @@ class RecipeModified: self.bblayers = None self.bpn = None self.d = None + self.debug_build = None self.fakerootcmd = None self.fakerootenv = None self.libdir = None @@ -348,6 +349,7 @@ class RecipeModified: self.bpn = recipe_d.getVar('BPN') self.cxx = recipe_d.getVar('CXX') self.d = recipe_d.getVar('D') + self.debug_build = recipe_d.getVar('DEBUG_BUILD') self.fakerootcmd = recipe_d.getVar('FAKEROOTCMD') self.fakerootenv = recipe_d.getVar('FAKEROOTENV') self.libdir = recipe_d.getVar('libdir') @@ -389,17 +391,6 @@ class RecipeModified: self.recipe_id = self.bpn + "-" + self.package_arch self.recipe_id_pretty = self.bpn + ": " + self.package_arch - def append_to_bbappend(self, append_text): - with open(self.bbappend, 'a') as bbap: - bbap.write(append_text) - - def remove_from_bbappend(self, append_text): - with open(self.bbappend, 'r') as bbap: - text = bbap.read() - new_text = text.replace(append_text, '') - with open(self.bbappend, 'w') as bbap: - bbap.write(new_text) - @staticmethod def is_valid_shell_variable(var): """Skip strange shell variables like systemd @@ -412,34 +403,6 @@ class RecipeModified: return True return False - def debug_build_config(self, args): - """Explicitely set for example CMAKE_BUILD_TYPE to Debug if not defined otherwise""" - if self.build_tool is BuildTool.CMAKE: - append_text = os.linesep + \ - 'OECMAKE_ARGS:append = " -DCMAKE_BUILD_TYPE:STRING=Debug"' + os.linesep - if args.debug_build_config and not 'CMAKE_BUILD_TYPE' in self.cmake_cache_vars: - self.cmake_cache_vars['CMAKE_BUILD_TYPE'] = { - "type": "STRING", - "value": "Debug", - } - self.append_to_bbappend(append_text) - elif 'CMAKE_BUILD_TYPE' in self.cmake_cache_vars: - del self.cmake_cache_vars['CMAKE_BUILD_TYPE'] - self.remove_from_bbappend(append_text) - elif self.build_tool is BuildTool.MESON: - append_text = os.linesep + 'MESON_BUILDTYPE = "debug"' + os.linesep - if args.debug_build_config and self.meson_buildtype != "debug": - self.mesonopts.replace( - '--buildtype ' + self.meson_buildtype, '--buildtype debug') - self.append_to_bbappend(append_text) - elif self.meson_buildtype == "debug": - self.mesonopts.replace( - '--buildtype debug', '--buildtype plain') - self.remove_from_bbappend(append_text) - elif args.debug_build_config: - logger.warn( - "--debug-build-config is not implemented for this build tool yet.") - def solib_search_path(self, image): """Search for debug symbols in the rootfs and rootfs-dbg @@ -988,6 +951,13 @@ def ide_setup(args, config, basepath, workspace): recipe_modified.gen_meson_wrapper() ide.setup_modified_recipe( args, recipe_image, recipe_modified) + + if recipe_modified.debug_build != '1': + logger.warn( + 'Recipe %s is compiled with release build configuration. ' + 'You might want to add DEBUG_BUILD = "1" to %s. ' + 'Note that devtool modify --debug-build can do this automatically.', + recipe_modified.name, recipe_modified.bbappend) else: raise DevtoolError("Must not end up here.") @@ -1065,6 +1035,4 @@ def register_commands(subparsers, context): '-p', '--no-preserve', help='Do not preserve existing files', action='store_true') parser_ide_sdk.add_argument( '--no-check-space', help='Do not check for available space before deploying', action='store_true') - parser_ide_sdk.add_argument( - '--debug-build-config', help='Use debug build flags, for example set CMAKE_BUILD_TYPE=Debug', action='store_true') parser_ide_sdk.set_defaults(func=ide_setup) From patchwork Sun Jan 26 12:48:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 56132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A608C02181 for ; Sun, 26 Jan 2025 12:48:23 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.29137.1737895698715389711 for ; Sun, 26 Jan 2025 04:48:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FIqGjOB3; spf=pass (domain: gmail.com, ip: 209.85.128.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436249df846so23286275e9.3 for ; Sun, 26 Jan 2025 04:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737895697; x=1738500497; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YzN5T0BXFcY+nLUfi7LvXcltC7d20woaRAPvoSW0nus=; b=FIqGjOB3PPJxZXmnwLLz4qpU2TZ1AoFVk7QRley5et3BvKVSO7Tkho1QTar5w77zar 5mfDhUnMyCKzoHsVG023IGItea3JzHAKYdZqfM6bip4Rg1sl0DbV95vHtD6fFNHHKDd+ qsIt4vjyC+TZ+w5XpQdUGiOJJyAzqiz2TBY3I80ZM4+z8Yizz8zcQUS/nS8ydZocmqjH eAgydRXay9MN0wZfbr5pu552tBbCu45PzSQm4kIUtnmMDDoccUOpCyeSiC72X8uYrLg/ z5CZux7JeclcpB4bq993qZS3UusAPtZvVaVsziBK9KXfWlO/i0NTJwwADEIFiL5YRe8g 1NDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737895697; x=1738500497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YzN5T0BXFcY+nLUfi7LvXcltC7d20woaRAPvoSW0nus=; b=TpPfviEnE/NG7Uzp672LiXJgDCS8mVFmr0uJpE0mz7nh/znMu3I3yjGtmyY6LbpJk2 dk9YrAsz50M2bAGwBxsOlCGJjmfQrkUbR+S0dpuZuSMBcVhJA0YmeztHtJUufW+xcKIz hS8+mUJ8A/AbdJ5SBDtbBgOns/z0rOBjwTX6MeDzHe0ViHgIVJJNCb0ra806vdPZ8Q3c XnVYXo5hT06lA4D2fK51VBXIVIu7KLgOwAVcosGtujYQFAHvNf3gkHHcPsTw0bvjU0mW OPPH1QizSVSd8SCNdYYelaPEYt1LNcoPHLmIOd2gnNcFyh3KiqScuaN3sbIZZAFW6Z5/ bJFA== X-Gm-Message-State: AOJu0YyP6MroeEd+z2kvTCxoSCJMWW6GT7hekQajPNXgug1Xu4zZh/vi OgitEe/yocGOlJ/0XRiXuET7Bb62Mz/+lu3CG1rnULM0l3OwtKNb2i9q8g== X-Gm-Gg: ASbGncvbUiKRwJpPQXRPKOAkSzGiy2bRAfwydSrKMbfSAEap1BObVZmVNTK/4+WD8ta s31O9PRQz7ZD5UFP+vyj2PrxT+XYaVqANh7XurFbppVB/3pHqK2gnLyJEHR9nSR05KvDEUn9Zu0 3a3wCJTQxu2ELJuJnRqA3IHyd5hFYZaMT70ncLpdcM464WV7nGIdWcs3ysFmwByTtT/ZB/+uhsA v0Ipn3ls8a1eFI60Z5SUxkErXupwERzwECL/P+uXn4z4aCGLXSTH9QmbysxjB150qsRvvEDx33f UVY0Dzype+nTBS4Wz3FVArHiFJ0= X-Google-Smtp-Source: AGHT+IE4ExhGBRazayrgBW+3dOCduxDynZ0Pen6S2UyTrDWNyovfO8nThiP8x8EN+QCS0Uvv0hYCJQ== X-Received: by 2002:a7b:cc8f:0:b0:438:a214:52f4 with SMTP id 5b1f17b1804b1-438a2145332mr248109315e9.25.1737895696717; Sun, 26 Jan 2025 04:48:16 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48a906sm95938295e9.18.2025.01.26.04.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 04:48:15 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Richard Purdie Subject: [scarthgap,styhead][PATCH 4/5] oe-selftest: devtool ide-sdk use modify debug-build Date: Sun, 26 Jan 2025 13:48:05 +0100 Message-ID: <20250126124806.1453644-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250126124806.1453644-1-adrian.freihofer@siemens.com> References: <20250126124806.1453644-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 26 Jan 2025 12:48:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210283 Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/devtool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index fc08906117..ee75687f01 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -2493,7 +2493,7 @@ class DevtoolIdeSdkTests(DevtoolBase): self.track_for_cleanup(tempdir) self.add_command_to_tearDown('bitbake -c clean %s' % recipe_name) - result = runCmd('devtool modify %s -x %s' % (recipe_name, tempdir)) + result = runCmd('devtool modify %s -x %s --debug-build' % (recipe_name, tempdir)) self.assertExists(os.path.join(tempdir, build_file), 'Extracted source could not be found') self.assertExists(os.path.join(self.workspacedir, 'conf', From patchwork Sun Jan 26 12:48:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 56129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57C8EC0218E for ; Sun, 26 Jan 2025 12:48:23 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web11.29139.1737895700581368865 for ; Sun, 26 Jan 2025 04:48:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RtG/9DlU; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-43634b570c1so24772605e9.0 for ; Sun, 26 Jan 2025 04:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737895699; x=1738500499; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gKnWFOn5Kw8wxIS2x/gnbuEmaI/r1IFLo/zpMQYB05A=; b=RtG/9DlUC8FYwSGrrVM1vIK7kQhVk+mBjuEW7GfWkNa6ogDcTfp2vEm6MRy9hbMk/v uhdEuCnMAkjHQCoF9/HucK+8BtXbblRWwUl22ZvoFnGrCwHxD9BV3hz/WMvfQIy43QOw r2vI4NzTKbTnBJJ0hLQOXMGjc2KI8DBQDWPNE9mPlCaL8EnGnQz8/mJo5sooR4ir3kNB PYM0jHpCxC6ZCYY0GE3o6MSGGv57XLpazkePzUoR0Tz0q3UqA1gvcxBWWyrJjaR5cgyc XX5EiLqzoxsRXyPivJOcFB2Ik2EbFESnzTe8YaoR0Zkj4DZFTQEaDvJd2H+0dQlKmzZb zovg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737895699; x=1738500499; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gKnWFOn5Kw8wxIS2x/gnbuEmaI/r1IFLo/zpMQYB05A=; b=pRYSbmfgWjmSdtQbPFAgVSBazLrmUND7yflvuUxk7g/uZmNsR7T3HLfsnuQpc4YUL2 soELur4NbqMnYCRI3kL9WATFlgIPUAg3P6owPCBVfa34bwvxOdjCTM5C8oRai2zDgl4U dFy+Gyv7LEzleEZ5kzOlUIHQeZrORcJPv1+LQ5Q07apmGpn25OT9vLetxXbcGqJ4o4FO mSZ/9g/ZuT5uu8yKcq0hWjJB01luqjUCKPFETAFMd4lTjtazyOY/LXbVotgbo2yJibxT WAjp6uq6aYcEaq9AeABs7IwmoV/N2LlXKyMEJX5xqE1i6arcSm+jofmOmvB7tguCO8bR Oryg== X-Gm-Message-State: AOJu0Yyr9J/nBCzC6GzMXzVGoXg8oCs/0whbEBc8ToI47w4kAF/UXdhY KfVLSNEKXD9aGqcGDW6QieeEBoXuT8HXTdHeB0xJDmYF4Qz27955hjwdPA== X-Gm-Gg: ASbGncuTqJzXWdPCULrIE2ua9oD20hW6kyvqmlKYPGTHJvrcG144JH4qftUOEh5asA9 Na65314zILYuPf30Z/vA3W/2xnRMFBtiQePYzwlBu9xpKSfbIiP14fvxRmj+w1+sdxziOphXp/A Zv7fvoAiKjYFl7KERBcEmF3LLo6AIn9SQ2rBVbcvoAARFE/USpVuC5TohL9i5kj1K4qYID3Lc4T qGheuvofaj340Wzk2TkMNEHmCy5YOlGuPByR+hMFVQnf03TwIN+rBYCPfgutz/Afvlyg0xBAgfE 3GIxVbBSQIDNCaQRvZxafE80SYA= X-Google-Smtp-Source: AGHT+IGreR0iChGxIGjS3dGFGvpGsoMiucGtqFumOyIlvLwN6FFh6tr8C6FjF0nfQ/BZeK8w19XS1w== X-Received: by 2002:a05:600c:524c:b0:435:306:e5dd with SMTP id 5b1f17b1804b1-4389143a66dmr314967035e9.22.1737895698382; Sun, 26 Jan 2025 04:48:18 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48a906sm95938295e9.18.2025.01.26.04.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 04:48:17 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer , Mathieu Dubois-Briand , Richard Purdie Subject: [scarthgap,styhead][PATCH 5/5] devtool: ide-sdk remove the plugin from eSDK installer Date: Sun, 26 Jan 2025 13:48:06 +0100 Message-ID: <20250126124806.1453644-6-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250126124806.1453644-1-adrian.freihofer@siemens.com> References: <20250126124806.1453644-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 26 Jan 2025 12:48:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210284 From: Adrian Freihofer The ide-sdk command bootstraps the SDK from the bitbake environment before the IDE configuration is generated. In the case of the eSDK installer, the bootstrapping is performed during the installation of the eSDK installer. Running the ide-sdk plugin from an eSDK installer based setup would require skipping the bootstrapping and probably taking some other differences into account when generating the IDE configurations. This would be possible. But it will probably never be implemented, as running devtool ide-sdk directly from the bitbake environment is much more flexible. Also, some of the recent improvements that have made it into the core have the potential to make the eSDK installer obsolete at some point in the future: - bitbake-layers create-layers-setup replicates the layers - bitbake-config-build replicates the build configuration - The new sstate mirror features replicate the sstate - bblock locks the sstate more flexible than the eSDK installer - devtool ide-sdk bootstraps the SDK directly from the bitbake environment. The same environment-setup... file is provided with --mode=shared. The devtool modify based workflow is supported since always by devtool and also the default --mode of devtool ide-sdk. These functions essentially cover what the eSDK installer does without a need for the current implementation of the eSDK installer and the populate_sdk_ext, which is hard to maintain and takes a lot of time to build. This means that instead of making the ide-sdk plugin compatible with the eSDK installer, we should rather replace the current implementation of the eSDK installer and populate_sdk_ext with an implementation that can replicate a normal bitbake environment in a convenient way where the ide-sdk plugin also just works without additional complexity. Signed-off-by: Adrian Freihofer Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- scripts/lib/devtool/ide_sdk.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 5e4c543275..0b50165a12 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -965,6 +965,15 @@ def ide_setup(args, config, basepath, workspace): def register_commands(subparsers, context): """Register devtool subcommands from this plugin""" + # The ide-sdk command bootstraps the SDK from the bitbake environment before the IDE + # configuration is generated. In the case of the eSDK, the bootstrapping is performed + # during the installation of the eSDK installer. Running the ide-sdk plugin from an + # eSDK installer-based setup would require skipping the bootstrapping and probably + # taking some other differences into account when generating the IDE configurations. + # This would be possible. But it is not implemented. + if context.fixed_setup: + return + global ide_plugins # Search for IDE plugins in all sub-folders named ide_plugins where devtool seraches for plugins.