X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blobdiff_plain/628b5aed9bfaa2b67fdcb78c041c36dd58e06074..ca8ffc28e70dab11ba0e4e35c02ba71d3cc0bd69:/patch_kernel_config.pl?ds=inline diff --git a/patch_kernel_config.pl b/patch_kernel_config.pl index 2238073..782977f 100644 --- a/patch_kernel_config.pl +++ b/patch_kernel_config.pl @@ -6,7 +6,7 @@ use warnings FATAL => 'all'; # This was taken from the linux-image-5.16.0-3-arm64-unsigned # Than it was copied as .config in the asahi tree # Than make olddefconfig was executed twice -my @lines = `cat config-round2`; +my @lines = `cat config`; chomp @lines; my %asahi_options = ( @@ -29,7 +29,7 @@ my %asahi_options = ( 'CONFIG_CHARGER_MACSMC' => 'y', 'CONFIG_COMMON_CLK_APPLE_NCO' => 'y', 'CONFIG_DRM' => 'y', - 'CONFIG_DRM_SIMPLEDRM' => 'm', + 'CONFIG_DRM_SIMPLEDRM' => 'y', 'CONFIG_FW_LOADER_USER_HELPER' => 'n', 'CONFIG_FW_LOADER_USER_HELPER_FALLBACK' => 'n', 'CONFIG_GPIO_MACSMC' => 'y', @@ -56,6 +56,10 @@ my %asahi_options = ( 'CONFIG_SPMI_APPLE' => 'y', 'CONFIG_USB_DWC3' => 'y', 'CONFIG_USB_DWC3_PCI' => 'y', + 'CONFIG_FB_EFI' => 'y', + 'CONFIG_BACKLIGHT_CLASS_DEVICE' => 'y', + 'CONFIG_BACKLIGHT_GPIO' => 'm', + 'CONFIG_TYPEC_TPS6598X' => 'y', ); my %debian_options; @@ -67,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"; }