Changeset 81475250 in mainline for tools/mkuimage.py


Ignore:
Timestamp:
2012-04-08T11:40:35Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d9f53877
Parents:
1dbe465 (diff), 6582b36 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Build scripts work with Python 3 (thx Sean Bartell)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkuimage.py

    r1dbe465 r81475250  
    124124        header.img_type = 2             # Kernel
    125125        header.compression = 0          # None
    126         header.img_name = image_name
     126        header.img_name = image_name.encode('ascii')
    127127
    128128        header_crc = calc_crc32(header.pack())
     
    140140        signed_crc = zlib.crc32(byteseq, 0)
    141141        if signed_crc < 0:
    142                 return (long(signed_crc) + (long(2) ** long(32))) # 2^32L
     142                return signed_crc + (1 << 32)
    143143        else:
    144144                return signed_crc
     
    148148def print_syntax(cmd):
    149149        print("syntax: " + cmd + " [<options>] <raw_image> <uImage>")
    150         print
     150        print()
    151151        print("\traw_image\tInput image name (raw binary data)")
    152152        print("\tuImage\t\tOutput uImage name (U-Boot image)")
    153         print
     153        print()
    154154        print("options:")
    155155        print("\t-name <name>\tImage name (default: 'Noname')")
Note: See TracChangeset for help on using the changeset viewer.