Subversion Repositories freemyipod

Rev

Rev 173 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 173 Rev 174
Line 604... Line 604...
604
            <addr_mem>: the address in memory to copy the data to
604
            <addr_mem>: the address in memory to copy the data to
605
        """
605
        """
606
        addr_flash = self._hexint(addr_flash)
606
        addr_flash = self._hexint(addr_flash)
607
        addr_mem = self._hexint(addr_mem)
607
        addr_mem = self._hexint(addr_mem)
608
        size = self._hexint(size)
608
        size = self._hexint(size)
-
 
609
        self.logger.info("Dumping boot flash addresses "+self._hex(addr_flash)+" - "+
-
 
610
                         hex(addr_flash+size)+" to "+self._hex(addr_mem)+" - "+self._hex(addr_mem+size)+"\n")
609
        raise NotImplementedError
611
        self.embios.bootflashread(addr_flash, addr_mem, size)
610
 
612
 
611
    @command
613
    @command
612
    def writerawbootflash(self, addr_flash, addr_mem, size):
614
    def writerawbootflash(self, addr_flash, addr_mem, size, force=False):
613
        """
615
        """
614
            Writes <size> bytes from memory to bootflash.
616
            Writes <size> bytes from memory to bootflash.
615
            ATTENTION: Don't call this unless you really know what you're doing!
617
            ATTENTION: Don't call this unless you really know what you're doing!
616
            This may BRICK your device (unless it has a good recovery option)
618
            This may BRICK your device (unless it has a good recovery option)
617
            <addr_mem>: the address in memory to copy the data from
619
            <addr_mem>: the address in memory to copy the data from
618
            <addr_bootflsh>: the address in bootflash to write to
620
            <addr_bootflsh>: the address in bootflash to write to
-
 
621
            <force>: Use this flag to suppress the 5 seconds delay
619
        """
622
        """
620
        addr_flash = self._hexint(addr_flash)
623
        addr_flash = self._hexint(addr_flash)
621
        addr_mem = self._hexint(addr_mem)
624
        addr_mem = self._hexint(addr_mem)
622
        size = self._hexint(size)
625
        size = self._hexint(size)
-
 
626
        force = self._bool(force)
-
 
627
        self.logger.info("Writing boot flash from the memory in "+self._hex(addr_mem)+" - "+
-
 
628
                         hex(addr_mem+size)+" to "+self._hex(addr_flash)+" - "+self._hex(addr_flash+size)+"\n")
-
 
629
        if force == False:
-
 
630
            self.logger.info("If this was not what you intended press Ctrl-C NOW")
-
 
631
            import time
-
 
632
            for i in range(5):
-
 
633
                self.logger.info(".")
623
        raise NotImplementedError
634
                time.sleep(1)
-
 
635
            self.logger.info("\n")
-
 
636
        self.embios.bootflashwrite(addr_flash, addr_mem, size)
624
 
637
 
625
    @command
638
    @command
626
    def flushcaches(self):
639
    def flushcaches(self):
627
        """
640
        """
628
            Flushes the CPUs data and instruction caches.
641
            Flushes the CPUs data and instruction caches.