]>
git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/ResetVector/Vtf0/Build.py
2 # Automate the process of building the various reset vector types
4 # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
14 def RunCommand(commandLine
):
15 #print ' '.join(commandLine)
16 return subprocess
.call(commandLine
)
18 for filename
in glob
.glob(os
.path
.join('Bin', '*.raw')):
21 for arch
in ('ia32', 'x64'):
22 for debugType
in (None, 'port80', 'serial'):
23 output
= os
.path
.join('Bin', 'ResetVector')
25 if debugType
is not None:
26 output
+= '.' + debugType
30 '-D', 'ARCH_%s' % arch
.upper(),
31 '-D', 'DEBUG_%s' % str(debugType
).upper(),
35 print(f
"Command : {' '.join(commandLine)}")
36 ret
= RunCommand(commandLine
)
38 print(f
"something went wrong while executing {commandLine[-1]}")
40 print('\tASM\t' + output
)
44 'Tools/FixupForRawSection.py',
47 print('\tFIXUP\t' + output
)
48 ret
= RunCommand(commandLine
)
49 if ret
!= 0: sys
.exit(ret
)