コード例 #1
0
    def ExpandEntries(self):
        """Create the subnodes"""
        names = [self.root_fname + '-nodtb', self.root_fname + '-dtb']
        if self.bss_pad:
            names.insert(1, self.root_fname + '-bss-pad')
        for name in names:
            subnode = state.AddSubnode(self._node, name)

        # Read entries again, now that we have some
        self._ReadEntries()
コード例 #2
0
ファイル: files.py プロジェクト: Rshman21/u-boot-1
    def ExpandEntries(self):
        files = tools.GetInputFilenameGlob(self._pattern)
        if self._require_matches and not files:
            self.Raise("Pattern '%s' matched no files" % self._pattern)
        for fname in files:
            if not os.path.isfile(fname):
                continue
            name = os.path.basename(fname)
            subnode = self._node.FindNode(name)
            if not subnode:
                subnode = state.AddSubnode(self._node, name)
            state.AddString(subnode, 'type', 'blob')
            state.AddString(subnode, 'filename', fname)
            state.AddString(subnode, 'compress', self._compress)

        # Read entries again, now that we have some
        self._ReadEntries()