Got the buildsystem to build multiple linux instances.

modified:   config/configuration.py
	modified:   config/projpaths.py
	modified:   configure.py
	modified:   scripts/linux/build_linux.py
	modified:   scripts/linux/build_rootfs.py
This commit is contained in:
Bahadir Balban
2009-09-13 18:29:57 +03:00
parent 2d2677945f
commit 403ab75805
5 changed files with 118 additions and 50 deletions

View File

@@ -104,8 +104,33 @@ class configuration:
# Make sure elements in order for indexed accessing
self.containers.sort()
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
# Save containers explicitly
for i, c in zip(range(len(config.containers)), config.containers):
config_shelve["container" + str(i)] = c
# config_shelve["arch"] = configuration.arch
# config_shelve["subarch"] = configuration.subarch
# config_shelve["platform"] = configuration.platform
# config_shelve["all_symbols"] = configuration.all
config_shelve.close()
def configuration_retrieve():
# Get configuration information
config_shelve = shelve.open(CONFIG_SHELVE)
configuration = config_shelve["configuration"]
return configuration
config = config_shelve["configuration"]
# Retrieve and append containers explicitly
for i in range(int(config.ncontainers)):
config.containers.append(config_shelve["container" + str(i)])
config.containers.sort()
return config

View File

@@ -23,3 +23,9 @@ LINUXDIR = join(PROJROOT, 'conts/linux')
LINUX_KERNELDIR = join(LINUXDIR, 'linux-2.6.28.10')
LINUX_ROOTFSDIR = join(LINUXDIR, 'rootfs')
projpaths = { \
'LINUX_ROOTFSDIR' : LINUX_ROOTFSDIR, \
'LINUX_KERNELDIR' : LINUX_KERNELDIR, \
'LINUXDIR' : LINUXDIR, \
'BUILDDIR' : BUILDDIR, \
}