-
Notifications
You must be signed in to change notification settings - Fork 0
/
fslflash
executable file
·22 lines (18 loc) · 1.14 KB
/
fslflash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3
import argparse
from fsl import flash
from fsl import flash_package
parser = argparse.ArgumentParser(description='Tool for flashing Freescale Vybrid SoM NAND Flash')
parser.add_argument('--package', help='Use this to update everything with a zip file containing a manifest')
parser.add_argument('--bootstrap', help='u-boot.imx boostrap loader to download into memory')
parser.add_argument('--uboot', help='u-boot nand image to flash for uboot partition')
parser.add_argument('--fdt', help='flattened device tree file to flash for fdt partition')
parser.add_argument('--kernel', help='kernel uImage file to flash for kernel-image partition')
parser.add_argument('--rootfs', help='rootfs jffs2 file to flash for rootfs partition')
parser.add_argument('--serial', help='serial number of device', type=int)
parser.add_argument('--reboot', help='If set, reboot after flashing specified partitions', action='store_true')
args = parser.parse_args()
if args.package:
flash_package(args.package, args.reboot)
else:
flash(args.bootstrap, args.uboot, args.fdt, args.kernel, args.rootfs, args.serial, args.reboot)