mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Integrated cinfo generation to configure.py
This commit is contained in:
@@ -18,6 +18,7 @@ CONFIG_H = join("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, 'linux-2.6.28.10')
|
||||
|
||||
@@ -6,7 +6,7 @@ from os.path import join
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.bare.bare_generator import *
|
||||
|
||||
from scripts.conts.generate_kernel_cinfo import *
|
||||
|
||||
def cml2_header_to_symbols(cml2_header, config):
|
||||
with file(cml2_header) as header_file:
|
||||
@@ -56,6 +56,9 @@ def configure_kernel(cml_file):
|
||||
bare_cont_gen = BareContGenerator()
|
||||
bare_cont_gen.bare_container_generate(config)
|
||||
|
||||
# Generate kernel cinfo structure for container definitions
|
||||
generate_kernel_cinfo(config.containers, KERNEL_CINFO_PATH)
|
||||
|
||||
if __name__ == "__main__":
|
||||
configure_kernel(join(CML2_CONFIG_SRCDIR, "arm.cml"))
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import os, sys, shelve, glob
|
||||
from os.path import join
|
||||
|
||||
PROJRELROOT = '.'
|
||||
PROJRELROOT = '../..'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
sys.path.append(os.path.abspath("../"))
|
||||
@@ -98,7 +98,6 @@ def generate_kernel_cinfo(containers, cinfo_path):
|
||||
with open(cinfo_path, 'w+') as cinfo_file:
|
||||
fbody = cinfo_file_start
|
||||
for c in containers:
|
||||
print "Container %s: %s" % (c.id, c.name)
|
||||
# Currently only these are considered as capabilities
|
||||
total_caps = c.virt_regions + c.phys_regions
|
||||
fbody += cinfo_start % (c.id, c.name)
|
||||
@@ -125,7 +124,7 @@ def generate_kernel_cinfo(containers, cinfo_path):
|
||||
|
||||
if __name__ == "__main__":
|
||||
config = configuration_retrieve()
|
||||
config.config_print()
|
||||
#config.config_print()
|
||||
containers = config.containers
|
||||
containers.sort()
|
||||
if len(sys.argv) > 1:
|
||||
Reference in New Issue
Block a user