]>
cvs.zerfleddert.de Git - m1-debian/blob - patch_kernel_config.pl
4c7e83d85302185615f30dfbc0c3b85545f3cd42
4 use warnings FATAL
=> 'all';
6 # This was taken from the linux-image-5.16.0-3-arm64-unsigned
7 # Than it was copied as .config in the asahi tree
8 # Than make olddefconfig was executed twice
9 my @lines = `cat config`;
13 'CONFIG_APPLE_ADMAC' => 'm',
14 'CONFIG_APPLE_AIC' => 'y',
15 'CONFIG_APPLE_DART' => 'm',
16 'CONFIG_APPLE_MAILBOX' => 'y',
17 'CONFIG_APPLE_PLATFORMS' => 'y',
18 'CONFIG_APPLE_PMGR_PWRSTATE' => 'y',
19 'CONFIG_APPLE_RTKIT' => 'y',
20 'CONFIG_APPLE_SART' => 'm',
21 'CONFIG_APPLE_SMC' => 'y',
22 'CONFIG_APPLE_SMC_RTKIT' => 'y',
23 'CONFIG_APPLE_WATCHDOG' => 'y',
24 'CONFIG_ARCH_APPLE' => 'y',
25 'CONFIG_ARM_APPLE_SOC_CPUFREQ' => 'm',
26 'CONFIG_BRCMFMAC' => 'm',
27 'CONFIG_BRCMFMAC_PCIE' => 'y',
28 'CONFIG_CFG80211_WEXT' => 'y',
29 'CONFIG_CHARGER_MACSMC' => 'm',
30 'CONFIG_COMMON_CLK_APPLE_NCO' => 'm',
32 'CONFIG_DRM_SIMPLEDRM' => 'y',
33 'CONFIG_FW_LOADER_USER_HELPER' => 'n',
34 'CONFIG_FW_LOADER_USER_HELPER_FALLBACK' => 'n',
35 'CONFIG_GPIO_MACSMC' => 'y',
36 'CONFIG_HID_APPLE' => 'm',
37 'CONFIG_HID_MAGICMOUSE' => 'm',
38 'CONFIG_I2C_APPLE' => 'm',
39 'CONFIG_MFD_APPLE_SPMI_PMU' => 'm',
40 'CONFIG_MMC_SDHCI_PCI' => 'm',
41 'CONFIG_NLMON' => 'm',
42 'CONFIG_NVMEM_SPMI_MFD' => 'm',
43 'CONFIG_NVME_APPLE' => 'm',
44 'CONFIG_PCIE_APPLE' => 'm',
45 'CONFIG_PINCTRL_APPLE_GPIO' => 'm',
46 'CONFIG_POWER_RESET_MACSMC' => 'm',
47 'CONFIG_RTC_DRV_MACSMC' => 'm',
48 'CONFIG_SND_SIMPLE_CARD' => 'm',
49 'CONFIG_SND_SOC_APPLE_MCA' => 'm',
50 'CONFIG_SND_SOC_APPLE_SILICON' => 'm',
51 'CONFIG_SND_SOC_CS42L42' => 'm',
52 'CONFIG_SND_SOC_TAS2770' => 'm',
53 'CONFIG_SPI_APPLE' => 'm',
54 'CONFIG_SPI_HID_APPLE_CORE' => 'm',
55 'CONFIG_SPI_HID_APPLE_OF' => 'm',
56 'CONFIG_SPMI_APPLE' => 'm',
57 'CONFIG_USB_DWC3' => 'm',
58 'CONFIG_BACKLIGHT_CLASS_DEVICE' => 'y',
59 'CONFIG_BACKLIGHT_GPIO' => 'y',
60 'CONFIG_TYPEC_TPS6598X' => 'm',
61 'CONFIG_BT_HCIBCM4377' => 'm',
62 'CONFIG_HID_DOCKCHANNEL' => 'm',
63 'CONFIG_APPLE_DOCKCHANNEL' => 'm',
69 if (/(^CONFIG_[^=]+)=(.*)/) {
70 $debian_options{$1} = $2;
74 for my $o (keys %asahi_options) {
75 if ((not exists $debian_options{$o}) && $asahi_options{$o} ne 'n') {
76 print "$o missing, adding\n";
77 $debian_options{$o} = $asahi_options{$o};
78 } elsif ((exists $debian_options{$o}) && ($asahi_options{$o} eq 'n')) {
79 print "$o present, removing\n";
80 delete $debian_options{$o};
81 } elsif ((exists $asahi_options{$o} && exists $debian_options{$o}) && ($debian_options{$o} ne $asahi_options{$o})) {
82 print "$o different\n";
86 open(CONFIG
, '>', 'config.new') || die;
87 for (keys %debian_options) {
88 print CONFIG
$_ . '=' . $debian_options{$_} . "\n";