mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2025-07-31 19:31:05 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
BIN
tools/bk7231u/encrypt_linux
Executable file
BIN
tools/bk7231u/encrypt_linux
Executable file
Binary file not shown.
39
tools/bk7231u/gen_firmware_img.py
Normal file
39
tools/bk7231u/gen_firmware_img.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
import os
|
||||
import sys
|
||||
import struct
|
||||
import zlib
|
||||
import time
|
||||
|
||||
def pack_image(fw_file, boot_file):
|
||||
|
||||
print 'app file_name:', fw_file
|
||||
print 'boot file_name:', boot_file
|
||||
|
||||
fname = os.path.splitext(fw_file)
|
||||
f = file(boot_file, 'rb')
|
||||
bootloader = f.read()
|
||||
f.close()
|
||||
|
||||
f = file(fw_file, 'rb')
|
||||
data_fw = f.read()
|
||||
f.close()
|
||||
|
||||
f = file(fname[0] + '_all.bin', 'wb')
|
||||
i = len(bootloader)
|
||||
|
||||
f.write(bootloader)
|
||||
|
||||
j = 0x11000 - i
|
||||
i = 0
|
||||
while i < j:
|
||||
i += 1
|
||||
f.write("\xff")
|
||||
|
||||
f.write(data_fw)
|
||||
f.close();
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print sys.argv[0], "firmware file"
|
||||
exit(0)
|
||||
pack_image(sys.argv[1], sys.argv[2])
|
Loading…
Add table
Add a link
Reference in a new issue