67
67
def __init__(self):
68
68
super(AndroidBoardConfig, self).__init__()
70
self._extra_serial_options = []
70
self._extra_serial_opts = []
71
71
self._android_specific_args = []
72
72
self._extra_boot_args_options = []
73
self._live_serial_options = []
74
75
def _get_android_specific_args(self):
75
76
android_args = self._android_specific_args
95
96
extra_boot_args_options = property(_get_extra_boot_args_options,
96
97
_set_extra_boot_args_options)
98
def _get_extra_serial_options(self):
99
return ' '.join(self._extra_serial_options)
101
def _set_extra_serial_options(self, value):
102
self._extra_serial_options = value
104
extra_serial_options = property(_get_extra_serial_options,
105
_set_extra_serial_options)
107
def _get_dtb_name(self):
108
return self._dtb_name
110
def _set_dtb_name(self, value):
111
self._dtb_name = value
113
dtb_name = property(_get_dtb_name, _set_dtb_name)
99
def _get_extra_serial_opts(self):
100
extra_serial = self._extra_serial_opts
101
if isinstance(extra_serial, list):
102
extra_serial = ' '.join(self._extra_serial_opts)
105
def _set_extra_serial_opts(self, value):
106
self._extra_serial_opts = value
108
extra_serial_opts = property(_get_extra_serial_opts,
109
_set_extra_serial_opts)
111
def _get_live_serial_options(self):
112
serial_options = self._live_serial_options
114
if isinstance(serial_options, list):
115
serial_options = ' '.join(self._live_serial_options)
116
if self._check_placeholder_presence(serial_options, '%s'):
117
serial_options = serial_options % self.serial_tty
118
return serial_options
120
def _set_live_serial_options(self, value):
121
self._live_serial_options = value
123
live_serial_options = property(_get_live_serial_options,
124
_set_live_serial_options)
115
126
def from_file(self, hwpack):
116
127
"""Loads the Android board configuration from an Android hardware pack
150
161
if self.extra_boot_args_options:
151
162
boot_args_options += ' %s' % self.extra_boot_args_options
152
163
boot_args_options += ' %s' % self.android_specific_args
153
serial_opts = self.extra_serial_options
164
serial_opts = self.extra_serial_opts
154
165
for console in consoles:
155
166
serial_opts += ' console=%s' % console
269
280
def __init__(self):
270
281
super(AndroidBeagleConfig, self).__init__()
271
282
self._android_specific_args = 'init=/init androidboot.console=ttyO2'
272
self._extra_serial_options = 'console=tty0 console=ttyO2,115200n8'
283
self._extra_serial_opts = 'console=tty0 console=ttyO2,115200n8'
275
286
class AndroidPandaConfig(AndroidBoardConfig, PandaConfig):
276
287
"""Placeholder class for Panda configuration inheritance."""
277
288
def __init__(self):
278
289
super(AndroidPandaConfig, self).__init__()
279
self._dtb_name = 'board.dtb'
280
self._extra_serial_options = 'console=ttyO2,115200n8'
290
self.dtb_name = 'board.dtb'
291
self._extra_serial_opts = 'console=ttyO2,115200n8'
281
292
self._extra_boot_args_options = (
282
293
'earlyprintk fixrtc nocompcache vram=48M '
283
294
'omapfb.vram=0:24M,1:24M mem=456M@0x80000000 mem=512M@0xA0000000')
290
301
"""Placeholder class for Snowball Sd configuration inheritance."""
291
302
def __init__(self):
292
303
super(AndroidSnowballSdConfig, self).__init__()
293
self._dtb_name = 'board.dtb'
304
self.dtb_name = 'board.dtb'
294
305
self._android_specific_args = 'init=/init androidboot.console=ttyAMA2'
295
306
self._extra_boot_args_options = (
296
307
'earlyprintk mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M '
297
308
'mem=22M@360M mem_issw=1M@383M mem=640M@384M vmalloc=500M')
298
self._extra_serial_options = 'console=ttyAMA2,115200n8'
309
self._extra_serial_opts = 'console=ttyAMA2,115200n8'
299
310
self.boot_script = 'boot.scr'
300
311
self.fdt_high = '0x05000000'
301
312
self.initrd_addr = '0x05000000'
307
318
"""Class for Snowball Emmc configuration inheritance."""
308
319
def __init__(self):
309
320
super(AndroidSnowballEmmcConfig, self).__init__()
310
self._dtb_name = 'board.dtb'
321
self.dtb_name = 'board.dtb'
311
322
self._extra_boot_args_options = (
312
323
'earlyprintk mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M '
313
324
'mem=22M@360M mem_issw=1M@383M mem=640M@384M vmalloc=500M')
314
self._extra_serial_options = 'console=ttyAMA2,115200n8'
325
self._extra_serial_opts = 'console=ttyAMA2,115200n8'
315
326
self._android_specific_args = 'init=/init androidboot.console=ttyAMA2'
316
327
self.boot_script = 'boot.scr'
317
328
self.fdt_high = '0x05000000'
367
378
super(AndroidMx53LoCoConfig, self).__init__()
368
379
self._extra_boot_args_options = (
369
380
'earlyprintk rootdelay=1 fixrtc nocompcache di1_primary tve')
370
self._extra_serial_options = 'console=%s,115200n8'
381
self._extra_serial_opts = 'console=%s,115200n8'
371
382
self._android_specific_args = 'init=/init androidboot.console=%s'
373
def _get_extra_serial_options(self):
374
serial_opts = self._extra_serial_options
384
def _get_extra_serial_opts(self):
385
serial_opts = self._extra_serial_opts
376
387
if isinstance(serial_opts, list):
377
388
serial_opts = ' '.join(serial_opts)
379
390
serial_opts = serial_opts % self.serial_tty
380
391
return serial_opts
382
def _set_extra_serial_options(self, value):
383
self._extra_serial_options = value
393
def _set_extra_serial_opts(self, value):
394
self._extra_serial_opts = value
385
extra_serial_options = property(_get_extra_serial_options,
386
_set_extra_serial_options)
396
extra_serial_opts = property(_get_extra_serial_opts,
397
_set_extra_serial_opts)
388
399
def _get_android_specific_args(self):
389
400
android_args = self._android_specific_args
421
432
"""Placeholder class for Mx6Q Sabrelite configuration inheritance."""
422
433
def __init__(self):
423
434
super(AndroidMx6QSabreliteConfig, self).__init__()
424
self._dtb_name = 'board.dtb'
435
self.dtb_name = 'board.dtb'
425
436
self.bootloader_flavor = 'mx6qsabrelite'
426
437
self.kernel_addr = '0x10000000'
427
438
self.initrd_addr = '0x12000000'
449
460
"""Placeholder class for SMDKV310 configuration inheritance."""
450
461
def __init__(self):
451
462
super(AndroidSMDKV310Config, self).__init__()
452
self._extra_serial_options = 'console=tty0 console=ttySAC1,115200n8'
463
self._extra_serial_opts = 'console=tty0 console=ttySAC1,115200n8'
453
464
self._android_specific_args = 'init=/init androidboot.console=ttySAC1'
457
468
"""Placeholder class for Origen configuration inheritance."""
458
469
def __init__(self):
459
470
super(AndroidOrigenConfig, self).__init__()
460
self._extra_serial_options = 'console=tty0 console=ttySAC2,115200n8'
471
self._extra_serial_opts = 'console=tty0 console=ttySAC2,115200n8'
461
472
self._android_specific_args = 'init=/init androidboot.console=ttySAC2'
465
476
"""Placeholder class for Vexpress configuration inheritance."""
466
477
def __init__(self):
467
478
super(AndroidVexpressConfig, self).__init__()
468
self._extra_serial_options = 'console=tty0 console=ttyAMA0,38400n8'
479
self._extra_serial_opts = 'console=tty0 console=ttyAMA0,38400n8'
469
480
self._android_specific_args = 'init=/init androidboot.console=ttyAMA0'