original_docstring: 
          Called to do the actual content population for a partition i.e. it
          'prepares' the partition to be incorporated into the image.
          
docstring: Called to do the actual content population for a partition i.e. it
  'prepares' the partition to be incorporated into the image.
docstring_tokens: Called to do the actual content population for a partition i . e . it ' prepares ' the partition to be incorporated into the image .
code: def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
                               oe_builddir, bootimg_dir, kernel_dir,
                               rootfs_dir, native_sysroot):
          """
          Called to do the actual content population for a partition i.e. it
          'prepares' the partition to be incorporated into the image.
          """
          if not bootimg_dir:
              bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
              if not bootimg_dir:
                  msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
  
          msger.debug('Bootimg dir: %s' % bootimg_dir)
  
          if 'file' not in source_params:
              msger.error("No file specified\n")
              return
  
          src = os.path.join(bootimg_dir, source_params['file'])
          dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
  
          if 'skip' in source_params:
              dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
                      (src, dst, source_params['skip'])
          else:
              dd_cmd = "cp %s %s" % (src, dst)
          exec_cmd(dd_cmd)
  
          # get the size in the right units for kickstart (kB)
          du_cmd = "du -Lbks %s" % dst
          out = exec_cmd(du_cmd)
          filesize = out.split()[0]
  
          if int(filesize) > int(part.size):
              part.size = filesize
  
          part.source_file = dst
code_tokens: def do_prepare_partition ( cls , part , source_params , cr , cr_workdir , oe_builddir , bootimg_dir , kernel_dir , rootfs_dir , native_sysroot ) : if not bootimg_dir : bootimg_dir = get_bitbake_var ( "DEPLOY_DIR_IMAGE" ) if not bootimg_dir : msger . error ( "Couldn't find DEPLOY_DIR_IMAGE, exiting\n" ) msger . debug ( 'Bootimg dir: %s' % bootimg_dir ) if 'file' not in source_params : msger . error ( "No file specified\n" ) return src = os . path . join ( bootimg_dir , source_params [ 'file' ] ) dst = os . path . join ( cr_workdir , "%s.%s" % ( source_params [ 'file' ] , part . lineno ) ) if 'skip' in source_params : dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % ( src , dst , source_params [ 'skip' ] ) else : dd_cmd = "cp %s %s" % ( src , dst ) exec_cmd ( dd_cmd ) du_cmd = "du -Lbks %s" % dst out = exec_cmd ( du_cmd ) filesize = out . split ( ) [ 0 ] if int ( filesize ) > int ( part . size ) : part . size = filesize part . source_file = dst
short_docstring: Called to do the actual content population for a partition i.e.
short_docstring_tokens: Called to do the actual content population for a partition i . e .
comment: """
          Called to do the actual content population for a partition i.e. it
          'prepares' the partition to be incorporated into the image.
          """$SEP$# get the size in the right units for kickstart (kB)