mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
final.axf building from top-level build.py including containers
This commit is contained in:
@@ -36,17 +36,19 @@ def build_container(container):
|
||||
"container of type: %s" % (container.type)
|
||||
Exit(1)
|
||||
|
||||
def main():
|
||||
def build_all_containers():
|
||||
container_images = []
|
||||
|
||||
config = configuration_retrieve()
|
||||
|
||||
# config.config_print()
|
||||
for container in config.containers:
|
||||
container_images.append(build_container(container))
|
||||
|
||||
all_cont_packer = AllContainerPacker(container_images, config.containers)
|
||||
|
||||
all_cont_packer.pack_all()
|
||||
return all_cont_packer.pack_all()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
build_all_containers()
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ class AllContainerPacker:
|
||||
file_body = ""
|
||||
img_i = 0
|
||||
for img in self.cont_images_in:
|
||||
print img
|
||||
file_body += containers_assembler_body % (img_i, img)
|
||||
img_i += 1
|
||||
|
||||
@@ -86,10 +85,8 @@ class AllContainerPacker:
|
||||
self.containers_lds_out,
|
||||
self.containers_S_out))
|
||||
|
||||
# oldwd = os.getcwd()
|
||||
# os.chdir(PROJROOT)
|
||||
# os.system("scons -f SConstruct.loader")
|
||||
# os.chdir(oldwd)
|
||||
# Return the final image to calling script
|
||||
return self.containers_elf_out
|
||||
|
||||
def clean(self):
|
||||
if os.path.exists(self.containers_elf_out):
|
||||
|
||||
@@ -44,9 +44,6 @@ assembler_symbol_definition = \
|
||||
'''
|
||||
|
||||
def generate_ksym_to_loader(target_path, source_path):
|
||||
print "Source: ", source_path
|
||||
print "Target: ", target_path
|
||||
|
||||
symbols = ['break_virtual']
|
||||
with open(target_path, 'w') as asm_file:
|
||||
asm_file.write(ksym_header % (target_path, source_path, sys.argv[0]))
|
||||
@@ -76,7 +73,6 @@ def generate_image_S(target_path, images):
|
||||
fbody = ''
|
||||
with open(target_path, 'w+') as images_S:
|
||||
for img in images:
|
||||
# print img[:-len(kern_fname)]
|
||||
print os.path.basename(img.path)
|
||||
if os.path.basename(img.path) == kern_fname:
|
||||
fbody += decl_sect_asm % ('.kernel', img)
|
||||
|
||||
Reference in New Issue
Block a user