diff --git a/conts/baremetal/baremetal0/SConstruct b/conts/baremetal/baremetal0/SConstruct index 25a11c7..6c760e1 100644 --- a/conts/baremetal/baremetal0/SConstruct +++ b/conts/baremetal/baremetal0/SConstruct @@ -7,7 +7,7 @@ import os, shelve, sys from os.path import * -PROJRELROOT = '../../..' +PROJRELROOT = '../..' sys.path.append(PROJRELROOT) diff --git a/conts/baremetal/baremetal1/SConstruct b/conts/baremetal/baremetal1/SConstruct index d2ad646..cd4af65 100644 --- a/conts/baremetal/baremetal1/SConstruct +++ b/conts/baremetal/baremetal1/SConstruct @@ -7,7 +7,7 @@ import os, shelve, sys from os.path import * -PROJRELROOT = '../../..' +PROJRELROOT = '../..' sys.path.append(PROJRELROOT) diff --git a/conts/baremetal/baremetal2/SConstruct b/conts/baremetal/baremetal2/SConstruct index 5d242cb..b497069 100644 --- a/conts/baremetal/baremetal2/SConstruct +++ b/conts/baremetal/baremetal2/SConstruct @@ -7,7 +7,7 @@ import os, shelve, sys from os.path import * -PROJRELROOT = '../../..' +PROJRELROOT = '../..' sys.path.append(PROJRELROOT) diff --git a/conts/baremetal/baremetal3/SConstruct b/conts/baremetal/baremetal3/SConstruct index b103d6a..3d615b2 100644 --- a/conts/baremetal/baremetal3/SConstruct +++ b/conts/baremetal/baremetal3/SConstruct @@ -7,7 +7,7 @@ import os, shelve, sys from os.path import * -PROJRELROOT = '../../..' +PROJRELROOT = '../..' sys.path.append(PROJRELROOT) diff --git a/scripts/baremetal/baremetal_generator.py b/scripts/baremetal/baremetal_generator.py index 921aa45..2702720 100755 --- a/scripts/baremetal/baremetal_generator.py +++ b/scripts/baremetal/baremetal_generator.py @@ -22,6 +22,7 @@ from config.lib import * class BaremetalContGenerator: def __init__(self): self.CONT_SRC_DIR = '' # Set when container is selected + self.BAREMETAL_SRC_BASEDIR = join(PROJROOT, 'conts') self.BAREMETAL_PROJ_SRC_DIR = join(PROJROOT, 'conts/baremetal') self.main_builder_name = 'build.py' @@ -113,7 +114,7 @@ class BaremetalContGenerator: for cont in config.containers: if cont.type == "baremetal": # Determine container directory name. - self.CONT_SRC_DIR = join(join(BUILDDIR, 'cont') + str(cont.id), cont.name) + self.CONT_SRC_DIR = join(self.BAREMETAL_SRC_BASEDIR, cont.dirname.lower()) 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 +122,7 @@ class BaremetalContGenerator: self.container_h_out = join(join(self.CONT_SRC_DIR, 'include'), \ self.container_h_name) - if not os.path.exists(self.CONT_SRC_DIR): + if not os.path.exists(join(self.BAREMETAL_SRC_BASEDIR, cont.dirname)): self.create_baremetal_sources(config, cont) else: # Don't create new sources but update configuration diff --git a/scripts/conts/containers.py b/scripts/conts/containers.py index 17acada..7703d08 100755 --- a/scripts/conts/containers.py +++ b/scripts/conts/containers.py @@ -83,16 +83,15 @@ def build_posix_container(config, projpaths, container): def build_default_container(config, projpaths, container): images = [] cwd = os.getcwd() - projdir = join(join(BUILDDIR, 'cont') + str(container.id), \ - container.name) + projdir = join(join(PROJROOT, 'conts'), container.name) os.chdir(projdir) os.system("scons") os.path.walk(projdir, glob_by_walk, ['*.elf', images]) # Calculate and store size of pager - pager_binary = join("cont" + str(container.id), container.name) + "/main.elf" + pager_binary = "conts/" + container.name + "/main.elf" config.containers[container.id].pager_size = \ - conv_hex(elf_binary_size(join(BUILDDIR, pager_binary))) + conv_hex(elf_binary_size(join(PROJROOT, pager_binary))) container_packer = DefaultContainerPacker(container, images) return container_packer.pack_container(config)