summaryrefslogtreecommitdiff
path: root/test-cli/test/flashers/flashmemory.py
blob: c7267c6609d03c339dabb57bed0b26401cd8b9c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import sh


def flash_memory(imagefile):
    print("Start programming Nand memory...")
    p = sh.bash("/usr/bin/igep-flash", "--skip-nandtest", "--image", "/opt/firmware/" + imagefile)
    if p.exit_code != 0:
        print("Flasher: Could not complete flashing task.")
        return 1
    else:
        print("Flasher: NAND memory flashed succesfully.")
        return 0