From 498ed9c0d516cd2478849ef9b8f9d001b56e4083 Mon Sep 17 00:00:00 2001 From: Elliott Mitchell Date: Tue, 19 Mar 2024 11:55:43 -0700 Subject: [PATCH] scripts: add partial update functionality to configuration upgrade script This matches the way this has been handled in the past. This could also help devices which were skipped due to abandoned plans to drop. Signed-off-by: Elliott Mitchell --- scripts/kernel_upgrade.pl | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) 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();