Skip to contentSkip to conversation

devtool: clean up debug build

PATCH In review Hongxu Jia 2 participants 5 messages Jan 10 – Jan 15 1 message not in the archive

lore
Share & tools
lore

Hongxu Jia

author
#1 lore raw

PATCH v2 1/1 devtool: clean up debug build

In reply to a message not in the archive

Due to we rework debug friendly optimization, rename DEBUG_BUILD to DEBUG_OPTIMIZE. Then:

- s/DEBUG_BUILD/DEBUG_OPTIMIZE/g

- s/debug-build/debug-optimize/g

- s/debug_build/debug_optimize/g

Note, for specific recipe, we do not use
OE_FRAGMENTS += "core/yocto/debug-optimize"
in recipe

---
 meta/conf/fragments/yocto/devtool-ide-sdk.conf |  2 +-
 meta/lib/oeqa/selftest/cases/devtool.py        |  2 +-
 scripts/lib/devtool/ide_sdk.py                 | 10 +++++-----
 scripts/lib/devtool/standard.py                |  6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)
meta/conf/fragments/yocto/devtool-ide-sdk.conf +1 -1
index ca0269543b..f451b47713 100644
@@ -5,7 +5,7 @@ Example usage: \
   1. bitbake-config-build enable-fragment core/yocto/devtool-ide-sdk \
      bitbake-config-build enable-fragment core/yocto/root-login-with-empty-password \
   2. The recipe (my-recipe in this case) must be in IMAGE_INSTALL. \
-  3. Devtool modify --debug-build my-recipe \
+  3. Devtool modify --debug-optimize my-recipe \
   4. devtool ide-sdk my-recipe core-image-full-cmdline --target [email protected]' \
   5. runqemu snapshot \
   6. code $BUILDDIR/workspace/sources/my-recipe \
meta/lib/oeqa/selftest/cases/devtool.py +1 -1
index 0446b46598..03a0bd0ddc 100644
@@ -2590,7 +2590,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 --debug-build' % (recipe_name, tempdir), output_log=self._cmd_logger)
+        result = runCmd('devtool modify %s -x %s --debug-optimize' % (recipe_name, tempdir), output_log=self._cmd_logger)
         self.assertExists(os.path.join(tempdir, build_file),
                           'Extracted source could not be found')
         self.assertExists(os.path.join(self.workspacedir, 'conf',
scripts/lib/devtool/ide_sdk.py +5 -5
index ba225f20b9..9040eee88d 100755
@@ -398,7 +398,7 @@ class RecipeModified:
         self.bitbakepath = None
         self.bpn = None
         self.d = None
-        self.debug_build = None
+        self.debug_optimize = None
         self.reverse_debug_prefix_map = {}
         self.fakerootcmd = None
         self.fakerootenv = None
@@ -469,7 +469,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.debug_optimize = recipe_d.getVar('DEBUG_OPTIMIZE')
         self.fakerootcmd = recipe_d.getVar('FAKEROOTCMD')
         self.fakerootenv = recipe_d.getVar('FAKEROOTENV')
         self.libdir = recipe_d.getVar('libdir')
@@ -1178,11 +1178,11 @@ def ide_setup(args, config, basepath, workspace):
             ide.setup_modified_recipe(
                 args, recipe_image, recipe_modified)
 
-            if recipe_modified.debug_build != '1':
+            if recipe_modified.debug_optimize != '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.',
+                    'You might want to add DEBUG_OPTIMIZE = "1" to %s. '
+                    'Note that devtool modify --debug-optimize can do this automatically.',
                     recipe_modified.name, recipe_modified.bbappend)
     else:
         raise DevtoolError("Must not end up here.")
scripts/lib/devtool/standard.py +3 -3
index f4d5d7cd3f..51edd08d92 100644
@@ -970,9 +970,9 @@ 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:
+            if args.debug_optimize:
                 f.write('\n# Optimize for debugging. Use e.g. -Og instead of -O2\n')
-                f.write('DEBUG_BUILD = "1"\n')
+                f.write('DEBUG_OPTIMIZE = "1"\n')
                 f.write('\n# Keep the paths to the source files for remote debugging\n')
                 f.write('# DEBUG_PREFIX_MAP = ""\n')
                 f.write('# WARN_QA:remove = "buildpaths"\n')
@@ -2325,7 +2325,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.add_argument('--debug-optimize', action="store_true", help='Add DEBUG_OPTIMIZE = "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',
Signature · 1 line
2.34.1
#2 lore raw

Hi,

meta/conf/fragments/yocto/devtool-ide-sdk.conf

Quoted 25 lines · hongxu via lists.openembedded.org

Due to we rework debug friendly optimization, rename DEBUG_BUILD to DEBUG_OPTIMIZE. Then:

- s/DEBUG_BUILD/DEBUG_OPTIMIZE/g

- s/debug-build/debug-optimize/g

- s/debug_build/debug_optimize/g

Note, for specific recipe, we do not use
OE_FRAGMENTS += "core/yocto/debug-optimize"
in recipe

---
 meta/conf/fragments/yocto/devtool-ide-sdk.conf |  2 +-
 meta/lib/oeqa/selftest/cases/devtool.py        |  2 +-
 scripts/lib/devtool/ide_sdk.py                 | 10 +++++-----
 scripts/lib/devtool/standard.py                |  6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)
meta/conf/fragments/yocto/devtool-ide-sdk.conf +0 -0
index ca0269543b..f451b47713 100644

I can't apply this patch as this file does not exist on master. Does your patch depend on another one?

Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#3 lore raw
Quoted 27 lines · Antonin Godard

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

Quoted 21 lines · hongxu via lists.openembedded.org

Due to we rework debug friendly optimization, rename DEBUG_BUILD to DEBUG_OPTIMIZE. Then:

- s/DEBUG_BUILD/DEBUG_OPTIMIZE/g

- s/debug-build/debug-optimize/g

- s/debug_build/debug_optimize/g

Note, for specific recipe, we do not use
OE_FRAGMENTS += "core/yocto/debug-optimize"
in recipe

---
  meta/conf/fragments/yocto/devtool-ide-sdk.conf |  2 +-
  meta/lib/oeqa/selftest/cases/devtool.py        |  2 +-
  scripts/lib/devtool/ide_sdk.py                 | 10 +++++-----
  scripts/lib/devtool/standard.py                |  6 +++---
  4 files changed, 10 insertions(+), 10 deletions(-)
Quoted 6 lines

meta/conf/fragments/yocto/devtool-ide-sdk.conf

Quoted 4 lines
meta/conf/fragments/yocto/devtool-ide-sdk.conf +0 -0
index ca0269543b..f451b47713 100644

I can't apply this patch as this file does not exist on master. Does your patch depend on another one?

Based on master-next

//Hongxu

Quoted 8 lines

Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#4 lore raw

Hi,

Quoted 28 lines · hongxu via lists.openembedded.org
Quoted 27 lines · Antonin Godard

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

Quoted 21 lines · hongxu via lists.openembedded.org

Due to we rework debug friendly optimization, rename DEBUG_BUILD to DEBUG_OPTIMIZE. Then:

- s/DEBUG_BUILD/DEBUG_OPTIMIZE/g

- s/debug-build/debug-optimize/g

- s/debug_build/debug_optimize/g

Note, for specific recipe, we do not use
OE_FRAGMENTS += "core/yocto/debug-optimize"
in recipe

---
  meta/conf/fragments/yocto/devtool-ide-sdk.conf |  2 +-
  meta/lib/oeqa/selftest/cases/devtool.py        |  2 +-
  scripts/lib/devtool/ide_sdk.py                 | 10 +++++-----
  scripts/lib/devtool/standard.py                |  6 +++---
  4 files changed, 10 insertions(+), 10 deletions(-)
Quoted 8 lines
Quoted 6 lines

meta/conf/fragments/yocto/devtool-ide-sdk.conf

Quoted 4 lines
meta/conf/fragments/yocto/devtool-ide-sdk.conf +0 -0
index ca0269543b..f451b47713 100644

I can't apply this patch as this file does not exist on master. Does your patch depend on another one?

Based on master-next

Sorry, but I can't find a commit on master-next that creates meta/conf/fragments/yocto/devtool-ide-sdk.conf. Can you please re-send the series based off master?

Thanks,
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#5 lore raw
Quoted 40 lines · Antonin Godard

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

Quoted 34 lines · hongxu via lists.openembedded.org
Quoted 33 lines · Antonin Godard

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

meta/conf/fragments/yocto/devtool-ide-sdk.conf

Quoted 25 lines · hongxu via lists.openembedded.org

Due to we rework debug friendly optimization, rename DEBUG_BUILD to DEBUG_OPTIMIZE. Then:

- s/DEBUG_BUILD/DEBUG_OPTIMIZE/g

- s/debug-build/debug-optimize/g

- s/debug_build/debug_optimize/g

Note, for specific recipe, we do not use

    OE_FRAGMENTS += "core/yocto/debug-optimize"

in recipe

---
   meta/conf/fragments/yocto/devtool-ide-sdk.conf |  2 +-
   meta/lib/oeqa/selftest/cases/devtool.py        |  2 +-
   scripts/lib/devtool/ide_sdk.py                 | 10 +++++-----
   scripts/lib/devtool/standard.py                |  6 +++---
   4 files changed, 10 insertions(+), 10 deletions(-)
meta/conf/fragments/yocto/devtool-ide-sdk.conf +0 -0
index ca0269543b..f451b47713 100644

I can't apply this patch as this file does not exist on master. Does your patch depend on another one?

Quoted 4 lines
Quoted 1 line

Based on master-next

Sorry, but I can't find a commit on master-next that creates meta/conf/fragments/yocto/devtool-ide-sdk.conf. Can you please re-send the series based off master?

Oh, seems master-next is refreshed.

Please drop this v2, still using v1

//Hongxu

Quoted 8 lines

Thanks,
Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com