aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJose Vasconcellos <jvasco@verizon.net>2009-03-24 12:24:06 +0000
committerJose Vasconcellos <jvasco@verizon.net>2009-03-24 12:24:06 +0000
commitf3f03147f5bfc740936dfaa9e02fe86f88500add (patch)
tree7eed75261db4ecb6b0e17361bca323c8172d249c /scripts
parent80ab269aa9d9ca6d0f076f01bcd808afb982ea48 (diff)
downloadmaster-187ad058-f3f03147f5bfc740936dfaa9e02fe86f88500add.tar.gz
master-187ad058-f3f03147f5bfc740936dfaa9e02fe86f88500add.tar.bz2
master-187ad058-f3f03147f5bfc740936dfaa9e02fe86f88500add.zip
Add check for IXP42x A0 stepping.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15013 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rw-r--r--scripts/flashing/jungo-image.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/flashing/jungo-image.py b/scripts/flashing/jungo-image.py
index d4143ea6d0..9947e7c720 100644
--- a/scripts/flashing/jungo-image.py
+++ b/scripts/flashing/jungo-image.py
@@ -62,8 +62,19 @@ def start_server(server):
####################
def get_flash_size():
+ # make sure we don't have an A0 stepping
+ tn.write("cat /proc/cpuinfo\n")
+ buf = tn.read_until("Returned 0", 3)
+ if not buf:
+ print "Unable to obtain CPU information; make sure to not use A0 stepping!"
+ elif buf.find('rev 0') > 0:
+ print "Warning: IXP42x stepping A0 detected!"
+ if imagefile or url:
+ print "Error: No linux support for A0 stepping!"
+ sys.exit(2)
+
+ # now get flash size
tn.write("cat /proc/mtd\n")
- # wait for prompt
buf = tn.read_until("Returned 0", 3)
if buf:
i = buf.find('mtd0:')
@@ -167,7 +178,7 @@ for o, a in opts:
usage()
sys.exit(1)
elif o in ("-V", "--version"):
- print "%s: 0.10" % sys.argv[0]
+ print "%s: 0.11" % sys.argv[0]
sys.exit(1)
elif o in ("-d", "--no-dump"):
do_dump = 1