mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Changes since April
Clean up of build directories. Simplifications to capability model.
This commit is contained in:
@@ -14,7 +14,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELR
|
||||
from optparse import OptionParser
|
||||
from os.path import join
|
||||
from shutil import copytree
|
||||
from config.projpaths import *
|
||||
from scripts.config.projpaths import *
|
||||
|
||||
def parse_cmdline_options():
|
||||
usage = "usage: %prog [options] arg"
|
||||
|
||||
@@ -15,9 +15,9 @@ sys.path.append(os.path.abspath("../"))
|
||||
|
||||
SCRIPTROOT = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from config.lib import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
from scripts.config.lib import *
|
||||
|
||||
class BaremetalContGenerator:
|
||||
def __init__(self):
|
||||
@@ -71,12 +71,14 @@ class BaremetalContGenerator:
|
||||
fout.write('\t' + conv_hex(cont.pager_lma) + '\n')
|
||||
fout.write(pager_vma_header)
|
||||
fout.write('\t' + conv_hex(cont.pager_vma) + '\n')
|
||||
for ireg in range(cont.virt_regions):
|
||||
for ireg in range(cont.caplist["PAGER"].virt_regions):
|
||||
fout.write(pager_virtmem_header % ireg)
|
||||
fout.write('\t' + cont.virtmem["START"][ireg] + ' - ' + cont.virtmem["END"][ireg] + '\n')
|
||||
for ireg in range(cont.phys_regions):
|
||||
fout.write('\t' + cont.caplist["PAGER"].virtmem["START"][ireg] + \
|
||||
' - ' + cont.caplist["PAGER"].virtmem["END"][ireg] + '\n')
|
||||
for ireg in range(cont.caplist["PAGER"].phys_regions):
|
||||
fout.write(pager_physmem_header % ireg)
|
||||
fout.write('\t' + cont.physmem["START"][ireg] + ' - ' + cont.physmem["END"][ireg] + '\n')
|
||||
fout.write('\t' + cont.caplist["PAGER"].physmem["START"][ireg] + \
|
||||
' - ' + cont.caplist["PAGER"].physmem["END"][ireg] + '\n')
|
||||
|
||||
def copy_baremetal_build_readme(self, config, cont):
|
||||
with open(self.build_readme_in) as fin:
|
||||
@@ -98,7 +100,10 @@ class BaremetalContGenerator:
|
||||
fout.write(str % (cont.name, cont.id, cont.id))
|
||||
|
||||
def create_baremetal_sources(self, config, cont):
|
||||
self.create_baremetal_srctree(config, cont)
|
||||
if cont.duplicate == 1:
|
||||
self.create_baremetal_srctree(config, cont)
|
||||
else:
|
||||
os.makedirs(join(self.CONT_SRC_DIR, 'include'))
|
||||
self.copy_baremetal_build_readme(config, cont)
|
||||
self.copy_baremetal_build_desc(config, cont)
|
||||
self.generate_linker_script(config, cont)
|
||||
@@ -112,8 +117,13 @@ class BaremetalContGenerator:
|
||||
def check_create_baremetal_sources(self, config):
|
||||
for cont in config.containers:
|
||||
if cont.type == "baremetal":
|
||||
|
||||
# Determine container directory name.
|
||||
self.CONT_SRC_DIR = join(self.BAREMETAL_SRC_BASEDIR, cont.name.lower())
|
||||
if cont.duplicate == 0:
|
||||
self.CONT_SRC_DIR = join(join(BUILDDIR, 'cont' + str(cont.id)), cont.name)
|
||||
else:
|
||||
self.CONT_SRC_DIR = join(self.BAREMETAL_SRC_BASEDIR, cont.name)
|
||||
|
||||
self.build_readme_out = join(self.CONT_SRC_DIR, self.build_readme_name)
|
||||
self.build_desc_out = join(self.CONT_SRC_DIR, self.build_desc_name)
|
||||
self.linker_lds_out = join(join(self.CONT_SRC_DIR, 'include'), \
|
||||
@@ -121,7 +131,7 @@ class BaremetalContGenerator:
|
||||
self.container_h_out = join(join(self.CONT_SRC_DIR, 'include'), \
|
||||
self.container_h_name)
|
||||
|
||||
if not os.path.exists(join(self.BAREMETAL_SRC_BASEDIR, cont.name)):
|
||||
if not os.path.exists(self.CONT_SRC_DIR):
|
||||
self.create_baremetal_sources(config, cont)
|
||||
else:
|
||||
# Don't create new sources but update configuration
|
||||
@@ -137,6 +147,20 @@ class BaremetalContGenerator:
|
||||
def baremetal_container_generate(self, config):
|
||||
self.check_create_baremetal_sources(config)
|
||||
|
||||
def baremetal_del_dynamic_files(self, cont):
|
||||
self.CONT_SRC_DIR = join(join(BUILDDIR, 'cont' + str(cont.id)), cont.name)
|
||||
self.build_readme_out = join(self.CONT_SRC_DIR, self.build_readme_name)
|
||||
self.build_desc_out = join(self.CONT_SRC_DIR, self.build_desc_name)
|
||||
self.linker_lds_out = join(join(self.CONT_SRC_DIR, 'include'), self.linker_lds_name)
|
||||
self.container_h_out = join(join(self.CONT_SRC_DIR, 'include'), self.container_h_name)
|
||||
|
||||
if cont.duplicate == 0:
|
||||
os.system('rm -f ' + self.build_readme_out)
|
||||
os.system('rm -f ' + self.build_desc_out)
|
||||
os.system('rm -f ' + self.linker_lds_out)
|
||||
os.system('rm -f ' + self.container_h_out)
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
config = configuration_retrieve()
|
||||
config.config_print()
|
||||
|
||||
@@ -8,23 +8,48 @@ vma_start = %s;
|
||||
lma_start = %s;
|
||||
offset = vma_start - lma_start;
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
rx PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = vma_start;
|
||||
.text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) }
|
||||
.rodata : AT (ADDR(.rodata) - offset) { *(.rodata) }
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }
|
||||
|
||||
/* Put all RX, RO sections here */
|
||||
.text : AT (ADDR(.text) - offset)
|
||||
{
|
||||
*(.text.head) *(.text)
|
||||
} : rx = 0x90909090
|
||||
|
||||
.rodata : AT (ADDR(.rodata) - offset)
|
||||
{
|
||||
*(.rodata)
|
||||
} : rx = 0x90909090
|
||||
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset)
|
||||
{
|
||||
*(.rodata1)
|
||||
} : rx = 0x90909090
|
||||
|
||||
. = ALIGN(4K);
|
||||
.data : AT (ADDR(.data) - offset) { *(.data) }
|
||||
|
||||
/* Put all RW sections here */
|
||||
.data : AT (ADDR(.data) - offset)
|
||||
{
|
||||
*(.data)
|
||||
} : rw
|
||||
.bss : AT (ADDR(.bss) - offset)
|
||||
{
|
||||
*(.bss)
|
||||
. += 0x1000;
|
||||
. = ALIGN(8);
|
||||
__stack = .;
|
||||
}
|
||||
} : rw
|
||||
__end = .;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,11 @@ from os.path import join
|
||||
from string import Template
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
sys.path.append(os.path.abspath("../"))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
containers_menu = \
|
||||
'''
|
||||
@@ -41,44 +40,6 @@ def add_container_constraint(cid):
|
||||
cml_string = containers_constraint % (cid, cid)
|
||||
return cml_string
|
||||
|
||||
device_suppress_rule = \
|
||||
'''
|
||||
when CONT${CONTID}_CAP_DEVICE_${DEVNAME}_USE == y suppress
|
||||
'''
|
||||
|
||||
device_suppress_sym = \
|
||||
'''\tcont${CONTID}_cap_device_${DEVNAME_LOWER}
|
||||
'''
|
||||
|
||||
devices = ['UART1', 'UART2', 'UART3', 'TIMER1',
|
||||
'KEYBOARD0', 'MOUSE0', 'CLCD0']
|
||||
|
||||
#
|
||||
# When a symbol is used by a single container, sometimes it is
|
||||
# necessary to hide it in other containers. This cannot be
|
||||
# achieved statically but rather needs to be autogenerated
|
||||
# depending on the number of containers used.
|
||||
#
|
||||
def generate_container_suppress_rules(ncont):
|
||||
finalstr = ''
|
||||
# For each device on the platform
|
||||
for devname in devices:
|
||||
# Generate rule for each container
|
||||
for cont in range(ncont):
|
||||
# Create string templates
|
||||
rule_templ = Template(device_suppress_rule)
|
||||
sym_templ = Template(device_suppress_sym)
|
||||
|
||||
rulestr = rule_templ.substitute(CONTID = cont, DEVNAME = devname)
|
||||
symstr = ''
|
||||
# Fill for each container
|
||||
for other_cont in range(ncont):
|
||||
if other_cont == cont:
|
||||
continue
|
||||
symstr += sym_templ.substitute(CONTID = other_cont, DEVNAME_LOWER = devname.lower())
|
||||
finalstr += rulestr + symstr + "\n"
|
||||
return finalstr
|
||||
|
||||
def generate_container_cml(arch, ncont):
|
||||
print "Autogenerating new rule file"
|
||||
fbody = ""
|
||||
@@ -96,9 +57,6 @@ def generate_container_cml(arch, ncont):
|
||||
|
||||
fbody += default_number_of_containers
|
||||
|
||||
# Generate inter-container suppression rules for as many rules as containers
|
||||
fbody += generate_container_suppress_rules(ncont)
|
||||
|
||||
# Write each container's rules
|
||||
for cont in range(ncont):
|
||||
with open(CML2_CONT_DEFFILE, "rU") as contdefs:
|
||||
|
||||
0
scripts/config/__init__.py
Normal file
0
scripts/config/__init__.py
Normal file
210
scripts/config/caps.py
Normal file
210
scripts/config/caps.py
Normal file
@@ -0,0 +1,210 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
import os, sys, shelve, shutil, re
|
||||
from projpaths import *
|
||||
from lib import *
|
||||
from caps import *
|
||||
from string import Template
|
||||
|
||||
cap_strings = { 'ipc' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_IPC | ${target_rtype},
|
||||
\t\t\t\t.access = CAP_IPC_SEND | CAP_IPC_RECV
|
||||
\t\t\t\t | CAP_IPC_FULL | CAP_IPC_SHORT
|
||||
\t\t\t\t | CAP_IPC_EXTENDED | CAP_CHANGEABLE
|
||||
\t\t\t\t | CAP_REPLICABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0, .size = 0,
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'tctrl' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_TCTRL | CAP_RTYPE_CONTAINER,
|
||||
\t\t\t\t.access = CAP_TCTRL_CREATE | CAP_TCTRL_DESTROY
|
||||
\t\t\t\t | CAP_TCTRL_SUSPEND | CAP_TCTRL_RUN
|
||||
\t\t\t\t | CAP_TCTRL_RECYCLE | CAP_TCTRL_WAIT
|
||||
\t\t\t\t | CAP_CHANGEABLE | CAP_REPLICABLE
|
||||
\t\t\t\t | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0, .size = 0,
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'irqctrl' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_IRQCTRL | CAP_RTYPE_CONTAINER,
|
||||
\t\t\t\t.access = CAP_IRQCTRL_REGISTER | CAP_IRQCTRL_WAIT
|
||||
\t\t\t\t | CAP_CHANGEABLE | CAP_REPLICABLE
|
||||
\t\t\t\t | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = IRQ_RANGE_START, .end = IRQ_RANGE_END, .size = 0,
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'exregs' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_EXREGS | CAP_RTYPE_CONTAINER,
|
||||
\t\t\t\t.access = CAP_EXREGS_RW_PAGER
|
||||
\t\t\t\t | CAP_EXREGS_RW_UTCB | CAP_EXREGS_RW_SP
|
||||
\t\t\t\t | CAP_EXREGS_RW_PC | CAP_EXREGS_RW_REGS
|
||||
\t\t\t\t | CAP_CHANGEABLE | CAP_REPLICABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0, .size = 0,
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'threadpool' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_QUANTITY
|
||||
\t\t\t\t | CAP_RTYPE_THREADPOOL,
|
||||
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0,
|
||||
\t\t\t\t.size = ${size},
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'spacepool' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_QUANTITY | CAP_RTYPE_SPACEPOOL,
|
||||
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0,
|
||||
\t\t\t\t.size = ${size},
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'mutexpool' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_QUANTITY | CAP_RTYPE_MUTEXPOOL,
|
||||
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0,
|
||||
\t\t\t\t.size = ${size},
|
||||
\t\t\t},
|
||||
'''
|
||||
, 'mappool' : \
|
||||
'''
|
||||
\t\t\t[${idx}] = {
|
||||
\t\t\t\t/* For pmd accounting */
|
||||
\t\t\t\t.target = ${cid},
|
||||
\t\t\t\t.type = CAP_TYPE_QUANTITY | CAP_RTYPE_MAPPOOL,
|
||||
\t\t\t\t.access = CAP_CHANGEABLE | CAP_TRANSFERABLE,
|
||||
\t\t\t\t.start = 0, .end = 0,
|
||||
\t\t\t\t/* Function of mem regions, nthreads etc. */
|
||||
\t\t\t\t.size = ${size},
|
||||
\t\t\t},
|
||||
'''
|
||||
}
|
||||
|
||||
#
|
||||
# These are carefully crafted functions, touch with care.
|
||||
#
|
||||
def prepare_custom_capability(cont, caplist, param, val):
|
||||
if 'TYPE' in param:
|
||||
capkey, captype, rest = param.split('_', 2)
|
||||
capkey = capkey.lower()
|
||||
captype = captype.lower()
|
||||
caplist.caps[capkey] = cap_strings[captype]
|
||||
elif 'TARGET' in param:
|
||||
target_parts = param.split('_', 2)
|
||||
if len(target_parts) == 2:
|
||||
capkey = target_parts[0].lower()
|
||||
templ = Template(caplist.caps[capkey])
|
||||
caplist.caps[capkey] = templ.safe_substitute(cid = val)
|
||||
elif len(target_parts) == 3:
|
||||
capkey = target_parts[0].lower()
|
||||
ttype = target_parts[2]
|
||||
templ = Template(caplist.caps[capkey])
|
||||
|
||||
# On current container, provide correct rtype and current containerid.
|
||||
# Else we leave container id to user-supplied value
|
||||
if ttype == 'CURRENT_CONTAINER':
|
||||
caplist.caps[capkey] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_CONTAINER',
|
||||
cid = cont.id)
|
||||
elif ttype == 'CURRENT_PAGER_SPACE':
|
||||
caplist.caps[capkey] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_SPACE',
|
||||
cid = cont.id)
|
||||
elif ttype == 'OTHER_CONTAINER':
|
||||
caplist.caps[capkey] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_CONTAINER')
|
||||
elif ttype == 'OTHER_PAGER':
|
||||
caplist.caps[capkey] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_THREAD')
|
||||
else: # Ignore custom_use symbol
|
||||
return
|
||||
# print capkey
|
||||
# print caplist.caps[capkey]
|
||||
|
||||
def prepare_typed_capability(cont, caplist, param, val):
|
||||
captype, params = param.split('_', 1)
|
||||
captype = captype.lower()
|
||||
|
||||
# USE makes us assign the initial cap string with blank fields
|
||||
if 'USE' in params:
|
||||
caplist.caps[captype] = cap_strings[captype]
|
||||
|
||||
# Prepare string template from capability type
|
||||
templ = Template(caplist.caps[captype])
|
||||
|
||||
# If it is a pool, tctrl, exregs, irqctrl, amend current container id as default
|
||||
if captype[-len('pool'):] == 'pool' or \
|
||||
captype[-len('irqctrl'):] == 'irqctrl':
|
||||
caplist.caps[captype] = templ.safe_substitute(cid = cont.id)
|
||||
|
||||
# Fill in the blank size field
|
||||
elif 'SIZE' in params:
|
||||
# Get reference to capability string template
|
||||
templ = Template(caplist.caps[captype])
|
||||
caplist.caps[captype] = templ.safe_substitute(size = val)
|
||||
|
||||
# Fill in capability target type and target id fields
|
||||
elif 'TARGET' in params:
|
||||
# Get reference to capability string template
|
||||
templ = Template(caplist.caps[captype])
|
||||
|
||||
# Two types of strings are expected here: TARGET or TARGET_TARGETTYPE
|
||||
# If TARGET, the corresponding value is in val
|
||||
target_parts = params.split('_', 1)
|
||||
|
||||
# Target type
|
||||
if len(target_parts) == 2:
|
||||
ttype = target_parts[1]
|
||||
|
||||
# On current container, provide correct rtype and current containerid.
|
||||
# Else we leave container id to user-supplied value
|
||||
if ttype == 'CURRENT_CONTAINER':
|
||||
caplist.caps[captype] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_CONTAINER',
|
||||
cid = cont.id)
|
||||
elif ttype == 'CURRENT_PAGER_SPACE':
|
||||
caplist.caps[captype] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_SPACE',
|
||||
cid = cont.id)
|
||||
elif ttype == 'OTHER_CONTAINER':
|
||||
caplist.caps[captype] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_CONTAINER')
|
||||
elif ttype == 'OTHER_PAGER':
|
||||
caplist.caps[captype] = templ.safe_substitute(target_rtype = 'CAP_RTYPE_THREAD')
|
||||
|
||||
# Get target value supplied by user in val
|
||||
else:
|
||||
caplist.caps[captype] = templ.safe_substitute(cid = val)
|
||||
|
||||
# print captype
|
||||
# print caplist.caps[captype]
|
||||
|
||||
def prepare_capability(cont, cap_owner, param, val):
|
||||
caplist = cont.caplist[cap_owner] # Passing either pager or container caplist.
|
||||
if 'CUSTOM' in param:
|
||||
prepare_custom_capability(cont, caplist, param, val)
|
||||
else:
|
||||
prepare_typed_capability(cont, caplist, param, val)
|
||||
# Add default capabilities exchange registers and thread control
|
||||
|
||||
def create_default_capabilities(cont):
|
||||
caplist = cont.caplist["PAGER"]
|
||||
for captype in ['tctrl', 'exregs']:
|
||||
# Set the string
|
||||
caplist.caps[captype] = cap_strings[captype]
|
||||
# Replace substitues with values
|
||||
templ = Template(caplist.caps[captype])
|
||||
caplist.caps[captype] = templ.safe_substitute(cid = cont.id)
|
||||
|
||||
290
scripts/config/cml/arm.ruleset
Normal file
290
scripts/config/cml/arm.ruleset
Normal file
@@ -0,0 +1,290 @@
|
||||
start main_menu
|
||||
|
||||
#############
|
||||
# SYMBOLS #
|
||||
#############
|
||||
symbols
|
||||
|
||||
ARCH_ARM 'ARM' text
|
||||
ARM architecture.
|
||||
|
||||
Support for armv5, armv6, armv7 available.
|
||||
.
|
||||
|
||||
arm_cpu_type 'ARM Processor Type' text
|
||||
Select the type of arm cpu/processor to be used.
|
||||
.
|
||||
|
||||
CPU_ARM1136 'ARM1136 - Experimental' text
|
||||
ARMv6/ARM11 series based uniprocessor cpu.
|
||||
.
|
||||
|
||||
CPU_ARM11MPCORE 'ARM11 MPCore - Experimental' text
|
||||
ARMv6/ARM11 series based multiprocessor cpu.
|
||||
.
|
||||
|
||||
CPU_ARM926 'ARM926EJ-S' text
|
||||
ARMv5/ARM9 series based uniprocessor cpu.
|
||||
.
|
||||
|
||||
CPU_CORTEXA8 'ARM Cortex-A8' text
|
||||
ARMv7/Cortex series based uniprocessor cpu.
|
||||
.
|
||||
|
||||
CPU_CORTEXA9 'ARM Cortex-A9' text
|
||||
ARMv7/Cortex series based multiprocessor cpu.
|
||||
.
|
||||
|
||||
arm_platform_type 'ARM Platform Type' text
|
||||
Select the type of arm platform to be used.
|
||||
.
|
||||
|
||||
PLATFORM_PB926 'PB926-Versatile Platform' text
|
||||
ARMv5 based versatile-pb platform.
|
||||
.
|
||||
|
||||
PLATFORM_EB 'Realview EB Platform' text
|
||||
ARMv6 based realview-eb platform.
|
||||
Supported cpus:
|
||||
ARM1136
|
||||
ARM11MPCORE
|
||||
Cortex-A8(Supported by qemu only)
|
||||
Cortex-A9(Supported by RTSM/Models only)
|
||||
.
|
||||
|
||||
PLATFORM_BEAGLE 'OMAP3530/Cortex-A8 Beagle Board' text
|
||||
Texas Instrument's OMAP3530 based beagle board(rev C) platform.
|
||||
|
||||
OMAP3530 is derived from armv7 based cortex-a8 cpu.
|
||||
.
|
||||
|
||||
PLATFORM_PBA9 'Realview Express Cortex-A9' text
|
||||
ARMv7 based realview-versatile-express quad-core platform.
|
||||
.
|
||||
|
||||
main_menu 'Codezero Microkernel Configurator'
|
||||
|
||||
arm_menu 'ARM Architecture Configuration' text
|
||||
Configure arm architecture.
|
||||
.
|
||||
|
||||
processor_properties 'Generic Processor Properties' text
|
||||
Generic processor properties common to all types of processors supported.
|
||||
.
|
||||
|
||||
kernel_generic_options 'Generic Kernel Properties' text
|
||||
Generic kernel properties.
|
||||
.
|
||||
|
||||
toolchain_menu 'Toolchain Prefix' text
|
||||
Toolchains used for compiling kernel and user space.
|
||||
.
|
||||
|
||||
containers_menu 'Container Setup' text
|
||||
Select the number of containers and configure each container.
|
||||
.
|
||||
|
||||
arch_type 'Main architecture' text
|
||||
Select the type of architecture.
|
||||
.
|
||||
|
||||
SMP_ 'Enable SMP Support' text
|
||||
Enable/Disable smp support.
|
||||
.
|
||||
|
||||
NCPU 'Number of SMP CPUs' text
|
||||
Configure the number of cpus in case of multiprocessor cores.
|
||||
|
||||
Available only when smp is enabled.
|
||||
.
|
||||
|
||||
DEBUG_ACCOUNTING 'Enable system operations accounting' text
|
||||
Enable/Disable sytem operations accounting.
|
||||
|
||||
By default operation accounting in kernel is enabled.
|
||||
To enable operation accounting in userspace enable DEBUG_PERFMON_USER.
|
||||
.
|
||||
|
||||
DEBUG_PERFMON 'Enable performance monitoring' text
|
||||
Enable/Disable system performance monitoring.
|
||||
.
|
||||
|
||||
DEBUG_PERFMON_USER 'Userspace access to perfmon registers' text
|
||||
Enable/Disable userspace access to processor's performance registers.
|
||||
Enabling this option will automatically disable in-kernel measurements.
|
||||
.
|
||||
|
||||
DEBUG_SPINLOCKS 'Debug spinlocks' text
|
||||
Enable/Disable spinlock debugging by the kernel.
|
||||
Eg: detect recursive locks, double unlocks etc.
|
||||
.
|
||||
|
||||
SCHED_TICKS 'Scheduler ticks per second' text
|
||||
Configure the number of ticks generated per second
|
||||
by the timer source of scheduler.
|
||||
.
|
||||
|
||||
ICACHE_DISABLE 'Disable the L1 instruction cache' text
|
||||
Enable/Disable usage of L1 instruction cache by the processor.
|
||||
.
|
||||
|
||||
DCACHE_DISABLE 'Disable the L1 data cache' text
|
||||
Enable/Disable usage of L1 data cache by the processor.
|
||||
.
|
||||
|
||||
PREEMPT_DISABLE 'Disable Kernel Preemption' text
|
||||
Enable/Disable premption of kernel.
|
||||
.
|
||||
|
||||
TOOLCHAIN_USERSPACE 'Toolchain prefix for userspace' text
|
||||
Toolchain used for compiling userspace libraries and container.
|
||||
|
||||
Userspace is tested for an up-to-date codesourcery NONE-EABI-LINUX toolchain.
|
||||
|
||||
To specify custom toolchain, use:
|
||||
path/to/toolchain/toolchain-prefix
|
||||
.
|
||||
|
||||
TOOLCHAIN_KERNEL 'Toolchain prefix for kernel' text
|
||||
Toolchain used for compiling kernel and loader.
|
||||
|
||||
Kernel is tested for an up-to-date codesourcery EABI toolchain.
|
||||
To specify custom toolchain, use:
|
||||
path/to/toolchain/toolchain-prefix
|
||||
.
|
||||
|
||||
CAPABILITIES 'Enable capability checking' text
|
||||
Enable/Disable capability checking by kernel.
|
||||
.
|
||||
|
||||
#############
|
||||
# CHOICES #
|
||||
#############
|
||||
|
||||
choices arch_type
|
||||
ARCH_ARM
|
||||
default ARCH_ARM
|
||||
|
||||
choices arm_platform_type
|
||||
PLATFORM_PB926
|
||||
PLATFORM_PBA9
|
||||
PLATFORM_BEAGLE
|
||||
PLATFORM_EB
|
||||
default PLATFORM_PBA9
|
||||
|
||||
choices arm_cpu_type
|
||||
CPU_ARM926
|
||||
CPU_ARM1136
|
||||
CPU_ARM11MPCORE
|
||||
CPU_CORTEXA8
|
||||
CPU_CORTEXA9
|
||||
default CPU_CORTEXA9
|
||||
|
||||
#############
|
||||
# MENUS #
|
||||
#############
|
||||
|
||||
menu arm_menu
|
||||
arm_platform_type
|
||||
arm_cpu_type
|
||||
|
||||
menu processor_properties
|
||||
SMP_
|
||||
NCPU%
|
||||
ICACHE_DISABLE
|
||||
DCACHE_DISABLE
|
||||
|
||||
menu kernel_generic_options
|
||||
PREEMPT_DISABLE
|
||||
DEBUG_ACCOUNTING
|
||||
DEBUG_PERFMON
|
||||
DEBUG_PERFMON_USER
|
||||
DEBUG_SPINLOCKS
|
||||
SCHED_TICKS%
|
||||
|
||||
menu toolchain_menu
|
||||
TOOLCHAIN_USERSPACE$
|
||||
TOOLCHAIN_KERNEL$
|
||||
|
||||
menu main_menu
|
||||
arch_type
|
||||
arm_menu
|
||||
processor_properties
|
||||
kernel_generic_options
|
||||
toolchain_menu
|
||||
containers_menu
|
||||
|
||||
#############
|
||||
# RULES #
|
||||
#############
|
||||
#Capability/Container rules:
|
||||
default CAPABILITIES from y
|
||||
default DEBUG_ACCOUNTING from n
|
||||
default DEBUG_PERFMON from n
|
||||
default DEBUG_PERFMON_USER from n
|
||||
default DEBUG_SPINLOCKS from n
|
||||
default SCHED_TICKS from 1000
|
||||
derive DEBUG_PERFMON_KERNEL from DEBUG_PERFMON == y and DEBUG_PERFMON_USER != y
|
||||
|
||||
#Subarch Derivation Rules
|
||||
derive SUBARCH_V5 from CPU_ARM926
|
||||
|
||||
derive SUBARCH_V6 from CPU_ARM1136 or
|
||||
CPU_ARM11MPCORE
|
||||
|
||||
derive SUBARCH_V7 from CPU_CORTEXA8 or
|
||||
CPU_CORTEXA9
|
||||
|
||||
#CPU rules:
|
||||
unless PLATFORM_PB926 suppress CPU_ARM926
|
||||
unless PLATFORM_EB suppress CPU_ARM11MPCORE
|
||||
unless PLATFORM_EB suppress CPU_ARM1136
|
||||
unless PLATFORM_PBA9 or PLATFORM_EB suppress CPU_CORTEXA9
|
||||
unless PLATFORM_BEAGLE or PLATFORM_EB suppress CPU_CORTEXA8
|
||||
|
||||
#SMP support rules
|
||||
unless CPU_CORTEXA9 or CPU_ARM11MPCORE suppress SMP_
|
||||
unless CPU_CORTEXA9 or CPU_ARM11MPCORE suppress NCPU
|
||||
unless SMP_ suppress NCPU
|
||||
unless DEBUG_ACCOUNTING suppress DEBUG_PERFMON
|
||||
DEBUG_PERFMON_USER
|
||||
unless DEBUG_PERFMON suppress DEBUG_PERFMON_USER
|
||||
|
||||
# NOTE: Unlike menus, choices dont take { sym } model of visibility
|
||||
# dependencies. Instead, a choice symbol is declared in a menu, and
|
||||
# suppress statement is used to make sym visible, instead of a
|
||||
# { sym } model under the choices. (See manual for { sym } usage).
|
||||
|
||||
unless ARCH_ARM suppress arm_menu
|
||||
|
||||
#SMP default value
|
||||
default SMP_ from y
|
||||
default NCPU from 4
|
||||
default ICACHE_DISABLE from n
|
||||
default DCACHE_DISABLE from n
|
||||
default PREEMPT_DISABLE from n
|
||||
|
||||
require NCPU <= 4
|
||||
|
||||
# Derive Ram base address depending on platform selected
|
||||
# we use this in setting containers physical regions
|
||||
# default values
|
||||
# FIXME: Find a better solution
|
||||
derive RAM_BASE_PLAT from PLATFORM_BEAGLE ? 0x80000000 : 0x00000000
|
||||
|
||||
# Toolchains:
|
||||
default TOOLCHAIN_USERSPACE from 'arm-none-linux-gnueabi-'
|
||||
default TOOLCHAIN_KERNEL from 'arm-none-eabi-'
|
||||
|
||||
prefix CONFIG_
|
||||
|
||||
# Checklist for correct CML2
|
||||
# 1) Have you defined a prompt for each menu, choice_type?
|
||||
# 2) Have you defined a default for each symbol?
|
||||
# 3) Have you put 'symbols' keyword before each symbol, menu and choice?
|
||||
|
||||
|
||||
# Important note on derived symbols
|
||||
# DO NOT place any declaration for derived symbols like normal symbols,
|
||||
# otherwise the derivation will be silently ignored, and you will be left
|
||||
# wondering why.
|
||||
1079
scripts/config/cml/container_ruleset.template
Normal file
1079
scripts/config/cml/container_ruleset.template
Normal file
File diff suppressed because it is too large
Load Diff
302
scripts/config/cml/examples/beagle/hello-world.cml
Normal file
302
scripts/config/cml/examples/beagle/hello-world.cml
Normal file
@@ -0,0 +1,302 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: amit-laptop
|
||||
# At: Tue, 23 Feb 2010 17:03:17 +0000
|
||||
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PBA8=n
|
||||
CONFIG_PLATFORM_PB926=n
|
||||
CONFIG_PLATFORM_PB11MPCORE=n
|
||||
CONFIG_PLATFORM_BEAGLE=y
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_CORTEXA8=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=y
|
||||
CONFIG_DEBUG_PERFMON=n
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=y
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="hello_world0"
|
||||
|
||||
#
|
||||
# Baremetal Project
|
||||
#
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_EMPTY=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_HELLO_WORLD=y
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_THREADS_DEMO=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TEST_SUITE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_UART_SERVICE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TIMER_SERVICE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x80100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x80100000
|
||||
CONFIG_CONT0_PHYS0_END=0x80e00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IRQCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x81100000
|
||||
CONFIG_DRIVER_IRQ_PL190=n
|
||||
CONFIG_DRIVER_TIMER_SP804=n
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=n
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_RAM_BASE_PLAT=2147483648
|
||||
CONFIG_DRIVER_INTC_OMAP=y
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x82100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x83100000
|
||||
CONFIG_SUBARCH_V5=n
|
||||
CONFIG_SUBARCH_V7=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_DRIVER_TIMER_OMAP=y
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x80100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_DRIVER_UART_OMAP=y
|
||||
CONFIG_DRIVER_UART_PL011=n
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
279
scripts/config/cml/examples/helloworld/config.cml
Normal file
279
scripts/config/cml/examples/helloworld/config.cml
Normal file
@@ -0,0 +1,279 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: amit-laptop
|
||||
# At: Fri, 04 Dec 2009 05:31:11 +0000
|
||||
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Architecture Family
|
||||
#
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_SUBARCH_V7=n
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=y
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="hello_world0"
|
||||
|
||||
#
|
||||
# Baremetal Project
|
||||
#
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_EMPTY=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_HELLO_WORLD=y
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_THREADS_DEMO=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TEST=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_UART_SERVICE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TIMER_SERVICE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_DRIVER_IRQ_PL190=y
|
||||
CONFIG_DRIVER_TIMER_SP804=y
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=n
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_baremetal2="baremetal_noname2"
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_baremetal1="baremetal_noname1"
|
||||
CONFIG_baremetal0="hello_world0"
|
||||
CONFIG_baremetal3="baremetal_noname3"
|
||||
CONFIG_DRIVER_UART_PL011=y
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
316
scripts/config/cml/examples/kmi/kmi-pb926.cml
Normal file
316
scripts/config/cml/examples/kmi/kmi-pb926.cml
Normal file
@@ -0,0 +1,316 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: amit-laptop-ubuntu
|
||||
# At: Mon, 29 Mar 2010 17:55:04 +0000
|
||||
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PBA8=n
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
CONFIG_PLATFORM_PB11MPCORE=n
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
CONFIG_DEBUG_SPINLOCKS=n
|
||||
CONFIG_SCHED_TICKS=1000
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=y
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="kmi_service0"
|
||||
|
||||
#
|
||||
# Baremetal Project
|
||||
#
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_EMPTY=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_HELLO_WORLD=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_THREADS_DEMO=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TEST_SUITE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_UART_SERVICE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TIMER_SERVICE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_KMI_SERVICE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IRQCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 KEYBOARD0 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_KEYBOARD0_USE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 MOUSE0 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_MOUSE0_USE=y
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_DRIVER_IRQ_PL190=y
|
||||
CONFIG_DRIVER_TIMER_SP804=y
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=n
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_RAM_BASE_PLAT=0
|
||||
CONFIG_DRIVER_INTC_OMAP=n
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V7=n
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_DRIVER_TIMER_OMAP=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_DRIVER_UART_OMAP=n
|
||||
CONFIG_DRIVER_UART_PL011=y
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
292
scripts/config/cml/examples/linux/beagle/config.cml
Normal file
292
scripts/config/cml/examples/linux/beagle/config.cml
Normal file
@@ -0,0 +1,292 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: amit-laptop
|
||||
# At: Wed, 03 Mar 2010 21:07:44 +0000
|
||||
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PBA8=n
|
||||
CONFIG_PLATFORM_PB926=n
|
||||
CONFIG_PLATFORM_PB11MPCORE=n
|
||||
CONFIG_PLATFORM_BEAGLE=y
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_CORTEXA8=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="linux0"
|
||||
|
||||
#
|
||||
# Container 0 Linux Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_LINUX_PHYS_OFFSET=0x80200000
|
||||
CONFIG_CONT0_LINUX_ZRELADDR=0x80208000
|
||||
CONFIG_CONT0_LINUX_ROOTFS_ADDRESS=0x80700000
|
||||
CONFIG_CONT0_LINUX_PAGE_OFFSET=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x80200000
|
||||
CONFIG_CONT0_PHYS0_END=0x80f00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IRQCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x81100000
|
||||
CONFIG_DRIVER_IRQ_PL190=n
|
||||
CONFIG_DRIVER_TIMER_SP804=n
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=n
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_RAM_BASE_PLAT=2147483648
|
||||
CONFIG_DRIVER_INTC_OMAP=y
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x82100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x83100000
|
||||
CONFIG_SUBARCH_V5=n
|
||||
CONFIG_SUBARCH_V7=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_DRIVER_TIMER_OMAP=y
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x80200000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_DRIVER_UART_OMAP=y
|
||||
CONFIG_DRIVER_UART_PL011=n
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0008000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
292
scripts/config/cml/examples/linux/pb926/config.cml
Normal file
292
scripts/config/cml/examples/linux/pb926/config.cml
Normal file
@@ -0,0 +1,292 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: amit-laptop
|
||||
# At: Wed, 03 Mar 2010 08:42:40 +0000
|
||||
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PBA8=n
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
CONFIG_PLATFORM_PB11MPCORE=n
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="linux0"
|
||||
|
||||
#
|
||||
# Container 0 Linux Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_LINUX_PHYS_OFFSET=0x200000
|
||||
CONFIG_CONT0_LINUX_ZRELADDR=0x208000
|
||||
CONFIG_CONT0_LINUX_ROOTFS_ADDRESS=0x700000
|
||||
CONFIG_CONT0_LINUX_PAGE_OFFSET=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x200000
|
||||
CONFIG_CONT0_PHYS0_END=0xf00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IRQCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_DRIVER_IRQ_PL190=y
|
||||
CONFIG_DRIVER_TIMER_SP804=y
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=n
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_RAM_BASE_PLAT=0
|
||||
CONFIG_DRIVER_INTC_OMAP=n
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_SUBARCH_V7=n
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_DRIVER_TIMER_OMAP=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x200000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_DRIVER_UART_OMAP=n
|
||||
CONFIG_DRIVER_UART_PL011=y
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0008000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
230
scripts/config/cml/examples/linux/vexpress/config.cml
Normal file
230
scripts/config/cml/examples/linux/vexpress/config.cml
Normal file
@@ -0,0 +1,230 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: bahadir-laptop
|
||||
# At: Tue, 01 Jun 2010 11:36:41 +0000
|
||||
# Linux version 2.6.31-21-generic (buildd@rothera) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_PB926=n
|
||||
CONFIG_PLATFORM_PBA9=y
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_EB=n
|
||||
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_CORTEXA9=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_SMP_=y
|
||||
CONFIG_NCPU=4
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
CONFIG_DEBUG_SPINLOCKS=n
|
||||
CONFIG_SCHED_TICKS=1000
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN_USERSPACE="arm-none-linux-gnueabi-"
|
||||
CONFIG_TOOLCHAIN_KERNEL="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="linux0"
|
||||
|
||||
#
|
||||
# Container 0 Linux Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_LINUX_PHYS_OFFSET=0x200000
|
||||
CONFIG_CONT0_LINUX_ZRELADDR=0x208000
|
||||
CONFIG_CONT0_LINUX_ROOTFS_ADDRESS=0x700000
|
||||
CONFIG_CONT0_LINUX_PAGE_OFFSET=0x60000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PAGER_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PAGER_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_PAGER_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_PAGER_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IRQCTRL_USE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Global Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_RAM_BASE_PLAT=0
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V5=n
|
||||
CONFIG_SUBARCH_V7=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x200000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0x60000000
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0x60008000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
243
scripts/config/cml/examples/posix/single_posix.cml
Normal file
243
scripts/config/cml/examples/posix/single_posix.cml
Normal file
@@ -0,0 +1,243 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: bahadir-laptop
|
||||
# At: Mon, 31 May 2010 17:06:37 +0000
|
||||
# Linux version 2.6.31-21-generic (buildd@rothera) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_EB=n
|
||||
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
CONFIG_DEBUG_SPINLOCKS=n
|
||||
CONFIG_SCHED_TICKS=1000
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN_USERSPACE="arm-none-linux-gnueabi-"
|
||||
CONFIG_TOOLCHAIN_KERNEL="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT0_TYPE_POSIX=y
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="posix0"
|
||||
|
||||
#
|
||||
# Container 0 Pager Linker Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 POSIX Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_SHM_START=0x80000000
|
||||
CONFIG_CONT0_PAGER_SHM_END=0x88000000
|
||||
CONFIG_CONT0_PAGER_TASK_START=0x40000000
|
||||
CONFIG_CONT0_PAGER_TASK_END=0x50000000
|
||||
CONFIG_CONT0_PAGER_UTCB_START=0xf8100000
|
||||
CONFIG_CONT0_PAGER_UTCB_END=0xf8200000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PAGER_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PAGER_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_VIRTMEM_REGIONS=4
|
||||
CONFIG_CONT0_PAGER_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_PAGER_VIRT0_END=0xb0000000
|
||||
CONFIG_CONT0_PAGER_VIRT1_START=0x80000000
|
||||
CONFIG_CONT0_PAGER_VIRT1_END=0x88000000
|
||||
CONFIG_CONT0_PAGER_VIRT2_START=0x40000000
|
||||
CONFIG_CONT0_PAGER_VIRT2_END=0x50000000
|
||||
CONFIG_CONT0_PAGER_VIRT3_START=0xf8100000
|
||||
CONFIG_CONT0_PAGER_VIRT3_END=0xf8200000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IRQCTRL_USE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Global Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_RAM_BASE_PLAT=0
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_SUBARCH_V7=n
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
397
scripts/config/cml/examples/posix/two_posix.cml
Normal file
397
scripts/config/cml/examples/posix/two_posix.cml
Normal file
@@ -0,0 +1,397 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: bahadir-laptop
|
||||
# At: Mon, 31 May 2010 17:04:09 +0000
|
||||
# Linux version 2.6.31-21-generic (buildd@rothera) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
CONFIG_PLATFORM_PBA9=n
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_EB=n
|
||||
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=n
|
||||
CONFIG_DEBUG_SPINLOCKS=n
|
||||
CONFIG_SCHED_TICKS=1000
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN_USERSPACE="arm-none-linux-gnueabi-"
|
||||
CONFIG_TOOLCHAIN_KERNEL="arm-none-eabi-"
|
||||
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
CONFIG_CONTAINERS=2
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT0_TYPE_POSIX=y
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="posix0"
|
||||
|
||||
#
|
||||
# Container 0 Pager Linker Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 POSIX Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_SHM_START=0x80000000
|
||||
CONFIG_CONT0_PAGER_SHM_END=0x88000000
|
||||
CONFIG_CONT0_PAGER_TASK_START=0x40000000
|
||||
CONFIG_CONT0_PAGER_TASK_END=0x50000000
|
||||
CONFIG_CONT0_PAGER_UTCB_START=0xf8100000
|
||||
CONFIG_CONT0_PAGER_UTCB_END=0xf8200000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PAGER_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PAGER_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PAGER_VIRTMEM_REGIONS=4
|
||||
CONFIG_CONT0_PAGER_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_PAGER_VIRT0_END=0xb0000000
|
||||
CONFIG_CONT0_PAGER_VIRT1_START=0x80000000
|
||||
CONFIG_CONT0_PAGER_VIRT1_END=0x88000000
|
||||
CONFIG_CONT0_PAGER_VIRT2_START=0x40000000
|
||||
CONFIG_CONT0_PAGER_VIRT2_END=0x50000000
|
||||
CONFIG_CONT0_PAGER_VIRT3_START=0xf8100000
|
||||
CONFIG_CONT0_PAGER_VIRT3_END=0xf8200000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Pager Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_PAGER_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_IRQCTRL_USE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Global Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 1 Type
|
||||
#
|
||||
CONFIG_CONT1_TYPE_BAREMETAL=n
|
||||
CONFIG_CONT1_TYPE_POSIX=y
|
||||
CONFIG_CONT1_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Options
|
||||
#
|
||||
CONFIG_CONT1_OPT_NAME="posix1"
|
||||
|
||||
#
|
||||
# Container 1 Pager Linker Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_LMA=0x1100000
|
||||
CONFIG_CONT1_PAGER_VMA=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 POSIX Pager Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_SHM_START=0x88000000
|
||||
CONFIG_CONT1_PAGER_SHM_END=0x90000000
|
||||
CONFIG_CONT1_PAGER_TASK_START=0x50000000
|
||||
CONFIG_CONT1_PAGER_TASK_END=0x60000000
|
||||
CONFIG_CONT1_PAGER_UTCB_START=0xf8200000
|
||||
CONFIG_CONT1_PAGER_UTCB_END=0xf8300000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Pager Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT1_PAGER_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT1_PAGER_PHYS0_START=0x1100000
|
||||
CONFIG_CONT1_PAGER_PHYS0_END=0x1e00000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Pager Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT1_PAGER_VIRTMEM_REGIONS=4
|
||||
CONFIG_CONT1_PAGER_VIRT0_START=0xb0000000
|
||||
CONFIG_CONT1_PAGER_VIRT0_END=0xc0000000
|
||||
CONFIG_CONT1_PAGER_VIRT1_START=0x88000000
|
||||
CONFIG_CONT1_PAGER_VIRT1_END=0x90000000
|
||||
CONFIG_CONT1_PAGER_VIRT2_START=0x50000000
|
||||
CONFIG_CONT1_PAGER_VIRT2_END=0x60000000
|
||||
CONFIG_CONT1_PAGER_VIRT3_START=0xf8200000
|
||||
CONFIG_CONT1_PAGER_VIRT3_END=0xf8300000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Pager Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 1 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT1_PAGER_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT1_PAGER_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT1_PAGER_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT1_PAGER_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 1 IPC Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_IPC_USE=y
|
||||
CONFIG_CONT1_PAGER_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT1_PAGER_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT1_PAGER_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT1_PAGER_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_IRQCTRL_USE=y
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Global Capabilities
|
||||
#
|
||||
|
||||
#
|
||||
# Container 1 IPC Capability
|
||||
#
|
||||
CONFIG_CONT1_CAP_IPC_USE=y
|
||||
CONFIG_CONT1_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT1_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT1_CAP_IPC_TARGET_OTHER_CONTAINER=n
|
||||
CONFIG_CONT1_CAP_IPC_TARGET_OTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT1_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT1_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_RAM_BASE_PLAT=0
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_SUBARCH_V7=n
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
302
scripts/config/cml/examples/vxa9/config.cml
Normal file
302
scripts/config/cml/examples/vxa9/config.cml
Normal file
@@ -0,0 +1,302 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: bahadir-laptop
|
||||
# At: Thu, 25 Feb 2010 16:06:59 +0000
|
||||
# Linux version 2.6.31-19-generic (buildd@palmer) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) ) #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_PBA8=n
|
||||
CONFIG_PLATFORM_PB926=n
|
||||
CONFIG_PLATFORM_PB11MPCORE=n
|
||||
CONFIG_PLATFORM_BEAGLE=n
|
||||
CONFIG_PLATFORM_PBA9=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_CORTEXA9=y
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Generic Processor Properties
|
||||
#
|
||||
CONFIG_SMP=n
|
||||
CONFIG_ICACHE_DISABLE=n
|
||||
CONFIG_DCACHE_DISABLE=n
|
||||
|
||||
|
||||
#
|
||||
# Generic Kernel Properties
|
||||
#
|
||||
CONFIG_PREEMPT_DISABLE=n
|
||||
CONFIG_DEBUG_ACCOUNTING=y
|
||||
CONFIG_DEBUG_PERFMON=y
|
||||
CONFIG_DEBUG_PERFMON_USER=y
|
||||
|
||||
|
||||
#
|
||||
# Toolchain Prefix
|
||||
#
|
||||
CONFIG_TOOLCHAIN="arm-none-eabi-"
|
||||
|
||||
CONFIG_CONTAINERS=1
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
CONFIG_CAPABILITIES=y
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_BAREMETAL=y
|
||||
CONFIG_CONT0_TYPE_POSIX=n
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="test_suite0"
|
||||
|
||||
#
|
||||
# Baremetal Project
|
||||
#
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_EMPTY=y
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_HELLO_WORLD=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_THREADS_DEMO=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TEST_SUITE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_UART_SERVICE=n
|
||||
CONFIG_CONT0_BAREMETAL_PROJ_TIMER_SERVICE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x100000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
CONFIG_CONT0_PHYS0_START=0x100000
|
||||
CONFIG_CONT0_PHYS0_END=0xe00000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions (Capabilities)
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=1
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability List
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Thread Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_THREADPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Space Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Mutex Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Map Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_MAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Pool Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPPOOL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Thread Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_TCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Exchange Registers Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_EXREGS_USE=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IPC Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IPC_USE=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
|
||||
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Capability Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_CAPCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Userspace Mutex Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_UMUTEX_USE=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 IRQ Control Capability
|
||||
#
|
||||
CONFIG_CONT0_CAP_IRQCTRL_USE=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
|
||||
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 0 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM0_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 1 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 2 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Custom Capability 3 Parameters
|
||||
#
|
||||
CONFIG_CONT0_CAP_CUSTOM3_USE=n
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Devices (Capabilities)
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 UART1 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART2 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 UART3 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
|
||||
|
||||
|
||||
#
|
||||
# Container 0 TIMER23 Menu
|
||||
#
|
||||
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=y
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_DEBUG_PERFMON_KERNEL=n
|
||||
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
|
||||
CONFIG_DRIVER_IRQ_PL190=n
|
||||
CONFIG_DRIVER_TIMER_SP804=y
|
||||
CONFIG_CONT2_START_PC_ADDR=0xc0000000
|
||||
CONFIG_CONT3_START_PC_ADDR=0xd0000000
|
||||
CONFIG_DRIVER_IRQ_GIC=y
|
||||
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
|
||||
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
|
||||
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
|
||||
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
|
||||
CONFIG_SUBARCH_V5=n
|
||||
CONFIG_SUBARCH_V7=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_DRIVER_TIMER_OMAP=n
|
||||
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
|
||||
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
|
||||
CONFIG_DRIVER_UART_OMAP=n
|
||||
CONFIG_DRIVER_UART_PL011=y
|
||||
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
|
||||
CONFIG_CONT0_START_PC_ADDR=0xa0000000
|
||||
CONFIG_CONT1_START_PC_ADDR=0xb0000000
|
||||
#
|
||||
# That's all, folks!
|
||||
54
scripts/config/config_check.py
Normal file
54
scripts/config/config_check.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
import os, sys, re
|
||||
|
||||
from projpaths import *
|
||||
from lib import *
|
||||
|
||||
def get_conts_memory_regions(phys_virt, array_start, array_end):
|
||||
with open(join(PROJROOT, CONFIG_H), 'r')as file:
|
||||
for line in file:
|
||||
begin = line.rfind(" ")
|
||||
end = len(line)
|
||||
if re.search("(" + phys_virt + ")([0-9]){1,4}(_START)", line):
|
||||
array_start.append(int(line[begin : end], 16))
|
||||
elif re.search("(" + phys_virt + ")([0-9]){1,4}(_END)", line):
|
||||
array_end.append(int(line[begin : end], 16))
|
||||
|
||||
def check_memory_overlap(phys_virt, array_start, array_end):
|
||||
length = len(array_start)
|
||||
# Brute force method
|
||||
for index, s1 in enumerate(array_start):
|
||||
e1 = array_end[index]
|
||||
iter = 0
|
||||
while iter < length:
|
||||
if index == iter:
|
||||
iter = iter + 1
|
||||
continue
|
||||
if ((s1 <= array_start[iter]) and \
|
||||
((e1 >= array_end[iter]) or (array_start[iter] < e1 <= array_end[iter]))):
|
||||
print 'Memory overlap between containers!!!'
|
||||
print 'overlapping ranges: '+ \
|
||||
conv_hex(s1) + '-' + conv_hex(e1) + ' and ' + \
|
||||
conv_hex(array_start[iter]) + '-' + conv_hex(array_end[iter])
|
||||
print '\n'
|
||||
sys.exit()
|
||||
else:
|
||||
iter = iter + 1
|
||||
|
||||
def phys_region_sanity_check():
|
||||
phys_start = []
|
||||
phys_end = []
|
||||
get_conts_memory_regions('PHYS', phys_start, phys_end)
|
||||
check_memory_overlap('PHYS', phys_start, phys_end)
|
||||
|
||||
def virt_region_sanity_check():
|
||||
virt_start = []
|
||||
virt_end = []
|
||||
get_conts_memory_regions('VIRT', virt_start, virt_end)
|
||||
check_memory_overlap('VIRT', virt_start, virt_end)
|
||||
|
||||
def sanity_check_conts():
|
||||
phys_region_sanity_check()
|
||||
virt_region_sanity_check()
|
||||
|
||||
266
scripts/config/config_invoke.py
Executable file
266
scripts/config/config_invoke.py
Executable file
@@ -0,0 +1,266 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
import os, sys, shelve, shutil, time
|
||||
from time import strftime, localtime
|
||||
from os.path import join
|
||||
|
||||
from projpaths import *
|
||||
sys.path.append(PROJROOT)
|
||||
from configuration import *
|
||||
from scripts.baremetal.baremetal_generator import *
|
||||
from scripts.kernel.generate_kernel_cinfo import *
|
||||
from scripts.cml.generate_container_cml import *
|
||||
from optparse import OptionParser
|
||||
|
||||
#
|
||||
# Rarely required. Only required when:
|
||||
# The number of containers defined in the ruleset are not enough.
|
||||
# E.g. you want 16 containers instead of 4.
|
||||
# You want to start from scratch and set _all_ the parameters yourself.
|
||||
#
|
||||
def autogen_rules_file(options, args):
|
||||
# Prepare default if arch not supplied
|
||||
if not options.arch:
|
||||
print "No arch supplied (-a), using `arm' as default."
|
||||
options.arch = "arm"
|
||||
|
||||
# Prepare default if number of containers not supplied
|
||||
if not options.ncont:
|
||||
options.ncont = 4
|
||||
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
||||
|
||||
return generate_container_cml(options.arch, options.ncont)
|
||||
|
||||
|
||||
def cml2_header_to_symbols(cml2_header, config):
|
||||
with file(cml2_header) as header_file:
|
||||
for line in header_file:
|
||||
pair = config.line_to_name_value(line)
|
||||
if pair is not None:
|
||||
name, value = pair
|
||||
config.get_all(name, value)
|
||||
config.get_cpu(name, value)
|
||||
config.get_arch(name, value)
|
||||
config.get_subarch(name, value)
|
||||
config.get_platform(name, value)
|
||||
config.get_ncpu(name, value)
|
||||
config.get_ncontainers(name, value)
|
||||
config.get_container_parameters(name, value)
|
||||
config.get_toolchain(name, value)
|
||||
|
||||
def cml2_add_default_caps(config):
|
||||
for c in config.containers:
|
||||
create_default_capabilities(c)
|
||||
|
||||
def cml2_update_config_h(config_h_path, config):
|
||||
with open(config_h_path, "a") as config_h:
|
||||
config_h.write("#define __ARCH__ " + config.arch + '\n')
|
||||
config_h.write("#define __PLATFORM__ " + config.platform + '\n')
|
||||
config_h.write("#define __SUBARCH__ " + config.subarch + '\n')
|
||||
config_h.write("#define __CPU__ " + config.cpu + '\n')
|
||||
|
||||
def configure_kernel(cml_file):
|
||||
config = configuration()
|
||||
|
||||
if not os.path.exists(BUILDDIR):
|
||||
os.mkdir(BUILDDIR)
|
||||
|
||||
cml2_configure(cml_file)
|
||||
|
||||
# Parse options + autogenerate cml rule file if necessary.
|
||||
def build_parse_options():
|
||||
autogen_true = 0
|
||||
usage = "\n\t%prog [options] arg\n\n\
|
||||
\r\t** : Override all other options provided"
|
||||
parser = OptionParser(usage, version = "codezero 4.0")
|
||||
|
||||
parser.add_option("-a", "--arch", type = "string", dest = "arch",
|
||||
help = "Specify architecture.")
|
||||
|
||||
parser.add_option("-n", "--num-containers", type = "int", dest = "ncont",
|
||||
help = "Maximum number of containers supported in configuration.")
|
||||
|
||||
parser.add_option("-f", "--file", dest = "cml_file",
|
||||
help = "Specify user-defined configuration file.")
|
||||
|
||||
parser.add_option("-C", "--configure", action = "store_true", dest = "config",
|
||||
help = "Configure only.")
|
||||
|
||||
parser.add_option("-r", "--reset-config", action = "store_true",
|
||||
default = False, dest = "reset_config",
|
||||
help = "Reset earlier configuration settings.")
|
||||
|
||||
parser.add_option("-b", "--batch", action="store_true", dest="batch", default = False,
|
||||
help = "Disable configuration screen, used with -f only.")
|
||||
|
||||
parser.add_option("-j", "--jobs", type = "str", dest="jobs", default = "1",
|
||||
help = "Enable parallel build with SCons and GNU/Make"
|
||||
"try to launch more than one compilation at a time")
|
||||
|
||||
parser.add_option("-p", "--print-config", action = "store_true",
|
||||
default = False, dest = "print_config",
|
||||
help = "Print configuration**")
|
||||
|
||||
parser.add_option("-c", "--clean", action="store_true", dest="clean", default = False,
|
||||
help = "Do cleanup excluding configuration files**")
|
||||
|
||||
parser.add_option("-x", "--clean-all", action="store_true", dest="clean_all", default = False,
|
||||
help = "Do cleanup including configuration files**")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.cml_file and options.reset_config:
|
||||
parser.error("options -f and -r are mutually exclusive")
|
||||
exit()
|
||||
|
||||
# if -C, configure only.
|
||||
# -f or -r or -n or -a implies -C.
|
||||
options.config_only = 0
|
||||
if options.config:
|
||||
options.config_only = 1
|
||||
elif options.cml_file or options.ncont or options.arch or options.reset_config \
|
||||
or not os.path.exists(BUILDDIR) or not os.path.exists(CONFIG_SHELVE_DIR):
|
||||
options.config = 1
|
||||
|
||||
return options, args
|
||||
|
||||
|
||||
def configure_system(options, args):
|
||||
#
|
||||
# Configure only if we are told to do so.
|
||||
#
|
||||
if not options.config:
|
||||
return
|
||||
|
||||
if not os.path.exists(BUILDDIR):
|
||||
os.mkdir(BUILDDIR)
|
||||
|
||||
#
|
||||
# If we have an existing config file or one supplied in options
|
||||
# and we're not forced to autogenerate, we use the config file.
|
||||
#
|
||||
# Otherwise we autogenerate a ruleset and compile it, and create
|
||||
# a configuration file from it from scratch.
|
||||
#
|
||||
if (options.cml_file or os.path.exists(CML2_CONFIG_FILE)) \
|
||||
and not options.reset_config:
|
||||
if options.cml_file:
|
||||
cml2_config_file = options.cml_file
|
||||
else:
|
||||
cml2_config_file = CML2_CONFIG_FILE
|
||||
|
||||
#
|
||||
# If we have a valid config file but not a rules file,
|
||||
# we still need to autogenerate the rules file.
|
||||
#
|
||||
if not os.path.exists(CML2_COMPILED_RULES):
|
||||
rules_file = autogen_rules_file(options, args)
|
||||
|
||||
# Compile rules file.
|
||||
os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + \
|
||||
CML2_COMPILED_RULES + ' ' + rules_file)
|
||||
|
||||
if options.batch:
|
||||
# Create configuration from existing file
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -b -o ' + \
|
||||
CML2_CONFIG_FILE + ' -i ' + cml2_config_file + \
|
||||
' ' + CML2_COMPILED_RULES)
|
||||
else:
|
||||
# Create configuration from existing file
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \
|
||||
CML2_CONFIG_FILE + ' -i ' + cml2_config_file + \
|
||||
' ' + CML2_COMPILED_RULES)
|
||||
|
||||
else:
|
||||
rules_file = autogen_rules_file(options, args)
|
||||
|
||||
# Compile rules file.
|
||||
os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + \
|
||||
CML2_COMPILED_RULES + ' ' + rules_file)
|
||||
|
||||
# Create configuration from scratch
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \
|
||||
CML2_CONFIG_FILE + ' ' + CML2_COMPILED_RULES)
|
||||
|
||||
# After configure, if user might have chosen to quit without saving
|
||||
if not os.path.exists(CML2_CONFIG_FILE):
|
||||
print "Exiting without saving configuration."
|
||||
sys.exit()
|
||||
|
||||
# Create header file
|
||||
os.system(TOOLSDIR + '/cml2header.py -o ' + \
|
||||
CML2_CONFIG_H + ' -i ' + CML2_CONFIG_FILE)
|
||||
|
||||
# The rest:
|
||||
if not os.path.exists(os.path.dirname(CONFIG_H)):
|
||||
os.mkdir(os.path.dirname(CONFIG_H))
|
||||
|
||||
shutil.copy(CML2_CONFIG_H, CONFIG_H)
|
||||
|
||||
config = configuration()
|
||||
cml2_header_to_symbols(CML2_CONFIG_H, config)
|
||||
cml2_add_default_caps(config)
|
||||
cml2_update_config_h(CONFIG_H, config)
|
||||
|
||||
configuration_save(config)
|
||||
|
||||
# Initialise config dependent projpaths
|
||||
define_config_dependent_projpaths(config)
|
||||
|
||||
# Generate baremetal container files if new ones defined
|
||||
baremetal_cont_gen = BaremetalContGenerator()
|
||||
baremetal_cont_gen.baremetal_container_generate(config)
|
||||
|
||||
return config
|
||||
#
|
||||
# Rename config.cml to more human friendly name
|
||||
# Name of new cml is based on paltform and
|
||||
# containers configured in the system.
|
||||
#
|
||||
def rename_config_cml(options):
|
||||
if not options.config:
|
||||
return None
|
||||
|
||||
config = configuration_retrieve()
|
||||
new_cml_file = \
|
||||
join(BUILDDIR, strftime("%a-%d%b%Y-%H:%M:%S", localtime()) + \
|
||||
'-' + config.platform)
|
||||
for cont in config.containers:
|
||||
new_cml_file += '-' + cont.name
|
||||
new_cml_file += '.cml'
|
||||
|
||||
os.system("cp -f " + CML2_CONFIG_FILE + " " + new_cml_file)
|
||||
return new_cml_file
|
||||
|
||||
def cml_files_cleanup():
|
||||
'''
|
||||
config = configuration_retrieve()
|
||||
new_cml_file = join(BUILDDIR, config.platform)
|
||||
for cont in config.containers:
|
||||
new_cml_file += '-' + cont.name
|
||||
new_cml_file += '.cml'
|
||||
|
||||
#os.system("rm -f " + CML2_CONFIG_FILE)
|
||||
#os.system("rm -f " + new_cml_file)
|
||||
#os.system("rm -f " + CML2_COMPILED_RULES)
|
||||
#os.system("rm -f " + CML2_CONFIG_H)
|
||||
#os.system("rm -f " + CML2_AUTOGEN_RULES)
|
||||
os.system("rm -f " + CONFIG_H)
|
||||
#os.system("rm -f " + CONFIG_SHELVE)
|
||||
'''
|
||||
os.system("rm -f " + CONFIG_H)
|
||||
os.system("rm -rf " + BUILDDIR)
|
||||
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
opts, args = build_parse_options()
|
||||
|
||||
# We force configuration when calling this script
|
||||
# whereas build.py can provide it as an option
|
||||
opts.config = 1
|
||||
|
||||
configure_system(opts, args)
|
||||
'''
|
||||
print '\nPlease use build.py for configuration and building.\n'
|
||||
'''
|
||||
312
scripts/config/configuration.py
Normal file
312
scripts/config/configuration.py
Normal file
@@ -0,0 +1,312 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
import os, sys, shelve, shutil, re
|
||||
from projpaths import *
|
||||
from lib import *
|
||||
from caps import *
|
||||
|
||||
class CapabilityList:
|
||||
def __init__(self):
|
||||
self.physmem = {}
|
||||
self.physmem["START"] = {}
|
||||
self.physmem["END"] = {}
|
||||
self.virtmem = {}
|
||||
self.virtmem["START"] = {}
|
||||
self.virtmem["END"] = {}
|
||||
self.caps = {}
|
||||
self.virt_regions = 0
|
||||
self.phys_regions = 0
|
||||
|
||||
class Container:
|
||||
def __init__(self, id):
|
||||
self.dirname = None
|
||||
self.duplicate = 0
|
||||
self.name = None
|
||||
self.type = None
|
||||
self.id = id
|
||||
self.pager_lma = 0
|
||||
self.pager_vma = 0
|
||||
self.pager_size = 0
|
||||
self.pager_rw_pheader_start = 0
|
||||
self.pager_rw_pheader_end = 0
|
||||
self.pager_rx_pheader_start = 0
|
||||
self.pager_rx_pheader_end = 0
|
||||
self.pager_task_region_start = 0
|
||||
self.pager_task_region_end = 0
|
||||
self.pager_shm_region_start = 0
|
||||
self.pager_shm_region_end = 0
|
||||
self.pager_utcb_region_start = 0
|
||||
self.pager_utcb_region_end = 0
|
||||
self.linux_zreladdr = 0
|
||||
self.linux_page_offset = 0
|
||||
self.linux_phys_offset = 0
|
||||
self.linux_rootfs_address = 0
|
||||
self.caplist = {}
|
||||
self.caplist["PAGER"] = CapabilityList()
|
||||
self.caplist["CONTAINER"] = CapabilityList()
|
||||
|
||||
def print_self(self):
|
||||
print '\nContainer %d' % self.id
|
||||
print '------------'
|
||||
print 'Container type: %s' % self.type
|
||||
print 'Container Name: %s' % self.name
|
||||
print 'Container Pager lma: %s' % conv_hex(self.pager_lma)
|
||||
print 'Container Pager vma: %s' % conv_hex(self.pager_vma)
|
||||
print 'Container Pager shm region start: %s' % conv_hex(self.pager_shm_region_start)
|
||||
print 'Container Pager shm region end: %s' % conv_hex(self.pager_shm_region_end)
|
||||
print 'Container Pager task region start: %s' % conv_hex(self.pager_task_region_start)
|
||||
print 'Container Pager task region end: %s' % conv_hex(self.pager_task_region_end)
|
||||
print 'Container Pager utcb region start: %s' % conv_hex(self.pager_utcb_region_start)
|
||||
print 'Container Pager utcb region end: %s' % conv_hex(self.pager_utcb_region_end)
|
||||
print 'Container Virtual regions: %s' % self.caps.virt_regions
|
||||
print 'Container Physical regions: %s' % self.caps.phys_regions
|
||||
print 'Container Pager Virtual regions: %s' % self.pager_caps.virt_regions
|
||||
print 'Container Pager Physical regions: %s' % self.pager_caps.phys_regions
|
||||
#print 'Container Capabilities: %s' % self.caps
|
||||
print '\n'
|
||||
|
||||
class configuration:
|
||||
|
||||
def __init__(self):
|
||||
# Mapping between cpu and gcc flags for it.
|
||||
# Optimized solution to derive gcc arch flag from cpu
|
||||
# gcc flag here is "-march"
|
||||
# cpu -march flag
|
||||
self.arch_to_gcc_flag = (['ARM926', 'armv5'],
|
||||
['ARM1136', 'armv6'],
|
||||
['ARM11MPCORE', 'armv6k'],
|
||||
['CORTEXA8', 'armv7-a'],
|
||||
['CORTEXA9', 'armv7-a'])
|
||||
self.arch = None
|
||||
self.subarch = None
|
||||
self.platform = None
|
||||
self.cpu = None
|
||||
self.gcc_arch_flag = None
|
||||
self.toolchain_userspace = None
|
||||
self.toolchain_kernel = None
|
||||
self.all = []
|
||||
self.smp = False
|
||||
self.ncpu = 0
|
||||
self.containers = []
|
||||
self.ncontainers = 0
|
||||
|
||||
# Get all name value symbols
|
||||
def get_all(self, name, val):
|
||||
self.all.append([name, val])
|
||||
|
||||
# Convert line to name value pair, if possible
|
||||
def line_to_name_value(self, line):
|
||||
parts = line.split()
|
||||
if len(parts) > 0:
|
||||
if parts[0] == "#define":
|
||||
return parts[1], parts[2]
|
||||
return None
|
||||
|
||||
# Check if SMP enable, and get NCPU if SMP
|
||||
def get_ncpu(self, name, value):
|
||||
if name[:len("CONFIG_SMP")] == "CONFIG_SMP":
|
||||
self.smp = bool(value)
|
||||
if name[:len("CONFIG_NCPU")] == "CONFIG_NCPU":
|
||||
self.ncpu = int(value)
|
||||
|
||||
# Extract architecture from a name value pair
|
||||
def get_arch(self, name, val):
|
||||
if name[:len("CONFIG_ARCH_")] == "CONFIG_ARCH_":
|
||||
parts = name.split("_", 3)
|
||||
self.arch = parts[2].lower()
|
||||
|
||||
# Extract subarch from a name value pair
|
||||
def get_subarch(self, name, val):
|
||||
if name[:len("CONFIG_SUBARCH_")] == "CONFIG_SUBARCH_":
|
||||
parts = name.split("_", 3)
|
||||
self.subarch = parts[2].lower()
|
||||
|
||||
# Extract platform from a name value pair
|
||||
def get_platform(self, name, val):
|
||||
if name[:len("CONFIG_PLATFORM_")] == "CONFIG_PLATFORM_":
|
||||
parts = name.split("_", 3)
|
||||
self.platform = parts[2].lower()
|
||||
|
||||
# Extract cpu from a name value pair
|
||||
def get_cpu(self, name, val):
|
||||
if name[:len("CONFIG_CPU_")] == "CONFIG_CPU_":
|
||||
parts = name.split("_", 3)
|
||||
self.cpu = parts[2].lower()
|
||||
|
||||
# derive gcc "-march" flag
|
||||
for cputype, archflag in self.arch_to_gcc_flag:
|
||||
if cputype == parts[2]:
|
||||
self.gcc_arch_flag = archflag
|
||||
|
||||
# Extract kernel space toolchain from a name value pair
|
||||
def get_toolchain(self, name, val):
|
||||
if name[:len("CONFIG_TOOLCHAIN_USERSPACE")] == \
|
||||
"CONFIG_TOOLCHAIN_USERSPACE":
|
||||
parts = val.split("\"", 2)
|
||||
self.toolchain_userspace = parts[1]
|
||||
|
||||
if name[:len("CONFIG_TOOLCHAIN_KERNEL")] == \
|
||||
"CONFIG_TOOLCHAIN_KERNEL":
|
||||
parts = val.split("\"", 2)
|
||||
self.toolchain_kernel = parts[1]
|
||||
|
||||
|
||||
# Extract number of containers
|
||||
def get_ncontainers(self, name, val):
|
||||
if name[:len("CONFIG_CONTAINERS")] == "CONFIG_CONTAINERS":
|
||||
self.ncontainers = int(val)
|
||||
|
||||
# TODO: Carry this over to Container() as static method???
|
||||
def get_container_parameter(self, id, param, val):
|
||||
if param[:len("PAGER_LMA")] == "PAGER_LMA":
|
||||
self.containers[id].pager_lma = int(val, 0)
|
||||
elif param[:len("PAGER_VMA")] == "PAGER_VMA":
|
||||
self.containers[id].pager_vma = int(val, 0)
|
||||
elif param[:len("PAGER_UTCB_START")] == "PAGER_UTCB_START":
|
||||
self.containers[id].pager_utcb_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_UTCB_END")] == "PAGER_UTCB_END":
|
||||
self.containers[id].pager_utcb_region_end = int(val, 0)
|
||||
elif param[:len("PAGER_SHM_START")] == "PAGER_SHM_START":
|
||||
self.containers[id].pager_shm_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_SHM_END")] == "PAGER_SHM_END":
|
||||
self.containers[id].pager_shm_region_end = int(val, 0)
|
||||
elif param[:len("PAGER_TASK_START")] == "PAGER_TASK_START":
|
||||
self.containers[id].pager_task_region_start = int(val, 0)
|
||||
elif param[:len("PAGER_TASK_END")] == "PAGER_TASK_END":
|
||||
self.containers[id].pager_task_region_end = int(val, 0)
|
||||
elif param[:len("LINUX_PAGE_OFFSET")] == "LINUX_PAGE_OFFSET":
|
||||
self.containers[id].linux_page_offset = int(val, 0)
|
||||
self.containers[id].pager_vma += int(val, 0)
|
||||
elif param[:len("LINUX_PHYS_OFFSET")] == "LINUX_PHYS_OFFSET":
|
||||
self.containers[id].linux_phys_offset = int(val, 0)
|
||||
self.containers[id].pager_lma += int(val, 0)
|
||||
elif param[:len("LINUX_ZRELADDR")] == "LINUX_ZRELADDR":
|
||||
self.containers[id].linux_zreladdr = int(val, 0)
|
||||
elif param[:len("LINUX_ROOTFS_ADDRESS")] == "LINUX_ROOTFS_ADDRESS":
|
||||
self.containers[id].linux_rootfs_address += int(val, 0)
|
||||
elif re.match(r"(PAGER_){0,1}(VIRT|PHYS){1}([0-9]){1}(_){1}(START|END){1}", param):
|
||||
matchobj = re.match(r"(PAGER_){0,1}(VIRT|PHYS){1}([0-9]){1}(_){1}(START|END){1}", param)
|
||||
pager, virtphys, regionidstr, discard1, startend = matchobj.groups()
|
||||
regionid = int(regionidstr)
|
||||
if pager == "PAGER_":
|
||||
owner = "PAGER"
|
||||
elif pager == None:
|
||||
owner = "CONTAINER"
|
||||
else:
|
||||
print "Pager is neither None nor PAGER_, it is: " + pager
|
||||
|
||||
if virtphys == "VIRT":
|
||||
self.containers[id].caplist[owner].virtmem[startend][regionid] = val
|
||||
if regionid + 1 > self.containers[id].caplist[owner].virt_regions:
|
||||
self.containers[id].caplist[owner].virt_regions = regionid + 1
|
||||
if virtphys == "PHYS":
|
||||
self.containers[id].caplist[owner].physmem[startend][regionid] = val
|
||||
if regionid + 1 > self.containers[id].caplist[owner].phys_regions:
|
||||
self.containers[id].caplist[owner].phys_regions = regionid + 1
|
||||
|
||||
elif param[:len("OPT_NAME")] == "OPT_NAME":
|
||||
name = val[1:-1].lower()
|
||||
self.containers[id].name = name
|
||||
elif param[:len("BAREMETAL_PROJ_")] == "BAREMETAL_PROJ_":
|
||||
param1 = param.split("_", 2)
|
||||
self.containers[id].dirname = param1[2].lower()
|
||||
elif param[:len("CAP_")] == "CAP_":
|
||||
prefix, param_rest = param.split('_', 1)
|
||||
prepare_capability(self.containers[id], "CONTAINER", param_rest, val)
|
||||
elif param[:len("PAGER_CAP_")] == "PAGER_CAP_":
|
||||
parts = param.split('_', 2)
|
||||
prepare_capability(self.containers[id], "PAGER", parts[2], val)
|
||||
else:
|
||||
param1, param2 = param.split("_", 1)
|
||||
if param1 == "TYPE":
|
||||
if param2 == "LINUX":
|
||||
self.containers[id].type = "linux"
|
||||
elif param2 == "POSIX":
|
||||
self.containers[id].type = "posix"
|
||||
elif param2 == "BAREMETAL":
|
||||
self.containers[id].type = "baremetal"
|
||||
|
||||
# Extract parameters for containers
|
||||
def get_container_parameters(self, name, val):
|
||||
matchobj = re.match(r"(CONFIG_CONT){1}([0-9]){1}(\w+)", name)
|
||||
if not matchobj:
|
||||
return None
|
||||
|
||||
prefix, idstr, param = matchobj.groups()
|
||||
id = int(idstr)
|
||||
|
||||
# Create and add new container if this id was not seen
|
||||
self.check_add_container(id)
|
||||
|
||||
# Get rid of '_' in front
|
||||
param = param[1:]
|
||||
|
||||
# Check and store info on this parameter
|
||||
self.get_container_parameter(id, param, val)
|
||||
#self.containers_print(self.containers)
|
||||
|
||||
# Used for sorting container members,
|
||||
# with this we are sure containers are sorted by id value
|
||||
@staticmethod
|
||||
def compare_containers(cont, cont2):
|
||||
if cont.id < cont2.id:
|
||||
return -1
|
||||
if cont.id == cont2.id:
|
||||
print "compare_containers: Error, containers have same id."
|
||||
exit(1)
|
||||
if cont.id > cont2.id:
|
||||
return 1
|
||||
|
||||
def check_add_container(self, id):
|
||||
for cont in self.containers:
|
||||
if id == cont.id:
|
||||
return
|
||||
|
||||
# If symbol to describe number of containers
|
||||
# Has already been visited, use that number
|
||||
# as an extra checking.
|
||||
if self.ncontainers > 0:
|
||||
# Sometimes unwanted symbols slip through
|
||||
if id >= self.ncontainers:
|
||||
return
|
||||
|
||||
container = Container(id)
|
||||
self.containers.append(container)
|
||||
|
||||
# Make sure elements in order for indexed accessing
|
||||
self.containers.sort(self.compare_containers)
|
||||
|
||||
def config_print(self):
|
||||
print '\nConfiguration'
|
||||
print '-------------'
|
||||
print 'Arch: %s, %s' % (self.arch, self.subarch)
|
||||
print 'Platform: %s' % self.platform
|
||||
#print 'Symbols: %s' % self.all
|
||||
print 'Containers: %d' % self.ncontainers
|
||||
self.containers_print()
|
||||
|
||||
def containers_print(self):
|
||||
for c in self.containers:
|
||||
c.print_self()
|
||||
|
||||
def configuration_save(config):
|
||||
if not os.path.exists(CONFIG_SHELVE_DIR):
|
||||
os.mkdir(CONFIG_SHELVE_DIR)
|
||||
|
||||
config_shelve = shelve.open(CONFIG_SHELVE)
|
||||
config_shelve["configuration"] = config
|
||||
|
||||
config_shelve["arch"] = config.arch
|
||||
config_shelve["subarch"] = config.subarch
|
||||
config_shelve["platform"] = config.platform
|
||||
config_shelve["cpu"] = config.cpu
|
||||
config_shelve["all_symbols"] = config.all
|
||||
config_shelve.close()
|
||||
|
||||
def configuration_retrieve():
|
||||
# Get configuration information
|
||||
if not os.path.exists(CONFIG_SHELVE):
|
||||
return None
|
||||
config_shelve = shelve.open(CONFIG_SHELVE)
|
||||
config = config_shelve["configuration"]
|
||||
return config
|
||||
10
scripts/config/lib.py
Normal file
10
scripts/config/lib.py
Normal file
@@ -0,0 +1,10 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
#
|
||||
|
||||
def conv_hex(val):
|
||||
hexval = hex(val)
|
||||
if hexval[-1:] == 'L':
|
||||
hexval = hexval[:-1]
|
||||
return hexval
|
||||
|
||||
75
scripts/config/projpaths.py
Normal file
75
scripts/config/projpaths.py
Normal file
@@ -0,0 +1,75 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
|
||||
import os, sys, shelve, shutil
|
||||
from os.path import join
|
||||
|
||||
# Way to get project root from any script importing this one :-)
|
||||
PROJROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
|
||||
|
||||
BUILDDIR = join(PROJROOT, 'build')
|
||||
TOOLSDIR = join(PROJROOT, 'tools')
|
||||
LOADERDIR = join(PROJROOT, 'loader')
|
||||
KERNEL_HEADERS = join(PROJROOT, 'include')
|
||||
SCRIPTS_DIR = join(PROJROOT, 'scripts')
|
||||
KERNEL_ELF = join(BUILDDIR, 'kernel.elf')
|
||||
FINAL_ELF = join(BUILDDIR, 'final.elf')
|
||||
|
||||
USERLIBS_RELDIR = 'conts/userlibs'
|
||||
USERLIBS_DIR = join(PROJROOT, USERLIBS_RELDIR)
|
||||
|
||||
LIBL4_RELDIR = join(USERLIBS_RELDIR, 'libl4')
|
||||
LIBL4_DIR = join(PROJROOT, LIBL4_RELDIR)
|
||||
LIBL4_INCLUDE = join(LIBL4_DIR, 'include')
|
||||
LIBL4_LIBPATH = join(BUILDDIR, LIBL4_RELDIR)
|
||||
|
||||
LIBC_RELDIR = join(USERLIBS_RELDIR, 'libc')
|
||||
LIBC_DIR = join(PROJROOT, LIBC_RELDIR)
|
||||
LIBC_LIBPATH = join(BUILDDIR, LIBC_RELDIR)
|
||||
LIBC_INCLUDE = [join(LIBC_DIR, 'include')]
|
||||
|
||||
LIBDEV_RELDIR = join(USERLIBS_RELDIR, 'libdev')
|
||||
LIBDEV_DIR = join(PROJROOT, LIBDEV_RELDIR)
|
||||
LIBDEV_INCLUDE = [join(LIBDEV_DIR, 'uart/include'), join(LIBDEV_DIR, 'include')]
|
||||
LIBDEV_USER_LIBPATH = join(join(BUILDDIR, LIBDEV_RELDIR), 'sys-userspace')
|
||||
LIBDEV_BAREMETAL_LIBPATH = join(join(BUILDDIR, LIBDEV_RELDIR), 'sys-baremetal')
|
||||
|
||||
LIBMEM_RELDIR = join(USERLIBS_RELDIR, 'libmem')
|
||||
LIBMEM_DIR = join(PROJROOT, LIBMEM_RELDIR)
|
||||
LIBMEM_LIBPATH = join(BUILDDIR, LIBMEM_RELDIR)
|
||||
LIBMEM_INCLUDE = join(LIBMEM_DIR, 'include')
|
||||
|
||||
CML2_CONFIG_SRCDIR = join(SCRIPTS_DIR, 'config/cml')
|
||||
CML2_CONT_DEFFILE = join(CML2_CONFIG_SRCDIR, 'container_ruleset.template')
|
||||
CML2TOOLSDIR = join(TOOLSDIR, 'cml2-tools')
|
||||
CML2_COMPILED_RULES = join(BUILDDIR, 'rules.compiled')
|
||||
CML2_CONFIG_FILE = join(BUILDDIR, 'config.cml')
|
||||
CML2_CONFIG_H = join(BUILDDIR, 'config.h')
|
||||
CML2_AUTOGEN_RULES = join(BUILDDIR, 'config.rules')
|
||||
CONFIG_H = join(PROJROOT, 'include/l4/config.h')
|
||||
CONFIG_SHELVE_DIR = join(BUILDDIR, 'configdata')
|
||||
CONFIG_SHELVE_FILENAME = 'configuration'
|
||||
CONFIG_SHELVE = join(CONFIG_SHELVE_DIR, CONFIG_SHELVE_FILENAME)
|
||||
KERNEL_CINFO_PATH = join(PROJROOT, "src/generic/cinfo.c")
|
||||
LINUXDIR = join(PROJROOT, 'conts/linux')
|
||||
LINUX_KERNELDIR = join(LINUXDIR, 'kernel-2.6.34')
|
||||
LINUX_ROOTFSDIR = join(LINUXDIR, 'rootfs')
|
||||
LINUX_ATAGSDIR = join(LINUXDIR, 'atags')
|
||||
|
||||
POSIXDIR = join(PROJROOT, 'conts/posix')
|
||||
POSIX_BOOTDESCDIR = join(POSIXDIR, 'bootdesc')
|
||||
|
||||
projpaths = {
|
||||
'LINUX_ATAGSDIR' : LINUX_ATAGSDIR,
|
||||
'LINUX_ROOTFSDIR' : LINUX_ROOTFSDIR,
|
||||
'LINUX_KERNELDIR' : LINUX_KERNELDIR,
|
||||
'LINUXDIR' : LINUXDIR,
|
||||
'BUILDDIR' : BUILDDIR,
|
||||
'POSIXDIR' : POSIXDIR,
|
||||
'POSIX_BOOTDESCDIR' : POSIX_BOOTDESCDIR
|
||||
}
|
||||
|
||||
def define_config_dependent_projpaths(config):
|
||||
LIBC_INCLUDE.append([join(LIBC_DIR, 'include/arch/' + config.arch)])
|
||||
return None
|
||||
|
||||
@@ -11,44 +11,41 @@ from tools.pyelf.elfsize import *
|
||||
from tools.pyelf.elf_section_info import *
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
sys.path.append(os.path.abspath("../"))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
from scripts.linux.build_linux import *
|
||||
from scripts.linux.build_rootfs import *
|
||||
from scripts.linux.build_atags import *
|
||||
from pack import *
|
||||
from packall import *
|
||||
from scripts.baremetal.baremetal_generator import *
|
||||
|
||||
def fill_pager_section_markers(cont, pager_binary):
|
||||
cont.pager_rw_section_start, cont.pager_rw_section_end, \
|
||||
cont.pager_rx_section_start, cont.pager_rx_section_end = \
|
||||
elf_loadable_section_info(join(PROJROOT, pager_binary))
|
||||
cont.pager_rw_pheader_start, cont.pager_rw_pheader_end, \
|
||||
cont.pager_rx_pheader_start, cont.pager_rx_pheader_end = \
|
||||
elf_loadable_section_info(join(PROJROOT, pager_binary))
|
||||
|
||||
def build_linux_container(config, projpaths, container):
|
||||
linux_builder = LinuxBuilder(projpaths, container)
|
||||
linux_builder.build_linux(config)
|
||||
def build_linux_container(config, projpaths, container, opts):
|
||||
linux_builder = LinuxBuilder(projpaths, container, opts)
|
||||
linux_builder.build_linux(config, opts)
|
||||
|
||||
rootfs_builder = RootfsBuilder(projpaths, container)
|
||||
rootfs_builder.build_rootfs(config)
|
||||
atags_builder = AtagsBuilder(projpaths, container)
|
||||
atags_builder.build_atags(config)
|
||||
os.chdir(LINUX_ROOTFSDIR)
|
||||
os.system('scons cid=' + str(container.id))
|
||||
|
||||
os.chdir(LINUX_ATAGSDIR)
|
||||
os.system('scons cid=' + str(container.id))
|
||||
|
||||
# Calculate and store size of pager
|
||||
pager_binary = \
|
||||
join(BUILDDIR, "cont" + str(container.id) +
|
||||
"/linux/linux-2.6.33/linux.elf")
|
||||
"/linux/kernel-2.6.34/linux.elf")
|
||||
config.containers[container.id].pager_size = \
|
||||
conv_hex(elf_binary_size(pager_binary))
|
||||
|
||||
fill_pager_section_markers(config.containers[container.id], pager_binary)
|
||||
|
||||
linux_container_packer = \
|
||||
LinuxContainerPacker(container, linux_builder, \
|
||||
rootfs_builder, atags_builder)
|
||||
linux_container_packer = LinuxContainerPacker(container, linux_builder)
|
||||
return linux_container_packer.pack_container(config)
|
||||
|
||||
def glob_by_walk(arg, dirname, names):
|
||||
@@ -67,12 +64,12 @@ def source_to_builddir(srcdir, id):
|
||||
# This is very similar to examples container builder:
|
||||
# In fact this notion may become a standard convention for
|
||||
# calling specific bare containers
|
||||
def build_posix_container(config, projpaths, container):
|
||||
def build_posix_container(config, projpaths, container, opts):
|
||||
images = []
|
||||
cwd = os.getcwd()
|
||||
os.chdir(POSIXDIR)
|
||||
print '\nBuilding Posix Container %d...' % container.id
|
||||
scons_cmd = 'scons ' + 'cont=' + str(container.id)
|
||||
scons_cmd = 'scons ' + 'cont=' + str(container.id) + ' -j ' + opts.jobs
|
||||
#print "Issuing scons command: %s" % scons_cmd
|
||||
os.system(scons_cmd)
|
||||
builddir = source_to_builddir(POSIXDIR, container.id)
|
||||
@@ -93,16 +90,27 @@ def build_posix_container(config, projpaths, container):
|
||||
# This simply calls SCons on a given container, and collects
|
||||
# all images with .elf extension, instead of using whole classes
|
||||
# for building and packing.
|
||||
def build_default_container(config, projpaths, container):
|
||||
def build_default_container(config, projpaths, container, opts):
|
||||
images = []
|
||||
cwd = os.getcwd()
|
||||
projdir = join(join(PROJROOT, 'conts'), container.name)
|
||||
|
||||
builddir = join(join(BUILDDIR, 'cont') + str(container.id), container.name)
|
||||
if container.duplicate == 0:
|
||||
projdir = join(join(PROJROOT, 'conts/baremetal'), container.dirname)
|
||||
else:
|
||||
projdir = join(join(PROJROOT, 'conts'), container.name)
|
||||
|
||||
BaremetalContGenerator().baremetal_container_generate(config)
|
||||
|
||||
if not os.path.exists(builddir):
|
||||
os.mkdir(builddir)
|
||||
|
||||
os.chdir(projdir)
|
||||
os.system("scons")
|
||||
os.path.walk(projdir, glob_by_walk, ['*.elf', images])
|
||||
os.system("scons -j " + opts.jobs + " cid=" + str(container.id))
|
||||
os.path.walk(builddir, glob_by_walk, ['*.elf', images])
|
||||
|
||||
# Calculate and store size of pager
|
||||
pager_binary = join(PROJROOT, "conts/" + container.name + "/main.elf")
|
||||
pager_binary = join(builddir, "main.elf")
|
||||
config.containers[container.id].pager_size = \
|
||||
conv_hex(elf_binary_size(pager_binary))
|
||||
|
||||
@@ -111,17 +119,16 @@ def build_default_container(config, projpaths, container):
|
||||
container_packer = DefaultContainerPacker(container, images)
|
||||
return container_packer.pack_container(config)
|
||||
|
||||
def build_all_containers():
|
||||
def build_all_containers(opts):
|
||||
config = configuration_retrieve()
|
||||
cont_images = []
|
||||
for container in config.containers:
|
||||
if container.type == 'linux':
|
||||
pass
|
||||
cont_images.append(build_linux_container(config, projpaths, container))
|
||||
cont_images.append(build_linux_container(config, projpaths, container, opts))
|
||||
elif container.type == 'baremetal':
|
||||
cont_images.append(build_default_container(config, projpaths, container))
|
||||
cont_images.append(build_default_container(config, projpaths, container, opts))
|
||||
elif container.type == 'posix':
|
||||
cont_images.append(build_posix_container(config, projpaths, container))
|
||||
cont_images.append(build_posix_container(config, projpaths, container, opts))
|
||||
else:
|
||||
print "Error: Don't know how to build " + \
|
||||
"container of type: %s" % (container.type)
|
||||
@@ -131,6 +138,56 @@ def build_all_containers():
|
||||
|
||||
return all_cont_packer.pack_all(config)
|
||||
|
||||
# Clean containers
|
||||
def clean_all_containers():
|
||||
config = configuration_retrieve()
|
||||
for container in config.containers:
|
||||
if container.type == 'linux':
|
||||
linux_builder = LinuxBuilder(projpaths, container, None)
|
||||
linux_builder.clean(config)
|
||||
|
||||
os.chdir(LINUX_ROOTFSDIR)
|
||||
os.system('scons -c cid=' + str(container.id))
|
||||
os.chdir(LINUX_ATAGSDIR)
|
||||
os.system('scons -c cid=' + str(container.id))
|
||||
LinuxContainerPacker(container, linux_builder).clean()
|
||||
|
||||
elif container.type == 'baremetal':
|
||||
builddir = join(join(BUILDDIR, 'cont') + str(container.id), container.name)
|
||||
if container.duplicate == 0:
|
||||
projdir = join(join(PROJROOT, 'conts/baremetal'), container.dirname)
|
||||
else:
|
||||
projdir = join(join(PROJROOT, 'conts'), container.name)
|
||||
|
||||
os.chdir(projdir)
|
||||
os.system("scons -c cid=" + str(container.id))
|
||||
BaremetalContGenerator().baremetal_del_dynamic_files(container)
|
||||
DefaultContainerPacker(container, None).clean()
|
||||
|
||||
elif container.type == 'posix':
|
||||
os.chdir(POSIXDIR)
|
||||
scons_cmd = 'scons -c ' + 'cont=' + str(container.id)
|
||||
os.system(scons_cmd)
|
||||
DefaultContainerPacker(container, None).clean()
|
||||
|
||||
else:
|
||||
print "Error: Don't know how to build " + \
|
||||
"container of type: %s" % (container.type)
|
||||
exit(1)
|
||||
|
||||
# Clean packed containers elf
|
||||
all_cont_packer = AllContainerPacker(None, None)
|
||||
all_cont_packer.clean()
|
||||
|
||||
return None
|
||||
|
||||
def find_container_from_cid(cid):
|
||||
config = configuration_retrieve()
|
||||
for container in config.containers:
|
||||
if cid == container.id:
|
||||
return container
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
build_all_containers()
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@ import os, sys, shelve, glob
|
||||
from os.path import join
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
sys.path.append(os.path.abspath('../'))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
container_assembler_body = \
|
||||
'''
|
||||
@@ -53,7 +52,7 @@ def source_to_builddir(srcdir, id):
|
||||
return join(BUILDDIR, cont_builddir)
|
||||
|
||||
class LinuxContainerPacker:
|
||||
def __init__(self, container, linux_builder, rootfs_builder, atags_builder):
|
||||
def __init__(self, container, linux_builder):
|
||||
|
||||
# Here, we simply attempt to get PROJROOT/conts as
|
||||
# PROJROOT/build/cont[0-9]
|
||||
@@ -65,9 +64,10 @@ class LinuxContainerPacker:
|
||||
self.container_S_out = join(self.CONTAINER_BUILDDIR_BASE, 'container.S')
|
||||
self.container_elf_out = join(self.CONTAINER_BUILDDIR_BASE, \
|
||||
'container' + str(container.id) + '.elf')
|
||||
|
||||
self.kernel_image_in = linux_builder.kernel_image
|
||||
self.rootfs_elf_in = rootfs_builder.rootfs_elf_out
|
||||
self.atags_elf_in = atags_builder.atags_elf_out
|
||||
self.rootfs_elf_in = join(self.CONTAINER_BUILDDIR_BASE, 'linux/rootfs/rootfs.elf')
|
||||
self.atags_elf_in = join(self.CONTAINER_BUILDDIR_BASE, 'linux/atags/atags.elf')
|
||||
|
||||
def generate_container_assembler(self, source):
|
||||
with open(self.container_S_out, 'w+') as f:
|
||||
@@ -104,12 +104,9 @@ class LinuxContainerPacker:
|
||||
return self.container_elf_out
|
||||
|
||||
def clean(self):
|
||||
if os.path.exists(self.container_elf_out):
|
||||
shutil.rmtree(self.container_elf_out)
|
||||
if os.path.exists(self.container_lds_out):
|
||||
shutil.rmtree(self.container_lds_out)
|
||||
if os.path.exists(self.container_S_out):
|
||||
shutil.rmtree(self.container_S_out)
|
||||
os.system('rm -rf ' + self.container_elf_out)
|
||||
os.system('rm -rf ' + self.container_lds_out)
|
||||
os.system('rm -rf ' + self.container_S_out)
|
||||
|
||||
|
||||
class DefaultContainerPacker:
|
||||
@@ -118,7 +115,7 @@ class DefaultContainerPacker:
|
||||
# Here, we simply attempt to get PROJROOT/conts as
|
||||
# PROJROOT/build/cont[0-9]
|
||||
self.CONTAINER_BUILDDIR_BASE = \
|
||||
source_to_builddir(join(PROJROOT,'conts'), container.id)
|
||||
join(source_to_builddir(join(PROJROOT,'conts'), container.id), 'packer')
|
||||
|
||||
if not os.path.exists(self.CONTAINER_BUILDDIR_BASE):
|
||||
os.mkdir(self.CONTAINER_BUILDDIR_BASE)
|
||||
@@ -163,10 +160,7 @@ class DefaultContainerPacker:
|
||||
return self.container_elf_out
|
||||
|
||||
def clean(self):
|
||||
if os.path.exists(self.container_elf_out):
|
||||
shutil.rmtree(self.container_elf_out)
|
||||
if os.path.exists(self.container_lds_out):
|
||||
shutil.rmtree(self.container_lds_out)
|
||||
if os.path.exists(self.container_S_out):
|
||||
shutil.rmtree(self.container_S_out)
|
||||
os.system('rm -f ' + self.container_elf_out)
|
||||
os.system('rm -f ' + self.container_lds_out)
|
||||
os.system('rm -f ' + self.container_S_out)
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@ import os, sys, shelve
|
||||
from os.path import join
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
SCRIPTROOT = os.path.abspath(os.path.dirname("."))
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
containers_assembler_body = \
|
||||
'''
|
||||
@@ -46,7 +45,10 @@ containers_lds_end = \
|
||||
class AllContainerPacker:
|
||||
def __init__(self, image_list, container_list):
|
||||
self.cont_images_in = image_list
|
||||
self.cont_images_in.sort()
|
||||
|
||||
if self.cont_images_in:
|
||||
self.cont_images_in.sort()
|
||||
|
||||
self.containers = container_list
|
||||
|
||||
self.CONTAINERS_BUILDDIR = join(PROJROOT, 'build/conts')
|
||||
@@ -87,12 +89,9 @@ class AllContainerPacker:
|
||||
return self.containers_elf_out
|
||||
|
||||
def clean(self):
|
||||
if os.path.exists(self.containers_elf_out):
|
||||
shutil.rmtree(self.containers_elf_out)
|
||||
if os.path.exists(self.containers_lds_out):
|
||||
shutil.rmtree(self.containers_lds_out)
|
||||
if os.path.exists(self.containers_S_out):
|
||||
shutil.rmtree(self.containers_S_out)
|
||||
os.system('rm -f ' + self.containers_elf_out)
|
||||
os.system('rm -f ' + self.containers_lds_out)
|
||||
os.system('rm -f ' + self.containers_S_out)
|
||||
|
||||
if __name__ == "__main__":
|
||||
all_cont_packer = AllContainerPacker([], [])
|
||||
|
||||
40
scripts/kernel/check_kernel_limit.py
Executable file
40
scripts/kernel/check_kernel_limit.py
Executable file
@@ -0,0 +1,40 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
#
|
||||
# Codezero -- a microkernel for embedded systems.
|
||||
#
|
||||
# Copyright © 2009 B Labs Ltd
|
||||
#
|
||||
import os, sys
|
||||
from tools.pyelf.elfsize import *
|
||||
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
def get_kernel_end_address(img):
|
||||
kernel_size = elf_binary_size(img)
|
||||
kernel_start = get_elf_load_address(img)
|
||||
return (int(kernel_start.get()) + kernel_size)
|
||||
|
||||
def get_container_start():
|
||||
start = 0xffffffff
|
||||
with open(join(PROJROOT, CONFIG_H), 'r')as file:
|
||||
for line in file:
|
||||
begin = line.rfind(" ")
|
||||
end = len(line)
|
||||
if re.search("(PHYS)([0-9]){1,4}(_START)", line) and \
|
||||
start > int(line[begin : end], 16):
|
||||
start = int(line[begin : end], 16)
|
||||
return start
|
||||
|
||||
def check_kernel_container_overlap():
|
||||
kernel_end = get_kernel_end_address(KERNEL_ELF)
|
||||
cont_start = get_container_start()
|
||||
if kernel_end > cont_start:
|
||||
print '\nKernel end address = ' + str(hex(kernel_end))
|
||||
print 'Container start address = ' + str(hex(cont_start)) + '\n'
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_kernel_container_overlap()
|
||||
@@ -10,12 +10,11 @@ from os.path import join
|
||||
from string import Template
|
||||
|
||||
PROJRELROOT = '../..'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
sys.path.append(os.path.abspath("../"))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
|
||||
cinfo_file_start = \
|
||||
@@ -34,10 +33,6 @@ cinfo_file_start = \
|
||||
|
||||
%s
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* Add irqs, exceptions
|
||||
*/
|
||||
|
||||
__initdata struct container_info cinfo[] = {
|
||||
'''
|
||||
@@ -46,12 +41,17 @@ cinfo_file_end = \
|
||||
};
|
||||
'''
|
||||
|
||||
cinfo_start = \
|
||||
cinfo_head_start = \
|
||||
'''
|
||||
\t[%d] = {
|
||||
\t.name = "%s",
|
||||
\t.npagers = 1,
|
||||
\t.pager = {
|
||||
\t.ncaps = %d,
|
||||
\t.caps = {'''
|
||||
|
||||
cinfo_caps_end = \
|
||||
'''
|
||||
\t},
|
||||
'''
|
||||
|
||||
cinfo_end = \
|
||||
@@ -62,15 +62,16 @@ cinfo_end = \
|
||||
|
||||
pager_start = \
|
||||
'''
|
||||
\t.pager = {
|
||||
\t\t[0] = {
|
||||
\t\t\t.start_address = (CONFIG_CONT%(cn)d_START_PC_ADDR),
|
||||
\t\t\t.pager_lma = __pfn(CONFIG_CONT%(cn)d_PAGER_LOAD_ADDR),
|
||||
\t\t\t.pager_vma = __pfn(CONFIG_CONT%(cn)d_PAGER_VIRT_ADDR),
|
||||
\t\t\t.pager_size = __pfn(page_align_up(CONT%(cn)d_PAGER_MAPSIZE)),
|
||||
\t\t\t.rw_sections_start = %(rw_sec_start)s,
|
||||
\t\t\t.rw_sections_end = %(rw_sec_end)s,
|
||||
\t\t\t.rx_sections_start = %(rx_sec_start)s,
|
||||
\t\t\t.rx_sections_end = %(rx_sec_end)s,
|
||||
\t\t\t.rw_pheader_start = %(rw_pheader_start)s,
|
||||
\t\t\t.rw_pheader_end = %(rw_pheader_end)s,
|
||||
\t\t\t.rx_pheader_start = %(rx_pheader_start)s,
|
||||
\t\t\t.rx_pheader_end = %(rx_pheader_end)s,
|
||||
\t\t\t.ncaps = %(caps)d,
|
||||
\t\t\t.caps = {
|
||||
'''
|
||||
@@ -80,6 +81,7 @@ pager_end = \
|
||||
\t\t},
|
||||
'''
|
||||
|
||||
# These are pager-only. If for container, remove the PAGER part, indent down some tabs.
|
||||
cap_virtmem = \
|
||||
'''
|
||||
\t\t\t[%(capidx)d] = {
|
||||
@@ -88,9 +90,9 @@ cap_virtmem = \
|
||||
\t\t\t\t.access = CAP_MAP_READ | CAP_MAP_WRITE | CAP_MAP_EXEC
|
||||
\t\t\t\t\t| CAP_MAP_CACHED | CAP_MAP_UNCACHED | CAP_MAP_UNMAP | CAP_MAP_UTCB |
|
||||
\t\t\t\t\tCAP_CACHE_INVALIDATE | CAP_CACHE_CLEAN,
|
||||
\t\t\t\t.start = __pfn(CONFIG_CONT%(cn)d_VIRT%(vn)d_START),
|
||||
\t\t\t\t.end = __pfn(CONFIG_CONT%(cn)d_VIRT%(vn)d_END),
|
||||
\t\t\t\t.size = __pfn(CONFIG_CONT%(cn)d_VIRT%(vn)d_END - CONFIG_CONT%(cn)d_VIRT%(vn)d_START),
|
||||
\t\t\t\t.start = __pfn(CONFIG_CONT%(cn)d_PAGER_VIRT%(vn)d_START),
|
||||
\t\t\t\t.end = __pfn(CONFIG_CONT%(cn)d_PAGER_VIRT%(vn)d_END),
|
||||
\t\t\t\t.size = __pfn(CONFIG_CONT%(cn)d_PAGER_VIRT%(vn)d_END - CONFIG_CONT%(cn)d_PAGER_VIRT%(vn)d_START),
|
||||
\t\t\t},
|
||||
'''
|
||||
|
||||
@@ -101,9 +103,9 @@ cap_physmem = \
|
||||
\t\t\t\t.type = CAP_TYPE_MAP_PHYSMEM | CAP_RTYPE_CONTAINER,
|
||||
\t\t\t\t.access = CAP_MAP_READ | CAP_MAP_WRITE | CAP_MAP_EXEC |
|
||||
\t\t\t\t\tCAP_MAP_CACHED | CAP_MAP_UNCACHED | CAP_MAP_UNMAP | CAP_MAP_UTCB,
|
||||
\t\t\t\t.start = __pfn(CONFIG_CONT%(cn)d_PHYS%(pn)d_START),
|
||||
\t\t\t\t.end = __pfn(CONFIG_CONT%(cn)d_PHYS%(pn)d_END),
|
||||
\t\t\t\t.size = __pfn(CONFIG_CONT%(cn)d_PHYS%(pn)d_END - CONFIG_CONT%(cn)d_PHYS%(pn)d_START),
|
||||
\t\t\t\t.start = __pfn(CONFIG_CONT%(cn)d_PAGER_PHYS%(pn)d_START),
|
||||
\t\t\t\t.end = __pfn(CONFIG_CONT%(cn)d_PAGER_PHYS%(pn)d_END),
|
||||
\t\t\t\t.size = __pfn(CONFIG_CONT%(cn)d_PAGER_PHYS%(pn)d_END - CONFIG_CONT%(cn)d_PAGER_PHYS%(pn)d_START),
|
||||
\t\t\t},
|
||||
'''
|
||||
|
||||
@@ -136,6 +138,7 @@ pager_ifdefs = \
|
||||
#define CONT%(cn)d_PAGER_MAPSIZE (CONT%(cn)d_PAGER_SIZE)
|
||||
#endif
|
||||
'''
|
||||
|
||||
def generate_pager_memory_ifdefs(config, containers):
|
||||
pager_ifdef_string = ""
|
||||
linux = 0
|
||||
@@ -149,7 +152,8 @@ def generate_pager_memory_ifdefs(config, containers):
|
||||
pager_ifdef_string += pager_ifdefs % { 'cn' : c.id }
|
||||
return pager_ifdef_string
|
||||
|
||||
def generate_kernel_cinfo(config, cinfo_path):
|
||||
def generate_kernel_cinfo(cinfo_path):
|
||||
config = configuration_retrieve()
|
||||
containers = config.containers
|
||||
containers.sort()
|
||||
|
||||
@@ -158,40 +162,44 @@ def generate_kernel_cinfo(config, cinfo_path):
|
||||
|
||||
pager_ifdefs = generate_pager_memory_ifdefs(config, containers)
|
||||
|
||||
with open(cinfo_path, 'w+') as cinfo_file:
|
||||
with open(str(cinfo_path), 'w+') as cinfo_file:
|
||||
fbody = cinfo_file_start % pager_ifdefs
|
||||
for c in containers:
|
||||
# Currently only these are considered as capabilities
|
||||
total_caps = c.virt_regions + c.phys_regions + len(c.caps)
|
||||
fbody += cinfo_start % (c.id, c.name)
|
||||
fbody += pager_start % { 'cn' : c.id, 'caps' : total_caps,
|
||||
'rw_sec_start' : hex(c.pager_rw_section_start),
|
||||
'rw_sec_end' : hex(c.pager_rw_section_end),
|
||||
'rx_sec_start' : hex(c.pager_rx_section_start),
|
||||
'rx_sec_end' : hex(c.pager_rx_section_end),
|
||||
}
|
||||
cap_index = 0
|
||||
for mem_index in range(c.virt_regions):
|
||||
fbody += cap_virtmem % { 'capidx' : cap_index, 'cn' : c.id, 'vn' : mem_index }
|
||||
cap_index += 1
|
||||
for mem_index in range(c.phys_regions):
|
||||
fbody += cap_physmem % { 'capidx' : cap_index, 'cn' : c.id, 'pn' : mem_index }
|
||||
cap_index += 1
|
||||
for caplist in [c.caplist["CONTAINER"], c.caplist["PAGER"]]:
|
||||
total_caps = caplist.virt_regions + caplist.phys_regions + len(caplist.caps)
|
||||
if caplist == c.caplist["CONTAINER"]:
|
||||
fbody += cinfo_head_start % (c.id, c.name, total_caps)
|
||||
else:
|
||||
fbody += pager_start % { 'cn' : c.id, 'caps' : total_caps,
|
||||
'rw_pheader_start' : hex(c.pager_rw_pheader_start),
|
||||
'rw_pheader_end' : hex(c.pager_rw_pheader_end),
|
||||
'rx_pheader_start' : hex(c.pager_rx_pheader_start),
|
||||
'rx_pheader_end' : hex(c.pager_rx_pheader_end),
|
||||
}
|
||||
cap_index = 0
|
||||
for mem_index in range(caplist.virt_regions):
|
||||
fbody += cap_virtmem % { 'capidx' : cap_index, 'cn' : c.id, 'vn' : mem_index }
|
||||
cap_index += 1
|
||||
for mem_index in range(caplist.phys_regions):
|
||||
fbody += cap_physmem % { 'capidx' : cap_index, 'cn' : c.id, 'pn' : mem_index }
|
||||
cap_index += 1
|
||||
|
||||
for capkey, capstr in c.caps.items():
|
||||
templ = Template(capstr)
|
||||
fbody += templ.safe_substitute(idx = cap_index)
|
||||
cap_index += 1
|
||||
for capkey, capstr in caplist.caps.items():
|
||||
templ = Template(capstr)
|
||||
fbody += templ.safe_substitute(idx = cap_index)
|
||||
cap_index += 1
|
||||
|
||||
fbody += pager_end
|
||||
fbody += cinfo_end
|
||||
if caplist == c.caplist["CONTAINER"]:
|
||||
fbody += cinfo_caps_end
|
||||
else:
|
||||
fbody += pager_end
|
||||
fbody += cinfo_end
|
||||
fbody += cinfo_file_end
|
||||
cinfo_file.write(fbody)
|
||||
|
||||
if __name__ == "__main__":
|
||||
config = configuration_retrieve()
|
||||
if len(sys.argv) > 1:
|
||||
generate_kernel_cinfo(config, join(PROJROOT, sys.argv[1]))
|
||||
generate_kernel_cinfo(join(PROJROOT, sys.argv[1]))
|
||||
else:
|
||||
generate_kernel_cinfo(config, join(PROJROOT, 'src/generic/cinfo.c'))
|
||||
generate_kernel_cinfo(KERNEL_CINFO_PATH)
|
||||
|
||||
|
||||
259
scripts/linux/build_linux.py
Executable file → Normal file
259
scripts/linux/build_linux.py
Executable file → Normal file
@@ -9,13 +9,12 @@ import os, sys, shelve, string
|
||||
from os.path import join
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
SCRIPTROOT = os.path.abspath(os.path.dirname("."))
|
||||
SCRIPTROOT = os.path.abspath(os.path.dirname('.'))
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from config.lib import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
from scripts.config.lib import *
|
||||
|
||||
LINUX_KERNEL_BUILDDIR = join(BUILDDIR, os.path.relpath(LINUX_KERNELDIR, PROJROOT))
|
||||
|
||||
@@ -23,105 +22,44 @@ LINUX_KERNEL_BUILDDIR = join(BUILDDIR, os.path.relpath(LINUX_KERNELDIR, PROJROOT
|
||||
# conts/linux -> build/cont[0-9]/linux
|
||||
def source_to_builddir(srcdir, id):
|
||||
cont_builddir = \
|
||||
os.path.relpath(srcdir, \
|
||||
PROJROOT).replace("conts", \
|
||||
"cont" + str(id))
|
||||
os.path.relpath(srcdir, PROJROOT).replace('conts', 'cont' + str(id))
|
||||
return join(BUILDDIR, cont_builddir)
|
||||
|
||||
class LinuxUpdateKernel:
|
||||
|
||||
def __init__(self, container):
|
||||
# List for setting/unsetting .config params of linux
|
||||
self.config_param_list = \
|
||||
(['PCI', 'SET'],['AEABI', 'SET'],
|
||||
['SCSI', 'SET'],['BLK_DEV_SD', 'SET'],
|
||||
['SYM53C8XX_2', 'SET'],['INPUT_EVDEV', 'SET'],
|
||||
['INOTIFY', 'SET'],['DEBUG_INFO', 'SET'],
|
||||
['USB_SUPPORT', 'UNSET'],['SOUND', 'UNSET'],)
|
||||
|
||||
# List of CPUIDs, to be used by linux based on codezero config
|
||||
self.cpuid_list = (['ARM926', '0x41069265'],
|
||||
['CORTEXA8', '0x410fc080'],
|
||||
['ARM11MPCORE', '0x410fb022'],
|
||||
['CORTEXA9', '0x410fc090'])
|
||||
self.cpuid_list = {'ARM926' : '0x41069265',
|
||||
'CORTEXA8' : '0x410fc080',
|
||||
'ARM11MPCORE': '0x410fb022',
|
||||
'CORTEXA9' : '0x410fc090'}
|
||||
|
||||
# List of ARCHIDs, to be used by linux based on codezero config
|
||||
self.archid_list = (['PB926', '0x183'],
|
||||
['EB', '0x33B'],
|
||||
['PB11MPCORE', '0x3D4'],
|
||||
['BEAGLE', '0x60A'],
|
||||
['PBA9', '0x76D'],
|
||||
['PBA8', '0x769'])
|
||||
self.archid_list = {'PB926' : '0x183',
|
||||
'EB' : '0x33B',
|
||||
'BEAGLE': '0x60A',
|
||||
'PBA9' : '0x76D'}
|
||||
|
||||
# Path of system_macros header file
|
||||
self.system_macros_h_out = \
|
||||
join(LINUX_KERNELDIR,
|
||||
'arch/codezero/include/virtualization/system_macros.h')
|
||||
self.system_macros_h_in = \
|
||||
join(LINUX_KERNELDIR,
|
||||
'arch/codezero/include/virtualization/system_macros.h.in')
|
||||
self.system_macros_h_out = join(LINUX_KERNELDIR, 'arch/arm/include/vmm/system_macros.h')
|
||||
self.system_macros_h_in = join(LINUX_KERNELDIR, 'arch/arm/include/vmm/system_macros.h.in')
|
||||
|
||||
#Path for kernel_param file
|
||||
self.kernel_param_out = \
|
||||
join(LINUX_KERNELDIR, 'arch/codezero/include/virtualization/kernel_param')
|
||||
self.kernel_param_in = \
|
||||
join(LINUX_KERNELDIR, 'arch/codezero/include/virtualization/kernel_param.in')
|
||||
|
||||
# Replace line(having input_pattern) in filename with new_data
|
||||
def replace_line(self, filename, input_pattern, new_data, prev_line):
|
||||
with open(filename, 'r+') as f:
|
||||
flag = 0
|
||||
temp = 0
|
||||
x = re.compile(input_pattern)
|
||||
for line in f:
|
||||
if '' != prev_line:
|
||||
if temp == prev_line and re.match(x, line):
|
||||
flag = 1
|
||||
break
|
||||
temp = line
|
||||
else:
|
||||
if re.match(x, line):
|
||||
flag = 1
|
||||
break
|
||||
|
||||
if flag == 0:
|
||||
#print 'Warning: No match found for the parameter'
|
||||
return
|
||||
else:
|
||||
# Prevent recompilation in case kernel parameter is same
|
||||
if new_data != line:
|
||||
f.seek(0)
|
||||
l = f.read()
|
||||
|
||||
# Need to truncate file because, size of contents to be
|
||||
# written may be less than the size of original file.
|
||||
f.seek(0)
|
||||
f.truncate(0)
|
||||
|
||||
# Write back to file
|
||||
f.write(l.replace(line, new_data))
|
||||
self.kconfig_in = join(LINUX_KERNELDIR, 'arch/arm/Kconfig.in')
|
||||
self.kconfig_out = join(LINUX_KERNELDIR, 'arch/arm/Kconfig')
|
||||
|
||||
# Update kernel parameters
|
||||
def update_kernel_params(self, config, container):
|
||||
# Update PAGE_OFFSET
|
||||
# FIXME: Find a way to add this in system_macros.h or kernel_param
|
||||
# issue is we have to update this in KCONFIG file which cannot
|
||||
# have dependency on other files.
|
||||
file = join(LINUX_KERNELDIR, 'arch/codezero/Kconfig')
|
||||
param = str(conv_hex(container.linux_page_offset))
|
||||
new_data = ('\t' + 'default ' + param + '\n')
|
||||
data_to_replace = "(\t)(default )"
|
||||
prev_line = ('\t'+'default 0x80000000 if VMSPLIT_2G' + '\n')
|
||||
self.replace_line(file, data_to_replace, new_data, prev_line)
|
||||
with open(self.kconfig_out, 'w+') as output:
|
||||
with open(self.kconfig_in, 'r') as input:
|
||||
output.write(input.read() % \
|
||||
{'phys_offset' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'page_offset' : str(conv_hex(container.linux_page_offset)), \
|
||||
'ztextaddr' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'zreladdr' : str(conv_hex(container.linux_zreladdr))})
|
||||
|
||||
# Update ARCHID, CPUID and ATAGS ADDRESS
|
||||
for cpu_type, cpu_id in self.cpuid_list:
|
||||
if cpu_type == config.cpu.upper():
|
||||
cpuid = cpu_id
|
||||
break
|
||||
for arch_type, arch_id in self.archid_list:
|
||||
if arch_type == config.platform.upper():
|
||||
archid = arch_id
|
||||
break
|
||||
|
||||
# Update ARCHID, CPUID and ATAGS ADDRESS
|
||||
cpuid = self.cpuid_list[config.cpu.upper()]
|
||||
archid = self.archid_list[config.platform.upper()]
|
||||
|
||||
# Create system_macros header
|
||||
with open(self.system_macros_h_out, 'w+') as output:
|
||||
@@ -129,38 +67,15 @@ class LinuxUpdateKernel:
|
||||
output.write(input.read() % \
|
||||
{'cpuid' : cpuid, \
|
||||
'archid' : archid, \
|
||||
'atags' : str(conv_hex(container.linux_page_offset + 0x100)), \
|
||||
'ztextaddr' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'phys_offset' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'page_offset' : str(conv_hex(container.linux_page_offset)), \
|
||||
'zreladdr' : str(conv_hex(container.linux_zreladdr))})
|
||||
'atags' : str(conv_hex(container.linux_page_offset + 0x100))})
|
||||
|
||||
with open(self.kernel_param_out, 'w+') as output:
|
||||
with open(self.kernel_param_in, 'r') as input:
|
||||
output.write(input.read() % \
|
||||
{'ztextaddr' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'phys_offset' : str(conv_hex(container.linux_phys_offset)), \
|
||||
'page_offset' : str(conv_hex(container.linux_page_offset)), \
|
||||
'zreladdr' : str(conv_hex(container.linux_zreladdr))})
|
||||
|
||||
def modify_kernel_config(self, linux_builddir):
|
||||
file = join(linux_builddir, '.config')
|
||||
for param_name, param_value in self.config_param_list:
|
||||
param = 'CONFIG_' + param_name
|
||||
prev_line = ''
|
||||
if param_value == 'SET':
|
||||
data_to_replace = ('# ' + param)
|
||||
new_data = (param + '=y' + '\n')
|
||||
else:
|
||||
data_to_replace = param
|
||||
new_data = ('# ' + param + ' is not set' + '\n')
|
||||
|
||||
self.replace_line(file, data_to_replace, new_data, prev_line)
|
||||
def clean(self):
|
||||
os.system('rm -f ' + self.system_macros_h_out)
|
||||
os.system('rm -f ' + self.kconfig_out)
|
||||
|
||||
class LinuxBuilder:
|
||||
|
||||
def __init__(self, pathdict, container):
|
||||
self.LINUX_KERNELDIR = pathdict["LINUX_KERNELDIR"]
|
||||
def __init__(self, pathdict, container, opts):
|
||||
self.LINUX_KERNELDIR = pathdict['LINUX_KERNELDIR']
|
||||
|
||||
# Calculate linux kernel build directory
|
||||
self.LINUX_KERNEL_BUILDDIR = \
|
||||
@@ -169,57 +84,98 @@ class LinuxBuilder:
|
||||
self.container = container
|
||||
self.kernel_binary_image = \
|
||||
join(os.path.relpath(self.LINUX_KERNEL_BUILDDIR, LINUX_KERNELDIR), \
|
||||
"vmlinux")
|
||||
self.kernel_image = join(self.LINUX_KERNEL_BUILDDIR, "linux.elf")
|
||||
'vmlinux')
|
||||
self.kernel_image = join(self.LINUX_KERNEL_BUILDDIR, 'linux.elf')
|
||||
self.kernel_updater = LinuxUpdateKernel(self.container)
|
||||
self.build_config_file = join(self.LINUX_KERNEL_BUILDDIR, '.config')
|
||||
self.platform_config_file = None
|
||||
|
||||
# Default configuration file to use based on selected platform
|
||||
self.platform_config_file = (['PB926', 'versatile_defconfig'],
|
||||
['BEAGLE', 'omap3_beagle_defconfig'],
|
||||
['PBA8', 'realview_defconfig'],
|
||||
['PBA9', 'realview-smp_defconfig'],
|
||||
['PB11MPCORE', 'realview-smp_defconfig'],)
|
||||
self.platform_config_files = {'PB926' : 'versatile',
|
||||
'BEAGLE' : 'omap3_beagle',
|
||||
'PBA9' : 'vexpress_a9'}
|
||||
# This one is for EB, EB can have 1136/1176/11MPCore/A8/A9 coretiles
|
||||
self.cpu_config_file = {'CORTEXA8': 'eb-a8',
|
||||
'CORTEXA9': 'eb-a9',
|
||||
'ARM1136' : 'eb-1136',
|
||||
'ARM11MPCORE': 'eb-11mpcore'}
|
||||
|
||||
def build_linux(self, config):
|
||||
def print_verbose(self, text):
|
||||
print "########################################################"
|
||||
print "########################################################"
|
||||
print "# " + text
|
||||
print "########################################################"
|
||||
print "########################################################"
|
||||
|
||||
def defconfig_to_config(self, config):
|
||||
# First get the linux configuration file corresponding to chosen platform
|
||||
self.platform_defconfig = ''
|
||||
if config.platform.upper() == 'EB':
|
||||
self.platform_defconfig = self.cpu_config_file[config.cpu.upper()]
|
||||
else:
|
||||
self.platform_defconfig = self.platform_config_files[config.platform.upper()]
|
||||
|
||||
if not self.platform_defconfig:
|
||||
print 'Platform detected as: ' + config.platform
|
||||
print 'Could not find relevant linux config file please review configuration'
|
||||
sys.exit(1)
|
||||
|
||||
# Create a config file from the corresponding defconfig
|
||||
os.system("make " + self.platform_defconfig + "_defconfig O=" + self.LINUX_KERNEL_BUILDDIR)
|
||||
|
||||
def build_linux(self, config, opts):
|
||||
print '\nBuilding the linux kernel...'
|
||||
os.chdir(self.LINUX_KERNELDIR)
|
||||
if not os.path.exists(self.LINUX_KERNEL_BUILDDIR):
|
||||
os.makedirs(self.LINUX_KERNEL_BUILDDIR)
|
||||
|
||||
for platform, config_file in self.platform_config_file:
|
||||
if platform == config.platform.upper():
|
||||
configuration_file = config_file
|
||||
os.system("make ARCH=codezero CROSS_COMPILE=" + \
|
||||
config.toolchain_userspace + \
|
||||
" O=" + self.LINUX_KERNEL_BUILDDIR + " " + configuration_file)
|
||||
|
||||
self.kernel_updater.modify_kernel_config(self.LINUX_KERNEL_BUILDDIR)
|
||||
# Update linux configuration based on codezero config
|
||||
# TODO: This may be changed from run-always to run-on-modification.
|
||||
self.kernel_updater.update_kernel_params(config, self.container)
|
||||
|
||||
os.system("make ARCH=codezero CROSS_COMPILE=" + \
|
||||
config.toolchain_userspace + \
|
||||
" O=" + self.LINUX_KERNEL_BUILDDIR + " menuconfig")
|
||||
os.system("make ARCH=codezero " + \
|
||||
"CROSS_COMPILE=" + config.toolchain_userspace + \
|
||||
" O=" + self.LINUX_KERNEL_BUILDDIR)
|
||||
# Is this the first time the kernel is to be configured?
|
||||
if not os.path.exists(self.build_config_file):
|
||||
self.print_verbose("Config file does not exist. Creating from defconfig")
|
||||
self.defconfig_to_config(config)
|
||||
|
||||
# Batch mode runs without invoking configure stage
|
||||
if opts.batch:
|
||||
# Build the kernel directly
|
||||
os.system('make ARCH=arm CROSS_COMPILE=' + config.toolchain_kernel + \
|
||||
' O=' + self.LINUX_KERNEL_BUILDDIR + ' ' + self.build_config_file)
|
||||
else:
|
||||
# Configure the kernel
|
||||
os.system('make ARCH=arm CROSS_COMPILE=' + config.toolchain_kernel + \
|
||||
' O=' + self.LINUX_KERNEL_BUILDDIR + ' menuconfig')
|
||||
if not os.path.exists(self.build_config_file):
|
||||
self.print_verbose("Config file doesnt exist after building: " + self.build_config_file)
|
||||
sys.exit(1)
|
||||
|
||||
# Build the kernel
|
||||
os.system('make V=1 ARCH=arm ' + '-j ' + opts.jobs + \
|
||||
' CROSS_COMPILE=' + config.toolchain_kernel + \
|
||||
' O=' + self.LINUX_KERNEL_BUILDDIR + ' Image')
|
||||
|
||||
# Generate kernel_image, elf to be used by codezero
|
||||
linux_elf_gen_cmd = (config.toolchain_userspace + "objcopy -R .note \
|
||||
-R .note.gnu.build-id -R .comment -S --change-addresses " + \
|
||||
linux_elf_gen_cmd = (config.toolchain_userspace + 'objcopy -R .note \
|
||||
-R .note.gnu.build-id -R .comment -S --change-addresses ' + \
|
||||
str(conv_hex(-self.container.linux_page_offset + self.container.linux_phys_offset)) + \
|
||||
" " + self.kernel_binary_image + " " + self.kernel_image)
|
||||
' ' + self.kernel_binary_image + ' ' + self.kernel_image)
|
||||
|
||||
#print cmd
|
||||
os.system(linux_elf_gen_cmd)
|
||||
print 'Done...'
|
||||
|
||||
def clean(self):
|
||||
def clean(self, config):
|
||||
print 'Cleaning linux kernel build...'
|
||||
if os.path.exists(self.LINUX_KERNEL_BUILDDIR):
|
||||
shutil.rmtree(self.LINUX_KERNEL_BUILDDIR)
|
||||
self.kernel_updater.clean()
|
||||
os.system('rm -f ' + self.kernel_image)
|
||||
os.chdir(self.LINUX_KERNELDIR)
|
||||
os.system('make ARCH=arm CROSS_COMPILE=' + config.toolchain_kernel + \
|
||||
' O=' + self.LINUX_KERNEL_BUILDDIR + ' clean')
|
||||
print 'Done...'
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
# This is only a default test case
|
||||
container = Container()
|
||||
container.id = 0
|
||||
@@ -227,7 +183,8 @@ if __name__ == "__main__":
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
linux_builder.build_linux()
|
||||
elif "clean" == sys.argv[1]:
|
||||
elif 'clean' == sys.argv[1]:
|
||||
linux_builder.clean()
|
||||
else:
|
||||
print " Usage: %s [clean]" % (sys.argv[0])
|
||||
print ' Usage: %s [clean]' % (sys.argv[0])
|
||||
|
||||
|
||||
@@ -7,15 +7,14 @@
|
||||
#
|
||||
import os, sys, shelve, subprocess
|
||||
from os.path import join
|
||||
from configure import *
|
||||
|
||||
PROJRELROOT = '../../'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from config.lib import *
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
from scripts.config.lib import *
|
||||
from scripts.config.config_invoke import *
|
||||
|
||||
config = configuration_retrieve()
|
||||
|
||||
@@ -86,8 +85,7 @@ def generate_image_S(target_path, images):
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) == 1:
|
||||
generate_ksym_to_loader(join(PROJROOT, 'loader/ksyms.S'), \
|
||||
join(BUILDDIR, 'kernel.elf'))
|
||||
generate_ksym_to_loader(join(PROJROOT, 'loader/ksyms.S'), KERNEL_ELF)
|
||||
elif len(sys.argv) == 3:
|
||||
generate_ksym_to_loader(sys.argv[1], sys.argv[1])
|
||||
else:
|
||||
|
||||
@@ -11,12 +11,8 @@ from os.path import join
|
||||
PROJRELROOT = "../.."
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
|
||||
#config = configuration_retrieve()
|
||||
#cpu = config.cpu
|
||||
#platform = config.platform
|
||||
from scripts.config.projpaths import *
|
||||
from scripts.config.configuration import *
|
||||
|
||||
# Mapping between system configuration and qemu flags
|
||||
# Platform CPU qemu "-M" flag qemu "-cpu" flag
|
||||
@@ -26,13 +22,12 @@ map_list = (['EB', 'ARM1136', 'realview-eb', 'arm1136'],
|
||||
['EB', 'CORTEXA9', 'realview-pbx-a9', 'cortex-a9'],
|
||||
['PB926', 'ARM926', 'versatilepb', 'arm926'],
|
||||
['BEAGLE', 'CORTEXA8', 'beagle', 'cortex-a8'],
|
||||
['PBA9', 'CORTEXA9', 'realview-pbx-a9', 'cortex-a9'],
|
||||
['PBA8', 'CORTEXA8', 'realview-pb-a8', 'cortex-a8'])
|
||||
['PBA9', 'CORTEXA9', 'realview-vx-a9', 'cortex-a9'])
|
||||
|
||||
data_up = \
|
||||
'''
|
||||
cd build
|
||||
qemu-system-arm -s -S -kernel final.elf -nographic -M %s -cpu %s &
|
||||
qemu-system-arm -s -S -kernel final.elf -M %s -cpu %s %s &
|
||||
arm-none-insight ; pkill qemu-system-arm
|
||||
cd ..
|
||||
'''
|
||||
@@ -40,15 +35,15 @@ cd ..
|
||||
data_smp = \
|
||||
'''
|
||||
cd build
|
||||
qemu-system-arm -s -S -kernel final.elf -smp %d -nographic -M %s -cpu %s &
|
||||
qemu-system-arm -s -S -kernel final.elf -smp %d -M %s -cpu %s %s &
|
||||
arm-none-insight ; pkill qemu-system-arm
|
||||
cd ..
|
||||
'''
|
||||
|
||||
def build_qemu_cmdline_script():
|
||||
build_tools_folder = 'tools'
|
||||
qemu_cmd_file = join(build_tools_folder, 'run-qemu-insight')
|
||||
# File to be generated with qemu commandline
|
||||
qemu_cmd_file = join(TOOLSDIR, 'run-qemu-insight')
|
||||
|
||||
def build_qemu_cmdline_script():
|
||||
# Get system selected platform and cpu
|
||||
config = configuration_retrieve()
|
||||
cpu = config.cpu.upper()
|
||||
@@ -67,21 +62,33 @@ def build_qemu_cmdline_script():
|
||||
print 'Qemu flags not found'
|
||||
sys.exit(1)
|
||||
|
||||
if os.path.exists(build_tools_folder) is False:
|
||||
os.system("mkdir " + build_tools_folder)
|
||||
|
||||
# Special case for EB+A9(non-smp)
|
||||
if platform == 'EB' and cpu == 'CORTEXA9' and smp == False:
|
||||
mflag = 'realview-eb'
|
||||
|
||||
# Check if we CLCD is selected, otherwise use -nographic
|
||||
clcd = None
|
||||
for sym0, sym1 in config.all:
|
||||
parts = sym0.split("_", )
|
||||
if len(parts) >= 5 and parts[3] == 'DEVICE' and \
|
||||
parts[4][:len("CLCD")] == "CLCD":
|
||||
clcd = '-serial stdio'
|
||||
if not clcd:
|
||||
clcd = '-nographic'
|
||||
|
||||
# Write run-qemu-insight file
|
||||
with open(qemu_cmd_file, 'w+') as f:
|
||||
if smp == False:
|
||||
f.write(data_up % (mflag, cpuflag))
|
||||
f.write(data_up % (mflag, cpuflag, clcd))
|
||||
else:
|
||||
f.write(data_smp % (ncpu, mflag, cpuflag))
|
||||
f.write(data_smp % (ncpu, mflag, cpuflag, clcd))
|
||||
|
||||
os.system("chmod +x " + qemu_cmd_file)
|
||||
return None
|
||||
|
||||
def clean_qemu_cmdline_script():
|
||||
os.system('rm -f ' + qemu_cmd_file)
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
build_qemu_cmdline_script()
|
||||
|
||||
Reference in New Issue
Block a user