diff options
author | George Kraft <george.kraft@calxeda.com> | 2012-08-21 12:10:14 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2012-08-21 12:10:14 -0500 |
commit | 306c927555a6658ad2f1d80b00b0085df2762713 (patch) | |
tree | 4d16832ee0eb7db6f7e6047927d249058babf7c4 | |
parent | ed23638f07bb12693075235ce7abe0c6bebadcde (diff) | |
download | cxmanage-306c927555a6658ad2f1d80b00b0085df2762713.tar.gz |
Add Calxeda license to cid / reg ID files
-rw-r--r-- | cxmanage/data/cids | 30 | ||||
-rw-r--r-- | cxmanage/data/registers | 30 | ||||
-rw-r--r-- | cxmanage/infodump.py | 13 |
3 files changed, 71 insertions, 2 deletions
diff --git a/cxmanage/data/cids b/cxmanage/data/cids index 936eb12..a12e5e7 100644 --- a/cxmanage/data/cids +++ b/cxmanage/data/cids @@ -1,3 +1,33 @@ +# Copyright (c) 2012, Calxeda Inc. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Calxeda Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + 00000001 00000002 00000003 diff --git a/cxmanage/data/registers b/cxmanage/data/registers index 88c3f19..5b813c3 100644 --- a/cxmanage/data/registers +++ b/cxmanage/data/registers @@ -1,3 +1,33 @@ +# Copyright (c) 2012, Calxeda Inc. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Calxeda Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + 40000000 40000400 40000404 diff --git a/cxmanage/infodump.py b/cxmanage/infodump.py index 4a3890a..4bc52ac 100644 --- a/cxmanage/infodump.py +++ b/cxmanage/infodump.py @@ -207,7 +207,12 @@ def print_ubootenv(tftp, target): def print_cdb(target, cids=None): """ Print info for each CDB entry. """ if cids == None: - cids = resource_string('cxmanage', 'data/cids').split() + string = resource_string('cxmanage', 'data/cids') + cids = set() + for line in string.splitlines(): + for entry in line.partition('#')[0].split(): + cids.add(entry) + cids = sorted(cids) for cid in cids: print '[ CDB %s ]' % cid @@ -266,7 +271,11 @@ def get_register_ranges(regfile=None): else: string = open(regfile).read() - registers = sorted(set(int(x, 16) for x in string.split())) + registers = set() + for line in string.splitlines(): + for entry in line.partition('#')[0].split(): + registers.add(int(entry, 16)) + registers = sorted(registers) # Build register ranges register_ranges = [] |