-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: Add script to build NVIDIA Linux modules
This script can be used to create the bee files to build the bee packages for the NVDIA Linux kernel modules.
- Loading branch information
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#! /usr/local/bin/perl | ||
use strict; | ||
use warnings; | ||
|
||
our $B='/src/mariux/beeroot/bee-files'; | ||
|
||
our $TEMPLATE_CURRENT = "nvidia_linux-4.6.4-93-367.18-0.bee"; | ||
our $TEMPLATE_LEGACY5 = "nvidia_legacy5-340.96-1.bee"; | ||
##our $TEMPLATE_LEGACY4 = "nvidia_legacy4-304.131-1.bee"; | ||
our $TEMPLATE_KERNEL="nvidia_linux-4.6.4-93-367.18-0.bee"; | ||
|
||
$ENV{BEE_MAKEFLAGS}='-j'; | ||
chdir ("/scratch/local") or die "/scratch/local: $!\n"; | ||
|
||
|
||
sub want_current{ | ||
my ($version,$build)=@_; | ||
my $name="nvidia_current-$version-$build"; | ||
|
||
if (-e "$B/$name.bee") { | ||
print "$B/$name.bee: already there\n"; | ||
return; | ||
} | ||
|
||
sys ('cp',"$B/$TEMPLATE_CURRENT","."); | ||
sys ('mv',$TEMPLATE_CURRENT,"$name.bee"); | ||
sys ("./$name.bee"); | ||
} | ||
|
||
sub want_legacy5{ | ||
my ($version,$build)=@_; | ||
my $name="nvidia_legacy5-$version-$build"; | ||
|
||
if (-e "$B/$name.bee") { | ||
print "$B/$name.bee: already there\n"; | ||
return; | ||
} | ||
sys ('cp',"$B/$TEMPLATE_LEGACY5","."); | ||
sys ('mv',$TEMPLATE_LEGACY5,"$name.bee"); | ||
sys ("./$name.bee"); | ||
} | ||
|
||
##sub want_legacy4 { | ||
## my ($version,$build)=@_; | ||
## my $name="nvidia_legacy4-$version-$build"; | ||
## | ||
## if (-e "$B/$name.bee") { | ||
## print "$B/$name.bee: already there\n"; | ||
## return; | ||
## } | ||
## sys ('cp',"$B/$TEMPLATE_LEGACY4","."); | ||
## sys ('mv',$TEMPLATE_LEGACY4,"$name.bee"); | ||
## sys ("./$name.bee"); | ||
##} | ||
|
||
sub want_kernel { | ||
my ($kernel,$version,$build)=@_; | ||
my $name="nvidia_linux-$kernel-$version-$build"; | ||
if (-e "$B/$name.bee") { | ||
print "$B/$name.bee: already there\n"; | ||
return; | ||
} | ||
sys ('cp',"$B/$TEMPLATE_KERNEL","."); | ||
sys ('mv',$TEMPLATE_KERNEL,"$name.bee"); | ||
sys ("./$name.bee"); | ||
} | ||
|
||
sub sys { | ||
print(join(' ',@_),"\n"); | ||
system @_ and exit 1; | ||
} | ||
|
||
# http://www.nvidia.com/object/unix.html | ||
|
||
our $kernel='4.7-94'; | ||
our $current="367.35"; # latest long live branch | ||
our $legacy5="340.96"; # 340.xx serie | ||
##our $legacy4="304.131"; # 304.xx serie | ||
|
||
# increase build number if you want a rebuild: | ||
|
||
want_current($current,0); | ||
want_legacy5($legacy5,1); | ||
##want_legacy4($legacy4,0); | ||
want_kernel($kernel,$current,0); | ||
want_kernel($kernel,$legacy5,0); | ||
##want_kernel($kernel,$legacy4,0); |