mirror of
https://github.com/drasko/codezero.git
synced 2026-01-24 16:53:14 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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, \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user