Subversion Repositories DevTools

Rev

Rev 5709 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5709 Rev 6133
Line 17... Line 17...
17
 
17
 
18
package LMOS_Build;
18
package LMOS_Build;
19
use JatsError;
19
use JatsError;
20
use Storable qw(dclone);
20
use Storable qw(dclone);
21
 
21
 
22
#
-
 
23
#   Create a hash of GBE_MACHTYPEs for which the LMOS platform is available
-
 
24
#   It won't just build on any old machine
-
 
25
#
-
 
26
#   Hash values are an array of platforms to replace the given platform
-
 
27
#   Note: The process is not recursive, thus the named plaforms MUST be
-
 
28
#         real platforms, not one that will expand into more platforms
-
 
29
#
-
 
30
my %valid_machines = (
-
 
31
    'linux_i386'             => [ 'LMOS_ARM9TDMI',
-
 
32
                                  'LMOS_LINUX_ETX',
-
 
33
                                  'LMOS_PPC_603E',
-
 
34
                                  'LMOS_COBRA',
-
 
35
                                  'LMOS_UBUNTU12',
-
 
36
                                  ],
-
 
37
    'win32'                  => [ 'LMOS_WIN32' ],
-
 
38
);
-
 
39
 
-
 
40
#-------------------------------------------------------------------------------
22
#-------------------------------------------------------------------------------
41
# Function        : new_platform
23
# Function        : new_platform
42
#
24
#
43
# Description     : Called when a new platform is being created
25
# Description     : Called when a new platform is being created
44
#                   The function can extend the build information
26
#                   The function can extend the build information
Line 55... Line 37...
55
{
37
{
56
    my $class = shift;              # Not really a class, but its called like a class
38
    my $class = shift;              # Not really a class, but its called like a class
57
    my $pInfo  = shift;
39
    my $pInfo  = shift;
58
 
40
 
59
    #
41
    #
-
 
42
    #   Get the list of targets that have been tagged as LMOS
-
 
43
    #   
-
 
44
    my @targets = PlatformConfig::getTargetsByTag('LMOS');
-
 
45
 
-
 
46
    #
60
    #   Ignore this platform if there is no way that it can be built on the
47
    #   Ignore this platform if there is no way that it can be built on the
61
    #   current machine.
48
    #   current machine.
62
    #
49
    #
63
    my $entry = $valid_machines{$::GBE_MACHTYPE};
-
 
64
    unless ( $entry )
50
    unless ( @targets )
65
    {
51
    {
66
        Verbose ("LMOS will not build on this machine type: $::GBE_MACHTYPE");
52
        Verbose ("LMOS will not build on this machine type: $::GBE_MACHTYPE");
67
        $pInfo->{NOT_AVAILABLE} = 1;
53
        $pInfo->{NOT_AVAILABLE} = 1;
68
        return;
54
        return;
69
    }
55
    }
70
 
56
 
71
    #
57
    #
72
    #   Instantiate all targets
58
    #   Instantiate all targets
73
    #
59
    #
74
    foreach my $target ( @$entry )
60
    foreach my $target ( @targets )
75
    {
61
    {
76
        LMOS_generic(  dclone($pInfo), $target );
62
        LMOS_generic(  dclone($pInfo), 'LMOS_' . $target );
77
    }
63
    }
78
 
64
 
79
    #
65
    #
80
    #   All done
66
    #   All done
81
    #   Mark the original entry as a TEMPLATE so that it won't be added
67
    #   Mark the original entry as a TEMPLATE so that it won't be added