From: Adrian Freihofer <[email protected]> Previously, the target was hardcoded in the install_and_deploy script, limiting flexibility. This change allows passing the target as a command-line argument, enabling IDEs to configure the target dynamically rather than only at IDE configuration generation time.
This is a first step towards making the target configurable from the IDE. Signed-off-by: Adrian Freihofer <[email protected]> --- scripts/lib/devtool/ide_plugins/ide_code.py | 4 ++++ scripts/lib/devtool/ide_sdk.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py index 67bd341347..3f8c1a44a3 100644 --- a/scripts/lib/devtool/ide_plugins/ide_code.py +++ b/scripts/lib/devtool/ide_plugins/ide_code.py @@ -306,6 +306,10 @@ class IdeVSCode(IdeBase): "label": install_task_name, "type": "shell", "command": run_install_deploy, + "args": [ + "--target", + args.target + ], "problemMatcher": [] } ] diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 2af4dca256..96d60ad4f1 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -859,6 +859,9 @@ class RecipeModified: cmd_lines.append(' for key in my_dict:') cmd_lines.append(' setattr(self, key, my_dict[key])') cmd_lines.append('filtered_args = Dict2Class(filtered_args_dict)') + cmd_lines.append('if len(sys.argv) > 2:') + cmd_lines.append(' if sys.argv[1] == "-t" or sys.argv[1] == "--target":') + cmd_lines.append(' setattr(filtered_args, "target", sys.argv[2])') cmd_lines.append( 'setattr(filtered_args, "recipename", "%s")' % self.bpn) cmd_lines.append('deploy_no_d("%s", "%s", "%s", "%s", "%s", "%s", %d, "%s", "%s", filtered_args)' % @@ -884,7 +887,7 @@ class RecipeModified: 'bitbake %s -c install --force || { echo "bitbake %s -c install --force failed"; exit 1; }' % (self.bpn, self.bpn)) # Self contained devtool deploy-target - cmd_lines.append(self.gen_deploy_target_script(args)) + cmd_lines.append(self.gen_deploy_target_script(args) + ' "$@"') return self.write_script(cmd_lines, 'install_and_deploy') -- 2.52.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#228743): https://lists.openembedded.org/g/openembedded-core/message/228743 Mute This Topic: https://lists.openembedded.org/mt/117010488/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
