Changes in tools/mkuimage.py [28f4adb:928d983] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkuimage.py
r28f4adb r928d983 72 72 start_addr = (int)(optarg, 0) 73 73 else: 74 print (base_name + ": Unrecognized option.")74 print base_name + ": Unrecognized option." 75 75 print_syntax(cmd_name) 76 76 return 77 77 78 78 if len(args) < 2: 79 print (base_name + ": Argument missing.")79 print base_name + ": Argument missing." 80 80 print_syntax(cmd_name) 81 81 return … … 91 91 92 92 def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr): 93 inf = open(inf_name, 'rb')94 outf = open(outf_name, 'wb')93 inf = file(inf_name, 'rb') 94 outf = file(outf_name, 'wb') 95 95 96 96 header = xstruct.create(UIMAGE_HEADER) … … 140 140 signed_crc = zlib.crc32(byteseq, 0) 141 141 if signed_crc < 0: 142 return (long(signed_crc) + (long(2) ** long(32))) # 2^32L142 return (long(signed_crc) + 4294967296L) # 2^32L 143 143 else: 144 144 return signed_crc … … 147 147 # 148 148 def print_syntax(cmd): 149 print ("syntax: " + cmd + " [<options>] <raw_image> <uImage>")149 print "syntax: " + cmd + " [<options>] <raw_image> <uImage>" 150 150 print 151 print ("\traw_image\tInput image name (raw binary data)")152 print ("\tuImage\t\tOutput uImage name (U-Boot image)")151 print "\traw_image\tInput image name (raw binary data)" 152 print "\tuImage\t\tOutput uImage name (U-Boot image)" 153 153 print 154 print ("options:")155 print ("\t-name <name>\tImage name (default: 'Noname')")156 print ("\t-laddr <name>\tLoad address (default: 0x00000000)")157 print ("\t-saddr <name>\tStart address (default: 0x00000000)")154 print "options:" 155 print "\t-name <name>\tImage name (default: 'Noname')" 156 print "\t-laddr <name>\tLoad address (default: 0x00000000)" 157 print "\t-saddr <name>\tStart address (default: 0x00000000)" 158 158 159 159 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.