cpt_upgrader.py (9293:df7c3f99ebca) | cpt_upgrader.py (9332:ae2a5329ce96) |
---|---|
1#!/usr/bin/env python 2 3# Copyright (c) 2012 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 91 unchanged lines hidden (view full) --- 100 cpt.set(section_name, 'range_size', mem_size) 101 cpt.set(section_name, 'filename', mem_filename) 102 elif re.search('.*sys.*\.\w*mem$', sec): 103 # Due to the lack of information about a start address, 104 # this migration only works if there is a single memory in 105 # the system, thus starting at 0 106 raise ValueError("more than one memory detected (" + sec + ")") 107 | 1#!/usr/bin/env python 2 3# Copyright (c) 2012 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 91 unchanged lines hidden (view full) --- 100 cpt.set(section_name, 'range_size', mem_size) 101 cpt.set(section_name, 'filename', mem_filename) 102 elif re.search('.*sys.*\.\w*mem$', sec): 103 # Due to the lack of information about a start address, 104 # this migration only works if there is a single memory in 105 # the system, thus starting at 0 106 raise ValueError("more than one memory detected (" + sec + ")") 107 |
108def from_2(cpt): 109 for sec in cpt.sections(): 110 import re 111 # Search for a CPUs 112 if re.search('.*sys.*cpu', sec): 113 try: 114 junk = cpt.get(sec, 'instCnt') 115 cpt.set(sec, '_pid', '0') 116 except ConfigParser.NoOptionError: 117 pass 118 119 |
|
108migrations = [] 109migrations.append(from_0) 110migrations.append(from_1) | 120migrations = [] 121migrations.append(from_0) 122migrations.append(from_1) |
123migrations.append(from_2) |
|
111 112verbose_print = False 113 114def verboseprint(*args): 115 if not verbose_print: 116 return 117 for arg in args: 118 print arg, --- 96 unchanged lines hidden --- | 124 125verbose_print = False 126 127def verboseprint(*args): 128 if not verbose_print: 129 return 130 for arg in args: 131 print arg, --- 96 unchanged lines hidden --- |