コード例 #1
0
    def SelectFdt(self, fdt_fname):
        """Select an FDT to control the firmware bundling

    Args:
      fdt_fname: The filename of the fdt to use.

    Returns:
      The Fdt object of the original fdt file, which we will not modify.

    We make a copy of this which will include any on-the-fly changes we want
    to make.
    """
        self._fdt_fname = fdt_fname
        self.CheckOptions()
        fdt = Fdt(self._tools, self._fdt_fname)

        # For upstream, select the correct architecture .dtsi manually.
        if self._board == 'link' or 'x86' in self._board:
            arch_dts = 'coreboot.dtsi'
        elif self._board == 'daisy':
            arch_dts = 'exynos5250.dtsi'
        else:
            arch_dts = 'tegra20.dtsi'

        fdt.Compile(arch_dts)
        self.fdt = fdt.Copy(os.path.join(self._tools.outdir, 'updated.dtb'))
        return fdt