X-Git-Url: https://jxself.org/git/?p=b43-tools.git;a=blobdiff_plain;f=fwcutter%2Fmklist.py;h=ae94412ab2afe72993eb9c2c7440fdfd4f780613;hp=1bc8351cf19ea93a2996c38f82ad013c2f37f3e2;hb=HEAD;hpb=d64eede155f2e3cc64e04b4c79b9778544e49186 diff --git a/fwcutter/mklist.py b/fwcutter/mklist.py index 1bc8351..ae94412 100755 --- a/fwcutter/mklist.py +++ b/fwcutter/mklist.py @@ -2,7 +2,7 @@ # # Script for creating a "struct extract" list for fwcutter_list.h # -# Copyright (c) 2008 Michael Buesch +# Copyright (c) 2008 Michael Buesch # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ import sys import os import re -import md5 +import hashlib if len(sys.argv) != 2: print "Usage: %s path/to/wl.o" % sys.argv[0] @@ -55,7 +55,7 @@ if rodata_fileoffset == None: print "ERROR: Could not find .rodata fileoffset" sys.exit(1) -md5sum = md5.md5(file(fn, "r").read()) +md5sum = hashlib.md5(file(fn, "r").read()) print "static struct extract _%s[] =" % md5sum.hexdigest() print "{" @@ -80,6 +80,14 @@ for sym in syms: size -= 8 if "pcm" in name: type = "EXT_PCM" + if "bommajor" in name: + print "\t/* ucode major version at offset 0x%x */" % pos + continue + if "bomminor" in name: + print "\t/* ucode minor version at offset 0x%x */" % pos + continue + if "ucode_2w" in name: + continue m = ucode_re.match(name) if m: corerev = int(m.group(1))