X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fmicrocode-tool.py;h=249a33b8cac440a1bf021dc71074f8d3a96243fc;hb=117f57b75aee2e145d2d23107f600d869b04231a;hp=71c2e91566b54605282a35d4394fc5d5a3c204cd;hpb=e72d344386bf80738fab7a6bd37cb321f443093a;p=u-boot diff --git a/tools/microcode-tool.py b/tools/microcode-tool.py index 71c2e91566..249a33b8ca 100755 --- a/tools/microcode-tool.py +++ b/tools/microcode-tool.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 +# SPDX-License-Identifier: GPL-2.0+ # # Copyright (c) 2014 Google, Inc # -# SPDX-License-Identifier: GPL-2.0+ -# # Intel microcode update tool from optparse import OptionParser @@ -95,9 +94,23 @@ def ParseHeaderFiles(fname_list): name = os.path.splitext(name)[0] data = [] with open(fname) as fd: + license_start = False + license_end = False for line in fd: line = line.rstrip() + if len(line) >= 2: + if line[0] == '/' and line[1] == '*': + license_start = True + continue + if line[0] == '*' and line[1] == '/': + license_end = True + continue + if license_start and not license_end: + # Ignore blank line + if len(line) > 0: + license_text.append(line) + continue # Omit anything after the last comma words = line.split(',')[:-1] data += [word + ',' for word in words]