Move certs partition before actual firmware
This commit is contained in:
committed by
Sandeep Mistry
parent
a1fbf4b2ce
commit
06b9b9e641
@@ -6,7 +6,7 @@ appData = open("build/nina-fw.bin", "rb").read()
|
|||||||
certsData = open("data/roots.pem", "rb").read()
|
certsData = open("data/roots.pem", "rb").read()
|
||||||
|
|
||||||
# calculate the output binary size, app offset
|
# calculate the output binary size, app offset
|
||||||
outputSize = 0x190000 + len(certsData) + 1
|
outputSize = 0x30000 + len(appData)
|
||||||
if (outputSize % 1024):
|
if (outputSize % 1024):
|
||||||
outputSize += 1024 - (outputSize % 1024)
|
outputSize += 1024 - (outputSize % 1024)
|
||||||
|
|
||||||
@@ -21,13 +21,13 @@ for i in range(0, len(partitionData)):
|
|||||||
outputData[0x8000 + i] = partitionData[i]
|
outputData[0x8000 + i] = partitionData[i]
|
||||||
|
|
||||||
for i in range(0, len(appData)):
|
for i in range(0, len(appData)):
|
||||||
outputData[0x10000 + i] = appData[i]
|
outputData[0x30000 + i] = appData[i]
|
||||||
|
|
||||||
for i in range(0, len(certsData)):
|
for i in range(0, len(certsData)):
|
||||||
outputData[0x190000 + i] = certsData[i]
|
outputData[0x10000 + i] = certsData[i]
|
||||||
|
|
||||||
# zero terminate the pem file
|
# zero terminate the pem file
|
||||||
outputData[0x190000 + len(certsData)] = 0
|
outputData[0x10000 + len(certsData)] = 0
|
||||||
|
|
||||||
# write out
|
# write out
|
||||||
with open("NINA_W102.bin","w+b") as f:
|
with open("NINA_W102.bin","w+b") as f:
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
|
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
|
||||||
nvs, data, nvs, 0x9000, 0x6000
|
nvs, data, nvs, 0x9000, 0x6000
|
||||||
phy_init, data, phy, 0xf000, 0x1000
|
phy_init, data, phy, 0xf000, 0x1000
|
||||||
factory, app, factory, 0x10000, 0x180000
|
certs, data, 0x04, 0x10000, 0x20000
|
||||||
certs, data, 0x04, 0x190000,0x20000
|
factory, app, factory, 0x30000, 0x180000
|
||||||
|
|||||||
|
Reference in New Issue
Block a user