diff options
| author | Tom Rini <trini@konsulko.com> | 2019-02-10 08:04:53 -0500 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-02-10 08:04:53 -0500 |
| commit | 2e8560797fc69a34c330a875da4f5d2992452f1e (patch) | |
| tree | fadec67e667ef3d72d62cef98aa3b3b19b2dd4a5 /tools | |
| parent | 97276a91db8e98f081a40ddf9dc8f81d4032a756 (diff) | |
| parent | 4a1fa524e95a1c81674d8a368035b522fd4a99d6 (diff) | |
| download | u-boot-2e8560797fc69a34c330a875da4f5d2992452f1e.tar.gz u-boot-2e8560797fc69a34c330a875da4f5d2992452f1e.tar.xz u-boot-2e8560797fc69a34c330a875da4f5d2992452f1e.zip | |
Merge branch '2019-02-08-master-imports'
- bcm6345 watchdog, bcm63158/bcm963158 initial support.
- Various TI platform resyncs and improvements.
- FDT support in Android-format images.
- stm32mp1 improvements.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/k3_x509template.txt | 2 | ||||
| -rwxr-xr-x | tools/moveconfig.py | 27 |
2 files changed, 26 insertions, 3 deletions
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. |
