Browse Source
The zephyr build system supports merging application-level board configurations, so there is no need to reproduce this functionality in MicroPython. If CONF_FILE is not explicitly set, then the zephyr build system looks for prj.conf in the application directory. Therefore we rename the MicroPython prj_base.conf to prj.conf. Furthermore, if the zephyr build system finds boards/$(BOARD).conf in the application directory, it merges that configuration with prj.conf. Therefore we rename all the MicroPython board .conf files and move them into a boards/ directory. The minimal configuration, prj_minimal.conf, is left in the application directory because it is used as an explicitly set CONF_FILE in make-minimal.pull/6015/head
Maureen Helm
5 years ago
committed by
Damien George
12 changed files with 7 additions and 40 deletions
@ -1,29 +0,0 @@ |
|||||
#!/usr/bin/env python3 |
|
||||
import sys |
|
||||
import os |
|
||||
import hashlib |
|
||||
|
|
||||
|
|
||||
def hash_file(fname): |
|
||||
if not os.path.exists(fname): |
|
||||
return b"" |
|
||||
hasher = hashlib.md5() |
|
||||
with open(fname, "rb") as f: |
|
||||
hasher.update(f.read()) |
|
||||
return hasher.digest() |
|
||||
|
|
||||
|
|
||||
old_digest = hash_file(sys.argv[3]) |
|
||||
|
|
||||
with open(sys.argv[3] + ".tmp", "wb") as f: |
|
||||
f.write(open(sys.argv[1], "rb").read()) |
|
||||
if os.path.exists(sys.argv[2]): |
|
||||
f.write(open(sys.argv[2], "rb").read()) |
|
||||
|
|
||||
new_digest = hash_file(sys.argv[3] + ".tmp") |
|
||||
|
|
||||
if new_digest != old_digest: |
|
||||
print("Replacing") |
|
||||
os.rename(sys.argv[3] + ".tmp", sys.argv[3]) |
|
||||
else: |
|
||||
os.remove(sys.argv[3] + ".tmp") |
|
Loading…
Reference in new issue