mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2026-07-13 13:35:38 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
32
tools/rtl8710bn/pick.py
Normal file
32
tools/rtl8710bn/pick.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Date : 2018/07/26
|
||||
# Author : Snow Yang
|
||||
# Mail : yangsw@mxchip.com
|
||||
|
||||
import sys
|
||||
from struct import pack
|
||||
|
||||
textimage = sys.argv[1]
|
||||
dataimage = sys.argv[2]
|
||||
outimage = sys.argv[3]
|
||||
|
||||
image = b''
|
||||
with open(textimage, 'rb') as f:
|
||||
data = f.read()
|
||||
size = len(data)
|
||||
image += b'81958711'
|
||||
image += pack('<L', size)
|
||||
image += pack('<L', 0)
|
||||
image += b'\xFF'*16
|
||||
image += data
|
||||
with open(dataimage, 'rb') as f:
|
||||
data = f.read()
|
||||
size = len(data)
|
||||
image += b'81958711'
|
||||
image += pack('<L', size)
|
||||
image += pack('<L', 0x1000D000)
|
||||
image += b'\xFF'*16
|
||||
image += data
|
||||
image = image[:0x10] + pack('<L', len(image)) + image[0x14:]
|
||||
|
||||
with open(outimage, 'wb') as f:
|
||||
f.write(image)
|
||||
Loading…
Add table
Add a link
Reference in a new issue