Revert "Building baremetal containers in build directory"

This reverts commit e2c2f1f2b1.

We need a cleaner solution
This commit is contained in:
Bahadir Balban
2009-11-20 14:42:33 +02:00
parent 4b225fadf4
commit 785bf340b4
6 changed files with 10 additions and 10 deletions

View File

@@ -7,7 +7,7 @@
import os, shelve, sys
from os.path import *
PROJRELROOT = '../../..'
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)

View File

@@ -7,7 +7,7 @@
import os, shelve, sys
from os.path import *
PROJRELROOT = '../../..'
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)

View File

@@ -7,7 +7,7 @@
import os, shelve, sys
from os.path import *
PROJRELROOT = '../../..'
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)

View File

@@ -7,7 +7,7 @@
import os, shelve, sys
from os.path import *
PROJRELROOT = '../../..'
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)

View File

@@ -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

View File

@@ -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)