Changeset 850235d in mainline for tools/mkuimage.py


Ignore:
Timestamp:
2013-03-10T14:56:21Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
05bab88
Parents:
ea906c29 (diff), 2277e03 (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:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkuimage.py

    rea906c29 r850235d  
    6060        load_addr = 0
    6161        start_addr = 0
     62        os_type = 5 #Linux is the default
    6263
    6364        while len(args) >= 2 and args[0][0] == '-':
     
    7172                elif opt == 'saddr':
    7273                        start_addr = (int)(optarg, 0)
     74                elif opt == 'ostype':
     75                        os_type = (int)(optarg, 0)
    7376                else:
    7477                        print(base_name + ": Unrecognized option.")
     
    8588
    8689        try:
    87                 mkuimage(inf_name, outf_name, image_name, load_addr, start_addr)
     90                mkuimage(inf_name, outf_name, image_name, load_addr, start_addr, os_type)
    8891        except:
    8992                os.remove(outf_name)
    9093                raise
    9194
    92 def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr):
     95def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr, os_type):
    9396        inf = open(inf_name, 'rb')
    9497        outf = open(outf_name, 'wb')
     
    120123        header.start_addr = start_addr  # Address of entry point
    121124        header.data_crc = data_crc
    122         header.os = 5                   # Linux
     125        header.os = os_type
    123126        header.arch = 2                 # ARM
    124127        header.img_type = 2             # Kernel
Note: See TracChangeset for help on using the changeset viewer.