diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/buildman/builderthread.py | 3 | ||||
-rw-r--r-- | tools/buildman/control.py | 2 | ||||
-rw-r--r-- | tools/k3_x509template.txt | 2 | ||||
-rwxr-xr-x | tools/moveconfig.py | 27 |
4 files changed, 30 insertions, 4 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 6b156f152d..8a9d47cd5e 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -322,6 +322,9 @@ class BuilderThread(threading.Thread): # Write out the image and function size information and an objdump env = result.toolchain.MakeEnvironment(self.builder.full_path) + with open(os.path.join(build_dir, 'env'), 'w') as fd: + for var in sorted(env.keys()): + print >>fd, '%s="%s"' % (var, env[var]) lines = [] for fname in ['u-boot', 'spl/u-boot-spl']: cmd = ['%snm' % self.toolchain.cross, '--size-sort', fname] diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 27916d3c35..fcf531c5f1 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -99,7 +99,7 @@ def CheckOutputDir(output_dir): cwd_path = os.path.realpath('.') while True: if os.path.realpath(path) == cwd_path: - Print("Cannot use output directory '%s' since it is within the current directtory '%s'" % + Print("Cannot use output directory '%s' since it is within the current directory '%s'" % (path, cwd_path)) sys.exit(1) parent = os.path.dirname(path) diff --git a/tools/k3_x509template.txt b/tools/k3_x509template.txt index bd3a9ab056..f176ff3ad2 100644 --- a/tools/k3_x509template.txt +++ b/tools/k3_x509template.txt @@ -42,7 +42,7 @@ # salt = FORMAT:HEX,OCT:TEST_IMAGE_KEY_DERIVE_SALT [ debug ] + debugUID = FORMAT:HEX,OCT:0000000000000000000000000000000000000000000000000000000000000000 debugType = INTEGER:4 coreDbgEn = INTEGER:0 coreDbgSecEn = INTEGER:0 - debugUID = FORMAT:HEX,OCT:0000000000000000000000000000000000000000000000000000000000000000 diff --git a/tools/moveconfig.py b/tools/moveconfig.py index caa81ac2ed..1a214c5605 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -545,6 +545,28 @@ def confirm(options, prompt): return True +def cleanup_empty_blocks(header_path, options): + """Clean up empty conditional blocks + + Arguments: + header_path: path to the cleaned file. + options: option flags. + """ + pattern = re.compile(r'^\s*#\s*if.*$\n^\s*#\s*endif.*$\n*', flags=re.M) + with open(header_path) as f: + data = f.read() + + new_data = pattern.sub('\n', data) + + show_diff(data.splitlines(True), new_data.splitlines(True), header_path, + options.color) + + if options.dry_run: + return + + with open(header_path, 'w') as f: + f.write(new_data) + def cleanup_one_header(header_path, patterns, options): """Clean regex-matched lines away from a file. @@ -626,8 +648,9 @@ def cleanup_headers(configs, options): continue for filename in filenames: if not fnmatch.fnmatch(filename, '*~'): - cleanup_one_header(os.path.join(dirpath, filename), - patterns, options) + header_path = os.path.join(dirpath, filename) + cleanup_one_header(header_path, patterns, options) + cleanup_empty_blocks(header_path, options) def cleanup_one_extra_option(defconfig_path, configs, options): """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in one defconfig file. |