Example #1
0
 def install(self, targets, path):
     debug.checkcmd([
         "make", "install",
         "INSTALL_PREFIX=%s" % path,
         "MODULES=%s" % (" ".join(targets))
     ],
                    cwd=self.build_dir)
Example #2
0
 def set_bootmodules(self, modules):
     menulst_fullpath = os.path.join(self._machine.options.builds[0].build_dir,
             "platforms", "arm", self._machine.menulst_template)
     self._machine._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     debug.verbose("building proper pandaboard image")
     debug.checkcmd(["make", self._machine.imagename],
             cwd=self._machine.options.builds[0].build_dir)
Example #3
0
 def _run_hake(self, srcdir, archs):
     # if srcdir is relative, adjust to be wrt build_dir
     print archs
     if not os.path.isabs(srcdir):
         srcdir = os.path.relpath(srcdir, self.build_dir)
     debug.checkcmd([os.path.join(srcdir, "hake", "hake.sh"), "--source-dir", srcdir],
                    cwd=self.build_dir)
Example #4
0
    def set_bootmodules(self, modules):
        # write menu.lst
        debug.verbose("Writing menu.lst in build directory.")
        menulst_fullpath = os.path.join(
            self._machine.options.builds[0].build_dir, "platforms", "arm",
            "menu.lst.armv8_base")
        self._write_menu_lst(modules.get_menu_data('/'), menulst_fullpath)

        # produce ROM image
        debug.verbose("Building QEMU EFI image.")
        #        debug.checkcmd(["make", self._machine.imagename],
        #                cwd=self._machine.options.builds[0].build_dir)

        debug.checkcmd(["make"] + modules.get_build_targets(),
                       cwd=self._machine.options.builds[0].build_dir)

        efi = efiimage.EFIImage(self._machine.kernel_img, 200)
        efi.create()
        for module in modules.get_build_targets():
            efi.addFile(
                os.path.join(self._machine.options.builds[0].build_dir,
                             module), module)
        efi.writeFile("startup.nsh", "Hagfish.efi hagfish.cfg")
        efi.addFile("/home/netos/tftpboot/Hagfish.efi", "Hagfish.efi")
        efi.addFile(menulst_fullpath, "hagfish.cfg")
Example #5
0
 def _run_hake(self, srcdir, archs):
     # if srcdir is relative, adjust to be wrt build_dir
     print archs
     if not os.path.isabs(srcdir):
         srcdir = os.path.relpath(srcdir, self.build_dir)
     debug.checkcmd([os.path.join(srcdir, "hake", "hake.sh"), "--source-dir", srcdir],
                    cwd=self.build_dir)
Example #6
0
 def set_bootmodules(self, modules):
     # write menu.lst in build directory
     debug.verbose("writing menu.lst in build directory")
     menulst_fullpath = os.path.join(self.options.buildbase, "platforms",
                                     "arm", "menu.lst.armv7_a15ve")
     debug.verbose("writing menu.lst in build directory: %s" %
                   menulst_fullpath)
     self._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     debug.verbose("building proper gem5 image")
     debug.checkcmd(["make", self.imagename], cwd=self.options.buildbase)
Example #7
0
 def set_bootmodules(self, modules):
     super(FVPMachineARMv7SingleCore, self).set_bootmodules(modules)
     debug.verbose("writing menu.lst in build directory")
     menulst_fullpath = os.path.join(self.builddir, "platforms", "arm",
                                     "menu.lst.armv7_a9ve")
     debug.verbose("writing menu.lst in build directory: %s" %
                   menulst_fullpath)
     self._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     debug.verbose("building proper FVP image")
     debug.checkcmd(["make", IMAGE_NAME], cwd=self.builddir)
Example #8
0
 def set_bootmodules(self, modules):
     menulst_fullpath = os.path.join(self.builddir, "platforms", "arm",
                                     "menu.lst.armv7_pandaboard")
     self._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     source_name = os.path.join(self.builddir, IMAGE_NAME)
     self.target_name = os.path.join(self.get_tftp_dir(), IMAGE_NAME)
     debug.verbose("building proper pandaboard image")
     debug.checkcmd(["make", IMAGE_NAME], cwd=self.builddir)
     debug.verbose("copying %s to %s" % (source_name, self.target_name))
     shutil.copyfile(source_name, self.target_name)
     self.__chmod_ar(self.target_name)
Example #9
0
    def set_bootmodules(self, modules):
        # write menu.lst
        debug.verbose("Writing menu.lst in build directory.")
        menulst_fullpath = os.path.join(self.options.builds[0].build_dir,
                "platforms", "arm", "menu.lst.armv7_zynq7")
        self._write_menu_lst(modules.get_menu_data('/'), menulst_fullpath)

        # produce ROM image
        debug.verbose("Building QEMU image.")
        debug.checkcmd(["make", self.imagename],
                cwd=self.options.builds[0].build_dir)
Example #10
0
    def set_bootmodules(self, modules):
        # store path to kernel for _get_cmdline to use
        self.kernel_img = os.path.join(self.options.builddir, self.imagename)
        # write menu.lst
        debug.verbose("Writing menu.lst in build directory.")
        menulst_fullpath = os.path.join(self.options.builddir, "platforms",
                                        "arm", "menu.lst.armv7_a15ve")
        self._write_menu_lst(modules.get_menu_data('/'), menulst_fullpath)

        # produce ROM image
        debug.verbose("Building QEMU image.")
        debug.checkcmd(["make", self.imagename], cwd=self.options.builddir)
Example #11
0
 def set_bootmodules(self, modules):
     menulst_fullpath = os.path.join(self._machine.options.builds[0].build_dir,
             "platforms", "arm", self._machine.menulst_template)
     self._machine._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     source_name = os.path.join(self._machine.options.builds[0].build_dir, self._machine.imagename)
     self.target_name = os.path.join(self.get_tftp_dir(), self._machine.imagename)
     debug.verbose("building proper pandaboard image")
     debug.checkcmd(["make", self._machine.imagename],
             cwd=self._machine.options.builds[0].build_dir)
     debug.verbose("copying %s to %s" % (source_name, self.target_name))
     shutil.copyfile(source_name, self.target_name)
     self.__chmod_ar(self.target_name)
Example #12
0
    def set_bootmodules(self, modules):
        # store path to kernel for _get_cmdline to use
        tftp_dir = self.get_tftp_dir()
        self.kernel_img = os.path.join(tftp_dir, modules.kernel[0])

        # write menu.lst
        menu_lst = 'armv5/menu.lst'
        menu_lst_path = os.path.join(tftp_dir, menu_lst)
        self._write_menu_lst(modules.get_menu_data('/'), menu_lst_path)

        # produce ROM image
        rom_name = 'romfs.cpio'
        self.rom_img = os.path.join(tftp_dir, rom_name)
        cmd = os.path.join(self.options.sourcedir, 'tools', 'arm-mkbootcpio.sh')
        debug.checkcmd([os.path.abspath(cmd), menu_lst, rom_name], cwd=tftp_dir)
 def __rackpower(self, arg):
     retries = 3
     failed = False
     while retries > 0:
         try:
             debug.checkcmd([RACKPOWER, arg, self.get_machine_name()])
         except subprocess.CalledProcessError:
             debug.warning("rackpower %s %s failed" %
                           (arg, self.get_machine_name()))
             failed = True
             if retries > 0:
                 debug.verbose("retrying...")
                 retries -= 1
         if not failed:
             break
Example #14
0
 def __rackpower(self, arg):
     retries = 3
     failed = False
     while retries > 0:
         try:
             debug.checkcmd([RACKPOWER, arg, self.get_machine_name()])
         except subprocess.CalledProcessError:
             debug.warning("rackpower %s %s failed" %
                     (arg, self.get_machine_name()))
             failed = True
             if retries > 0:
                 debug.verbose("retrying...")
                 retries -= 1
         if not failed:
             break
Example #15
0
    def set_bootmodules(self, modules):
        # store path to kernel for _get_cmdline to use
        tftp_dir = self.get_tftp_dir()
        self.kernel_img = os.path.join(tftp_dir, modules.kernel[0])

        # write menu.lst
        menu_lst = 'armv5/menu.lst'
        menu_lst_path = os.path.join(tftp_dir, menu_lst)
        self._write_menu_lst(modules.get_menu_data('/'), menu_lst_path)

        # produce ROM image
        rom_name = 'romfs.cpio'
        self.rom_img = os.path.join(tftp_dir, rom_name)
        cmd = os.path.join(self.options.sourcedir, 'tools',
                           'arm-mkbootcpio.sh')
        debug.checkcmd([os.path.abspath(cmd), menu_lst, rom_name],
                       cwd=tftp_dir)
Example #16
0
    def set_bootmodules(self, modules):
        # write menu.lst in build directory
        debug.verbose("writing menu.lst in build directory")
        menulst_fullpath = os.path.join(self.options.builds[0].build_dir,
                "platforms", "arm", "menu.lst.armv8_base")
        debug.verbose("writing menu.lst in build directory: %s" %
                menulst_fullpath)
        self._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)

        debug.checkcmd(["make"] + modules.get_build_targets(), cwd=self.options.builds[0].build_dir)

        debug.verbose("building proper FVP image")
        efi = efiimage.EFIImage(self.kernel_img, 200)
        efi.create()
        for module in modules.get_build_targets():
            efi.addFile(os.path.join(self.options.builds[0].build_dir, module), module)
        efi.writeFile("startup.nsh", "Hagfish.efi hagfish.cfg")
        efi.addFile("/home/netos/tftpboot/Hagfish.efi", "Hagfish.efi")
        efi.addFile(menulst_fullpath, "hagfish.cfg")
    def set_bootmodules(self, modules):
        # write menu.lst
        debug.verbose("Writing menu.lst in build directory.")
        menulst_fullpath = os.path.join(
            self._machine.options.builds[0].build_dir, "platforms", "arm",
            "menu.lst.armv8_base")
        self._write_menu_lst(modules.get_menu_data('/'), menulst_fullpath)

        # produce ROM image
        debug.verbose("Building QEMU EFI image.")
        #        debug.checkcmd(["make", self._machine.imagename],
        #                cwd=self._machine.options.builds[0].build_dir)

        debug.checkcmd(["make"] + modules.get_build_targets(),
                       cwd=self._machine.options.builds[0].build_dir)

        efiimage.build_bf_efi_img(self._machine.kernel_img,
                                  self._machine.options.builds[0].build_dir,
                                  modules.get_build_targets(),
                                  menulst_fullpath, None)
Example #18
0
 def __rackboot(self, args):
     debug.checkcmd([RACKBOOT] + args + [self.get_machine_name()])
Example #19
0
 def __usbboot(self):
     imagename = os.path.join(self.builddir, IMAGE_NAME)
     debug.verbose("Usbbooting pandaboard; press reset")
     debug.checkcmd(["usbboot", imagename])
Example #20
0
 def set_bootmodules(self, modules):
     menulst_fullpath = os.path.join(self.builddir, "platforms", "arm",
                                     "menu.lst.armv7_pandaboard")
     self._write_menu_lst(modules.get_menu_data("/"), menulst_fullpath)
     debug.verbose("building proper pandaboard image")
     debug.checkcmd(["make", IMAGE_NAME], cwd=self.builddir)
Example #21
0
 def __usbboot(self):
     debug.verbose("Usbbooting pandaboard; press reset")
     debug.verbose("build dir: %s" % self.builddir)
     debug.checkcmd(["make", "usbboot_panda"], cwd=self.builddir)
Example #22
0
 def __rackpower(self, arg):
     try:
         debug.checkcmd([RACKPOWER, arg, self.get_machine_name()])
     except subprocess.CalledProcessError:
         debug.warning("rackpower %s %s failed" %
                       (arg, self.get_machine_name()))
Example #23
0
 def __rackpower(self, arg):
     try:
         debug.checkcmd([RACKPOWER, arg, self.get_machine_name()])
     except subprocess.CalledProcessError:
         debug.warning("rackpower %s %s failed" %
                       (arg, self.get_machine_name()))
Example #24
0
 def __rackboot(self, args):
     debug.checkcmd([RACKBOOT] + args + [self.get_machine_name()])
 def __usbboot(self):
     self._colibri_devtty()
     debug.verbose("Usbbooting imx8x")
     debug.verbose("build dir: %s" % self._machine.options.builds[0].build_dir)
     debug.checkcmd(["make", "usbboot_imx8x"],
             cwd=self._machine.options.builds[0].build_dir)
Example #26
0
 def build(self, targets):
     makeopts = self.split_env(os.environ.get('MAKEOPTS', ''))
     debug.checkcmd(["make"] + makeopts + targets, cwd=self.build_dir)
Example #27
0
 def build(self, targets):
     makeopts = self.split_env(os.environ.get('MAKEOPTS', ''))
     debug.checkcmd(["make"] + makeopts + targets, cwd=self.build_dir)
Example #28
0
 def install(self, targets, path):
     debug.checkcmd(["make", "install",
                            "INSTALL_PREFIX=%s" % path,
                            "MODULES=%s" % (" ".join(targets))],
                    cwd=self.build_dir)
 def __usbboot(self):
     debug.checkcmd([
         BFBOOT,
         "--bf", self.target_name,
         "--board", self.__get_colibri_num()])