Implemented SC6531C flashing support

This commit is contained in:
Luxferre
2021-12-28 01:43:12 +02:00
parent a07d91aa0f
commit eb034239db
2 changed files with 9 additions and 5 deletions
+2 -4
View File
@@ -54,13 +54,11 @@ E.g. for CAT B26 (bootkey is `#`) the dumping command is: `python uniflash.py -l
### SC6531C
SC6531C is a single-FDL variant. Here, if your model doesn't require signed FDLs, you need to specify `sc6530_generic` target and typically 8MB length, for instance, for Alcatel OT-2051D the boot key is Call key and the command to dump is: `python uniflash.py -t sc6530_generic -l 0x800000 dump ot2051d.bin`
**Note**: for SC6531C, only readback is supported as of now.
SC6531C is a single-FDL variant. Both readback and flashing are now supported here. Here, if your model doesn't require signed FDLs, you need to specify `sc6530_generic` target and typically 8MB length, for instance, for Alcatel OT-2051D the boot key is Call key and the command to dump is: `python uniflash.py -t sc6530_generic -l 0x800000 dump ot2051d.bin`
### SC6531D and lower
For now, SC6531DA and other variants of SC6531 chipset older than SC6531CA are not supported.
For now, SC6531DA and other variants of SC6531 chipset older than SC6531C are not supported or at least tested. You may verify the support by using the same `sc6530_generic` target as for SC6531C.
### Add your own targets
+7 -1
View File
@@ -10,6 +10,7 @@ import unicmd
UNISOC_VID = 0x1782
UNISOC_PID = 0x4d00
UNISOC_FLASH_BASE_ADDR = 0x10000000
UNISOC_FLASH_BASE_ADDR_OLD = 0x30000000
MAX_PKT_SIZE = 1024
bSize = 512 # read block size
genTimeout = 120000
@@ -98,7 +99,7 @@ def send_file_to_addr(fname, faddr, fdlBooted = False, flashMode = False, fbs =
print('\nEnding data transfer...')
resp = reqresp(unicmd.cmd_data_end(), fdlBooted)
rcode, rlen, r = unicmd.resp_decode(resp, fdlBooted)
if not flashMode or (rcode != unicmd.BSL_FLASH_CFG_ERROR and rcode != unicmd.BSL_WRITE_ERROR): # on flashing, ignore 0xA2 and 0xA4 errors
if not flashMode or (rcode != unicmd.BSL_FLASH_CFG_ERROR and rcode != unicmd.BSL_WRITE_ERROR and rcode != 0xFF): # on flashing, ignore 0xA2, 0xA4 and 0xFF errors
assert rcode == unicmd.BSL_REP_ACK, 'Could not finalize data transfer, response code is %X' % rcode
print('Data transfer successful')
@@ -237,6 +238,11 @@ if __name__ == '__main__': # main app start
fdl1Label = 'FDL1'
fdl2Label = 'FDL2'
# override flash base addr based on the target
if target.startswith('sc6530'):
UNISOC_FLASH_BASE_ADDR = UNISOC_FLASH_BASE_ADDR_OLD
if args.flash_noremap == True:
print('Flash remapping disabled')
UNISOC_FLASH_BASE_ADDR = 0