--- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/bug/Kconfig | 9 +++++++++ drivers/bug/Makefile | 3 +++ drivers/bug/bug1/Kconfig | 3 +++ drivers/bug/bug1/Makefile | 1 + drivers/bug/bug1/bug1.c | 20 ++++++++++++++++++++ 7 files changed, 39 insertions(+) --- /dev/null +++ b/drivers/bug/bug1/bug1.c @@ -0,0 +1,20 @@ +#include +#include +#include + +static int __init bug1_init(void) +{ + printk(KERN_INFO "Is this a buggy module?\n"); + return 0; +} + +static void __exit bug1_exit(void) +{ +} + +module_init(bug1_init); +module_exit(bug1_exit); + +MODULE_AUTHOR("Buggy McBug"); +MODULE_DESCRIPTION("Buggy driver"); +MODULE_LICENSE("GPL"); --- /dev/null +++ b/drivers/bug/bug1/Kconfig @@ -0,0 +1,3 @@ +config BUILD_BUG1 + tristate "Build Bug 1 selection" + default m --- /dev/null +++ b/drivers/bug/bug1/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BUILD_BUG1) += bug1.o --- /dev/null +++ b/drivers/bug/Kconfig @@ -0,0 +1,9 @@ +menuconfig BUILD_BUG + bool "test build system bug" + default y + +if BUILD_BUG + +source "drivers/bug/bug1/Kconfig" + +endif --- /dev/null +++ b/drivers/bug/Makefile @@ -0,0 +1,3 @@ +# Makefile + +obj-$(CONFIG_BUG1) += bug1/ --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -101,4 +101,6 @@ source "drivers/auxdisplay/Kconfig" source "drivers/uio/Kconfig" source "drivers/xen/Kconfig" + +source "drivers/bug/Kconfig" endmenu --- a/drivers/Makefile +++ b/drivers/Makefile @@ -99,3 +99,4 @@ obj-$(CONFIG_OF) += of/ obj-$(CONFIG_SSB) += ssb/ obj-$(CONFIG_VIRTIO) += virtio/ obj-$(CONFIG_REGULATOR) += regulator/ +obj-$(CONFIG_BUILD_BUG) += bug/