mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
CML2 rule file is autogenerated from arm.cml and the containers template
Container rules are too many and repetitive for each container. With this change, the cml file is autogenerated from a container template cml and the architecture cml, e.g. arm.cml. -c option determines the number of containers. See build.py -h for more.
This commit is contained in:
@@ -103,11 +103,22 @@ class BareContGenerator:
|
||||
self.copy_bare_build_desc(config, cont)
|
||||
self.generate_linker_script(config, cont)
|
||||
|
||||
def update_configuration(self, config, cont):
|
||||
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'), \
|
||||
self.linker_lds_name)
|
||||
self.copy_bare_build_desc(config, cont)
|
||||
self.generate_linker_script(config, cont)
|
||||
|
||||
def check_create_bare_sources(self, config):
|
||||
for cont in config.containers:
|
||||
if cont.type == "bare":
|
||||
if not os.path.exists(join(self.BARE_SRC_BASEDIR, cont.dirname)):
|
||||
self.create_bare_sources(config, cont)
|
||||
# Don't create new sources but update configuration
|
||||
else:
|
||||
self.update_configuration(config, cont)
|
||||
|
||||
def generate_linker_script(self, config, cont):
|
||||
with open(self.linker_lds_in) as fin:
|
||||
|
||||
Reference in New Issue
Block a user