Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Assorted cleanup
[palacios.git] / bios / seabios / tools / encodeint.py
1 #!/usr/bin/env python
2 # Encode an integer in little endian format in a file.
3 #
4 # Copyright (C) 2011  Kevin O'Connor <kevin@koconnor.net>
5 #
6 # This file may be distributed under the terms of the GNU GPLv3 license.
7
8 import sys
9 import struct
10
11 def main():
12     filename = sys.argv[1]
13     value = int(sys.argv[2])
14
15     outval = struct.pack('<Q', value)
16     f = open(filename, 'wb')
17     f.write(outval)
18     f.close()
19
20 if __name__ == '__main__':
21     main()