[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-174-ge37ec54
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-03-19 21:12:24
|
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 e37ec54346c729798efc556478aecbdf29bd6be9 (commit)
via bbbeb453f1e6a4a5cea71cad04de0eeabcd9e759 (commit)
via a994fca17afa41b03a218f292bff0b44e8d4049f (commit)
from 65ad8807bdebe74c960124e5650551fce8a4eb76 (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 e37ec54346c729798efc556478aecbdf29bd6be9
Merge: bbbeb45 65ad880
Author: Eric Jarrige <eri...@ar...>
Date: Mon Mar 19 22:23:07 2012 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit bbbeb453f1e6a4a5cea71cad04de0eeabcd9e759
Author: Eric Jarrige <eri...@ar...>
Date: Mon Mar 19 22:22:14 2012 +0100
[UBOOT] apf51: check <ctrl>-c on boot to cancel fpga download
commit a994fca17afa41b03a218f292bff0b44e8d4049f
Author: Eric Jarrige <eri...@ar...>
Date: Mon Mar 19 22:21:26 2012 +0100
[UBOOT] apf9328: check <ctrl>-c on boot to cancel fpga download
-----------------------------------------------------------------------
Summary of changes:
patches/u-boot/2011.12/03-apf9328.patch | 12 +++++++---
patches/u-boot/2011.12/401-apf51.patch | 6 +++-
software/uboot_recover/apf51_recover.py | 33 +++++++++++++++----------------
3 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/patches/u-boot/2011.12/03-apf9328.patch b/patches/u-boot/2011.12/03-apf9328.patch
index d1abe33..752743b 100644
--- a/patches/u-boot/2011.12/03-apf9328.patch
+++ b/patches/u-boot/2011.12/03-apf9328.patch
@@ -197,7 +197,7 @@ Index: u-boot-custom/board/armadeus/apf9328/apf9328fpga.c
===================================================================
--- /dev/null
+++ u-boot-custom/board/armadeus/apf9328/apf9328fpga.c
-@@ -0,0 +1,89 @@
+@@ -0,0 +1,93 @@
+/*
+ * (C) Copyright 2005-2011
+ * Nicolas Colombin <th...@us...>
@@ -277,13 +277,17 @@ Index: u-boot-custom/board/armadeus/apf9328/apf9328fpga.c
+ }
+
+ if ((autoload) && (0 == strcmp(autoload, "1"))) {
-+ if (FPGA_SUCCESS != fpga_load(0, (void *)CONFIG_FIRMWARE_ADDR,
-+ (size_t) CONFIG_FIRMWARE_LEN)) {
++ if (ctrlc()) {
++ printf("Firmware download stopped!\n");
++ lout = 0;
++ } else if (FPGA_SUCCESS != fpga_load(0,
++ (void *)CONFIG_FIRMWARE_ADDR,
++ (size_t) CONFIG_FIRMWARE_LEN)) {
+ lout = 0;
+ printf("Firmware not loaded!\n");
+ }
+ }
-+ return 1;
++ return lout;
+}
+
+#endif /* CONFIG_FPGA */
diff --git a/patches/u-boot/2011.12/401-apf51.patch b/patches/u-boot/2011.12/401-apf51.patch
index 9818093..5ef9f71 100644
--- a/patches/u-boot/2011.12/401-apf51.patch
+++ b/patches/u-boot/2011.12/401-apf51.patch
@@ -2,7 +2,7 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-custom/board/armadeus/apf51/apf51.c 2012-01-12 17:19:58.434303119 +0100
-@@ -0,0 +1,1242 @@
+@@ -0,0 +1,1244 @@
+/*
+ * (C) Copyright 2010-2012 Eric Jarrige, Armadeus Project
+ *
@@ -975,7 +975,9 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
+ if ((s = getenv("firmware_len")) != NULL) {
+ end = offset + simple_strtoul(s, NULL, 16);
+ }
-+ if ((-1 != offset) && (offset != end)) {
++ if (ctrlc()) {
++ printf("Firmware download stopped!\n");
++ } else if ((-1 != offset) && (offset != end)) {
+ size = read_firmware(offset, end, firmware_buffer);
+ }
+ }
diff --git a/software/uboot_recover/apf51_recover.py b/software/uboot_recover/apf51_recover.py
index 9e31cdd..85778b4 100644
--- a/software/uboot_recover/apf51_recover.py
+++ b/software/uboot_recover/apf51_recover.py
@@ -412,7 +412,6 @@ class UBoot:
def __getOutput(self, error_msg=None):
""" This function waits for U-Boot answer and returns it"""
- #debugser = serial.Serial("/dev/tty0",115200,timeout=1)
response = ""
while not re.search(r'BIOS>', response):
char = self.serial.read(1)
@@ -422,23 +421,23 @@ class UBoot:
if error_msg!=None:
if re.search(error_msg,response):
raise Error("getOutput error")
-
- sys.stdout.write(response)
- #debugser.write(char)
- #debugser.close()
+ #sys.stdout.write(char)
return response
def resetEnv(self):
+ self.serial.flushInput()
self.serial.write("run flash_reset_env\n")
return self.__getOutput()
def waitForPrompt(self):
- time.sleep(1)
- self.serial.write("\n")
+ self.serial.write("\003")
+ while not self.serial.inWaiting():
+ self.serial.write("\003")
return self.__getOutput()
def flash(self):
""" Ask U-Boot to flash itself """
+ self.serial.flushInput()
self.serial.write("run flash_uboot\n")
try:
ret = self.__getOutput()
@@ -537,6 +536,16 @@ if __name__ == "__main__":
if port is '':
port = '/dev/ttyACM0'
+ try:
+ ser = serial.Serial(port, SPEED, timeout=2)
+ except Exception, msg:
+ print "unable to open serial port %s !" % port
+ print msg
+ sys.exit()
+ ser.flush()
+
+ uboot = UBoot(ser)
+
usb = USBDevice()
apfBootloader = apf51Bootloader(usb)
@@ -554,16 +563,6 @@ if __name__ == "__main__":
print "Loading %s, size = %d bytes" % (BINARY, os.path.getsize(BINARY))
apfBootloader.download("90000000", BINARY, fsize, "AA")
- try:
- ser = serial.Serial(port, SPEED, timeout=2)
- except Exception, msg:
- print "unable to open serial port %s !" % port
- print msg
- sys.exit()
- ser.flush()
-
- uboot = UBoot(ser)
-
# execute loaded code:
apfBootloader.put("90000000", "90000004", "l")
#self.bootstrap.getStatus() ?
hooks/post-receive
--
armadeus
|