forked from xiaozhi/xiaozhi-esp32
fix sensecap watcher partition alignment
This commit is contained in:
@@ -4,6 +4,7 @@ nvsfactory, data, nvs, , 200K,
|
|||||||
nvs, data, nvs, , 840K,
|
nvs, data, nvs, , 840K,
|
||||||
otadata, data, ota, , 0x2000,
|
otadata, data, ota, , 0x2000,
|
||||||
phy_init, data, phy, , 0x1000,
|
phy_init, data, phy, , 0x1000,
|
||||||
model, data, spiffs, , 1024K,
|
model, data, spiffs, , 0xF0000,
|
||||||
ota_0, app, ota_0, , 12M,
|
# According to scripts/versions.py, app partition must be aligned to 1MB
|
||||||
ota_1, app, ota_1, , 12M,
|
ota_0, app, ota_0, 0x200000, 12M,
|
||||||
|
ota_1, app, ota_1, , 12M,
|
||||||
|
|||||||
|
@@ -75,8 +75,14 @@ def get_board_name(folder):
|
|||||||
|
|
||||||
def read_binary(dir_path):
|
def read_binary(dir_path):
|
||||||
merged_bin_path = os.path.join(dir_path, "merged-binary.bin")
|
merged_bin_path = os.path.join(dir_path, "merged-binary.bin")
|
||||||
data = open(merged_bin_path, "rb").read()[0x100000:]
|
merged_bin_data = open(merged_bin_path, "rb").read()
|
||||||
if data[0] != 0xE9:
|
|
||||||
|
# find app partition
|
||||||
|
if merged_bin_data[0x100000] == 0xE9:
|
||||||
|
data = merged_bin_data[0x100000:]
|
||||||
|
elif merged_bin_data[0x200000] == 0xE9:
|
||||||
|
data = merged_bin_data[0x200000:]
|
||||||
|
else:
|
||||||
print(dir_path, "is not a valid image")
|
print(dir_path, "is not a valid image")
|
||||||
return
|
return
|
||||||
# get flash size
|
# get flash size
|
||||||
|
|||||||
Reference in New Issue
Block a user