diff --git a/main.py b/main.py index b258b947d8731ed26be3fe403314bbbe768ce990..3337463b502bd60c1aecaf4299b97a5e88d1210c 100644 --- a/main.py +++ b/main.py @@ -53,30 +53,55 @@ def menuconfig_proc(board): if plat == '': print('Not supported {}'.format(board)) return - src_path = abs_path + '\\system\\platform\\' + plat + '\\boards\\' + board + '\\config' - dst_path = abs_path + '\\config' + + if host_spec == ' HOST=win32': + src_path = abs_path + '\\system\\platform\\' + plat + '\\boards\\' + board + '\\config' + dst_path = abs_path + '\\config' + + shutil.copy(src_path + '\\config.in', dst_path) + shutil.copy(src_path + '\\config.mk', dst_path) + shutil.copy(src_path + '\\autoconf.h', dst_path) + + target_dir = dst_path + '\\include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(src_path + '\\include', dst_path + '\\include') + else: + src_path = abs_path + '/system/platform/' + plat + '/boards/' + board + '/config' + dst_path = abs_path + '/config' - shutil.copy(src_path + '\\config.in', dst_path) - shutil.copy(src_path + '\\config.mk', dst_path) - shutil.copy(src_path + '\\autoconf.h', dst_path) + shutil.copy(src_path + '/config.in', dst_path) + shutil.copy(src_path + '/config.mk', dst_path) + shutil.copy(src_path + '/autoconf.h', dst_path) - target_dir = dst_path + '\\include' - if os.path.exists(target_dir): - shutil.rmtree(target_dir, ignore_errors=True) - if not os.path.exists(target_dir): - shutil.copytree(src_path + '\\include', dst_path + '\\include') + target_dir = dst_path + '/include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(src_path + '/include', dst_path + '/include') cmd_str = 'make menuconfig PY=' + argv[1] + host_spec os.system(cmd_str) - shutil.copy(dst_path + '\\config.in', src_path) - shutil.copy(dst_path + '\\config.mk', src_path) - shutil.copy(dst_path + '\\autoconf.h', src_path) - target_dir = src_path + '\\include' - if os.path.exists(target_dir): - shutil.rmtree(target_dir, ignore_errors=True) - if not os.path.exists(target_dir): - shutil.copytree(dst_path + '\\include', src_path + '\\include') + if host_spec == ' HOST=win32': + shutil.copy(dst_path + '\\config.in', src_path) + shutil.copy(dst_path + '\\config.mk', src_path) + shutil.copy(dst_path + '\\autoconf.h', src_path) + target_dir = src_path + '\\include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(dst_path + '\\include', src_path + '\\include') + else: + shutil.copy(dst_path + '/config.in', src_path) + shutil.copy(dst_path + '/config.mk', src_path) + shutil.copy(dst_path + '/autoconf.h', src_path) + target_dir = src_path + '/include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(dst_path + '/include', src_path + '/include') # clean cmd process @@ -145,20 +170,36 @@ def make_proc(): return else: abs_path = os.getcwd() - src_path = abs_path + '\\system\\platform\\' + get_plat_by_board(i) + '\\boards\\' + i + '\\config' - dst_path = abs_path + '\\config' - if not filecmp.cmp(src_path + '\\config.in', dst_path + '\\config.in', shallow=False): - shutil.copy(src_path + '\\config.in', dst_path) - if not filecmp.cmp(src_path + '\\config.mk', dst_path + '\\config.mk', shallow=False): - shutil.copy(src_path + '\\config.mk', dst_path) - if not filecmp.cmp(src_path + '\\autoconf.h', dst_path + '\\autoconf.h', shallow=False): - shutil.copy(src_path + '\\autoconf.h', dst_path) - - target_dir = dst_path + '\\include' - if os.path.exists(target_dir): - shutil.rmtree(target_dir, ignore_errors=True) - if not os.path.exists(target_dir): - shutil.copytree(src_path + '\\include', dst_path + '\\include') + if host_spec == ' HOST=win32': + src_path = abs_path + '\\system\\platform\\' + get_plat_by_board(i) + '\\boards\\' + i + '\\config' + dst_path = abs_path + '\\config' + if not filecmp.cmp(src_path + '\\config.in', dst_path + '\\config.in', shallow=False): + shutil.copy(src_path + '\\config.in', dst_path) + if not filecmp.cmp(src_path + '\\config.mk', dst_path + '\\config.mk', shallow=False): + shutil.copy(src_path + '\\config.mk', dst_path) + if not filecmp.cmp(src_path + '\\autoconf.h', dst_path + '\\autoconf.h', shallow=False): + shutil.copy(src_path + '\\autoconf.h', dst_path) + + target_dir = dst_path + '\\include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(src_path + '\\include', dst_path + '\\include') + else: + src_path = abs_path + '/system/platform/' + get_plat_by_board(i) + '/boards/' + i + '/config' + dst_path = abs_path + '/config' + if not filecmp.cmp(src_path + '/config.in', dst_path + '/config.in', shallow=False): + shutil.copy(src_path + '/config.in', dst_path) + if not filecmp.cmp(src_path + '/config.mk', dst_path + '/config.mk', shallow=False): + shutil.copy(src_path + '/config.mk', dst_path) + if not filecmp.cmp(src_path + '/autoconf.h', dst_path + '/autoconf.h', shallow=False): + shutil.copy(src_path + '/autoconf.h', dst_path) + + target_dir = dst_path + '/include' + if os.path.exists(target_dir): + shutil.rmtree(target_dir, ignore_errors=True) + if not os.path.exists(target_dir): + shutil.copytree(src_path + '/include', dst_path + '/include') cmd_str = cmd_str + ' PLAT=' + get_plat_by_board(i) + ' BOARD=' + i got_plat = True diff --git a/system/platform/ASR/boards/EC600NCN_LA/images/DBG.7z b/system/platform/ASR/boards/EC600NCN_LA/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..9b58e6de6dc2a84071993fda8e1b0bed85c5b1f9 Binary files /dev/null and b/system/platform/ASR/boards/EC600NCN_LA/images/DBG.7z differ diff --git a/system/platform/ASR/boards/EC600NCN_LC/images/DBG.7z b/system/platform/ASR/boards/EC600NCN_LC/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..41f6cb71bea910d51ff6c7220a702fa754e25692 Binary files /dev/null and b/system/platform/ASR/boards/EC600NCN_LC/images/DBG.7z differ diff --git a/system/platform/ASR/boards/EC600NCN_LD/images/DBG.7z b/system/platform/ASR/boards/EC600NCN_LD/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..d2994230adc6cbbe7f226a93c168b63837645d79 Binary files /dev/null and b/system/platform/ASR/boards/EC600NCN_LD/images/DBG.7z differ diff --git a/system/platform/ASR/boards/EC600SCN_LA/images/DBG.7z b/system/platform/ASR/boards/EC600SCN_LA/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..8e64155f2f4dbce85ffb9cbd7b7bef9db1b1e78a Binary files /dev/null and b/system/platform/ASR/boards/EC600SCN_LA/images/DBG.7z differ diff --git a/system/platform/ASR/boards/EC600SCN_LB/images/DBG.7z b/system/platform/ASR/boards/EC600SCN_LB/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..aa66217d0e6909ebbf35af791077930ddcd1bff9 Binary files /dev/null and b/system/platform/ASR/boards/EC600SCN_LB/images/DBG.7z differ diff --git a/system/platform/ASR/boards/EC800NCN_LA/images/DBG.7z b/system/platform/ASR/boards/EC800NCN_LA/images/DBG.7z new file mode 100644 index 0000000000000000000000000000000000000000..68f2c23975b696163327b7a38d96390e30898053 Binary files /dev/null and b/system/platform/ASR/boards/EC800NCN_LA/images/DBG.7z differ diff --git a/system/platform/ASR/scripts/private.mk b/system/platform/ASR/scripts/private.mk index 9f1570d369d78c736e2d7c68625b659ded3ba02b..f7695814bde3de2067fa132d08d230b85b1290d9 100644 --- a/system/platform/ASR/scripts/private.mk +++ b/system/platform/ASR/scripts/private.mk @@ -52,7 +52,7 @@ $(FIRMWARE_REL_ZIP): $(FIRMWARE_BASE) $(TARGET_COMPRESS_BIN) $(Q)mkdir -p $(OUTPUT_REL_PATH)/$(FW_NAME) $(Q)cp $(FIRMWARE_BASE) $@.tmp $(Q)$(Z7_CMD_PATCH)$(Z7_CMD) a -tzip $(Z7_CMD_PATCH)$@.tmp $(shell readlink -f $(Z7_CMD_PATCH)$(TARGET_COMPRESS_BIN)) > /dev/null - $(Q)cp -arf $(IMAGES_PATH)/DBG $(OUTPUT_REL_PATH)/$(FW_NAME) + $(Q)$(Z7_CMD_PATCH)$(Z7_CMD) x -y $(Z7_CMD_PATCH)$(IMAGES_PATH)/DBG.7z -o$(Z7_CMD_PATCH)$(OUTPUT_REL_PATH)/$(FW_NAME) > /dev/null $(Q)cp -arf $(IMAGES_PATH)/firmware_base.json $(OUTPUT_REL_PATH)/$(FW_NAME)/$(FW_NAME).json $(Q)mv $@.tmp $@ @echo ----- $@ updated @@ -61,8 +61,8 @@ $(FIRMWARE_FAC_ZIP): $(FIRMWARE_FAC_BASE) $(TARGET_COMPRESS_BIN) $(Q)mkdir -p $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/DBG $(Q)cp $(FIRMWARE_FAC_BASE) $@.tmp $(Q)$(Z7_CMD_PATCH)$(Z7_CMD) a -tzip $(Z7_CMD_PATCH)$@.tmp $(shell readlink -f $(Z7_CMD_PATCH)$(TARGET_COMPRESS_BIN)) > /dev/null - $(Q)cp -arf $(IMAGES_PATH)/DBG/*.txt $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/DBG - $(Q)cp -arf $(IMAGES_PATH)/DBG/*.mdb $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/DBG + $(Q)cp -arf $(OUTPUT_REL_PATH)/$(FW_NAME)/DBG/*.txt $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/DBG + $(Q)cp -arf $(OUTPUT_REL_PATH)/$(FW_NAME)/DBG/*.mdb $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/DBG $(Q)cp -arf $(IMAGES_PATH)/firmware_base.json $(OUTPUT_REL_PATH)/$(FW_NAME_FAC)/$(FW_NAME_FAC).json $(Q)mv $@.tmp $@ @echo ----- $@ updated