U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 1/2] buildman: Extract environment as part of each build
@ 2018-05-25  4:57 Alex Kiernan
  2018-05-25  4:57 ` [U-Boot] [PATCH v1 2/2] buildman: Add support for environment delta in summary Alex Kiernan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alex Kiernan @ 2018-05-25  4:57 UTC (permalink / raw)
  To: u-boot

As we're building the boards, extract the default U-Boot environment to
uboot.env so we can interrogate it later.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

 tools/buildman/builderthread.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 0efe80d945..688322ced2 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -351,6 +351,16 @@ class BuilderThread(threading.Thread):
                     lines.append(size_result.stdout.splitlines()[1] + ' ' +
                                  rodata_size)
 
+            # Extract the environment from U-Boot and dump it out
+            cmd = ['%sobjcopy' % self.toolchain.cross, '-O', 'binary',
+                   '-j', '.rodata.default_environment',
+                   'env/built-in.o', 'uboot.env']
+            command.RunPipe([cmd], capture=False,
+                            capture_stderr=False, cwd=result.out_dir,
+                            raise_on_error=False, env=env)
+            ubootenv = os.path.join(result.out_dir, 'uboot.env')
+            self.CopyFiles(result.out_dir, build_dir, '', ['uboot.env'])
+
             # Write out the image sizes file. This is similar to the output
             # of binutil's 'size' utility, but it omits the header line and
             # adds an additional hex value at the end of each line for the
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-26 22:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-25  4:57 [U-Boot] [PATCH v1 1/2] buildman: Extract environment as part of each build Alex Kiernan
2018-05-25  4:57 ` [U-Boot] [PATCH v1 2/2] buildman: Add support for environment delta in summary Alex Kiernan
2018-05-26  2:07   ` Simon Glass
2018-05-25  8:03 ` [U-Boot] [PATCH v1 1/2] buildman: Extract environment as part of each build Lukasz Majewski
2018-05-25  8:56   ` Alex Kiernan
2018-05-25 10:03     ` Alex Kiernan
2018-05-26  2:07 ` Simon Glass
2018-05-26  5:19   ` Alex Kiernan
2018-05-26 22:18     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox