Merge pull request #21 from ch999dev/master

[sstar] make local build on ubuntu 20 happy
pull/25/head
Igor Zalatov 2021-05-24 22:56:51 +03:00 committed by GitHub
commit cfebce8876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1,64 @@
--- a/scripts/ms_bin_option_get_int.py 2021-05-17 00:51:18.868114209 +0300
+++ b/scripts/ms_bin_option_get_int.py 2021-05-17 00:05:08.807550092 +0300
@@ -5,10 +5,16 @@
if __name__ == '__main__':
name=sys.argv[2]
-# if sys.argv[3].upper().startswith( '0X' ):
-# value=long(sys.argv[3],16)
-# else:
-# value=long(sys.argv[3])
+ if sys.version_info.major == 2:
+ if sys.argv[3].upper().startswith( '0X' ):
+ value=long(sys.argv[3],16)
+ else:
+ value=long(sys.argv[3])
+ else:
+ if sys.argv[3].upper().startswith( '0X' ):
+ value=int(sys.argv[3],16)
+ else:
+ value=int(sys.argv[3])
fmap=mmap.mmap(os.open(sys.argv[1],os.O_RDWR),0)
--- a/scripts/ms_bin_option_update_int.py 2021-05-17 00:51:18.868114209 +0300
+++ b/scripts/ms_bin_option_update_int.py 2021-05-17 01:02:24.277864288 +0300
@@ -3,12 +3,19 @@
import re, fnmatch, os, sys, mmap, struct
if __name__ == '__main__':
-
- name=sys.argv[2]
- if sys.argv[3].upper().startswith( '0X' ):
- value=long(sys.argv[3],16)
+ print(sys.argv)
+ if sys.version_info.major == 2:
+ name=sys.argv[2]
+ if sys.argv[3].upper().startswith( '0X' ):
+ value=long(sys.argv[3],16)
+ else:
+ value=long(sys.argv[3])
else:
- value=long(sys.argv[3])
+ name=sys.argv[2].encode()
+ if sys.argv[3].upper().startswith( '0X' ):
+ value=int(sys.argv[3],16)
+ else:
+ value=int(sys.argv[3])
fmap=mmap.mmap(os.open(sys.argv[1],os.O_RDWR),0)
--- a/scripts/ms_builtin_dtb_update.py 2021-05-17 00:51:18.868114209 +0300
+++ b/scripts/ms_builtin_dtb_update.py 2021-05-17 00:02:41.886266869 +0300
@@ -17,6 +17,11 @@
print ('DTB size 0x%08X too big to fit in 64K limit!!' % dtb.size())
sys.exit()
+ if sys.version_info.major == 2:
+ name=sys.argv[2]
+ else:
+ name=sys.argv[2].encode()
+
fmap=mmap.mmap(os.open(sys.argv[1],os.O_RDWR),0)
offset=fmap.find(name)

View File

@ -0,0 +1,24 @@
--- a/makefile 2021-05-16 02:02:11.148664390 +0300
+++ b/makefile 2021-05-18 02:04:02.210673988 +0300
@@ -4,8 +4,10 @@
# additional $(MAKEFLAGS) with 'w' passed
# use $(filter-out w,$(MAKEFLAGS)) instead of $(MAKEFLAGS)
-%: force
- @$(MAKE) -f Makefile $(filter-out w,$(MAKEFLAGS)) $@
+%: force
+# -w already filtered by buildroot
+ @$(MAKE) -f Makefile $@
+# @$(MAKE) -f Makefile $(filter-out w,$(MAKEFLAGS)) $@
%_defconfig: force
@echo "Extract CHIP NAME ($(firstword $(subst _, ,$@))) to $(SSTAR_CHIP_FILE)"
@@ -13,7 +15,7 @@
@echo $(strip $(firstword $(subst _, ,$@))) > $(SSTAR_CHIP_FILE)
@$(MAKE) -f Makefile $(filter-out w,$(MAKEFLAGS)) $@
-GNUmakefile: force
+GNUmakefile: force
@$(MAKE) -f Makefile $(filter-out w,$(MAKEFLAGS)) $(filter-out GNUmakefile,$@)
makefile:;