diff --git a/scripts/kernel_upgrade.pl b/scripts/kernel_upgrade.pl index f6fc4573c76444..2428d1362429a9 100755 --- a/scripts/kernel_upgrade.pl +++ b/scripts/kernel_upgrade.pl @@ -209,8 +209,8 @@ () } # end of interface to git fast-import -die(<<"__USAGE__") if(@ARGV!=2); -Usage: $0 +die(<<"__USAGE__") if(@ARGV<2); +Usage: $0 [] Copies all kernel configuration files and patches from the old version to the new version. Git history is preserved on the copies by using a @@ -225,6 +225,12 @@ () Note, the two strings are non-optional, but completely free-form. There are no limitations besides whether they can be used in a file-name (\\0 is the only invalid character). + +One or more boards can be specified to update a subset of boards. This +can include "generic", this can also include a subdirectory for a device. + +The end merge commit /can/ be amended to remove files which should not +be included during an update. __USAGE__ my $from=shift(@ARGV); @@ -235,9 +241,19 @@ () my $start=gethead(); -my $list=getlistmatch('HEAD', $target, $from); +my $list; +unless(@ARGV) { + $list=getlistmatch('HEAD', $target, $from); + + die("no files matching \"$from\" found") unless(@$list); +} else { + foreach my $board (@ARGV) { + $board=getlistmatch('HEAD', $target.$board, $from); -die("no files matching \"$from\" found") unless(@$list); + die("no files matching \"$from\" found in $target$board") unless(@$board); + push(@$list, @$board); + } +} my $git=GitImporter->new();