mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Added support for ATAGS for linux kernel
This commit is contained in:
@@ -17,6 +17,7 @@ from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.linux.build_linux import *
|
||||
from scripts.linux.build_rootfs import *
|
||||
from scripts.linux.build_atags import *
|
||||
from pack import *
|
||||
from packall import *
|
||||
|
||||
@@ -25,9 +26,12 @@ def build_linux_container(projpaths, container):
|
||||
linux_builder.build_linux()
|
||||
rootfs_builder = RootfsBuilder(projpaths, container)
|
||||
rootfs_builder.build_rootfs()
|
||||
atags_builder = AtagsBuilder(projpaths, container)
|
||||
atags_builder.build_atags()
|
||||
linux_container_packer = LinuxContainerPacker(container, \
|
||||
linux_builder, \
|
||||
rootfs_builder)
|
||||
rootfs_builder, \
|
||||
atags_builder)
|
||||
return linux_container_packer.pack_container()
|
||||
|
||||
def glob_by_walk(arg, dirname, names):
|
||||
|
||||
@@ -53,7 +53,7 @@ def source_to_builddir(srcdir, id):
|
||||
return join(BUILDDIR, cont_builddir)
|
||||
|
||||
class LinuxContainerPacker:
|
||||
def __init__(self, container, linux_builder, rootfs_builder):
|
||||
def __init__(self, container, linux_builder, rootfs_builder, atags_builder):
|
||||
|
||||
# Here, we simply attempt to get PROJROOT/conts as
|
||||
# PROJROOT/build/cont[0-9]
|
||||
@@ -67,6 +67,7 @@ class LinuxContainerPacker:
|
||||
'container' + str(container.id) + '.elf')
|
||||
self.kernel_image_in = linux_builder.kernel_image
|
||||
self.rootfs_elf_in = rootfs_builder.rootfs_elf_out
|
||||
self.atags_elf_in = atags_builder.atags_elf_out
|
||||
|
||||
def generate_container_assembler(self, source):
|
||||
with open(self.container_S_out, 'w+') as f:
|
||||
@@ -92,9 +93,11 @@ class LinuxContainerPacker:
|
||||
|
||||
def pack_container(self):
|
||||
self.generate_container_lds([self.kernel_image_in, \
|
||||
self.rootfs_elf_in])
|
||||
self.rootfs_elf_in, \
|
||||
self.atags_elf_in])
|
||||
self.generate_container_assembler([self.kernel_image_in, \
|
||||
self.rootfs_elf_in])
|
||||
self.rootfs_elf_in, \
|
||||
self.atags_elf_in])
|
||||
os.system("arm-none-linux-gnueabi-gcc " + "-nostdlib -o %s -T%s %s" \
|
||||
% (self.container_elf_out, \
|
||||
self.container_lds_out,
|
||||
|
||||
Reference in New Issue
Block a user