Example #1
0
 def install(self, src, dst):
     src_base = path.basename(src)
     log.notice('Install: %s' % (src_base))
     asrc = path.abspath(src)
     adst = path.join(path.abspath(dst), src_base)
     log.output('Copy: %s -> %s' % (asrc, adst))
     path.copy(asrc, adst)
Example #2
0
 def fdt_convert(self, image, fdt):
     dst = path.join(path.abspath(self['build']), path.basename(fdt))
     self['fdt_build'] = dst
     log.output('Copy (into build): %s -> %s' % (fdt, dst))
     image.clean_path(dst)
     path.copy(fdt, dst)
     return self['fdt_image'].replace('@FDT@', dst)
Example #3
0
 def kernel_convert(self, image, kernel):
     dst = path.join(path.abspath(self['build']), path.basename(kernel))
     self['kernel_build'] = dst
     log.output('Copy (into build): %s -> %s' % (kernel, dst))
     image.clean_path(dst)
     path.copy(kernel, dst)
     cmds = self.filter_text(self.comma_split(self['kernel_converter']))
     for cmd in cmds:
         _command(cmd, self['build'])
     return self['kernel_image'].replace('@KERNEL@', dst)
Example #4
0
 def install_files(self, image, mountpoint):
     if self['kernel'] is not None:
         kernel_image = self.kernel_convert(image, self['kernel'])
         if self.convert_kernel:
             path.copy(kernel_image, self['output'])
         else:
             image.install(kernel_image, mountpoint)
     if self['fdt'] is not None:
         fdt_image = self.fdt_convert(image, self['fdt'])
         image.install(fdt_image, mountpoint)