summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Thomas <james.thomas@codethink.co.uk>2014-12-04 11:53:59 +0000
committerStephen Warren <swarren@nvidia.com>2014-12-04 09:57:10 -0700
commitb54bdc46b51ecb0971aa495b0fdd5ef884ccd48d (patch)
treea1446636af24f15d3bc27603ee8f29efcdbc09ca
parent287c88ac6aba58983d8e3dab7c69e60a8987faf8 (diff)
downloadtegra-uboot-flasher-scripts-b54bdc46b51ecb0971aa495b0fdd5ef884ccd48d.tar.gz
Add a --post-flash-cmd command line argument
This allows a user to specify the u-boot command to run after flashing is complete (e.g 'ums 0 mmc 0'), defaults to 'reset' if not set Signed-off-by: James Thomas <james.thomas@codethink.co.uk> Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-xtegra-uboot-flasher7
1 files changed, 6 insertions, 1 deletions
diff --git a/tegra-uboot-flasher b/tegra-uboot-flasher
index 69f9262..d80aa0d 100755
--- a/tegra-uboot-flasher
+++ b/tegra-uboot-flasher
@@ -218,7 +218,10 @@ def func_flash():
bootcmd += 'echo >>> Flashing OK, rebooting... ; '
# To update the bootloader, reset.
# If wanting to run installer, set installer_args.configname in environment, 'run bootcmd'
- bootcmd += 'reset'
+ if args.post_flash_cmd:
+ bootcmd += args.post_flash_cmd
+ else:
+ bootcmd += 'reset'
print 'bootcmd:', bootcmd
cmd = ['fdtput', '-p', '-t', 's', u_boot_dtb_runflash, '/config', 'bootcmd', bootcmd]
run(workdir, cmd)
@@ -307,6 +310,8 @@ parser_flash.add_argument('--env', type=str, nargs=2, action='append',
metavar=("VAR", "VALUE"),
help='Set a U-Boot environment variable after flashing. This option ' +
'may be given multiple times')
+parser_flash.add_argument('--post-flash-cmd', type=str,
+ help='The U-Boot command to run after flashing, defaults to \'reset\'')
parser_exec = subparsers.add_parser('exec',
help='Download and execute an unmodified bootloader binary, named ' +