summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-05-08 21:47:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-05-08 21:47:33 -0400
commit4b39b82790d17a64d13171ba501efa4ffa044460 (patch)
tree3cb4e05451f7266d1c397d7f3cc009adf5cab4b5 /tools
parent1812e20b4b4edd574e21637c6e57ca17797f155c (diff)
Support 32bit entry point and an elf wrapped binary.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildrom.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/buildrom.py b/tools/buildrom.py
index fd49076..83bedde 100755
--- a/tools/buildrom.py
+++ b/tools/buildrom.py
@@ -7,6 +7,7 @@
import sys
import struct
+import os
ROM16='out/rom16.bin'
ROM32='out/rom32.bin'
@@ -78,5 +79,11 @@ def main():
f.write(outrom)
f.close()
+ # Build elf file with 32bit entry point
+ os.system(
+ "objcopy -I binary -O elf32-i386 -B i386"
+ " --change-addresses 0xf0000 --set-start %s %s %s" %(
+ int(o32['OFFSET_post32'], 16) - 0xf0000, OUT, OUT+".o"))
+
if __name__ == '__main__':
main()