FSConfig.py (10735:071996521ce6) FSConfig.py (10747:3fe41011333d)
1# Copyright (c) 2010-2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 29 unchanged lines hidden (view full) ---

38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39#
40# Authors: Kevin Lim
41
42from m5.objects import *
43from Benchmarks import *
44from m5.util import *
45
1# Copyright (c) 2010-2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 29 unchanged lines hidden (view full) ---

38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39#
40# Authors: Kevin Lim
41
42from m5.objects import *
43from Benchmarks import *
44from m5.util import *
45
46# Populate to reflect supported os types per target ISA
47os_types = { 'alpha' : [ 'linux' ],
48 'mips' : [ 'linux' ],
49 'sparc' : [ 'linux' ],
50 'x86' : [ 'linux' ],
51 'arm' : [ 'linux',
52 'android-gingerbread',
53 'android-ics',
54 'android-jellybean',
55 'android-kitkat' ],
56 }
57
46class CowIdeDisk(IdeDisk):
47 image = CowDiskImage(child=RawDiskImage(read_only=True),
48 read_only=False)
49
50 def childImage(self, ci):
51 self.image.child.image_file = ci
52
53class MemBus(SystemXBar):
54 badaddr_responder = BadAddr()
55 default = Self.badaddr_responder.pio
56
58class CowIdeDisk(IdeDisk):
59 image = CowDiskImage(child=RawDiskImage(read_only=True),
60 read_only=False)
61
62 def childImage(self, ci):
63 self.image.child.image_file = ci
64
65class MemBus(SystemXBar):
66 badaddr_responder = BadAddr()
67 default = Self.badaddr_responder.pio
68
57
58def fillInCmdline(mdesc, template, **kwargs):
59 kwargs.setdefault('disk', mdesc.disk())
60 kwargs.setdefault('rootdev', mdesc.rootdev())
61 kwargs.setdefault('mem', mdesc.mem())
62 kwargs.setdefault('script', mdesc.script())
63 return template % kwargs
64
65def makeLinuxAlphaSystem(mem_mode, mdesc=None, ruby=False, cmdline=None):

--- 215 unchanged lines hidden (view full) ---

281 cmdline = 'earlyprintk=pl011,0x1c090000 console=ttyAMA0 ' + \
282 'lpj=19988480 norandmaps rw loglevel=8 ' + \
283 'mem=%(mem)s root=%(rootdev)s'
284
285 self.realview.setupBootLoader(self.membus, self, binary)
286 self.gic_cpu_addr = self.realview.gic.cpu_addr
287 self.flags_addr = self.realview.realview_io.pio_addr + 0x30
288
69def fillInCmdline(mdesc, template, **kwargs):
70 kwargs.setdefault('disk', mdesc.disk())
71 kwargs.setdefault('rootdev', mdesc.rootdev())
72 kwargs.setdefault('mem', mdesc.mem())
73 kwargs.setdefault('script', mdesc.script())
74 return template % kwargs
75
76def makeLinuxAlphaSystem(mem_mode, mdesc=None, ruby=False, cmdline=None):

--- 215 unchanged lines hidden (view full) ---

292 cmdline = 'earlyprintk=pl011,0x1c090000 console=ttyAMA0 ' + \
293 'lpj=19988480 norandmaps rw loglevel=8 ' + \
294 'mem=%(mem)s root=%(rootdev)s'
295
296 self.realview.setupBootLoader(self.membus, self, binary)
297 self.gic_cpu_addr = self.realview.gic.cpu_addr
298 self.flags_addr = self.realview.realview_io.pio_addr + 0x30
299
289 # Android disk images must have 'android' keyword in the disk name
290 # Look for 'android' in disk name and append /init to boot_osflags
300 # This check is for users who have previously put 'android' in
301 # the disk image filename to tell the config scripts to
302 # prepare the kernel with android-specific boot options. That
303 # behavior has been replaced with a more explicit option per
304 # the error message below. The disk can have any name now and
305 # doesn't need to include 'android' substring.
291 if (os.path.split(mdesc.disk())[-1]).lower().count('android'):
306 if (os.path.split(mdesc.disk())[-1]).lower().count('android'):
292 cmdline += " init=/init "
307 if 'android' not in mdesc.os_type():
308 fatal("It looks like you are trying to boot an Android " \
309 "platform. To boot Android, you must specify " \
310 "--os-type with an appropriate Android release on " \
311 "the command line.")
312
313 # android-specific tweaks
314 if 'android' in mdesc.os_type():
315 # generic tweaks
316 cmdline += " init=/init"
317
318 # release-specific tweaks
319 if 'kitkat' in mdesc.os_type():
320 cmdline += " androidboot.hardware=gem5 qemu=1 qemu.gles=0 " + \
321 "android.bootanim=0"
322
293 self.boot_osflags = fillInCmdline(mdesc, cmdline)
323 self.boot_osflags = fillInCmdline(mdesc, cmdline)
324
294 self.realview.attachOnChipIO(self.membus, self.bridge)
295 self.realview.attachIO(self.iobus)
296 self.intrctrl = IntrControl()
297 self.terminal = Terminal()
298 self.vncserver = VncServer()
299
300 self.system_port = self.membus.slave
301

--- 289 unchanged lines hidden ---
325 self.realview.attachOnChipIO(self.membus, self.bridge)
326 self.realview.attachIO(self.iobus)
327 self.intrctrl = IntrControl()
328 self.terminal = Terminal()
329 self.vncserver = VncServer()
330
331 self.system_port = self.membus.slave
332

--- 289 unchanged lines hidden ---