From: Thomas Glanzmann Date: Thu, 17 Mar 2022 20:30:49 +0000 (+0100) Subject: Merge branch 'master' of a.gmvl.de:/git/m1-debian X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/commitdiff_plain/b63620bb085c32343362acdfecb1c74fb3403c99?hp=8837532b0d117c3b2f98984b8fb3f154cdfca731 Merge branch 'master' of a.gmvl.de:/git/m1-debian --- diff --git a/patch_kernel_config.pl b/patch_kernel_config.pl index 3c08b36..782977f 100644 --- a/patch_kernel_config.pl +++ b/patch_kernel_config.pl @@ -59,6 +59,7 @@ my %asahi_options = ( 'CONFIG_FB_EFI' => 'y', 'CONFIG_BACKLIGHT_CLASS_DEVICE' => 'y', 'CONFIG_BACKLIGHT_GPIO' => 'm', + 'CONFIG_TYPEC_TPS6598X' => 'y', ); my %debian_options; @@ -70,13 +71,18 @@ for (@lines) { } for my $o (keys %asahi_options) { - if (not exists $debian_options{$o}) { + if ((not exists $debian_options{$o}) && $asahi_options{$o} ne 'n') { print "$o missing, adding\n"; $debian_options{$o} = $asahi_options{$o}; + } elsif ((exists $debian_options{$o}) && ($asahi_options{$o} eq 'n')) { + print "$o present, removing\n"; + delete $debian_options{$o}; + } elsif ((exists $asahi_options{$o} && exists $debian_options{$o}) && ($debian_options{$o} ne $asahi_options{$o})) { + print "$o different\n"; } } -open(CONFIG, '>', 'config') || die; +open(CONFIG, '>', 'config.new') || die; for (keys %debian_options) { print CONFIG $_ . '=' . $debian_options{$_} . "\n"; }