Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
bee-files/scripts/build-nvidia.pl
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
80 lines (66 sloc)
1.98 KB
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
#! /usr/local/bin/perl | |
use strict; | |
use warnings; | |
our $B='/src/mariux/beeroot/bee-files'; | |
our $TEMPLATE_CURRENT_USER = "nvidia_current-367.18-0.bee"; | |
our $TEMPLATE_CURRENT_KERNEL = "nvidia_linux-4.7.2-99-367.18-0.bee"; | |
our $TEMPLATE_LEGACY5_USER = "nvidia_legacy5-340.96-1.bee"; | |
our $TEMPLATE_LEGACY5_KERNEL = "nvidia_linux-4.7.2-99-340.96-0.bee"; | |
chdir ("/scratch/local") or die "/scratch/local: $!\n"; | |
sub want_current_user { | |
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_USER","."); | |
sys ('mv',$TEMPLATE_CURRENT_USER,"$name.bee"); | |
sys ("./$name.bee"); | |
} | |
sub want_legacy5_user{ | |
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_USER","."); | |
sys ('mv',$TEMPLATE_LEGACY5_USER,"$name.bee"); | |
sys ("./$name.bee"); | |
} | |
sub want_current_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_CURRENT_KERNEL","."); | |
sys ('mv',$TEMPLATE_CURRENT_KERNEL,"$name.bee"); | |
sys ("./$name.bee"); | |
} | |
sub want_legacy5_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_LEGACY5_KERNEL","."); | |
sys ('mv',$TEMPLATE_LEGACY5_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.2-99'; | |
our $current="367.44"; # latest long live branch | |
our $legacy5="340.96"; # 340.xx serie | |
# increase build number if you want a rebuild: | |
want_current_user($current,0); | |
want_legacy5_user($legacy5,1); | |
want_current_kernel($kernel,$current,0); | |
want_legacy5_kernel($kernel,$legacy5,0); |