diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-05-31 07:48:33 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-06-07 22:25:07 +0300 |
commit | 0ddc510ea37aa578b8cb197840a5125409978bec (patch) | |
tree | ec86d6c4a05306a43cf4270f12ad3581224caab6 /tools/buildman/builderthread.py | |
parent | bf6226c3c4e181f7fcaec924ccd7c953f6aa0d9b (diff) | |
download | u-boot-0ddc510ea37aa578b8cb197840a5125409978bec.tar.xz |
buildman: Extract environment as part of each build
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builderthread.py')
-rw-r--r-- | tools/buildman/builderthread.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 0efe80d945..c84ba6acf1 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=True, + capture_stderr=True, 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 |