From patchwork Mon Dec 16 17:43:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54159 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 18699E7717F for ; Mon, 16 Dec 2024 17:44:31 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web10.62664.1734371061132794736 for ; Mon, 16 Dec 2024 09:44:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j3JNboLB; spf=pass (domain: gmail.com, ip: 209.85.221.41, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3862b40a6e0so2467668f8f.0 for ; Mon, 16 Dec 2024 09:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734371059; x=1734975859; 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=+Z+Jas9GGCrS1wIN2nVLEaEi5vvOZqNogZHg/MfNjio=; b=j3JNboLB6EizJqGJ5ty4ofuQVJq7CbkdyjfwX6yZW8Hq8L0BXmtQxb1UoqSf8x47bP 2dUmb09nWWEAzhcLt/Euvk7vDIUIBTz7hMJx+wZyZcvEPAKNGtUhQiJ3AzVJWq/OJoDt ggbZUnTpiYtzJ/1cCHQftlWQIJqmY8IxqGeq7DHQ7G2/MVgubr4yC6H1nmRcMI9/+SWE lnHSjMegQu0W4aZJAWkQ4QPHfYRtbeVSDJGD2Xf1vvqPMklGqga+hCJQa7kRIlFPGd8a QKPydX2Uuv2nb9RMsOADkS+3FsNyQ56tgmCmf+ahlX19hvroj5oHU8uDb41pG6QjLr47 cllw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734371059; x=1734975859; 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=+Z+Jas9GGCrS1wIN2nVLEaEi5vvOZqNogZHg/MfNjio=; b=foK8b0vI9PD9cX7ziG+krK5KR/LkVKpvSz1TgUiaBMESRZBWLG9YvhkbvPtLJUT7ci juyyKxM6CXjIfBypXk8usPm5Ukn9SeGcDbgY4DF2mwI01is/cYkO7G90FCvc54upNkdm 1YtnRRu0ykKhLvYEvusW/0YtPUM8AqQLwMVwISHVpMKSr1RGoWaOHhqdKW4BTVMa68aZ /aAepdbe7wluRCh8xMPMGUHazqEQsBBrAf21lYJYyp+zbgLWQ7JpyRFesIwIKHkbml/X ZArJk6H7Jjlac6A0Tmw88YL3TRzVANIy4AQ9hFM06WCkme3h3XTVZZW9B8KL+Vfi9BeV EJvw== X-Gm-Message-State: AOJu0YxjdvGmQS0FDC4xZCV6ni7kd6o5Nm1XyyM7kB0XZxY8UzyOQuIx KeMPLHstA2dM0EIMdEuOOqax31EwVuqrRPajjyTmQcwwFg7SqZB5UN2Y/g== X-Gm-Gg: ASbGncuGw9vx8kZYNRYPDGP8HAnuRFlTnffiF51lXi6IPT/LspYgNH98e/NjIrqlTWE HgCb+BYTkxhtXOdnJg341YMBm7MVWBq88XkbwjGo2O8oxeDWAUWF5wFJu1XRZPWm3McI5uPnfCz +dimVDkvuS0T+DFgvEao2yJySFpZt6Z5hlo2exuLqJTuPiTzWyd3Ry/YG9s0e9FsomUxAAoYklF /KeWFBI++1TyyU8nrA51tU/WpGki+++y8W5znWCr9EOa12LGeUnABLrcri66Fc6Qz9eywEclVS9 X-Google-Smtp-Source: AGHT+IEZ/p6WRn9E/lSlRHA1geX4q24dKRuOrLynuAvJ9HqGG+WZIPWmwdjnEjc5FvxHq0b1Ivyj6Q== X-Received: by 2002:a5d:598e:0:b0:385:e1a8:e2a1 with SMTP id ffacd0b85a97d-38880af153bmr12231315f8f.3.1734371058980; Mon, 16 Dec 2024 09:44:18 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c46sm8892338f8f.71.2024.12.16.09.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:44:17 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 1/4] devtool: modify support debug-builds Date: Mon, 16 Dec 2024 18:43:03 +0100 Message-ID: <20241216174406.3128556-2-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216174406.3128556-1-adrian.freihofer@gmail.com> References: <20241216174406.3128556-1-adrian.freihofer@gmail.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 ; Mon, 16 Dec 2024 17:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208786 From: Adrian Freihofer 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 --- 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 f2440ae804f..fa846ce61ac 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -972,6 +972,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]) @@ -2310,6 +2312,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 Mon Dec 16 17:43:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54160 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 1934DE77180 for ; Mon, 16 Dec 2024 17:44:31 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web10.62666.1734371062530288639 for ; Mon, 16 Dec 2024 09:44:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=B4uaNlFb; spf=pass (domain: gmail.com, ip: 209.85.221.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-385e3621518so2188693f8f.1 for ; Mon, 16 Dec 2024 09:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734371061; x=1734975861; 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=4shF/IcXSQb7qKeXDzWXNpx/W3qqFEV8vsY52mCf2SM=; b=B4uaNlFbnDV/UABOWM7LkRLc390SNwsvs4sqwpwgtiGEayv7HKZdNcGi1hOsr35GSl xNWwwCxKAO1wBypr1J+D4cvSUUsH+meKeFwOE1C/MpBt5w+YBog6Zti55+SH3H/MBySN MSBGd/yR+Q8RZrvg9xDB7j6eY6fVXe1mIraO2/77Ks1yUDEzzvvx8Tqh89wCCLEx6OCN 8hodPR8f9p2+O2si1tfocTZtf2QU6cfo3VhWT/dffRovdYVpO3YapFOUae6I32u1HSkG +6jIfqJqAxchjfXLS1PRn2UQqcIM43V3J6fiOMPAxw9+di3jOGWCWa4fyOkp9xEkk9A4 GVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734371061; x=1734975861; 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=4shF/IcXSQb7qKeXDzWXNpx/W3qqFEV8vsY52mCf2SM=; b=VmgiAIZeJ5FME7QsjNK88/tTC2OFUZCEJzFZMMts1Zh4Zvi4TBnsZ7mtY5/6nowo9M nog0WThuGBPQM48g4D89AhEFPZG3b02nygQUE9uxATkNZ4LCCh4smDrCso09jAKimSlY ri8JPKjL8Hw4CGeSvBlB/JFvC0KaZR7lXCtWOhMSMAr6yAuDsnGYNd3VHtT2biox96yh aJ5bg005BbEdDNfbGNopCyqaeLhFiNOs7WdLAVzoHafjmE7j7yv2UA4N/04aTad0OTXF bVuBv2ZSb5OVjsgzVGFEAlcGrw/K/BvrQogdsyDe0urvUI2DukQJdA0HIEIqH8VA6Nrf Qt6A== X-Gm-Message-State: AOJu0YwI0jyMCpE86bwAvMrn810q8VkhF7RfdNRPFZlN32OXZxyeTBcI 44OUogbM+2F1b48iEensosdKlaUKtcqQ39+j626qsaVjpWu65DxZw7kRgQ== X-Gm-Gg: ASbGncvhlsaQW+HAs37toY9w/M/b5cPCSmmG07IHHmn/lb/hGlMaAKN3MapYs3omeFe IeC/UG8rMjeYRqqhTP8GEd7E36w0Iys+Ypsyr+BOKyGu2P3FY9cDZQ3xps9R8nPnLR1jLnJtBbj Uv/hzwKD6AHvvAe5AOlOof7p54w5yaTBBykLnyoQFhHTu3H9oDSeIqvhgmrOBGM8HNc4mdzRfGC PP7G2Z+c8FGyPqFEBalZI95LqMUrEZObT9oqQ9ZO97mOuQ5YBTG9n737cObAnswRZcwF7DqwHZK X-Google-Smtp-Source: AGHT+IHudL5kC67csMLNZB2bffQ/Lq/ibH42iK3ds7u9s619ONhrj2GzU6ldND6fyb3BAaXgS41WOA== X-Received: by 2002:a05:6000:4b0c:b0:385:df44:12cb with SMTP id ffacd0b85a97d-3886c72506bmr12319621f8f.0.1734371060378; Mon, 16 Dec 2024 09:44:20 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c46sm8892338f8f.71.2024.12.16.09.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:44:20 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 2/4] devtool: ide-sdk sort cmake preset Date: Mon, 16 Dec 2024 18:43:04 +0100 Message-ID: <20241216174406.3128556-3-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216174406.3128556-1-adrian.freihofer@gmail.com> References: <20241216174406.3128556-1-adrian.freihofer@gmail.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 ; Mon, 16 Dec 2024 17:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208787 From: Adrian Freihofer Sort the keys of the generated CMakeUserPreset.json file to make it easier to search and compare. Signed-off-by: Adrian Freihofer --- 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 2f6eddec2a0..42ee13b3e54 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 Mon Dec 16 17:43:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54162 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 205A6E77184 for ; Mon, 16 Dec 2024 17:44:31 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web11.62604.1734371063819331141 for ; Mon, 16 Dec 2024 09:44:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MUFAJPN/; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-385e06af753so2319399f8f.2 for ; Mon, 16 Dec 2024 09:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734371062; x=1734975862; 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=hoZy9XMkcTm1EvF1HwkxTMLORXt5c3yZSCOY7iD6tkQ=; b=MUFAJPN/At8dZONQb4UaGXqIQ7e98eVRVt7QAJp1pxCbP5hllenityHhccLvDrtF4C O9gprhUKppiVdTrLMaWx1nxdZYMOjNR9FWKMYJYr+gkhPNKfC84N/5Hwrx/fiYkcayxx 3X+LFCJZYGgQx+7Kn9Aw7lbNcdtrCXUdxBhbKM4stjdfw9EJb9p29Q/G8arjoL6b3N2r Ghag9hGUCOj1EFE3uH8yAdHQKjaepwS1y2U3iaW1aIbxvNnpM70yCQ3ixdO0YA/x1Cwx sv01asqGYym5BemLuhEUG/6lbrygFJv1lpj24ny/RxVJ0TweDREN4Z/hRFj6gE7Uzw3j 7W3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734371062; x=1734975862; 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=hoZy9XMkcTm1EvF1HwkxTMLORXt5c3yZSCOY7iD6tkQ=; b=Zy0MnxpqkjRsIwLn6Qa4YVIQkWo9ZvKulyK8PkUeBAZUrqbYLz8jakxrhAa1EUlBT6 3VnMd0CaU1M42GypyD+9yBH/ei9/nRy4zXZcydWehqEfoZgCYPHJwXXSNu7ZZhjiNvcx 48WJ439z9PLdiNaZt/AfvkEOfVr72abtFG1IAXBabjL55TIbgfeoLatu3/KwgN8eXhhW EyV1vkO59b5KRb/cqlkD09VsazufGajwKWMxFcZxJJuhq7+Sq/9xl8MljH4fpM0aeh9a gDodoLR6l0LkL9mzFWKjEF/mX8/6gzeGsukwf8sRFkiVr1u6DdD/k2KP0pI6htV45ZcK sROQ== X-Gm-Message-State: AOJu0YwHrzR5SOv9UHVGPWXOdhZaVBmCmMllJy/qeNi6/hhKWi7+Q8mt 5UtphRZdppZBLXedMUSWPY0+6V7KlYxYDpjURQ5aWoQfkRYpOQpBQ0o+OQ== X-Gm-Gg: ASbGncv3D8ldQ8RhRByau9DtdTVx8TtZ9v81QpDrGvdfm2+483Ry9NZwyHU7fp+O9ZM FPq9mqi2dIsvkr/SUL2zXA/KSuCxfAhW8hagcmwtwfFDuUSZ0P5oGPiJSUnCW3cmH6KddK6WoyU ngucAUKSASEmQPwLzo52HY7hunXqwEH3pxR6B/bNn5MmLjI3Nm8htCMFqrKFjT0VrzS8izlxmMB QKogUo1RJ9iQffwmZ2xgSZ241RowVTYOKrCUo87v1DHN/sp1+da9N79A18tnAtJcJwmGk8XaZv8 X-Google-Smtp-Source: AGHT+IGxzYjnhqljkaTYkh+ukKGnFMxDFhUqywyztqosH6TgKPIDfvWiM+Rel1rIX/ZlXzbxHX/mAg== X-Received: by 2002:a05:6000:2a6:b0:385:fb34:d59f with SMTP id ffacd0b85a97d-38880af1508mr10929770f8f.11.1734371061793; Mon, 16 Dec 2024 09:44:21 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c46sm8892338f8f.71.2024.12.16.09.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:44:21 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 3/4] devtool: ide-sdk recommend DEBUG_BUILD Date: Mon, 16 Dec 2024 18:43:05 +0100 Message-ID: <20241216174406.3128556-4-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216174406.3128556-1-adrian.freihofer@gmail.com> References: <20241216174406.3128556-1-adrian.freihofer@gmail.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 ; Mon, 16 Dec 2024 17:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208788 From: Adrian Freihofer 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 --- 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 42ee13b3e54..ee7c68dbbe9 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 @@ -950,6 +913,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.") @@ -1027,6 +997,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 Mon Dec 16 17:43:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54161 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 2815CE77183 for ; Mon, 16 Dec 2024 17:44:31 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web11.62606.1734371065396244741 for ; Mon, 16 Dec 2024 09:44:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IVUSUCtN; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-436341f575fso30840975e9.1 for ; Mon, 16 Dec 2024 09:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734371063; x=1734975863; 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=bbAa0Pu7sqj71oQIxq5N/BDzE2UBYAzsc6fFBS4ZWMM=; b=IVUSUCtN+1jXH0yougoiXoJSxgbn2aUiKYStODHargnJMhl7sGFsbuQTmilNtboE0f df9tBpRCUCwZT223LP0fsGb2kXGOBQxvC6AWjQ34KVSQpEvR/QAur7ZNxW5qIPQk3Egs PAEA0XxYTyvblnBbJj75WSBFX/lYZqUnQqpheZiU/3n/2rq7KqOCM0C/PLJRtnwy1Exs Z3dgXuXtmMg9s3RAp11Uf0U/V0abjsxMjtX0snqauRUJulZIkinVrOKzlUG5jG/yuxtW f1lo4ICPrWkx6BqZ1s3qJlrq8i2Xm8+d1r3LPPd6QeIyd+vaiQnp16BCFTp8z7OsIQFh Ndfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734371063; x=1734975863; 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=bbAa0Pu7sqj71oQIxq5N/BDzE2UBYAzsc6fFBS4ZWMM=; b=G0hvUJZG/irLbO1E5LvIZp/S32QpTq57BPgExOiOB0oYSNtKvqscW5ESo+a/bxV2Nh FkG68HRPTwyjJXH8B4SKWN8vMrxle5SjhvWqb4A3E7JPnp5zYdraYJ/9oW6tDs8rdASd DFf0J719d+G178TEdqpTD5KPEYzjKDoF5kXgEYIQ6Oi9rHbmybQqYFhosBqQg1ABPFzj vMZ4ESatGfg4UGrEDIy3eLx03XXUDwBx07ZLRmcDzlq54euX4lyiyxbGDxSFKFRtNAnr j1ev23iosqjeiSrn64grVS1MS1HGKY4ImT6lXnnBq0SyftPVbCdFKe6Sh7bLAIbper/+ 8mSA== X-Gm-Message-State: AOJu0Yz7F2t3++WKnXb13l9KDGnhBb3Et2wZHbjn6eARPqvKASVfUFNi o6g357y0qUnRMimPJG+QKyOv3Gbe/N0hBNT+bfcsHNGIlryzQd9TF+jEQQ== X-Gm-Gg: ASbGncsuUFA9ExBjuTzOMhY2XHb/JCd2deXptPE8+GasWD94zpU1OaZLEoPzelM+2// EPIM6PqO4NSsa6Pu/LRqf4b5JdR6p9Y+iE7q21EhTwsAwXCfrhNSQRC20NaWoIhtMU3GAVsNkCl krqtRTxn6LloktVbAeKCaxK2LAVDSXOOWws3r2gindSMw7Kh1ISMCwhMgbLsDeZMdYNQcmT1h2n uAI1WMf2lUTGFnBJqmVtRYiRyg//B0t4ME9AKmMD7jEgv29xqas2/uijgZBZS8miN15HF2IJtLK X-Google-Smtp-Source: AGHT+IG9AvEvI5NLRrqeOeKxdLsXFwK0pKV7CU5WkawE3iqwyK1ctfeZtA3bIottR9HZuMuPWis00w== X-Received: by 2002:a05:6000:178b:b0:37d:4833:38f5 with SMTP id ffacd0b85a97d-38880ae14a8mr10684582f8f.30.1734371063189; Mon, 16 Dec 2024 09:44:23 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c46sm8892338f8f.71.2024.12.16.09.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:44:22 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 4/4] oe-selftest: devtool ide-sdk use modify debug-build Date: Mon, 16 Dec 2024 18:43:06 +0100 Message-ID: <20241216174406.3128556-5-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216174406.3128556-1-adrian.freihofer@gmail.com> References: <20241216174406.3128556-1-adrian.freihofer@gmail.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 ; Mon, 16 Dec 2024 17:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208789 From: Adrian Freihofer Signed-off-by: Adrian Freihofer --- 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 8d80501becb..fb9d7966eda 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -2533,7 +2533,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',