Skip to content

Instantly share code, notes, and snippets.

@changtimwu
Created June 26, 2012 08:29
Show Gist options
  • Save changtimwu/2994386 to your computer and use it in GitHub Desktop.
Save changtimwu/2994386 to your computer and use it in GitHub Desktop.
python script to send bunch of uboot envs to uart
import os,sys
import time
f=open( sys.argv[1])
for line in f:
line = line.strip(' \r\n')
args=line.split('=')
key = args[0]
val= '='.join(args[1:])
if len(args)>1:
sline = "setenv {0} '{1}'".format( key, val)
print sline
time.sleep(0.09)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment