configuration_retrieve pending work done

This commit is contained in:
Amit Mahajan
2009-11-03 11:13:51 +05:30
parent 03b2751377
commit 6e898151bc
6 changed files with 18 additions and 47 deletions

View File

@@ -49,12 +49,8 @@ class AtagsBuilder:
self.elf_relpath = os.path.relpath(self.atags_elf_out, \
self.LINUX_ATAGSDIR)
def build_atags(self):
def build_atags(self, config):
print 'Building Atags for linux kenel...'
# TODO: Need to sort this, we cannot call it in global space
# as configuration file is not presnt in beginning
config = configuration_retrieve()
# IO files from this build
os.chdir(LINUX_ATAGSDIR)
if not os.path.exists(self.LINUX_ATAGS_BUILDDIR):

View File

@@ -117,10 +117,7 @@ class LinuxUpdateKernel:
self.replace_line(file, data_to_replace, new_data, prev_line)
# Update ARCHID, CPUID and ATAGS ADDRESS
def modify_register_values(self, container):
# TODO: This call needs to be made global
config = configuration_retrieve()
def modify_register_values(self, config, container):
for cpu_type, cpu_id in self.cpuid_list:
if cpu_type == config.cpu.upper():
cpuid = cpu_id
@@ -185,19 +182,15 @@ class LinuxBuilder:
self.kernel_image = None
self.kernel_updater = LinuxUpdateKernel(self.container)
def build_linux(self):
def build_linux(self, config):
print '\nBuilding the linux kernel...'
# TODO: Need to sort this, we cannot call it in global space
# as configuration file is not presnt in beginning
config = configuration_retrieve()
os.chdir(self.LINUX_KERNELDIR)
if not os.path.exists(self.LINUX_KERNEL_BUILDDIR):
os.makedirs(self.LINUX_KERNEL_BUILDDIR)
self.kernel_updater.modify_kernel_config()
self.kernel_updater.update_kernel_params(self.container)
self.kernel_updater.modify_register_values(self.container)
self.kernel_updater.modify_register_values(config, self.container)
os.system("make defconfig ARCH=arm O=" + self.LINUX_KERNEL_BUILDDIR)
os.system("make ARCH=arm " + \

View File

@@ -40,12 +40,8 @@ class RootfsBuilder:
self.rootfs_elf_out = join(self.LINUX_ROOTFS_BUILDDIR, "rootfs.elf")
self.cont_id = container.id
def build_rootfs(self):
def build_rootfs(self, config):
print 'Building the root filesystem...'
# TODO: Need to sort this, we cannot call it in global space
# as configuration file is not presnt in beginning
config = configuration_retrieve()
# IO files from this build
os.chdir(LINUX_ROOTFSDIR)
if not os.path.exists(self.LINUX_ROOTFS_BUILDDIR):