Commit 9d54f9a1 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

sdbfs/gen_flash_image: erase sector is 256KB for M25P128 (SVEC)

parent cdf507b8
......@@ -23,7 +23,8 @@ import shutil
SDBFS_MAC = "{path}sdbfs-{type}/mac-address"
SDBFS_BSTR = "{path}sdbfs-{type}/bitstream"
SDBFS_IMG = "{path}sdbfs-{type}-{mac}.bin"
GEN_FLASH_CMD = "{path}./gensdbfs -b 65536 {path}sdbfs-{type} {img}"
GEN_SPEC_CMD = "{path}./gensdbfs -b 65536 {path}sdbfs-spec {img}"
GEN_SVEC_CMD = "{path}./gensdbfs -b 262144 {path}sdbfs-svec {img}"
###########################################################
......@@ -72,7 +73,10 @@ def gen_sdb_image(type, mac, bstr, output=None):
# 3. generate SDBFS image
sdbfs_img = SDBFS_IMG.format(path=abs_path, type=type, mac=mac)
# gensdbfs for spec/svec
cmd = GEN_FLASH_CMD.format(path=abs_path, type=type, img=sdbfs_img)
if type == "spec":
cmd = GEN_SPEC_CMD.format(path=abs_path, img=sdbfs_img)
else:
cmd = GEN_SVEC_CMD.format(path=abs_path, img=sdbfs_img)
subprocess.Popen(cmd, shell=True).wait()
print "Generated " + sdbfs_img
# 4. Copy generated SDBFS image to <output>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment