[beken-72xx] Disable OTA encryption

This commit is contained in:
Kuba Szczodrzyński
2023-01-28 12:50:37 +01:00
parent a3e7e21d45
commit 861e741030
2 changed files with 5 additions and 12 deletions

View File

@@ -3,10 +3,8 @@
"f_cpu": "120000000L",
"prefix": "arm-none-eabi-",
"bkota": {
"encryption": "aes256",
"compression": "gzip",
"key": "0123456789ABCDEF0123456789ABCDEF",
"iv": "0123456789ABCDEF"
"encryption": "none",
"compression": "gzip"
}
},
"connectivity": [

View File

@@ -2,17 +2,12 @@
from os.path import join
from ltchiptool.soc.bk72xx.binary import to_offset
from SCons.Script import Builder, DefaultEnvironment
env = DefaultEnvironment()
board = env.BoardConfig()
# Install PyCryptodome for OTA packaging with AES
try:
import Cryptodome
except ImportError:
env.Execute("$PYTHONEXE -m pip install pycryptodomex")
ROOT_DIR = join("$SDK_DIR", "beken378")
APP_DIR = join(ROOT_DIR, "app")
DRIVER_DIR = join(ROOT_DIR, "driver")
@@ -567,8 +562,8 @@ env.Replace(
# Calculate RBL header offset
app_offs = int(env["FLASH_APP_OFFSET"], 16)
app_size = int(board.get("build.bkrbl_size_app"), 16)
rbl_offs = int(app_size // 32 * 34) - 102
env.Replace(FLASH_RBL_OFFSET=f"0x{app_offs + rbl_offs:06X}")
rbl_offs = app_offs + to_offset(app_size) - 102
env.Replace(FLASH_RBL_OFFSET=f"0x{rbl_offs:06X}")
# Build all libraries
env.BuildLibraries()