[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-471-g18964a5
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2013-09-30 15:12:00
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 18964a5324a3f2b4aa4c30522dc6bf889a8d1b99 (commit)
via 3e6b47d54ddfa5328f7dcfb55e9c342c5e828d98 (commit)
from b93ab00c3e8d6babed0d78a5fe1d0e5f29f53004 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 18964a5324a3f2b4aa4c30522dc6bf889a8d1b99
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 30 17:24:12 2013 +0200
[TOOLS] apf27: Fix U-Boot recover tool capabilities to reset env variables - enhance to download U-Boot binary image from our server
commit 3e6b47d54ddfa5328f7dcfb55e9c342c5e828d98
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 30 17:23:18 2013 +0200
[TOOLS] apf9328: use defined u-boot binary finename
-----------------------------------------------------------------------
Summary of changes:
software/uboot_recover/apf27_recover.py | 32 +++++++++++++++++++++-------
software/uboot_recover/apf9328_recover.py | 2 +-
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/software/uboot_recover/apf27_recover.py b/software/uboot_recover/apf27_recover.py
index aa039a2..df05c6b 100644
--- a/software/uboot_recover/apf27_recover.py
+++ b/software/uboot_recover/apf27_recover.py
@@ -290,9 +290,10 @@ class apf27Bootloader:
class UBoot:
"""
"""
- def __init__(self, bootstrap, serial):
+ def __init__(self, bootstrap, serial, binary):
self.bootstrap = bootstrap
self.serial = serial
+ self.binary = binary
def __getOutput(self,error_msg=None):
""" This function waits for U-Boot response and return response"""
@@ -312,15 +313,14 @@ class UBoot:
return response
def load(self):
- BINARY = "apf27-u-boot-nand.bin"
- if not os.path.exists(BINARY):
- raise Error("file "+BINARY+" doesn't exit",0)
- self.fsize = "%08x" % os.path.getsize(BINARY) #os.stat(filesize)[6]
- self.bootstrap.download("A0000000", BINARY, self.fsize)
+ if not os.path.exists(self.binary):
+ raise Error("file "+self.binary+" doesn't exit",0)
+ self.fsize = "%08x" % os.path.getsize(self.binary) #os.stat(filesize)[6]
+ self.bootstrap.download("A0000000", self.binary, self.fsize)
def resetenv(self):
self.serial.flushInput()
- self.serial.write("run flash_reset_env\n")
+ self.serial.write("env default -f && saveenv && echo Flash environment variables erased!\n")
return self.__getOutput()
def waitForPrompt(self):
@@ -346,6 +346,22 @@ class UBoot:
if __name__ == "__main__":
+ RECOVERY_URL = "http://sourceforge.net/projects/armadeus/files/armadeus/"
+ RECOVERY_VERSION = "armadeus-5.2"
+ RECOVERY_BOARD_PATH = "binaries/apf27/"
+ UBOOT_IMAGE_BIN = "apf27-u-boot-nand.bin"
+ UBOOT_RECOVERY_PATH = RECOVERY_URL+RECOVERY_VERSION+"/"+RECOVERY_BOARD_PATH+UBOOT_IMAGE_BIN+"/download"
+ if not os.path.exists(UBOOT_IMAGE_BIN):
+ try:
+ print "Downloading " + UBOOT_IMAGE_BIN + ".."
+ os.system("wget -O "+ UBOOT_IMAGE_BIN + " " +UBOOT_RECOVERY_PATH)
+ except Exception, msg:
+ print "Failed to download U-Boot image file from server!"
+ print msg
+ print "Server may be unavailable for the momenet. please try later."
+ os.remove(UBOOT_IMAGE_BIN);
+ sys.exit()
+
SPEED = 115200
print "\nAPF27 Bootstrap Tool\n"
@@ -362,7 +378,7 @@ if __name__ == "__main__":
ser.flush()
apfBootloader = apf27Bootloader(ser)
- uboot = UBoot(apfBootloader, ser)
+ uboot = UBoot(apfBootloader, ser, UBOOT_IMAGE_BIN)
apfBootloader.getstatus()
apfBootloader.initSDRAM1()
diff --git a/software/uboot_recover/apf9328_recover.py b/software/uboot_recover/apf9328_recover.py
index aa6eb45..a590842 100644
--- a/software/uboot_recover/apf9328_recover.py
+++ b/software/uboot_recover/apf9328_recover.py
@@ -62,7 +62,7 @@ if __name__ == "__main__":
apfBootloader = imxlBootloader(ser, ramSize)
apfBootloader.sync()
eraseAll = raw_input('Would you like to erase the environment variables? y/n: ')
- apfBootloader.loadFlashbin("apf9328-u-boot.bin", "10000000", eraseAll)
+ apfBootloader.loadFlashbin(UBOOT_IMAGE_BIN, "10000000", eraseAll)
print "uBoot successfully recovered !"
del ser
hooks/post-receive
--
armadeus
|