origen 0.7.16 → 0.7.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/origen +59 -55
- data/config/version.rb +1 -1
- metadata +2 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c364ae7c1293812d927894e5042f043e2193239
|
4
|
+
data.tar.gz: 6e82db6660eb123f319c0881067137241f4248c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbb1240b5fd303bd0b13b597ba69680cf2eda70a68637256037967123dd0c61b492edb084c584a4ee59d96e8ea78e839118ae73ff8afd57a434b6130c6b16247
|
7
|
+
data.tar.gz: c94692a764b48cc68b3e50ee3e2962205c31023a5e70856a80d4eec852e46597bc9591f1067b76b233979a06786f4c7f87a53dca299241c7d2af4a23fb2e0243
|
data/bin/origen
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
$VERBOSE=nil # Don't care about world writable dir warnings and the like
|
2
|
+
$VERBOSE = nil # Don't care about world writable dir warnings and the like
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'pathname'
|
5
|
+
require 'fileutils'
|
6
6
|
|
7
7
|
class OrigenBootError < StandardError
|
8
8
|
end
|
9
9
|
|
10
|
-
ORIGEN_MIN_GCC_VERSION =
|
10
|
+
ORIGEN_MIN_GCC_VERSION = '4.6.3'
|
11
11
|
|
12
12
|
# Keep a note of the pwd at the time when Origen was first loaded, this is initially used
|
13
13
|
# by the site_config lookup.
|
@@ -20,12 +20,12 @@ load File.expand_path('../../lib/origen/site_config.rb', __FILE__)
|
|
20
20
|
# the process is different than the one that actually runs under bundler
|
21
21
|
$origen_launch_root = Pathname.new(File.dirname(__FILE__)).parent
|
22
22
|
|
23
|
-
# Override any influence from $LANG in the users environment
|
23
|
+
# Override any influence from $LANG in the users environment
|
24
24
|
Encoding.default_external = Encoding::UTF_8
|
25
25
|
Encoding.default_internal = Encoding::UTF_8
|
26
26
|
ENV['LC_ALL'] = nil
|
27
27
|
ENV['LANG'] = nil
|
28
|
-
ENV['LANG'] = 'en_US.UTF-8'
|
28
|
+
ENV['LANG'] = 'en_US.UTF-8'
|
29
29
|
|
30
30
|
# Work out what Origen.root is if we are running inside an Origen application, this will be
|
31
31
|
# later used to execute from that app's bundle even if the origen executable lives somewhere
|
@@ -47,15 +47,15 @@ end
|
|
47
47
|
if origen_root
|
48
48
|
# If it looks like a bundled binstub of origen exists, and we have not been invoked through that,
|
49
49
|
# then run that instead.
|
50
|
-
if Origen.site_config.gem_manage_bundler && File.exist?("#{origen_root}/lbin/origen") && !ENV[
|
51
|
-
|
50
|
+
if Origen.site_config.gem_manage_bundler && File.exist?("#{origen_root}/lbin/origen") && !ENV['BUNDLE_BIN_PATH'] &&
|
51
|
+
File.exist?(File.expand_path(Origen.site_config.gem_install_dir))
|
52
52
|
exec Gem.ruby, "#{origen_root}/lbin/origen", *ARGV
|
53
53
|
exit 0
|
54
54
|
else
|
55
55
|
# Force everyone to have a consistent way of installing gems with bundler
|
56
|
-
ENV['BUNDLE_GEMFILE'] = File.join(origen_root,
|
56
|
+
ENV['BUNDLE_GEMFILE'] = File.join(origen_root, 'Gemfile')
|
57
57
|
ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
|
58
|
-
ENV['BUNDLE_BIN'] = File.join(origen_root,
|
58
|
+
ENV['BUNDLE_BIN'] = File.join(origen_root, 'lbin')
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -82,16 +82,16 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
82
82
|
Bundler.setup
|
83
83
|
fail OrigenBootError unless File.exist?(ENV['BUNDLE_BIN'])
|
84
84
|
rescue Gem::LoadError, Bundler::BundlerError, OrigenBootError => e
|
85
|
-
cmd = "bundle install --gemfile #{ENV[
|
86
|
-
#puts cmd
|
87
|
-
puts
|
85
|
+
cmd = "bundle install --gemfile #{ENV['BUNDLE_GEMFILE']} --binstubs #{ENV['BUNDLE_BIN']} --path #{ENV['BUNDLE_PATH']}"
|
86
|
+
# puts cmd
|
87
|
+
puts 'Installing required gems...'
|
88
88
|
puts
|
89
89
|
`chmod o-w #{origen_root}` # Stops some annoying world writable warnings during install
|
90
90
|
`chmod o-w #{origen_root}/bin` if File.exist?("#{origen_root}/bin")
|
91
91
|
`chmod o-w #{origen_root}/.bin` if File.exist?("#{origen_root}/.bin")
|
92
92
|
result = false
|
93
93
|
|
94
|
-
# Set this here since the clean environment will not have access to the ENV variable
|
94
|
+
# Set this here since the clean environment will not have access to the ENV variable
|
95
95
|
local_gem_dir = "#{ENV['BUNDLE_PATH']}/ruby/#{Pathname.new(Gem.dir).basename}"
|
96
96
|
|
97
97
|
Bundler.with_clean_env do
|
@@ -102,15 +102,15 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
gcc_version = begin
|
105
|
-
begin
|
106
|
-
line =
|
105
|
+
begin
|
106
|
+
line = `gcc --version`.split("\n").first
|
107
107
|
rescue
|
108
108
|
puts "You don't seem to have gcc available, make sure you following the Origen installation instructions:"
|
109
|
-
puts
|
109
|
+
puts 'http://origen-sdk.org/origen/latest/guides/starting/installing/'
|
110
110
|
exit 1
|
111
111
|
end
|
112
112
|
if line =~ /(\d+\.\d+\.\d+)/
|
113
|
-
|
113
|
+
Regexp.last_match(1)
|
114
114
|
end
|
115
115
|
end
|
116
116
|
if gcc_version
|
@@ -119,7 +119,7 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
119
119
|
exit 1
|
120
120
|
end
|
121
121
|
else
|
122
|
-
puts
|
122
|
+
puts 'Unable to determine gcc version, proceeding with fingers crossed...'
|
123
123
|
end
|
124
124
|
# Need to compact the system gem specs array to remove reference to any nil elements which will cause an error below.
|
125
125
|
system_gem_specs.compact!
|
@@ -134,31 +134,37 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
134
134
|
system_gem_specs.each do |spec|
|
135
135
|
begin
|
136
136
|
(spec.executables || []).each do |bin|
|
137
|
-
|
137
|
+
unless File.exist?("#{local_gem_dir}/bin/#{bin}")
|
138
|
+
FileUtils.cp("#{spec.bin_dir}/#{bin}", "#{local_gem_dir}/bin")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
p = Pathname.new(spec.cache_file)
|
142
|
+
unless File.exist?("#{local_gem_dir}/cache/#{p.basename}")
|
143
|
+
FileUtils.cp(spec.cache_file, "#{local_gem_dir}/cache")
|
138
144
|
end
|
139
|
-
if !File.exist(spec.cache_file)
|
140
|
-
FileUtils.cp(spec.cache_file, "#{local_gem_dir}/cache")
|
141
|
-
end
|
142
145
|
if spec.extension_dir && File.exist?(spec.extension_dir)
|
143
146
|
spec.extension_dir =~ /.*extensions(.*)/
|
144
|
-
sub_dir = Pathname.new(
|
147
|
+
sub_dir = Pathname.new(Regexp.last_match(1)).dirname.to_s
|
145
148
|
local_ext_dir = "#{local_gem_dir}/extensions/#{sub_dir}"
|
146
149
|
FileUtils.mkdir_p(local_ext_dir) unless File.exist?(local_ext_dir)
|
147
150
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
151
|
+
# If the file exists in the extensions directory, skip copying it over.
|
152
|
+
p = Pathname.new(spec.extension_dir)
|
153
|
+
unless File.exist?("#{local_ext_dir}/#{p.basename}")
|
154
|
+
FileUtils.cp_r(spec.extension_dir, local_ext_dir)
|
155
|
+
end
|
152
156
|
end
|
153
|
-
|
154
|
-
|
155
|
-
|
157
|
+
|
158
|
+
# If the file exists in the gem directory, skip copying it over.
|
159
|
+
p = Pathname.new(spec.gem_dir)
|
160
|
+
unless File.exist?("#{local_gem_dir}/gems/#{p.basename}")
|
156
161
|
FileUtils.cp_r(spec.gem_dir, "#{local_gem_dir}/gems")
|
157
|
-
|
158
|
-
|
159
|
-
|
162
|
+
end
|
163
|
+
# If the file exists in the specifications directory, skip copying it over.
|
164
|
+
p = Pathname.new(spec.spec_file)
|
165
|
+
unless File.exist?("#{local_gem_dir}/specifications/#{p.basename}")
|
160
166
|
FileUtils.cp(spec.spec_file, "#{local_gem_dir}/specifications")
|
161
|
-
|
167
|
+
end
|
162
168
|
rescue
|
163
169
|
puts "Had problems installing #{spec.name} from your system Ruby, proceeding with fingers crossed..."
|
164
170
|
end
|
@@ -167,7 +173,7 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
167
173
|
end
|
168
174
|
result = system(cmd)
|
169
175
|
end
|
170
|
-
`chmod o-w #{ENV[
|
176
|
+
`chmod o-w #{ENV['BUNDLE_BIN']}`
|
171
177
|
# Make .bat versions of all executables, Bundler should really be doing this when running
|
172
178
|
# on windows
|
173
179
|
if Origen.os.windows?
|
@@ -181,15 +187,15 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
181
187
|
end
|
182
188
|
end
|
183
189
|
if !bat_present && !result
|
184
|
-
puts
|
190
|
+
puts 'Some Windows specific updates to your workspace were required, please re-run the last command'
|
185
191
|
exit 0
|
186
192
|
end
|
187
193
|
end
|
188
194
|
if result
|
189
195
|
# This is a shim to help NXP run regression tests between an old version of an app running
|
190
196
|
# RGen and a new version running Origen
|
191
|
-
origen = File.join(ENV['BUNDLE_BIN'],
|
192
|
-
rgen = File.join(ENV['BUNDLE_BIN'],
|
197
|
+
origen = File.join(ENV['BUNDLE_BIN'], 'origen')
|
198
|
+
rgen = File.join(ENV['BUNDLE_BIN'], 'rgen')
|
193
199
|
if File.exist?(rgen) && !File.exist?(origen) && Origen.os.linux?
|
194
200
|
exec "ln -s #{rgen} #{origen}"
|
195
201
|
end
|
@@ -206,18 +212,18 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
206
212
|
Bundler.setup
|
207
213
|
end
|
208
214
|
end
|
209
|
-
require
|
210
|
-
require
|
215
|
+
require 'bundler/setup'
|
216
|
+
require 'origen'
|
211
217
|
else
|
212
218
|
$LOAD_PATH.unshift "#{File.expand_path(File.dirname(__FILE__))}/../lib"
|
213
|
-
require
|
219
|
+
require 'origen'
|
214
220
|
end
|
215
221
|
|
216
222
|
# This is a shim to help NXP run regression tests between an old version of an app running
|
217
223
|
# RGen and a new version running Origen
|
218
224
|
# If RGen < 3 is present then abort the process here and execute the rgen bin file instead
|
219
225
|
begin
|
220
|
-
require
|
226
|
+
require 'rgen'
|
221
227
|
if RGen.version.major == 2
|
222
228
|
exec Gem.ruby, "#{RGen.top}/bin/rgen", *ARGV
|
223
229
|
exit 0
|
@@ -231,22 +237,22 @@ begin
|
|
231
237
|
# up all commands, if not then only allow the command to create a new Origen
|
232
238
|
# application.
|
233
239
|
if origen_root
|
234
|
-
require
|
240
|
+
require 'origen/commands'
|
235
241
|
else
|
236
|
-
require
|
242
|
+
require 'origen/commands_global'
|
237
243
|
end
|
238
244
|
rescue Exception => e
|
239
245
|
unless e.is_a?(SystemExit) && e.status == 0
|
240
246
|
puts
|
241
247
|
if Origen.app_loaded?
|
242
|
-
puts
|
243
|
-
puts
|
248
|
+
puts 'COMPLETE CALL STACK'
|
249
|
+
puts '-------------------'
|
244
250
|
puts e.message unless e.is_a?(SystemExit)
|
245
251
|
puts e.backtrace
|
246
252
|
|
247
253
|
puts
|
248
|
-
puts
|
249
|
-
puts
|
254
|
+
puts 'APPLICATION CALL STACK'
|
255
|
+
puts '----------------------'
|
250
256
|
puts e.message unless e.is_a?(SystemExit)
|
251
257
|
# Only print out the application stack trace by default, if verbose logging is
|
252
258
|
# enabled then output the full thing
|
@@ -254,15 +260,15 @@ rescue Exception => e
|
|
254
260
|
path = Pathname.new(line)
|
255
261
|
if path.absolute?
|
256
262
|
if line =~ /^#{Origen.root}/ && line !~ /^#{Origen.root}\/lbin/
|
257
|
-
puts line
|
263
|
+
puts line
|
258
264
|
end
|
259
265
|
else
|
260
266
|
puts line unless line =~ /^.\/lbin/
|
261
267
|
end
|
262
268
|
end
|
263
269
|
else
|
264
|
-
puts
|
265
|
-
puts
|
270
|
+
puts 'COMPLETE CALL STACK'
|
271
|
+
puts '-------------------'
|
266
272
|
puts e.message unless e.is_a?(SystemExit)
|
267
273
|
puts e.backtrace
|
268
274
|
end
|
@@ -270,9 +276,7 @@ rescue Exception => e
|
|
270
276
|
end
|
271
277
|
ensure
|
272
278
|
if Origen.app_loaded?
|
273
|
-
Origen.app.listeners_for(:on_origen_shutdown).each
|
274
|
-
listener.on_origen_shutdown
|
275
|
-
end
|
279
|
+
Origen.app.listeners_for(:on_origen_shutdown).each(&:on_origen_shutdown)
|
276
280
|
Origen.app.runner.shutdown
|
277
281
|
end
|
278
282
|
end
|
data/config/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
@@ -324,90 +324,6 @@ dependencies:
|
|
324
324
|
- - '='
|
325
325
|
- !ruby/object:Gem::Version
|
326
326
|
version: 0.12.4
|
327
|
-
- !ruby/object:Gem::Dependency
|
328
|
-
name: stackprof
|
329
|
-
requirement: !ruby/object:Gem::Requirement
|
330
|
-
requirements:
|
331
|
-
- - "~>"
|
332
|
-
- !ruby/object:Gem::Version
|
333
|
-
version: '0'
|
334
|
-
type: :development
|
335
|
-
prerelease: false
|
336
|
-
version_requirements: !ruby/object:Gem::Requirement
|
337
|
-
requirements:
|
338
|
-
- - "~>"
|
339
|
-
- !ruby/object:Gem::Version
|
340
|
-
version: '0'
|
341
|
-
- !ruby/object:Gem::Dependency
|
342
|
-
name: origen_core_support
|
343
|
-
requirement: !ruby/object:Gem::Requirement
|
344
|
-
requirements:
|
345
|
-
- - '='
|
346
|
-
- !ruby/object:Gem::Version
|
347
|
-
version: 0.2.3
|
348
|
-
type: :development
|
349
|
-
prerelease: false
|
350
|
-
version_requirements: !ruby/object:Gem::Requirement
|
351
|
-
requirements:
|
352
|
-
- - '='
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
version: 0.2.3
|
355
|
-
- !ruby/object:Gem::Dependency
|
356
|
-
name: origen_doc_helpers
|
357
|
-
requirement: !ruby/object:Gem::Requirement
|
358
|
-
requirements:
|
359
|
-
- - ">="
|
360
|
-
- !ruby/object:Gem::Version
|
361
|
-
version: 0.2.0
|
362
|
-
type: :development
|
363
|
-
prerelease: false
|
364
|
-
version_requirements: !ruby/object:Gem::Requirement
|
365
|
-
requirements:
|
366
|
-
- - ">="
|
367
|
-
- !ruby/object:Gem::Version
|
368
|
-
version: 0.2.0
|
369
|
-
- !ruby/object:Gem::Dependency
|
370
|
-
name: loco
|
371
|
-
requirement: !ruby/object:Gem::Requirement
|
372
|
-
requirements:
|
373
|
-
- - ">="
|
374
|
-
- !ruby/object:Gem::Version
|
375
|
-
version: '0'
|
376
|
-
type: :development
|
377
|
-
prerelease: false
|
378
|
-
version_requirements: !ruby/object:Gem::Requirement
|
379
|
-
requirements:
|
380
|
-
- - ">="
|
381
|
-
- !ruby/object:Gem::Version
|
382
|
-
version: '0'
|
383
|
-
- !ruby/object:Gem::Dependency
|
384
|
-
name: origen_testers
|
385
|
-
requirement: !ruby/object:Gem::Requirement
|
386
|
-
requirements:
|
387
|
-
- - "~>"
|
388
|
-
- !ruby/object:Gem::Version
|
389
|
-
version: '0'
|
390
|
-
type: :development
|
391
|
-
prerelease: false
|
392
|
-
version_requirements: !ruby/object:Gem::Requirement
|
393
|
-
requirements:
|
394
|
-
- - "~>"
|
395
|
-
- !ruby/object:Gem::Version
|
396
|
-
version: '0'
|
397
|
-
- !ruby/object:Gem::Dependency
|
398
|
-
name: origen_debuggers
|
399
|
-
requirement: !ruby/object:Gem::Requirement
|
400
|
-
requirements:
|
401
|
-
- - "~>"
|
402
|
-
- !ruby/object:Gem::Version
|
403
|
-
version: '0'
|
404
|
-
type: :development
|
405
|
-
prerelease: false
|
406
|
-
version_requirements: !ruby/object:Gem::Requirement
|
407
|
-
requirements:
|
408
|
-
- - "~>"
|
409
|
-
- !ruby/object:Gem::Version
|
410
|
-
version: '0'
|
411
327
|
description:
|
412
328
|
email:
|
413
329
|
- stephen.f.mcginty@gmail.com
|
@@ -652,7 +568,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
652
568
|
version: 1.8.11
|
653
569
|
requirements: []
|
654
570
|
rubyforge_project:
|
655
|
-
rubygems_version: 2.
|
571
|
+
rubygems_version: 2.5.1
|
656
572
|
signing_key:
|
657
573
|
specification_version: 4
|
658
574
|
summary: The Semiconductor Developer's Kit
|