diff options
| author | Bernard Xiong <[email protected]> | 2020-01-14 09:51:11 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-01-14 09:51:11 +0800 |
| commit | c07ad5c24fc9daa8cf1ecbe2f7808a387fcdc536 (patch) | |
| tree | f58f42acee81edead1440224ac94458ad8371566 | |
| parent | 390687122ebcd9332282ec116a3c719d8c802eae (diff) | |
| parent | 438397b586a62ea65917bc961e95ffa8e376098f (diff) | |
Merge pull request #3323 from chenxuuu/patch-1
fix makeimg.py wrong on linux
| -rw-r--r-- | bsp/w60x/makeimg.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bsp/w60x/makeimg.py b/bsp/w60x/makeimg.py index 277ad872d5..f3f194cd90 100644 --- a/bsp/w60x/makeimg.py +++ b/bsp/w60x/makeimg.py @@ -103,6 +103,11 @@ if __name__=='__main__': # Setting the makeimg_all.exe file path makeimg_all_file=wmlib_path_full + '/Tools/makeimg_all.exe' + if (platform.system() == "Linux"): + wm_gzip_file=wmlib_path_full + '/Tools/wm_gzip.py' + makeimg_file=wmlib_path_full + '/Tools/makeimg' + makeimg_all_file=wmlib_path_full + '/Tools/makeimg_all' + # Get absolute path out_path = os.path.abspath(out_path).replace('\\', '/'); bin_file = os.path.abspath(bin_file).replace('\\', '/'); @@ -149,7 +154,10 @@ if __name__=='__main__': print('make_SEC_param' + make_SEC_param) print('make_FLS_param' + make_FLS_param) - do_makeimg(wm_gzip_file, gzip_param) + if (platform.system() == "Linux"): + do_makeimg("python",wm_gzip_file + " " + gzip_param) + else: + do_makeimg(wm_gzip_file, gzip_param) do_makeimg(makeimg_file, make_img_param) do_makeimg(makeimg_file, make_GZ_param) do_makeimg(makeimg_file, make_SEC_param) @@ -177,7 +185,10 @@ if __name__=='__main__': print('make_SEC_param' + make_SEC_param) print('make_FLS_param' + make_FLS_param) - do_makeimg(wm_gzip_file, gzip_param) + if (platform.system() == "Linux"): + do_makeimg("python",wm_gzip_file + " " + gzip_param) + else: + do_makeimg(wm_gzip_file, gzip_param) do_makeimg(makeimg_file, make_img_param) do_makeimg(makeimg_file, make_GZ_param) do_makeimg(makeimg_file, make_SEC_param) @@ -211,4 +222,4 @@ if __name__=='__main__': if os.path.exists(rm_file): os.remove(rm_file) - print('end')
\ No newline at end of file + print('end') |
