summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-12-13 22:03:54 +1100
committerChris Johns <chrisj@rtems.org>2012-12-13 22:03:54 +1100
commit9b993066c50eb82e6be776a5d68659fd32fb6a1d (patch)
tree4a9eb4776cffff3e85a720c15af8b7c759e3af52
parenta408634ee13315868a80484bd53c579096bec54e (diff)
Add the PC tweak for the base address.
-rw-r--r--rtems.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/rtems.py b/rtems.py
index ef296c3..5558f84 100644
--- a/rtems.py
+++ b/rtems.py
@@ -6,6 +6,7 @@
import os
import os.path
import pkgconfig
+import re
import subprocess
default_version = '4.11'
@@ -145,14 +146,9 @@ def configure(conf):
conf.env.LIB = flags['LIB']
#
- # Hack to work around NIOS2 naming.
+ # Add tweaks.
#
- if conf.env.RTEMS_ARCH in ['nios2']:
- conf.env.OBJCOPY_FLAGS = ['-O', 'elf32-littlenios2']
- elif conf.env.RTEMS_ARCH in ['arm']:
- conf.env.OBJCOPY_FLAGS = ['-I', 'binary', '-O', 'elf32-littlearm']
- else:
- conf.env.OBJCOPY_FLAGS = ['-O', 'elf32-' + conf.env.RTEMS_ARCH]
+ tweaks(conf, ab)
conf.env.SHOW_COMMANDS = show_commands
@@ -168,6 +164,23 @@ def build(bld):
if bld.env.SHOW_COMMANDS == 'yes':
output_command_line()
+def tweaks(conf, arch_bsp):
+ #
+ # Hack to work around NIOS2 naming.
+ #
+ if conf.env.RTEMS_ARCH in ['nios2']:
+ conf.env.OBJCOPY_FLAGS = ['-O', 'elf32-littlenios2']
+ elif conf.env.RTEMS_ARCH in ['arm']:
+ conf.env.OBJCOPY_FLAGS = ['-I', 'binary', '-O', 'elf32-littlearm']
+ else:
+ conf.env.OBJCOPY_FLAGS = ['-O', 'elf32-' + conf.env.RTEMS_ARCH]
+
+ #
+ # Check for a i386 PC bsp.
+ #
+ if re.match('i386-.*-pc[3456]86', arch_bsp) is not None:
+ conf.env.LINKFLAGS += ['-Wl,-Ttext,0x00100000']
+
def check_options(ctx, rtems_tools, rtems_path, rtems_version, rtems_archs, rtems_bsps):
#
# Check the paths are valid.