| 227 |
dpurdie |
1 |
###############################################################################
|
| 7300 |
dpurdie |
2 |
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
|
| 227 |
dpurdie |
3 |
#
|
|
|
4 |
# File: PLATFORM/LMOS.cfg
|
|
|
5 |
#
|
|
|
6 |
# Contents: LMOS Build support
|
|
|
7 |
#
|
|
|
8 |
# This package is used during the processing of the build.pl file
|
|
|
9 |
# Values provided by this package are used to extend the Platform
|
|
|
10 |
# information as platforms are being created. This provides a
|
|
|
11 |
# powerful set of mechanism to extend the entire JATS toolset
|
|
|
12 |
#
|
|
|
13 |
###############################################################################
|
|
|
14 |
|
|
|
15 |
use strict;
|
|
|
16 |
use warnings;
|
|
|
17 |
|
|
|
18 |
package LMOS_Build;
|
|
|
19 |
use JatsError;
|
|
|
20 |
use Storable qw(dclone);
|
|
|
21 |
|
|
|
22 |
#-------------------------------------------------------------------------------
|
|
|
23 |
# Function : new_platform
|
|
|
24 |
#
|
|
|
25 |
# Description : Called when a new platform is being created
|
|
|
26 |
# The function can extend the build information
|
|
|
27 |
#
|
|
|
28 |
# The 'LINUX' platform will be converted into a 'suitable'
|
|
|
29 |
# platform for the current machine.
|
|
|
30 |
#
|
|
|
31 |
# Inputs : $pInfo - Reference to the platform build info hash
|
|
|
32 |
#
|
|
|
33 |
# Returns : Nothing yet
|
|
|
34 |
#
|
|
|
35 |
|
|
|
36 |
sub new_platform
|
|
|
37 |
{
|
|
|
38 |
my $class = shift; # Not really a class, but its called like a class
|
|
|
39 |
my $pInfo = shift;
|
|
|
40 |
|
|
|
41 |
#
|
| 6133 |
dpurdie |
42 |
# Get the list of targets that have been tagged as LMOS
|
|
|
43 |
#
|
|
|
44 |
my @targets = PlatformConfig::getTargetsByTag('LMOS');
|
|
|
45 |
|
|
|
46 |
#
|
| 227 |
dpurdie |
47 |
# Ignore this platform if there is no way that it can be built on the
|
|
|
48 |
# current machine.
|
|
|
49 |
#
|
| 6133 |
dpurdie |
50 |
unless ( @targets )
|
| 227 |
dpurdie |
51 |
{
|
|
|
52 |
Verbose ("LMOS will not build on this machine type: $::GBE_MACHTYPE");
|
|
|
53 |
$pInfo->{NOT_AVAILABLE} = 1;
|
|
|
54 |
return;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
#
|
|
|
58 |
# Instantiate all targets
|
|
|
59 |
#
|
| 6133 |
dpurdie |
60 |
foreach my $target ( @targets )
|
| 227 |
dpurdie |
61 |
{
|
| 6133 |
dpurdie |
62 |
LMOS_generic( dclone($pInfo), 'LMOS_' . $target );
|
| 227 |
dpurdie |
63 |
}
|
|
|
64 |
|
|
|
65 |
#
|
|
|
66 |
# All done
|
|
|
67 |
# Mark the original entry as a TEMPLATE so that it won't be added
|
|
|
68 |
# We have added cloned copies of it
|
|
|
69 |
#
|
|
|
70 |
$pInfo->{TEMPLATE} = 1;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
#-------------------------------------------------------------------------------
|
|
|
74 |
# Function : LMOS_generic
|
|
|
75 |
#
|
|
|
76 |
# Description : Take a clone of the buildinfo structure and specialise it
|
|
|
77 |
# for the required target
|
|
|
78 |
#
|
|
|
79 |
# Inputs : $pInfo - A clone of the buildinfo data
|
|
|
80 |
# $target - Name of the target platform
|
|
|
81 |
#
|
|
|
82 |
# Returns : Nothing
|
|
|
83 |
# The buildinfo MUST be added to the build system
|
|
|
84 |
#
|
|
|
85 |
sub LMOS_generic
|
|
|
86 |
{
|
|
|
87 |
my ($pInfo, $target) = @_;
|
|
|
88 |
Debug("LMOS_generic: $target");
|
|
|
89 |
|
|
|
90 |
#
|
|
|
91 |
# Request that a simple BuildAlias be created for this platform
|
|
|
92 |
# Use the original name of the TARGET
|
|
|
93 |
#
|
|
|
94 |
$pInfo->{ALIAS} = $pInfo->{TARGET};
|
|
|
95 |
|
|
|
96 |
# #
|
|
|
97 |
# # Specify the hardware family
|
|
|
98 |
# # Will be used to create an ALIAS
|
|
|
99 |
# #
|
|
|
100 |
# $pInfo->{HARDWARE} = uc($arch);
|
|
|
101 |
|
|
|
102 |
#
|
|
|
103 |
# Alter the 'TARGET' name
|
|
|
104 |
# This is allowed (expected)
|
|
|
105 |
#
|
|
|
106 |
$pInfo->{TARGET} = uc($target);
|
|
|
107 |
|
|
|
108 |
#
|
|
|
109 |
# Register this 'new' buildinfo entry with the build system
|
|
|
110 |
#
|
|
|
111 |
::AddBuildPlatformEntry( $pInfo );
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
1;
|
|
|
115 |
|