forked from zongheng23333/IPQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_xanmod_kernel.sh
executable file
·920 lines (821 loc) · 65 KB
/
build_xanmod_kernel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
#!/bin/bash
set -ex
export KERNEL_BASE_VER=linux-${KERNEL_BASE_VER}
export XANMOD_CONFIG=config_x86-64-v2
# define outer
#export WORK_DIR=/dev/shm/linux
#export KERNEL_BASE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.12.tar.xz
#export XANMOD_PATCH=https://sourceforge.net/projects/xanmod/files/releases/edge/6.12.1-xanmod1/patch-6.12.1-xanmod1.xz/download
sudo -E rm -rf ${WORK_DIR} || true
mkdir -p ${WORK_DIR} || true
## https://blobfolio.com/2024/building-a-custom-xanmod-kernel-on-ubuntu-23-10/
# if not exist llvm19 then build it
[ ! -e /opt/llvm19_krl ] && build_xanmod_docker.sh
# download source
curl -L ${KERNEL_BASE_URL} -o /dev/shm/linux.tar.xz
curl -L ${XANMOD_PATCH} -o /dev/shm/patch.xz
# Unpack the kernel sources and patches
cd ${WORK_DIR} && tar -xJf /dev/shm/linux.tar.xz && unxz -k /dev/shm/patch.xz
cd ${WORK_DIR}/${KERNEL_BASE_VER}
patch -Np1 -i /dev/shm/patch
rm /dev/shm/linux.tar.xz && rm /dev/shm/patch*
## https://github.com/graysky2/openwrt/commit/0628c0a4673ad349d517b579e72d88de9c3924a5#diff-d5daeb65b3fa0ba33c79958bd89ca5122a6211baa492081ed752652a9a1bbdd1R20
## CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE boost build
sed -i "s/KBUILD_CFLAGS += -O2/KBUILD_CFLAGS += -O3/g" arch/x86/Makefile
cat arch/x86/Makefile | grep KBUILD_CFLAGS
# build kernel
cp -a CONFIGS/xanmod/gcc/${XANMOD_CONFIG} .config
export MAIN_KCONFIG_FILE=.config
sed -i 's/CONFIG_X86_MSR=[mny]/CONFIG_X86_MSR=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_X86_CPUID=[mny]/CONFIG_X86_CPUID=y/g' ${MAIN_KCONFIG_FILE}
# enable kvm,hyperv,vmware and disable xen
sed -i 's/CONFIG_XEN=[mny]/CONFIG_XEN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XEN/# CONFIG_XEN/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_JAILHOUSE_GUEST=[mny]/CONFIG_JAILHOUSE_GUEST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACRN_GUEST=[mny]/CONFIG_ACRN_GUEST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HAVE_KVM=[mny]/CONFIG_HAVE_KVM=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_KVM=[mny]/CONFIG_KVM=m/g' ${MAIN_KCONFIG_FILE}
# hyperv
sed -i 's/CONFIG_HYPERVISOR_GUEST=[mny]/CONFIG_HYPERVISOR_GUEST=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HYPERV=[mny]/CONFIG_HYPERV=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HYPERV_NET=[mny]/CONFIG_HYPERV_NET=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HYPERV_KEYBOARD=[mny]/CONFIG_HYPERV_KEYBOARD=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HYPERV_VSOCKETS=[mny]/CONFIG_HYPERV_VSOCKETS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HYPERV_STORAGE=[mny]/CONFIG_HYPERV_STORAGE=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PCI_HYPERV=[mny]/CONFIG_PCI_HYPERV=y/g' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_PCI_HYPERV/s/=m/=y/' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_HYPERV/s/=m/=y/' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_VMWARE/s/=m/=y/' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_VIRTIO/s/=m/=y/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VSOCKETS=[mny]/CONFIG_VSOCKETS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VMXNET3=[mny]/CONFIG_VMXNET3=y/g' ${MAIN_KCONFIG_FILE}
# disable gpu
sed -i 's/CONFIG_DRM_AMDGPU=[mny]/CONFIG_DRM_AMDGPU=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DRM_RADEON=[mny]/CONFIG_DRM_RADEON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DRM_NOUVEAU=[mny]/CONFIG_DRM_NOUVEAU=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DRM_XE=[mny]/CONFIG_DRM_XE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INPUT_TOUCHSCREEN=[mny]/CONFIG_INPUT_TOUCHSCREEN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SURFACE_PLATFORMS=[mny]/CONFIG_SURFACE_PLATFORMS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AGP=[mny]/CONFIG_AGP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACPI_VIDEO=[mny]/CONFIG_ACPI_VIDEO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VGA_ARB=[mny]/CONFIG_VGA_ARB=n/g' ${MAIN_KCONFIG_FILE}
# ktls
sed -i 's/CONFIG_TLS=[mny]/CONFIG_TLS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_RSA=[mny]/CONFIG_CRYPTO_RSA=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_DH=[mny]/CONFIG_CRYPTO_DH=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_ECC=[mny]/CONFIG_CRYPTO_ECC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_ECDH=[mny]/CONFIG_CRYPTO_ECDH=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_ECDSA=[mny]/CONFIG_CRYPTO_ECDSA=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CURVE25519=[mny]/CONFIG_CRYPTO_CURVE25519=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_AKCIPHER2=[mny]/CONFIG_CRYPTO_AKCIPHER2=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_AKCIPHER=[mny]/CONFIG_CRYPTO_AKCIPHER=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_KPP2=[mny]/CONFIG_CRYPTO_KPP2=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_KPP=[mny]/CONFIG_CRYPTO_KPP=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_ACOMP2=[mny]/CONFIG_CRYPTO_ACOMP2=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CBC=[mny]/CONFIG_CRYPTO_CBC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CTS=[mny]/CONFIG_CRYPTO_CTS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_GENIV=[mny]/CONFIG_CRYPTO_GENIV=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SEQIV=[mny]/CONFIG_CRYPTO_SEQIV=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_HMAC=[mny]/CONFIG_CRYPTO_HMAC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_MD4=[mny]/CONFIG_CRYPTO_MD4=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_MD5=[mny]/CONFIG_CRYPTO_MD5=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA1=[mny]/CONFIG_CRYPTO_SHA1=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA1_SSSE3=[mny]/CONFIG_CRYPTO_SHA1_SSSE3=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA256=[mny]/CONFIG_CRYPTO_SHA256=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA512=[mny]/CONFIG_CRYPTO_SHA512=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA3=[mny]/CONFIG_CRYPTO_SHA3=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_SHA512_SSSE3=[mny]/CONFIG_CRYPTO_SHA512_SSSE3=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_HW=[mny]/CONFIG_CRYPTO_HW=y/g' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_CRYPTO_DEV_/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CRCT10DIF=[mny]/CONFIG_CRYPTO_CRCT10DIF=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CRC64_ROCKSOFT=[mny]/CONFIG_CRYPTO_CRC64_ROCKSOFT=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_BLAKE2S_X86=[mny]/CONFIG_CRYPTO_BLAKE2S_X86=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=[mny]/CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=[mny]/CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=[mny]/CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_LIB_SHA1=[mny]/CONFIG_CRYPTO_LIB_SHA1=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_LIB_SHA256=[mny]/CONFIG_CRYPTO_LIB_SHA256=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ASYMMETRIC_KEY_TYPE=[mny]/CONFIG_ASYMMETRIC_KEY_TYPE=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=[mny]/CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ASN1=[mny]/CONFIG_ASN1=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_X509_CERTIFICATE_PARSER=[mny]/CONFIG_X509_CERTIFICATE_PARSER=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PKCS7_MESSAGE_PARSER=[mny]/CONFIG_PKCS7_MESSAGE_PARSER=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PKCS7_TEST_KEY=[mny]/CONFIG_PKCS7_TEST_KEY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SIGNED_PE_FILE_VERIFICATION=[mny]/CONFIG_SIGNED_PE_FILE_VERIFICATION=m/g' ${MAIN_KCONFIG_FILE}
sed -i '/SHA3/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/SHA256/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_AES_NI_INTEL=[mny]/CONFIG_CRYPTO_AES_NI_INTEL=y/g' ${MAIN_KCONFIG_FILE}
# Blowfish对称加密算法,一种又老又慢的对称加密算法.
sed -i 's/CONFIG_CRYPTO_BLOWFISH=[mny]/CONFIG_CRYPTO_BLOWFISH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CAST5=[mny]/CONFIG_CRYPTO_CAST5=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_CAST6=[mny]/CONFIG_CRYPTO_CAST6=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_DES=[mny]/CONFIG_CRYPTO_DES=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_MD4=[mny]/CONFIG_CRYPTO_MD4=n/g' ${MAIN_KCONFIG_FILE}
# input
sed -i 's/CONFIG_MOUSE_PS2=[mny]/CONFIG_MOUSE_PS2=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MOUSE_PS2_/#CONFIG_MOUSE_PS2_/g' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_RMI4/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_GPIO/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_SENSORS/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_PWM/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EXTCON=[mny]/CONFIG_EXTCON=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REMOTEPROC=[mny]/CONFIG_REMOTEPROC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INPUT_VIVALDIFMAP=[mny]/CONFIG_INPUT_VIVALDIFMAP=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACCESSIBILITY=[mny]/CONFIG_ACCESSIBILITY=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_UDMABUF=[mny]/CONFIG_UDMABUF=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RTC_NVMEM=[mny]/CONFIG_RTC_NVMEM=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EDAC=[mny]/CONFIG_EDAC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LIRC=[mny]/CONFIG_LIRC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SPI=[mny]/CONFIG_SPI=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PVPANIC =[mny]/CONFIG_PVPANIC =m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RAPIDIO=[mny]/CONFIG_RAPIDIO=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CARDBUS =[mny]/CONFIG_CARDBUS =m/g' ${MAIN_KCONFIG_FILE}
# disable for android
sed -i '/^CONFIG_LIBNVDIMM/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_DAX/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_DAX/s/=y/=m/' ${MAIN_KCONFIG_FILE}
# wireless and sfc, bt
sed -i 's/CONFIG_WIRELESS=[mny]/CONFIG_WIRELESS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WIRELESS_HOTKEY=[mny]/CONFIG_WIRELESS_HOTKEY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SFC=[mny]/CONFIG_SFC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SFC_FALCON=[mny]/CONFIG_SFC_FALCON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SFC_SIENA=[mny]/CONFIG_SFC_SIENA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MARVELL=[mny]/CONFIG_NET_VENDOR_MARVELL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CAVIUM=[mny]/CONFIG_NET_VENDOR_CAVIUM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_NETRONOME=[mny]/CONFIG_NET_VENDOR_NETRONOME=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_DSA_MV88E6060=[mny]/CONFIG_NET_DSA_MV88E6060=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_DSA_MV88E6XXX=[mny]/CONFIG_NET_DSA_MV88E6XXX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_DSA_SJA1105=[mny]/CONFIG_NET_DSA_SJA1105=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BT=[mny]/CONFIG_BT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WLAN=[mny]/CONFIG_WLAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WWAN=[mny]/CONFIG_WWAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ISDN=[mny]/CONFIG_ISDN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NEW_LEDS=[mny]/CONFIG_NEW_LEDS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NFC=[mny]/CONFIG_NFC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INFINIBAND=[mny]/CONFIG_INFINIBAND=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PPP=[mny]/CONFIG_PPP=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SLHC=[mny]/CONFIG_SLHC=m/g' ${MAIN_KCONFIG_FILE}
#media video sound
sed -i 's/CONFIG_SOUND=[mny]/CONFIG_SOUND=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SOUNDWIRE=[ymn]/CONFIG_SOUNDWIRE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MEDIA_SUPPORT=[mny]/CONFIG_MEDIA_SUPPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VIDEO_DEV=[mny]/CONFIG_VIDEO_DEV=n/g' ${MAIN_KCONFIG_FILE}
# sata, ahci
sed -i 's/CONFIG_SCSI=[mny]/CONFIG_SCSI=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_AHCI=[mny]/CONFIG_SATA_AHCI=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EXT4_FS=[mny]/CONFIG_EXT4_FS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ISO9660_FS=[mny]/CONFIG_ISO9660_FS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_OVERLAY_FS=[mny]/CONFIG_OVERLAY_FS=y/g' ${MAIN_KCONFIG_FILE}
#fat efi need
sed -i 's/CONFIG_MSDOS_FS=[mny]/CONFIG_MSDOS_FS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VFAT_FS=[mny]/CONFIG_VFAT_FS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NLS_ISO8859_1=[mny]/CONFIG_NLS_ISO8859_1=y/g' ${MAIN_KCONFIG_FILE}
# hyperv_storage depends
sed -i 's/CONFIG_SCSI_FC_ATTRS=[mny]/CONFIG_SCSI_FC_ATTRS=y/g' ${MAIN_KCONFIG_FILE}
# fs
sed -i 's/CONFIG_AIX_PARTITION=[mny]/CONFIG_AIX_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_OSF_PARTITION=[mny]/CONFIG_OSF_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AMIGA_PARTITION=[mny]/CONFIG_AMIGA_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATARI_PARTITION=[mny]/CONFIG_ATARI_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MAC_PARTITION=[mny]/CONFIG_MAC_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MINIX_SUBPARTITION=[mny]/CONFIG_MINIX_SUBPARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SOLARIS_X86_PARTITION=[mny]/CONFIG_SOLARIS_X86_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_UNIXWARE_DISKLABEL=[mny]/CONFIG_UNIXWARE_DISKLABEL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LDM_PARTITION=[mny]/CONFIG_LDM_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SGI_PARTITION=[mny]/CONFIG_SGI_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ULTRIX_PARTITION=[mny]/CONFIG_ULTRIX_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SUN_PARTITION=[mny]/CONFIG_SUN_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_KARMA_PARTITION=[mny]/CONFIG_KARMA_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SYSV68_PARTITION=[mny]/CONFIG_SYSV68_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CMDLINE_PARTITION=[mny]/CONFIG_CMDLINE_PARTITION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BCACHEFS_FS=[mny]/CONFIG_BCACHEFS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BCACHE=[mny]/CONFIG_BCACHE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BTRFS_FS=[mny]/CONFIG_BTRFS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_OCFS2_FS=[mny]/CONFIG_OCFS2_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_F2FS_FS=[mny]/CONFIG_F2FS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GFS2_FS=[mny]/CONFIG_GFS2_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_JFFS2_FS=[mny]/CONFIG_JFFS2_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TEXTSEARCH=[mny]/CONFIG_TEXTSEARCH=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SQUASHFS=[mny]/CONFIG_SQUASHFS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FS_ENCRYPTION=[mny]/CONFIG_FS_ENCRYPTION=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ECRYPT_FS=[mny]/CONFIG_ECRYPT_FS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_UNICODE=[mny]/CONFIG_UNICODE=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TRUSTED_KEYS=[mny]/CONFIG_TRUSTED_KEYS=m/g' ${MAIN_KCONFIG_FILE}
sed -i '/CONFIG_GPIO_BT8XX/e' ${MAIN_KCONFIG_FILE}
echo 'CONFIG_GPIO_BT8XX=n' >> ${MAIN_KCONFIG_FILE}
# for xdp https://pulsar.sh/docs/faq/kernel-requirements
sed -i 's/CONFIG_IKHEADERS=[mny]/CONFIG_IKHEADERS=n/g' ${MAIN_KCONFIG_FILE}
# for udhcpc: socket(AF_PACKET,2,8)
sed -i 's/CONFIG_PACKET=[mny]/CONFIG_PACKET=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TEST_/# CONFIG_TEST_/g' ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_NONE=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_DWARF4=n' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_DWARF5=n' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=n' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_TEST_BPF=n' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_BTF=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_SECURITY=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_SECURITYFS=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_SECURITY_NETWORK=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_FUNCTION_TRACER=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_FTRACE_SYSCALLS=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_BPF_LSM=y' >> ${MAIN_KCONFIG_FILE}
#echo 'CONFIG_IKCONFIG=m' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_NF_CONNTRACK_PROCFS=y' >> ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SECURITY_IPE=[mny]/CONFIG_SECURITY_IPE=y/g' ${MAIN_KCONFIG_FILE}
##### for server, no pc or laptop
#sed -i 's/CONFIG_HW_CONSOLE=[mny]/CONFIG_HW_CONSOLE=n/g' ${MAIN_KCONFIG_FILE}
# network
sed -i '/^CONFIG_XFRM/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_DCB/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_DNS_RESOLVER/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MPLS=[mny]/CONFIG_MPLS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MCTP=[mny]/CONFIG_MCTP=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_NCSI=[mny]/CONFIG_NET_NCSI=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HAMRADIO=[mny]/CONFIG_HAMRADIO=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RXKAD=[mny]/CONFIG_RXKAD=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RFKILL=[mny]/CONFIG_RFKILL=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TUN=[mny]/CONFIG_TUN=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MDIO_DEVICE=[mny]/CONFIG_MDIO_DEVICE=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_UBSAN=[mny]/CONFIG_UBSAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FONTS=[mny]/CONFIG_FONTS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AS3935=[mny]/CONFIG_AS3935=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_THINKPAD_ACPI=[mny]/CONFIG_THINKPAD_ACPI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VME_USER=[mny]/CONFIG_VME_USER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LTE_GDM724X=[mny]/CONFIG_LTE_GDM724X=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GREYBUS=[mny]/CONFIG_GREYBUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_COMEDI=[mny]/CONFIG_COMEDI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LEDS_CLASS=[mny]/CONFIG_LEDS_CLASS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MMC=[mny]/CONFIG_MMC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TYPEC=[mny]/CONFIG_TYPEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB_NET_DRIVERS=[mny]/CONFIG_USB_NET_DRIVERS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB_USBNET=[mny]/CONFIG_USB_USBNET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MTD=[mny]/CONFIG_MTD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BNX2X=[mny]/CONFIG_BNX2X=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_QED=[mny]/CONFIG_QED=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_QLCNIC=[mny]/CONFIG_QLCNIC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CHELSIO=[mny]/CONFIG_NET_VENDOR_CHELSIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_META=[mny]/CONFIG_NET_VENDOR_META=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MICREL=[mny]/CONFIG_NET_VENDOR_MICREL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MYRI=[mny]/CONFIG_NET_VENDOR_MYRI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_NATSEMI=[mny]/CONFIG_NET_VENDOR_NATSEMI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_NVIDIA=[mny]/CONFIG_NET_VENDOR_NVIDIA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_OKI=[mny]/CONFIG_NET_VENDOR_OKI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_QLOGIC=[mny]/CONFIG_NET_VENDOR_QLOGIC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_QUALCOMM=[mny]/CONFIG_NET_VENDOR_QUALCOMM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_RDC=[mny]/CONFIG_NET_VENDOR_RDC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_RENESAS=[mny]/CONFIG_NET_VENDOR_RENESAS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SMSC=[mny]/CONFIG_NET_VENDOR_SMSC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TABLET/# CONFIG_TABLET/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CHARGER_/# CONFIG_CHARGER_/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATTERY/# CONFIG_BATTERY/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LEDS/# CONFIG_LEDS/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TOUCHSCREEN/# CONFIG_TOUCHSCREEN/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ARCNET=[mny]/CONFIG_ARCNET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_B53=[mny]/CONFIG_B53=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_JOYSTICK/#CONFIG_JOYSTICK/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INPUT_TABLET=[mny]/CONFIG_INPUT_TABLET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INPUT_TOUCHSCREEN=[mny]/CONFIG_INPUT_TOUCHSCREEN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FRAME_WARN=1024/CONFIG_FRAME_WARN=2048/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SOC_TI=[mny]/CONFIG_SOC_TI=n/g' ${MAIN_KCONFIG_FILE}
# debug
sed -i 's/CONFIG_DEBUG_MISC=[mny]/CONFIG_DEBUG_MISC=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SLUB_DEBUG=[mny]/CONFIG_SLUB_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PM_DEBUG=[mny]/CONFIG_PM_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACPI_DEBUG=[mny]/CONFIG_ACPI_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACPI_DEBUGGER=[mny]/CONFIG_ACPI_DEBUGGER=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IOSF_MBI_DEBUG=[mny]/CONFIG_IOSF_MBI_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFS_DEBUG=[mny]/CONFIG_NETFS_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCHED_DEBUG=[mny]/CONFIG_SCHED_DEBUG=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FW_LOADER_DEBUG=[mny]/CONFIG_FW_LOADER_DEBUG=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MEMTEST=[mny]/CONFIG_MEMTEST=n/g' ${MAIN_KCONFIG_FILE}
# disable isa bus
sed -i 's/CONFIG_ISA_BUS=[mny]/CONFIG_ISA_BUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ISA_DMA_API=[mny]/CONFIG_ISA_DMA_API=n/g' ${MAIN_KCONFIG_FILE}
# if [ ! -z "$BUILD_TYPE" ]; then
##### for cloud
if [[ "$BUILD_TYPE" == "cloud" ]]; then
sed -i 's/CONFIG_HYPERV=[mny]/CONFIG_HYPERV=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_KVM=[mny]/CONFIG_KVM=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VMWARE_VMCI=[mny]/CONFIG_VMWARE_VMCI=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VMWARE_VMCI_VSOCKETS=[mny]/CONFIG_VMWARE_VMCI_VSOCKETS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VMWARE_PVSCSI=[mny]/CONFIG_VMWARE_PVSCSI=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VIRTIO_FS=[mny]/CONFIG_VIRTIO_FS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VIRTIO_NET=[mny]/CONFIG_VIRTIO_NET=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VIRTIO_BLK=[mny]/CONFIG_VIRTIO_BLK=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VIRTIO_MEM=[mny]/CONFIG_VIRTIO_MEM=y/g' ${MAIN_KCONFIG_FILE}
# 二分
#sed -i 's/CONFIG_PC104=[mny]/CONFIG_PC104=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_GART_IOMMU=[mny]/CONFIG_GART_IOMMU=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_X86_PLATFORM_DEVICES=[mny]/CONFIG_X86_PLATFORM_DEVICES=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_AC=[mny]/CONFIG_ACPI_AC=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_BATTERY=[mny]/CONFIG_ACPI_BATTERY=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_IPMI=[mny]/CONFIG_ACPI_IPMI=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_BGRT=[mny]/CONFIG_ACPI_BGRT=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_NHLT=[mny]/CONFIG_ACPI_NHLT=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_ACPI_DPTF=[mny]/CONFIG_ACPI_DPTF=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCIE_EDR=[mny]/CONFIG_PCIE_EDR=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCI_STUB=[mny]/CONFIG_PCI_STUB=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCI_NPEM=[mny]/CONFIG_PCI_NPEM=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCI_P2PDMA=[mny]/CONFIG_PCI_P2PDMA=n/g' ${MAIN_KCONFIG_FILE}
##sed -i 's/CONFIG_VMD=[mny]/CONFIG_VMD=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCIE_DW=[mny]/CONFIG_PCIE_DW=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCI_ENDPOINT=[mny]/CONFIG_PCI_ENDPOINT=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCI_SW_SWITCHTEC=[mny]/CONFIG_PCI_SW_SWITCHTEC=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCCARD=[mny]/CONFIG_PCCARD=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_PCMCIA=[mny]/CONFIG_PCMCIA=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_CARDBUS=[mny]/CONFIG_CARDBUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IOSF_MBI=[mny]/CONFIG_IOSF_MBI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_X86_MCELOG_LEGACY=[mny]/CONFIG_X86_MCELOG_LEGACY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PM_WAKELOCKS=[mny]/CONFIG_PM_WAKELOCKS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PM_TRACE=[mny]/CONFIG_PM_TRACE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ZSWAP=[mny]/CONFIG_ZSWAP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ANON_VMA_NAME=[mny]/CONFIG_ANON_VMA_NAME=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INET_ESPINTCP=[mny]/CONFIG_INET_ESPINTCP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IPV6_IOAM6_LWTUNNEL=[mny]/CONFIG_IPV6_IOAM6_LWTUNNEL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER_NETLINK_HOOK=[mny]/CONFIG_NETFILTER_NETLINK_HOOK=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATM=[mny]/CONFIG_ATM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BRIDGE_MRP=[mny]/CONFIG_BRIDGE_MRP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BRIDGE_CFM=[mny]/CONFIG_BRIDGE_CFM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_DSA=[mny]/CONFIG_NET_DSA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LLC2=[mny]/CONFIG_LLC2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATALK=[mny]/CONFIG_ATALK=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LAPB=[mny]/CONFIG_LAPB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PHONET=[mny]/CONFIG_PHONET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_6LOWPAN=[mny]/CONFIG_6LOWPAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IEEE802154=[mny]/CONFIG_IEEE802154=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MAC802154=[mny]/CONFIG_MAC802154=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATMAN_ADV=[mny]/CONFIG_BATMAN_ADV=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HSR=[mny]/CONFIG_HSR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_QRTR=[mny]/CONFIG_QRTR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_NCSI=[mny]/CONFIG_NET_NCSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HAMRADIO=[mny]/CONFIG_HAMRADIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AX25=[mny]/CONFIG_AX25=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETROM=[mny]/CONFIG_NETROM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ROSE=[mny]/CONFIG_ROSE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_6PACK=[mny]/CONFIG_6PACK=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MKISS=[mny]/CONFIG_MKISS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BPQETHER=[mny]/CONFIG_BPQETHER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_YAM=[mny]/CONFIG_YAM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BAYCOM_PAR=[mny]/CONFIG_BAYCOM_PAR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BAYCOM_SER_HDX=[mny]/CONFIG_BAYCOM_SER_HDX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BAYCOM_SER_FDX=[mny]/CONFIG_BAYCOM_SER_FDX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CAN=[mny]/CONFIG_CAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BT=[mny]/CONFIG_BT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RXKAD=[mny]/CONFIG_RXKAD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WIRELESS=[mny]/CONFIG_WIRELESS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CFG80211=[mny]/CONFIG_CFG80211=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LIB80211=[mny]/CONFIG_LIB80211=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MAC80211=[mny]/CONFIG_MAC80211=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RFKILL=[mny]/CONFIG_RFKILL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_9P=[mny]/CONFIG_NET_9P=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CAIF=[mny]/CONFIG_CAIF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NFC=[mny]/CONFIG_NFC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_YENTA=[mny]/CONFIG_YENTA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PD6729=[mny]/CONFIG_PD6729=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I82092=[mny]/CONFIG_I82092=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RAPIDIO=[mny]/CONFIG_RAPIDIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MHI_BUS_EP=[mny]/CONFIG_MHI_BUS_EP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EDD=[mny]/CONFIG_EDD=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EFI_TEST=[mny]/CONFIG_EFI_TEST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GNSS=[mny]/CONFIG_GNSS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MTD=[mny]/CONFIG_MTD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FTL=[mny]/CONFIG_FTL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NFTL=[mny]/CONFIG_NFTL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RFD_FTL=[mny]/CONFIG_RFD_FTL=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_SRAM=[mny]/CONFIG_SRAM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NSM=[mny]/CONFIG_NSM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XILINX_SDFEC=[mny]/CONFIG_XILINX_SDFEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_C2PORT=[mny]/CONFIG_C2PORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EEPROM/#CONFIG_EEPROM/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CB710_CORE=[mny]/CONFIG_CB710_CORE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INTEL_MEI=[mny]/CONFIG_INTEL_MEI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_SRP_ATTRS=[mny]/CONFIG_SCSI_SRP_ATTRS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_CXGB3_ISCSI=[mny]/CONFIG_SCSI_CXGB3_ISCSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_CXGB4_ISCSI=[mny]/CONFIG_SCSI_CXGB4_ISCSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_BNX2_ISCSI=[mny]/CONFIG_SCSI_BNX2_ISCSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BE2ISCSI=[mny]/CONFIG_BE2ISCSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BLK_DEV_3W_XXXX_RAID=[mny]/CONFIG_BLK_DEV_3W_XXXX_RAID=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_HPSA=[mny]/CONFIG_SCSI_HPSA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_3W_9XXX=[mny]/CONFIG_SCSI_3W_9XXX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_3W_SAS=[mny]/CONFIG_SCSI_3W_SAS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_ACARD=[mny]/CONFIG_SCSI_ACARD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_AIC7XXX=[mny]/CONFIG_SCSI_AIC7XXX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_AIC79XX=[mny]/CONFIG_SCSI_AIC79XX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_AIC94XX=[mny]/CONFIG_SCSI_AIC94XX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_MVSAS=[mny]/CONFIG_SCSI_MVSAS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_MVUMI=[mny]/CONFIG_SCSI_MVUMI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_ADVANSYS=[mny]/CONFIG_SCSI_ADVANSYS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_ARCMSR=[mny]/CONFIG_SCSI_ARCMSR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_ESAS2R=[mny]/CONFIG_SCSI_ESAS2R=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LIBFC=[mny]/CONFIG_LIBFC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATA=[mny]/CONFIG_ATA=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATA_ACPI=[mny]/CONFIG_ATA_ACPI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATA_PIIX=[mny]/CONFIG_ATA_PIIX=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_MV=[mny]/CONFIG_SATA_MV=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_NV=[mny]/CONFIG_SATA_NV=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_PROMISE=[mny]/CONFIG_SATA_PROMISE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_SIL=[mny]/CONFIG_SATA_SIL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SATA_SIS=[mny]/CONFIG_SATA_SIS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PATA_ALI=[mny]/CONFIG_PATA_ALI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PATA_AMD=[mny]/CONFIG_PATA_AMD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PATA_CMD640_PCI=[mny]/CONFIG_PATA_CMD640_PCI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REMOTE_TARGET=[mny]/CONFIG_REMOTE_TARGET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FUSION=[mny]/CONFIG_FUSION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FIREWIRE=[mny]/CONFIG_FIREWIRE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MACINTOSH_DRIVERS=[mny]/CONFIG_MACINTOSH_DRIVERS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MII=[mny]/CONFIG_MII=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BAREUDP=[mny]/CONFIG_BAREUDP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GTP=[mny]/CONFIG_GTP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PFCP=[mny]/CONFIG_PFCP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AMT=[mny]/CONFIG_AMT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RIONET=[mny]/CONFIG_RIONET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SUNGEM_PHY=[mny]/CONFIG_SUNGEM_PHY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATM_DRIVERS=[mny]/CONFIG_ATM_DRIVERS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATM_DUMMY=[mny]/CONFIG_ATM_DUMMY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATM_TCP=[mny]/CONFIG_ATM_TCP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_3COM=[mny]/CONFIG_NET_VENDOR_3COM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ADAPTEC=[mny]/CONFIG_NET_VENDOR_ADAPTEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_AGERE=[mny]/CONFIG_NET_VENDOR_AGERE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ALACRITECH=[mny]/CONFIG_NET_VENDOR_ALACRITECH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ALTEON=[mny]/CONFIG_NET_VENDOR_ALTEON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_AMD=[mny]/CONFIG_NET_VENDOR_AMD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_AQUANTIA=[mny]/CONFIG_NET_VENDOR_AQUANTIA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ARC=[mny]/CONFIG_NET_VENDOR_ARC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CHELSIO=[mny]/CONFIG_NET_VENDOR_CHELSIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CAVIUM=[mny]/CONFIG_NET_VENDOR_CAVIUM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CISCO=[mny]/CONFIG_NET_VENDOR_CISCO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_DEC=[mny]/CONFIG_NET_VENDOR_DEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_DLINK=[mny]/CONFIG_NET_VENDOR_DLINK=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_EMULEX=[mny]/CONFIG_NET_VENDOR_EMULEX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DNET=[mny]/CONFIG_DNET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ALTERA_TSE=[mny]/CONFIG_ALTERA_TSE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_E100=[mny]/CONFIG_E100=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_E1000=[mny]/CONFIG_E1000=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_E1000E=[mny]/CONFIG_E1000E=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IGB=[mny]/CONFIG_IGB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IGBVF=[mny]/CONFIG_IGBVF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IXGBE=[mny]/CONFIG_IXGBE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I40E=[mny]/CONFIG_I40E=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I40EVF=[mny]/CONFIG_I40EVF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ICE=[mny]/CONFIG_ICE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FM10K=[mny]/CONFIG_FM10K=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IGC=[mny]/CONFIG_IGC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MARVELL=[mny]/CONFIG_NET_VENDOR_MARVELL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX5_ESWITCH=[mny]/CONFIG_MLX5_ESWITCH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX5_MACSEC=[mny]/CONFIG_MLX5_MACSEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX5_EN_IPSEC=[mny]/CONFIG_MLX5_EN_IPSEC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX5_SF=[mny]/CONFIG_MLX5_SF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FBNIC=[mny]/CONFIG_FBNIC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MICREL=[mny]/CONFIG_NET_VENDOR_MICREL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MICROCHIP=[mny]/CONFIG_NET_VENDOR_MICROCHIP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_NVIDIA=[mny]/CONFIG_NET_VENDOR_NVIDIA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MYRI=[mny]/CONFIG_NET_VENDOR_MYRI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_OKI=[mny]/CONFIG_NET_VENDOR_OKI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_QLOGIC=[mny]/CONFIG_NET_VENDOR_QLOGIC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_BROCADE=[mny]/CONFIG_NET_VENDOR_BROCADE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_QUALCOMM=[mny]/CONFIG_NET_VENDOR_QUALCOMM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_BROADCOM=[mny]/CONFIG_NET_VENDOR_BROADCOM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_RDC=[mny]/CONFIG_NET_VENDOR_RDC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_REALTEK=[mny]/CONFIG_NET_VENDOR_REALTEK=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SAMSUNG=[mny]/CONFIG_NET_VENDOR_SAMSUNG=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SUN=[mny]/CONFIG_NET_VENDOR_SUN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FDDI=[mny]/CONFIG_FDDI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PHYLIB=[mny]/CONFIG_PHYLIB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ETHOC=[mny]/CONFIG_ETHOC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MDIO_DEVICE=[mny]/CONFIG_MDIO_DEVICE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PCS_XPCS=[mny]/CONFIG_PCS_XPCS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PPP=[mny]/CONFIG_PPP=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SLIP=[mny]/CONFIG_SLIP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WLAN=[mny]/CONFIG_WLAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WAN=[mny]/CONFIG_WAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_WWAN_HWSIM=[mny]/CONFIG_WWAN_HWSIM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FUJITSU_ES=[mny]/CONFIG_FUJITSU_ES=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ISDN=[mny]/CONFIG_ISDN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_KEYBOARD_LKKBD=[mny]/CONFIG_KEYBOARD_LKKBD=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INPUT_MISC=[mny]/CONFIG_INPUT_MISC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIAL_/# CONFIG_SERIAL_/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO=[mny]/CONFIG_SERIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_SERPORT=[mny]/CONFIG_SERIO_SERPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_CT82C710=[mny]/CONFIG_SERIO_CT82C710=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_PCIPS2=[mny]/CONFIG_SERIO_PCIPS2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_ALTERA_PS2=[mny]/CONFIG_SERIO_ALTERA_PS2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_PS2MULT=[mny]/CONFIG_SERIO_PS2MULT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIO_ARC_PS2=[mny]/CONFIG_SERIO_ARC_PS2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USERIO=[mny]/CONFIG_USERIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GAMEPORT=[mny]/CONFIG_GAMEPORT=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_LEGACY_PTYS=[mny]/CONFIG_LEGACY_PTYS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIAL_JSM=[mny]/CONFIG_SERIAL_JSM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SERIAL_ARC=[mny]/CONFIG_SERIAL_ARC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_N_GSM=[mny]/CONFIG_N_GSM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NOZOMI=[mny]/CONFIG_NOZOMI=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_NULL_TTY=[mny]/CONFIG_NULL_TTY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DEVPORT=[mny]/CONFIG_DEVPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I2C=[mny]/CONFIG_I2C=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I3C=[mny]/CONFIG_I3C=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SPI=[mny]/CONFIG_SPI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SPMI=[mny]/CONFIG_SPMI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HSI=[mny]/CONFIG_HSI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PTP_1588_CLOCK_MOCK=[mny]/CONFIG_PTP_1588_CLOCK_MOCK=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PINCTRL=[mny]/CONFIG_PINCTRL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GPIOLIB=[mny]/CONFIG_GPIOLIB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_W1=[mny]/CONFIG_W1=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_POWER_RESET=[mny]/CONFIG_POWER_RESET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_POWER_SEQUENCING=[mny]/CONFIG_POWER_SEQUENCING=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TEST_POWER=[mny]/CONFIG_TEST_POWER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATTERY_DS2780=[mny]/CONFIG_BATTERY_DS2780=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATTERY_SAMSUNG_SDI=[mny]/CONFIG_BATTERY_SAMSUNG_SDI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATTERY_DS2781=[mny]/CONFIG_BATTERY_DS2781=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BATTERY_BQ27XXX=[mny]/CONFIG_BATTERY_BQ27XXX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CHARGER_MAX8903=[mny]/CONFIG_CHARGER_MAX8903=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HWMON=[mny]/CONFIG_HWMON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_THERMAL_EMULATION=[mny]/CONFIG_THERMAL_EMULATION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REGULATOR=[mny]/CONFIG_REGULATOR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RC_CORE=[mny]/CONFIG_RC_CORE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CEC_GPIO=[mny]/CONFIG_CEC_GPIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MEDIA_SUPPORT=[mny]/CONFIG_MEDIA_SUPPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MEDIA_USB_SUPPORT=[mny]/CONFIG_MEDIA_USB_SUPPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB_GSPCA=[mny]/CONFIG_USB_GSPCA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AUXDISPLAY=[mny]/CONFIG_AUXDISPLAY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AGP=[mny]/CONFIG_AGP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VGA_SWITCHEROO=[mny]/CONFIG_VGA_SWITCHEROO=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_DRM=[mny]/CONFIG_DRM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LCD_CLASS_DEVICE=[mny]/CONFIG_LCD_CLASS_DEVICE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BACKLIGHT_CLASS_DEVICE=[mny]/CONFIG_BACKLIGHT_CLASS_DEVICE=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_VGASTATE=[mny]/CONFIG_VGASTATE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HDMI=[mny]/CONFIG_HDMI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SOUND=[mny]/CONFIG_SOUND=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HID_BPF=[mny]/CONFIG_HID_BPF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB_HID=[mny]/CONFIG_USB_HID=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HID_PID=[mny]/CONFIG_HID_PID=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INTEL_ISH_HID=[mny]/CONFIG_INTEL_ISH_HID=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB_SUPPORT=[mny]/CONFIG_USB_SUPPORT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LEDS_CLASS_FLASH=[mny]/CONFIG_LEDS_CLASS_FLASH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ACCESSIBILITY=[mny]/CONFIG_ACCESSIBILITY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EDAC=[mny]/CONFIG_EDAC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RTC_NVMEM=[mny]/CONFIG_RTC_NVMEM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SYNC_FILE=[mny]/CONFIG_SYNC_FILE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VDPA_SIM=[mny]/CONFIG_VDPA_SIM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IFCVF=[mny]/CONFIG_IFCVF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GREYBUS=[mny]/CONFIG_GREYBUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_COMEDI_TESTS=[mny]/CONFIG_COMEDI_TESTS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CHROME_PLATFORMS=[mny]/CONFIG_CHROME_PLATFORMS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MELLANOX_PLATFORM=[mny]/CONFIG_MELLANOX_PLATFORM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ALTERA_MBOX=[mny]/CONFIG_ALTERA_MBOX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REMOTEPROC=[mny]/CONFIG_REMOTEPROC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RPMSG=[mny]/CONFIG_RPMSG=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PM_DEVFREQ=[mny]/CONFIG_PM_DEVFREQ=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_EXTCON=[mny]/CONFIG_EXTCON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_LAN966X_OIC=[mny]/CONFIG_LAN966X_OIC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IPACK_BUS=[mny]/CONFIG_IPACK_BUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RESET_CONTROLLER=[mny]/CONFIG_RESET_CONTROLLER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GENERIC_PHY=[mny]/CONFIG_GENERIC_PHY=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PHY_CAN_TRANSCEIVER=[mny]/CONFIG_PHY_CAN_TRANSCEIVER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MCB=[mny]/CONFIG_MCB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_AMD_ATL=[mny]/CONFIG_AMD_ATL=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USB4=[mny]/CONFIG_USB4=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ANDROID_BINDER_IPC=[mny]/CONFIG_ANDROID_BINDER_IPC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NVMEM=[mny]/CONFIG_NVMEM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INTEL_TH=[mny]/CONFIG_INTEL_TH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FPGA=[mny]/CONFIG_FPGA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SIOX=[mny]/CONFIG_SIOX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SLIMBUS=[mny]/CONFIG_SLIMBUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_INTERCONNECT=[mny]/CONFIG_INTERCONNECT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_COUNTER=[mny]/CONFIG_COUNTER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MOST=[mny]/CONFIG_MOST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PECI=[mny]/CONFIG_PECI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HTE=[mny]/CONFIG_HTE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REISERFS_FS=[mny]/CONFIG_REISERFS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_JFS_FS=[mny]/CONFIG_JFS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NILFS2_FS=[mny]/CONFIG_NILFS2_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NFSD_V4=[mny]/CONFIG_NFSD_V4=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CIFS=[mny]/CONFIG_CIFS=m/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SIS=[mny]/CONFIG_NET_VENDOR_SIS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SILAN=[mny]/CONFIG_NET_VENDOR_SILAN=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ROCKER=[mny]/CONFIG_NET_VENDOR_ROCKER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_PENSANDO=[mny]/CONFIG_NET_VENDOR_PENSANDO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_NETERION=[mny]/CONFIG_NET_VENDOR_NETERION=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SOLARFLARE=[mny]/CONFIG_NET_VENDOR_SOLARFLARE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_SOCIONEXT=[mny]/CONFIG_NET_VENDOR_SOCIONEXT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_STMICRO=[mny]/CONFIG_NET_VENDOR_STMICRO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_MICROSEMI=[mny]/CONFIG_NET_VENDOR_MICROSEMI=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_LITEX=[mny]/CONFIG_NET_VENDOR_LITEX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_FUNGIBLE=[mny]/CONFIG_NET_VENDOR_FUNGIBLE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_EZCHIP=[mny]/CONFIG_NET_VENDOR_EZCHIP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CORTINA=[mny]/CONFIG_NET_VENDOR_CORTINA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_DAVICOM=[mny]/CONFIG_NET_VENDOR_DAVICOM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ENGLEDER=[mny]/CONFIG_NET_VENDOR_ENGLEDER=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_CADENCE=[mny]/CONFIG_NET_VENDOR_CADENCE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ASIX=[mny]/CONFIG_NET_VENDOR_ASIX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NET_VENDOR_ATHEROS=[mny]/CONFIG_NET_VENDOR_ATHEROS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLXFW=[mny]/CONFIG_MLXFW=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLXSW/# CONFIG_MLXSW/g' ${MAIN_KCONFIG_FILE}
#huawei
sed -i 's/CONFIG_HINIC=[mny]/CONFIG_HINIC=n/g' ${MAIN_KCONFIG_FILE}
#amazon
sed -i 's/CONFIG_ENA_ETHERNET=[mny]/CONFIG_ENA_ETHERNET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_GVE=[mny]/CONFIG_GVE=n/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_LIBETH=[mny]/CONFIG_LIBETH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NTFS_FS=[mny]/CONFIG_NTFS_FS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DLM=[mny]/CONFIG_DLM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_CRYPTO_HW=[mny]/CONFIG_CRYPTO_HW=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PACKING=[mny]/CONFIG_PACKING=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_VMLINUX_MAP=[mny]/CONFIG_VMLINUX_MAP=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TEST_MULDIV64=[mny]/CONFIG_TEST_MULDIV64=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MEMTEST=[mny]/CONFIG_MEMTEST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_TEST_BPF=[mny]/CONFIG_TEST_BPF=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_STMMAC_ETH=[mny]/CONFIG_STMMAC_ETH=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_LPFC=[mny]/CONFIG_SCSI_LPFC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_QLA_FC=[mny]/CONFIG_SCSI_QLA_FC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_BFA_FC=[mny]/CONFIG_SCSI_BFA_FC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_MPT3SAS=[mny]/CONFIG_SCSI_MPT3SAS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SCSI_EFCT=[mny]/CONFIG_SCSI_EFCT=n/g' ${MAIN_KCONFIG_FILE}
# filber channel
# 光传感器
sed -i '/# Light sensors/,/# end of Light sensors/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# Magnetometer Sensors(磁力计传感器)
sed -i '/# Magnetometer sensors/,/# end of Magnetometer sensors/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# Accelerometers(加速度计)
sed -i '/# Accelerometers/,/# end of Accelerometers/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 湿度传感器
sed -i '/# Humidity sensors/,/# end of Humidity sensors/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 压力传感器
sed -i '/# Pressure sensors/,/# end of Pressure sensors/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 模拟到数字转换器(ADC)
sed -i '/# Analog to digital converters/,/# end of Analog to digital converters/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 惯性测量单元(IMU)
sed -i '/# Inertial measurement units/,/# end of Inertial measurement units/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 接近传感器和距离传感器
sed -i '/# Proximity and distance sensors/,/# end of Proximity and distance sensors/{s/^[^#]/# &/}' ${MAIN_KCONFIG_FILE}
# 电压调节
sed -i 's/CONFIG_REGULATOR=[mny]/CONFIG_REGULATOR=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IIO=[mny]/CONFIG_IIO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I2C=[mny]/CONFIG_I2C=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HWMON=[mny]/CONFIG_HWMON=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HWMON_VID=[mny]/CONFIG_HWMON_VID=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PMBUS=[mny]/CONFIG_PMBUS=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SENSORS/# CONFIG_SENSORS/g' ${MAIN_KCONFIG_FILE}
#sed -i 's/CONFIG_KGDB=[mny]/CONFIG_KGDB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_PHYLIB=[mny]/CONFIG_PHYLIB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DRM_I915=[mny]/CONFIG_DRM_I915=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATL1=[mny]/CONFIG_ATL1=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATL1C=[mny]/CONFIG_ATL1C=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATL1E=[mny]/CONFIG_ATL1E=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ALX=[mny]/CONFIG_ALX=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ATL2=[mny]/CONFIG_ATL2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I40E=[mny]/CONFIG_I40E=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_ICE=[mny]/CONFIG_ICE=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BNXT=[mny]/CONFIG_BNXT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BNX2=[mny]/CONFIG_BNX2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BCMGENET=[mny]/CONFIG_BCMGENET=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX5_/# CONFIG_MLX5_/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MLX4_/# CONFIG_MLX4_/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_BNXT/# CONFIG_BNXT/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IIO/# CONFIG_IIO/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_I2C/# CONFIG_I2C/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_REGULATOR/# CONFIG_REGULATOR/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_HWMON/# CONFIG_HWMON/g' ${MAIN_KCONFIG_FILE}
fi
#### cloud end
# 支持睡眠Sleep,禁用休眠; 禁用老系统选项
sed -i '/HIBERNAT/s/=y/=n/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SYSVIPC=[mny]/CONFIG_SYSVIPC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_SYSVIPC_COMPAT=[mny]/CONFIG_SYSVIPC_COMPAT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_USELIB=[mny]/CONFIG_USELIB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_X86_16BIT=[mny]/CONFIG_X86_16BIT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_COMPAT=[mny]/CONFIG_COMPAT=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_COMPAT_32=[mny]/CONFIG_COMPAT_32=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_IA32_EMULATION=[mny]/CONFIG_IA32_EMULATION=n/g' ${MAIN_KCONFIG_FILE}
# reduce size
sed -i '/^CONFIG_NETFILTER/s/=y/=m/' ${MAIN_KCONFIG_FILE}
# 和 xanmod fullcone 冲突
#sed -i '/^CONFIG_NF_/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER=[mny]/CONFIG_NETFILTER=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER_INGRESS=[mny]/CONFIG_NETFILTER_INGRESS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER_EGRESS=[mny]/CONFIG_NETFILTER_EGRESS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER_SKIP_EGRESS=[mny]/CONFIG_NETFILTER_SKIP_EGRESS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_NETFILTER_ADVANCED=[mny]/CONFIG_NETFILTER_ADVANCED=y/g' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_BRIDGE/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_XFS_/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_NFS_/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_NFSD/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_EXPORTFS/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/^CONFIG_USB/s/=y/=m/' ${MAIN_KCONFIG_FILE}
# build opt
sed -i '/BZIP2/s/^/#/' ${MAIN_KCONFIG_FILE}
#sed -i '/GZIP/s/^/#/' ${MAIN_KCONFIG_FILE}
sed -i '/ZSTD/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/LZMA/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/LZ4/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i '/LZO/s/=y/=m/' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MODULE_COMPRESS_XZ=[mny]/CONFIG_MODULE_COMPRESS_XZ=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_MODULE_DECOMPRESS=[mny]/CONFIG_MODULE_DECOMPRESS=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_FW_LOADER_COMPRESS_XZ=[mny]/CONFIG_FW_LOADER_COMPRESS_XZ=y/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_KERNEL_/#CONFIG_KERNEL_/g' ${MAIN_KCONFIG_FILE}
echo 'CONFIG_LTO_CLANG_THIN=y' >> ${MAIN_KCONFIG_FILE}
#echo 'CONFIG_DEBUG_INFO_COMPRESSED_ZLIB=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_DEBUG_INFO_COMPRESSED_XZ=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_KERNEL_XZ=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_MODULE_STRIPPED=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_MODULE_COMPRESS=y' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_MODULE_COMPRESS_XZ=y' >> ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XZ_DEC_POWERPC=[mny]/CONFIG_XZ_DEC_POWERPC=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XZ_DEC_ARM=[mny]/CONFIG_XZ_DEC_ARM=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XZ_DEC_ARMTHUMB=[mny]/CONFIG_XZ_DEC_ARMTHUMB=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_XZ_DEC_TEST=[mny]/CONFIG_XZ_DEC_TEST=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DECOMPRESS_LZMA=[mny]/CONFIG_DECOMPRESS_LZMA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DECOMPRESS_BZIP2=[mny]/CONFIG_DECOMPRESS_BZIP2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DECOMPRESS_LZO=[mny]/CONFIG_DECOMPRESS_LZO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DECOMPRESS_LZ4=[mny]/CONFIG_DECOMPRESS_LZ4=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_DECOMPRESS_ZSTD=[mny]/CONFIG_DECOMPRESS_ZSTD=n/g' ${MAIN_KCONFIG_FILE}
# gzip xz
sed -i 's/CONFIG_RD_LZMA=[mny]/CONFIG_RD_LZMA=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RD_BZIP2=[mny]/CONFIG_RD_BZIP2=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RD_LZO=[mny]/CONFIG_RD_LZO=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RD_LZ4=[mny]/CONFIG_RD_LZ4=n/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_RD_ZSTD=[mny]/CONFIG_RD_ZSTD=n/g' ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HAVE_KERNEL_BZIP2=n/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HAVE_KERNEL_LZMA=n/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HAVE_KERNEL_LZO=n/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HAVE_KERNEL_ZSTD=n/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HAVE_KERNEL_LZ4=y/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_CRYPTO_LZ4=y/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_ZRAM_BACKEND_LZ4=y/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_RT_GROUP_SCHED=y/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_BASE_FULL=y/g' >> ${MAIN_KCONFIG_FILE}
echo 'CONFIG_HYPERV_STORAGE=y/g' >> ${MAIN_KCONFIG_FILE}
# CONFIG_KALLSYMS=y, so no need System.map file
[ -e ./scripts/package/builddeb ] && sed -i '/System.map/s/^/#/' ./scripts/package/builddeb
# Append a timestamp or something to the localversion to make it unique:
# echo "$( cat localversion )-$( date +%s )" > localversion
export DEBFULLNAME="Alexandre Frade"
export DEBEMAIL="[email protected]"
export KDEB_CHANGELOG_DIST="bookworm"
#export KCONFIG_CONFIG="CONFIGS/xanmod/gcc/config_$psabi"
export lv=$(make -s kernelversion)
export xv=$(cat localversion)
export rv=0
PAREL_BUILD=$(nproc)
if [ "$PAREL_BUILD" -ge '8' ]; then
PAREL_BUILD=8
fi
date; make olddefconfig LLVM=1 LLVM_IAS=1
date; make KDEB_COMPRESS=xz bindeb-pkg -j${PAREL_BUILD} LLVM=1 LLVM_IAS=1
date
# build perf
create_package() {
local pname="$1" pdir="$2"
local dpkg_deb_opts
mkdir -m 755 -p "$pdir/DEBIAN"
mkdir -p "$pdir/usr/share/doc/$pname"
cp debian/copyright "$pdir/usr/share/doc/$pname/"
cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
gzip -n -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums"
# Fix ownership and permissions
if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
dpkg_deb_opts="--root-owner-group"
else
sudo -E chown -R root:root "$pdir"
fi
# a+rX in case we are in a restrictive umask environment like 0077
# ug-s in case we build in a setuid/setgid directory
sudo -E chmod -R go-w,a+rX,ug-s "$pdir"
# Create the package
#dpkg-gencontrol -p$pname -P"$pdir"
sudo -E cp ./debian/control "$pdir/DEBIAN/"
sudo -E dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
}
tools_version=$lv$pv$xv
tools_packagename=linux-tools
tools_destdir=./linux-tools-tmp
tools_destdir=`readlink -f $tools_destdir`
sudo -E rm -rf $tools_destdir || true
make -C ./tools/perf prefix=/usr DESTDIR=$tools_destdir install NO_LIBZSTD=1 NO_LIBPERL=1 NO_LIBBABELTRACE=1
make -C ./tools/power/cpupower DESTDIR=$tools_destdir prefix=/usr install NO_LIBZSTD=1 NO_LIBPERL=1 NO_LIBBABELTRACE=1
cat <<DEOF > debian/control
Package: $tools_packagename
Architecture: amd64
Replaces: linux-base, linux-tools-common
Depends: libc6, libcap2, libdw1, libelf1, liblzma5, libnuma1, libpci3, libudev1, libunwind8, zlib1g
Description: Performance analysis tools for Linux $tools_version
This package contains the 'perf' performance analysis tools for Linux
kernel version $tools_version .
Maintainer: linux
Version: $tools_version
DEOF
# create perf deb
KDEB_COMPRESS=xz create_package \"$tools_packagename\" $tools_destdir
# build x64v3
cp ${MAIN_KCONFIG_FILE} ${MAIN_KCONFIG_FILE}.v2
if [[ $XANMOD_CONFIG =~ "-v2" ]]; then
sed -i 's/x64v2/x64v3/g' ${MAIN_KCONFIG_FILE}
sed -i 's/CONFIG_X86_64_VERSION=2/CONFIG_X86_64_VERSION=3/g' ${MAIN_KCONFIG_FILE}
make olddefconfig LLVM=1 LLVM_IAS=1
make KDEB_COMPRESS=xz bindeb-pkg -j${PAREL_BUILD} LLVM=1 LLVM_IAS=1
fi
# build cloud image
#rm ${MAIN_KCONFIG_FILE} || true
#cp -f ${MAIN_KCONFIG_FILE}.v2 ${MAIN_KCONFIG_FILE}