]> git.zerfleddert.de Git - m1-debian/blobdiff - patch_kernel_config.pl
make m1n1 package compatible with new way to package things
[m1-debian] / patch_kernel_config.pl
index d7f50c92d44e6b63cb4dd3d384dd108212d27822..617cfc3af89cc871214e6b060404ac0cca609e7e 100644 (file)
@@ -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 /boot/config-5.17.0-rc6-asahi-next-20220301-25570-g0cf7b747744a`;
+my @lines = `cat .config`;
 chomp @lines;
 
 my %asahi_options = (
@@ -56,9 +56,26 @@ my %asahi_options = (
         'CONFIG_SPMI_APPLE' => 'y',
         'CONFIG_USB_DWC3' => 'y',
         'CONFIG_USB_DWC3_PCI' => 'y',
-        'CONFIG_FB_EFI' => 'n',
+        'CONFIG_FB_EFI' => 'y',
         'CONFIG_BACKLIGHT_CLASS_DEVICE' => 'y',
         'CONFIG_BACKLIGHT_GPIO' => 'm',
+        'CONFIG_TYPEC_TPS6598X' => 'y',
+        'CONFIG_BT_HCIBCM4377' => 'm',
+        'CONFIG_HID_DOCKCHANNEL' => 'm',
+        'CONFIG_APPLE_DOCKCHANNEL' => 'm',
+        'CONFIG_SND_SOC_CS42L84' => 'm',
+        'CONFIG_SND_SOC_TAS2780' => 'm',
+        'CONFIG_USB_XHCI_PCI_ASMEDIA' => 'y',
+        'CONFIG_APPLE_M1_CPU_PMU' => 'y',
+        'CONFIG_SND_SOC_CS42L83' => 'm',
+        'CONFIG_DRM_APPLE' => 'y',
+        'CONFIG_DRM_ASAHI' => 'y',
+        'CONFIG_GENERIC_PHY' => 'y',
+        'CONFIG_PHY_APPLE_ATC' => 'm',
+        'CONFIG_CONSTRUCTORS' => 'y',
+        'CONFIG_RUST' => 'y',
+        'CONFIG_PWM_APPLE' => 'm',
+        'CONFIG_DRM_SIMPLEDRM_BACKLIGHT' => 'y',
 );
 
 my %debian_options;
@@ -70,13 +87,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') || die;
 for (keys %debian_options) {
         print CONFIG $_ . '=' . $debian_options{$_} . "\n";
 }
Impressum, Datenschutz