Subject: patches/Kconfig-core-defaults.patch Signed-off-by: Ingo Molnar --- arch/x86/Kconfig | 98 +++++++++++++++++++++++++++++++++++++++++ arch/x86/Kconfig.needed | 99 ++++++++++++++++++++++++++++++++++++++++++ drivers/atm/Kconfig | 1 drivers/base/core.c | 3 + drivers/block/Kconfig | 4 + drivers/ide/Kconfig | 8 +++ drivers/mtd/Kconfig | 4 + drivers/net/appletalk/Kconfig | 4 + drivers/scsi/Kconfig | 4 + drivers/video/Kconfig | 28 +++++++++++ drivers/video/console/Kconfig | 7 ++ drivers/watchdog/Kconfig | 9 +++ fs/Kconfig | 4 + init/Kconfig | 20 ++++++-- init/main.c | 56 +++++++++++++++++++++++ kernel/time/Kconfig | 13 +++++ lib/Kconfig | 3 + lib/Kconfig.debug | 9 +++ lib/Kconfig.kgdb | 6 ++ security/Kconfig | 4 + security/selinux/Kconfig | 4 + sound/drivers/Kconfig | 4 + sound/oss/Kconfig | 4 + 23 files changed, 391 insertions(+), 5 deletions(-) Index: linux/arch/x86/Kconfig =================================================================== --- linux.orig/arch/x86/Kconfig +++ linux/arch/x86/Kconfig @@ -169,6 +169,12 @@ config X86_TRAMPOLINE config KTIME_SCALAR def_bool X86_32 + +config BOOTPARAM_SUPPORT + bool "bootparam support" + help + support for boot command-line parameters via .config + source "init/Kconfig" menu "Processor type and features" @@ -216,6 +222,10 @@ config X86_PC config X86_ELAN bool "AMD Elan" depends on X86_32 + + # dangerous to boot on non-Elan CPUs + depends on 0 + help Select this for an AMD Elan processor. @@ -227,6 +237,10 @@ config X86_VOYAGER bool "Voyager (NCR)" depends on X86_32 select SMP if !BROKEN + + # hangs on bootup on non-Voyager platforms + depends on 0 + help Voyager is an MCA-based 32-way capable SMP architecture proprietary to NCR Corp. Machine classes 345x/35xx/4100/51xx are Voyager-based. @@ -238,6 +252,10 @@ config X86_VOYAGER config X86_NUMAQ bool "NUMAQ (IBM/Sequent)" + + # hangs on bootup on non-Numaq platforms + depends on 0 + select SMP select NUMA depends on X86_32 @@ -270,6 +288,10 @@ config X86_BIGSMP config X86_VISWS bool "SGI 320/540 (Visual Workstation)" depends on X86_32 + + # hangs on bootup on non-VisWS platforms + depends on 0 + help The SGI Visual Workstation series is an IA32-based workstation based on SGI systems chips with some legacy PC hardware attached. @@ -290,6 +312,10 @@ config X86_GENERICARCH config X86_ES7000 bool "Support for Unisys ES7000 IA32 series" depends on X86_32 && SMP + + # hangs on bootup on non-VisWS platforms + depends on 0 + help Support for Unisys ES7000 systems. Say 'Y' here if this kernel is supposed to run on an IA32-based Unisys ES7000 system. @@ -1201,6 +1227,66 @@ config COMPAT_VDSO If unsure, say Y. +config BOOTPARAM_NMI_WATCHDOG_BIT_0 + bool "bootparam: nmi_watchdog=X default value - bit 0" + depends on BOOTPARAM_SUPPORT + help + NMI watchdog default, bit 0. Useful for automated testing. + +config BOOTPARAM_NMI_WATCHDOG_BIT_1 + bool "bootparam: nmi_watchdog=X default value - bit 1" + depends on BOOTPARAM_SUPPORT + help + NMI watchdog default, bit 1. Useful for automated testing. + +config BOOTPARAM_NOAPIC + bool "bootparam: noapic" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "noapic" on the boot line + +config BOOTPARAM_NOLAPIC + bool "bootparam: nolapic" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "nolapic" on the boot line + +config BOOTPARAM_LAPIC + bool "bootparam: lapic" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "lapic" on the boot line + +config BOOTPARAM_HPET_DISABLE + bool "bootparam: hpet=disable" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "hpet=disable" on the boot line + +config BOOTPARAM_IDLE_MWAIT + bool "bootparam: idle=mwait" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "idle=mwait" on the boot line + +config BOOTPARAM_IDLE_POLL + bool "bootparam: idle=poll" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "idle=poll" on the boot line + +config BOOTPARAM_HIGHMEM_512M + bool "bootparam: highmem=512m" + depends on BOOTPARAM_SUPPORT + help + highmem=512m boot parameter. Useful for automated testing. + +config BOOTPARAM_NOPAT + bool "bootparam: nopat" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "nopat" on the boot line + endmenu config ARCH_ENABLE_MEMORY_HOTPLUG @@ -1403,6 +1489,10 @@ config PCI_GOBIOS bool "BIOS" config PCI_GOMMCONFIG + + # hangs on bootup on non-PCIE systems + depends on 0 + bool "MMConfig" config PCI_GODIRECT @@ -1609,3 +1699,11 @@ source "security/Kconfig" source "crypto/Kconfig" source "lib/Kconfig" + +config X86_32_ALWAYS_ON + bool + default y + depends on X86_32 + select X86_PC + select PCI_GOANY + Index: linux/arch/x86/Kconfig.needed =================================================================== --- /dev/null +++ linux/arch/x86/Kconfig.needed @@ -0,0 +1,99 @@ +config FORCE_MINIMAL_CONFIG + bool + default y + + select EXPERIMENTAL + + select EXT3_FS + select EXT3_FS_XATTR + select EXT3_FS_POSIX_ACL + select EXT3_FS_SECURITY + select BLOCK + select HOTPLUG +#select INOTIFY +#select INOTIFY_USER + + # so that capset() works (sudo, etc.): + select SECURITY + select SECURITY_CAPABILITIES + select BINFMT_ELF + + select MSDOS_PARTITION + select PARTITION_ADVANCED + select BSD_DISKLABEL + + select SYSFS + select SYSFS_DEPRECATED + select PROC_FS + select FUTEX + +select PACKET + +select NETPOLL +select NETCONSOLE +select NET_POLL_CONTROLLER +select INET +select NET +select UNIX +select NETDEVICES + +select SERIAL_8250 +select SERIAL_8250_CONSOLE +select MAGIC_SYSRQ + +select INPUT +select INPUT_MOUSEDEV +select INPUT_POLLDEV +select INPUT_KEYBOARD +select KEYBOARD_ATKBD +select SERIO +select SERIO_I8042 + +select VT +select VT_CONSOLE +select HW_CONSOLE +select VGA_CONSOLE +select EARLY_PRINTK +select PRINTK +select UNIX98_PTYS +select STANDALONE +select PREVENT_FIRMWARE_BUILD + +config FORCE_MINIMAL_CONFIG_64 + bool + default y + depends on X86_64 + select IA32_EMULATION + +config FORCE_MINIMAL_CONFIG_PHYS + bool + default y + depends on X86_64 || X86_32 + + select ATA + select SATA_AHCI + select ATA_PIIX + select PATA_AMD + select PATA_OLDPIIX + select BLK_DEV_SD + + select E100 + select E1000 + select NET_ETHERNET + select NET_PCI + select MII + select CRC32 + + select 8139TOO + select FORCEDETH + + select USB + select USB_MOUSE + select USB_EHCI_HCD + select USB_OHCI_HCD + select USB_UHCI_HCD + select USB_SUPPORT + + select PCI + + Index: linux/drivers/atm/Kconfig =================================================================== --- linux.orig/drivers/atm/Kconfig +++ linux/drivers/atm/Kconfig @@ -344,6 +344,7 @@ config ATM_FORE200E_MAYBE config ATM_FORE200E_PCA bool "PCA-200E support" depends on ATM_FORE200E_MAYBE && PCI + select ATM_FORE200E_PCA_DEFAULT_FW if PREVENT_FIRMWARE_BUILD help Say Y here if you want your PCA-200E cards to be probed. Index: linux/drivers/base/core.c =================================================================== --- linux.orig/drivers/base/core.c +++ linux/drivers/base/core.c @@ -104,7 +104,10 @@ static void device_release(struct kobjec printk(KERN_ERR "Device '%s' does not have a release() function, " "it is broken and must be fixed.\n", dev->bus_id); +#if 0 + // not a real bug: WARN_ON(1); +#endif } } Index: linux/drivers/block/Kconfig =================================================================== --- linux.orig/drivers/block/Kconfig +++ linux/drivers/block/Kconfig @@ -81,6 +81,10 @@ config BLK_DEV_XD config PARIDE tristate "Parallel port IDE device support" depends on PARPORT_PC + + # the probe can hang during bootup on non-PARIDE boxes + depends on 0 + ---help--- There are many external CD-ROM and disk devices that connect through your computer's parallel port. Most of them are actually IDE devices Index: linux/drivers/ide/Kconfig =================================================================== --- linux.orig/drivers/ide/Kconfig +++ linux/drivers/ide/Kconfig @@ -6,6 +6,10 @@ menuconfig IDE tristate "ATA/ATAPI/MFM/RLL support" + + # my test box expects /dev/sda, not /dev/hda + depends on 0 + depends on BLOCK depends on HAS_IOMEM ---help--- @@ -121,6 +125,10 @@ config BLK_DEV_IDE_SATA config BLK_DEV_HD_IDE bool "Use old disk-only driver on primary interface" depends on (X86 || SH_MPC1211) + + # unsafe and hangs on newer boxes + depends on 0 + ---help--- There are two drivers for MFM/RLL/IDE disks. Most people use just the new enhanced driver by itself. This option however installs the Index: linux/drivers/mtd/Kconfig =================================================================== --- linux.orig/drivers/mtd/Kconfig +++ linux/drivers/mtd/Kconfig @@ -3,6 +3,10 @@ menuconfig MTD tristate "Memory Technology Device (MTD) support" depends on HAS_IOMEM + + # dangerous to enable - sometimes hangs on probe + depends on 0 + help Memory Technology Devices are flash, RAM and similar chips, often used for solid state file systems on embedded devices. This option Index: linux/drivers/net/appletalk/Kconfig =================================================================== --- linux.orig/drivers/net/appletalk/Kconfig +++ linux/drivers/net/appletalk/Kconfig @@ -52,6 +52,10 @@ config LTPC config COPS tristate "COPS LocalTalk PC support" depends on DEV_APPLETALK && (ISA || EISA) + # + # Can hang + # + depends on 0 help This allows you to use COPS AppleTalk cards to connect to LocalTalk networks. You also need version 1.3.3 or later of the netatalk Index: linux/drivers/scsi/Kconfig =================================================================== --- linux.orig/drivers/scsi/Kconfig +++ linux/drivers/scsi/Kconfig @@ -1529,6 +1529,10 @@ config SCSI_NSP32 config SCSI_DEBUG tristate "SCSI debugging host simulator" depends on SCSI + + # this creates a fake /dev/sda which confuses the bzImage bootup + depends on 0 + help This is a host adapter simulator that can simulate multiple hosts each with multiple dummy SCSI devices (disks). It defaults to one Index: linux/drivers/video/Kconfig =================================================================== --- linux.orig/drivers/video/Kconfig +++ linux/drivers/video/Kconfig @@ -203,6 +203,10 @@ comment "Frame buffer hardware drivers" config FB_CIRRUS tristate "Cirrus Logic support" + + # can hang on a box without this hardware + depends on 0 + depends on FB && (ZORRO || PCI) select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -513,6 +517,10 @@ config FB_CT65550 config FB_ASILIANT bool "Asiliant (Chips) 69000 display support" + + # can hang on a box without this hardware + depends on 0 + depends on (FB = y) && PCI select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -531,6 +539,10 @@ config FB_IMSTT config FB_VGA16 tristate "VGA 16-color graphics support" + + # can hang on a box without this hardware + depends on 0 + depends on FB && (X86 || PPC) select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -630,6 +642,10 @@ config FB_UVESA config FB_VESA bool "VESA VGA graphics support" + + # can hang on a box without this hardware + depends on 0 + depends on (FB = y) && X86 select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -1257,6 +1273,10 @@ config FB_MATROX_MULTIHEAD config FB_RADEON tristate "ATI Radeon display support" + + # can hang on a box without this hardware + depends on 0 + depends on FB && PCI select FB_BACKLIGHT if FB_RADEON_BACKLIGHT select FB_MODE_HELPERS @@ -1539,6 +1559,10 @@ config FB_VT8623 config FB_CYBLA tristate "Cyberblade/i1 support" + + # can hang on a box without this hardware + depends on 0 + depends on FB && PCI && X86_32 && !64BIT select FB_CFB_IMAGEBLIT select VIDEO_SELECT @@ -1882,6 +1906,10 @@ config FB_XILINX config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" + + # can hang on a box without this hardware + depends on 0 + depends on FB select FB_SYS_FILLRECT select FB_SYS_COPYAREA Index: linux/drivers/video/console/Kconfig =================================================================== --- linux.orig/drivers/video/console/Kconfig +++ linux/drivers/video/console/Kconfig @@ -61,6 +61,10 @@ config VIDEO_SELECT config MDA_CONSOLE depends on !M68K && !PARISC && ISA + + # can hang on a box without this hardware + depends on 0 + tristate "MDA text console (dual-headed) (EXPERIMENTAL)" ---help--- Say Y here if you have an old MDA or monochrome Hercules graphics @@ -113,6 +117,9 @@ config DUMMY_CONSOLE_ROWS config FRAMEBUFFER_CONSOLE tristate "Framebuffer Console support" + + depends on 0 + depends on FB select CRC32 help Index: linux/drivers/watchdog/Kconfig =================================================================== --- linux.orig/drivers/watchdog/Kconfig +++ linux/drivers/watchdog/Kconfig @@ -311,6 +311,11 @@ config SC520_WDT config EUROTECH_WDT tristate "Eurotech CPU-1220/1410 Watchdog Timer" depends on X86 + + # this ISA driver puts itself on IRQ10 - if IRQ10 happens to + # trigger then that will cause a watchdog-initiated reboot + depends on 0 + help Enable support for the watchdog timer on the Eurotech CPU-1220 and CPU-1410 cards. These are PC/104 SBCs. Spec sheets and product @@ -788,6 +793,10 @@ config MIXCOMWD config WDT tristate "WDT Watchdog timer" depends on ISA + + # this ISA driver sits on IRQ11 by default - blocking forcedeth + depends on 0 + ---help--- If you have a WDT500P or WDT501P watchdog board, say Y here, otherwise N. It is not possible to probe for this board, which means Index: linux/fs/Kconfig =================================================================== --- linux.orig/fs/Kconfig +++ linux/fs/Kconfig @@ -1744,6 +1744,10 @@ config NFSD_TCP config ROOT_NFS bool "Root file system on NFS" depends on NFS_FS=y && IP_PNP + + # hangs a non-root-NFS box during bootup + depends on 0 + help If you want your Linux box to mount its whole root file system (the one containing the directory /) from some other computer over the Index: linux/init/Kconfig =================================================================== --- linux.orig/init/Kconfig +++ linux/init/Kconfig @@ -272,10 +272,10 @@ config IKCONFIG_PROC config LOG_BUF_SHIFT int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" range 12 21 - default 17 if S390 || LOCKDEP - default 16 if X86_NUMAQ || IA64 - default 15 if SMP - default 14 + + # auto-qa needs to see all messages + default 20 + help Select kernel log buffer size as a power of 2. Defaults and Examples: @@ -324,6 +324,18 @@ config CPUSETS Say N if unsure. +config BOOTPARAM_MAXCPUS_1 + bool "bootparam: maxcpus=1" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "maxcpus=1" on the boot line + +config BOOTPARAM_NOSMP + bool "bootparam: nosmp" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "nosmp" on the boot line + config FAIR_GROUP_SCHED bool "Fair group CPU scheduler" default y Index: linux/init/main.c =================================================================== --- linux.orig/init/main.c +++ linux/init/main.c @@ -126,6 +126,58 @@ static char *static_command_line; static char *execute_command; static char *ramdisk_execute_command; +const char bootparam_command_line [] = +"" +#ifdef CONFIG_BOOTPARAM_MAXCPUS_1 +" maxcpus=1" +#endif +#ifdef CONFIG_BOOTPARAM_NOSMP +" nosmp" +#endif +#ifdef CONFIG_BOOTPARAM_NO_HZ_OFF +" no_hz=off" +#endif +#ifdef CONFIG_BOOTPARAM_HIGHRES_OFF +" highres=0" +#endif +#if defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_0) && \ + !defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_1) +" nmi_watchdog=0" +#endif +#if !defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_0) && \ + defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_1) +" nmi_watchdog=1" +#endif +#if defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_0) && \ + defined(CONFIG_BOOTPARAM_NMI_WATCHDOG_BIT_1) +" nmi_watchdog=2" +#endif +#ifdef CONFIG_BOOTPARAM_NOAPIC +" noapic" +#endif +#ifdef CONFIG_BOOTPARAM_NOLAPIC +" nolapic" +#endif +#ifdef CONFIG_BOOTPARAM_LAPIC +" lapic" +#endif +#ifdef CONFIG_BOOTPARAM_HPET_DISABLE +" hpet=disable" +#endif +#ifdef CONFIG_BOOTPARAM_IDLE_MWAIT +" idle=mwait" +#endif +#ifdef CONFIG_BOOTPARAM_IDLE_POLL +" idle=poll" +#endif +#ifdef CONFIG_BOOTPARAM_HIGHMEM_512M +" highmem=512m" +#endif +#ifdef CONFIG_BOOTPARAM_NOPAT +" nopat" +#endif +; + #ifdef CONFIG_SMP /* Setup configured maximum number of CPUs to activate */ static unsigned int __initdata max_cpus = NR_CPUS; @@ -484,6 +536,7 @@ void __init parse_early_param(void) /* All fall through to do_early_param. */ strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); parse_args("early options", tmp_cmdline, NULL, 0, do_early_param); + done = 1; } @@ -511,6 +564,9 @@ asmlinkage void __init start_kernel(void smp_setup_processor_id(); + /* Build-time simulated boot parameters: */ + strncat(boot_command_line, bootparam_command_line, COMMAND_LINE_SIZE); + /* * Need to run as early as possible, to initialize the * lockdep hash: Index: linux/kernel/time/Kconfig =================================================================== --- linux.orig/kernel/time/Kconfig +++ linux/kernel/time/Kconfig @@ -14,6 +14,12 @@ config NO_HZ only trigger on an as-needed basis both when the system is busy and when the system is idle. +config BOOTPARAM_NO_HZ_OFF + bool "bootparam: no_hz" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "no_hz=off" on the boot line + config HIGH_RES_TIMERS bool "High Resolution Timer Support" depends on GENERIC_TIME && GENERIC_CLOCKEVENTS @@ -28,3 +34,10 @@ config GENERIC_CLOCKEVENTS_BUILD default y depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR +config BOOTPARAM_HIGHRES_OFF + bool "bootparam: highres=0" + depends on BOOTPARAM_SUPPORT + help + if enabled, it has the effect as "highres=0" on the boot line + + Index: linux/lib/Kconfig =================================================================== --- linux.orig/lib/Kconfig +++ linux/lib/Kconfig @@ -142,3 +142,6 @@ config CHECK_SIGNATURE bool endmenu + +source "arch/x86/Kconfig.needed" + Index: linux/lib/Kconfig.debug =================================================================== --- linux.orig/lib/Kconfig.debug +++ linux/lib/Kconfig.debug @@ -345,6 +345,11 @@ config STACKTRACE config DEBUG_KOBJECT bool "kobject debugging" depends on DEBUG_KERNEL + # + # Slows down bootup unnecessarily and does not catch bugs + # by itself - so disable this. + # + depends on 0 help If you say Y here, some extra kobject debugging messages will be sent to the syslog. @@ -369,6 +374,10 @@ config DEBUG_BUGVERBOSE config DEBUG_INFO bool "Compile the kernel with debug info" depends on DEBUG_KERNEL + + # too slow build in QA + depends on 0 + help If you say Y here the resulting kernel image will include debugging info resulting in a larger kernel image. Index: linux/lib/Kconfig.kgdb =================================================================== --- linux.orig/lib/Kconfig.kgdb +++ linux/lib/Kconfig.kgdb @@ -6,13 +6,17 @@ config WANT_EXTRA_DEBUG_INFORMATION select FRAME_POINTER if X86 default n + # slow to build + depends on 0 + config UNWIND_INFO bool default n config KGDB bool "KGDB: kernel debugging with remote gdb" - select WANT_EXTRA_DEBUG_INFORMATION +# slow to build +# select WANT_EXTRA_DEBUG_INFORMATION select KGDB_ARCH_HAS_SHADOW_INFO if X86_64 depends on DEBUG_KERNEL && (X86) help Index: linux/security/Kconfig =================================================================== --- linux.orig/security/Kconfig +++ linux/security/Kconfig @@ -93,6 +93,10 @@ config SECURITY_FILE_CAPABILITIES config SECURITY_ROOTPLUG bool "Root Plug Support" depends on USB=y && SECURITY + + # fails with hard-to-debug "could not find init" boot failure + depends on 0 + help This is a sample LSM module that should only be used as such. It prevents any programs running with egid == 0 if a specific Index: linux/security/selinux/Kconfig =================================================================== --- linux.orig/security/selinux/Kconfig +++ linux/security/selinux/Kconfig @@ -100,6 +100,10 @@ config SECURITY_SELINUX_CHECKREQPROT_VAL config SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT bool "NSA SELinux enable new secmark network controls by default" depends on SECURITY_SELINUX + + # old system booted up with this cannot ssh out + depends on 0 + default n help This option determines whether the new secmark-based network Index: linux/sound/drivers/Kconfig =================================================================== --- linux.orig/sound/drivers/Kconfig +++ linux/sound/drivers/Kconfig @@ -60,6 +60,10 @@ config SND_VIRMIDI config SND_MTPAV tristate "MOTU MidiTimePiece AV multiport MIDI" depends on SND + + # may hang on non-hardware + depends on 0 + select SND_RAWMIDI help To use a MOTU MidiTimePiece AV multiport MIDI adapter Index: linux/sound/oss/Kconfig =================================================================== --- linux.orig/sound/oss/Kconfig +++ linux/sound/oss/Kconfig @@ -305,6 +305,10 @@ config MSND_FIFOSIZE config SOUND_OSS tristate "OSS sound modules" depends on SOUND_PRIME && ISA_DMA_API && VIRT_TO_BUS + + # obsolete drivers + depends on 0 + help OSS is the Open Sound System suite of sound card drivers. They make sound programming easier since they provide a common API. Say Y or