修改pg的rom下载关键字
This commit is contained in:
16
kunlun.py
16
kunlun.py
@@ -29,7 +29,7 @@ def init_send(s_port:serial.Serial, send_str:str):
|
|||||||
send_str=send_str.encode('utf-8')
|
send_str=send_str.encode('utf-8')
|
||||||
key_words={
|
key_words={
|
||||||
b"WQKL":b"Recieving RAM-IMAGE in xmodem : C",
|
b"WQKL":b"Recieving RAM-IMAGE in xmodem : C",
|
||||||
b"HZPG":b"waiting recieve image: C"
|
b"HZPG":b"waiting receive image: C"
|
||||||
}
|
}
|
||||||
while True:
|
while True:
|
||||||
s_port.write(send_str)
|
s_port.write(send_str)
|
||||||
@@ -364,19 +364,21 @@ def global_def():
|
|||||||
if(args.flash_file is not None):
|
if(args.flash_file is not None):
|
||||||
iot_flash_file=args.flash_file
|
iot_flash_file=args.flash_file
|
||||||
log_file=iot_flash_file
|
log_file=iot_flash_file
|
||||||
|
if(args.ram_file is not None):
|
||||||
|
ram_file=ram_file_redirect(args.ram_file)
|
||||||
if(os.path.exists(iot_flash_file)):
|
if(os.path.exists(iot_flash_file)):
|
||||||
function_type='download'
|
function_type='download'
|
||||||
iot_flash_file=bin_file_decrypt(iot_flash_file)
|
iot_flash_file=bin_file_decrypt(iot_flash_file)
|
||||||
if args.kunlun_version is None:
|
if args.kunlun_version is None:
|
||||||
args.kunlun_version=check_bin_type(iot_flash_file)
|
args.kunlun_version=check_bin_type(iot_flash_file)
|
||||||
ram_file=f'kl{args.kunlun_version}_ram_build.bin'
|
if ram_file is None:
|
||||||
ram_file=ram_file_redirect(ram_file)
|
ram_file=f'kl{args.kunlun_version}_ram_build.bin'
|
||||||
|
ram_file=ram_file_redirect(ram_file)
|
||||||
else:
|
else:
|
||||||
function_type='upload'
|
function_type='upload'
|
||||||
ram_file=f'bootram_kl{args.kunlun_version}.bin'
|
if ram_file is None:
|
||||||
ram_file=ram_file_redirect(ram_file)
|
ram_file=f'bootram_kl{args.kunlun_version}.bin'
|
||||||
if(args.ram_file is not None):
|
ram_file=ram_file_redirect(ram_file)
|
||||||
ram_file=ram_file_redirect(args.ram_file)
|
|
||||||
if(args.kunlun_version is None):
|
if(args.kunlun_version is None):
|
||||||
print("请指定参数 -k")
|
print("请指定参数 -k")
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
Reference in New Issue
Block a user