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_DEVLINUX_Build;
18
package LMOS_DEVLINUX_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_DEVLINUX platform is available
-
 
24
#   It won't just build on any old machine
-
 
25
#
-
 
26
#   Hash values are an array of:
-
 
27
#           Operating System
-
 
28
#           architecture
-
 
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
);
-
 
38
 
-
 
39
#-------------------------------------------------------------------------------
22
#-------------------------------------------------------------------------------
40
# Function        : new_platform
23
# Function        : new_platform
41
#
24
#
42
# Description     : Called when a new platform is being created
25
# Description     : Called when a new platform is being created
43
#                   The function can extend the build information
26
#                   The function can extend the build information
Line 54... Line 37...
54
{
37
{
55
    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
56
    my $pInfo  = shift;
39
    my $pInfo  = shift;
57
 
40
 
58
    #
41
    #
-
 
42
    #   Get the list of targets that have been tagged as LMOS and DEVLINUX
-
 
43
    #
-
 
44
    my @targets;   
-
 
45
    my @lmosTargets = PlatformConfig::getTargetsByTag('LMOS');
-
 
46
    my @devLinuxTargets = PlatformConfig::getTargetsByTag('DEVLINUX');
-
 
47
 
-
 
48
    my %lmosTargetsMap = map {$_ => 1} @lmosTargets;
-
 
49
    foreach ( @devLinuxTargets )
-
 
50
    {
-
 
51
        if (exists $lmosTargetsMap{$_} )
-
 
52
        {
-
 
53
            push @targets, $_;
-
 
54
        }
-
 
55
    }
-
 
56
    
-
 
57
    #
59
    #   Ignore this platform if there is no way that it can be built on the
58
    #   Ignore this platform if there is no way that it can be built on the
60
    #   current machine.
59
    #   current machine.
61
    #
60
    #
62
    my $entry = $valid_machines{$::GBE_MACHTYPE};
-
 
63
    unless ( $entry )
61
    unless ( @targets )
64
    {
62
    {
65
        Verbose ("LMOS_DEVLINUX will not build on this machine type: $::GBE_MACHTYPE");
63
        Verbose ("LMOS_DEVLINUX will not build on this machine type: $::GBE_MACHTYPE");
66
        $pInfo->{NOT_AVAILABLE} = 1;
64
        $pInfo->{NOT_AVAILABLE} = 1;
67
        return;
65
        return;
68
    }
66
    }
69
 
67
 
70
    #
68
    #
71
    #   Instantiate all targets
69
    #   Instantiate all targets
72
    #
70
    #
73
    foreach my $target ( @$entry )
71
    foreach my $target ( @targets )
74
    {
72
    {
75
        LMOS_DEVLINUX_generic(  dclone($pInfo), $target );
73
        LMOS_DEVLINUX_generic(  dclone($pInfo), 'LMOS_' . $target );
76
    }
74
    }
77
 
75
 
78
    #
76
    #
79
    #   All done
77
    #   All done
80
    #   Mark the original entry as a TEMPLATE so that it won't be added
78
    #   Mark the original entry as a TEMPLATE so that it won't be added