diff --git a/drivers/Kconfig b/drivers/Kconfig index 216c52363bd2c6945991e8705887e0b4f447c5c9..2fdedb7d0284c307e5b9eff209f9f470350099b0 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -246,4 +246,6 @@ source "drivers/hck/Kconfig" source "drivers/auth_ctl/Kconfig" +source "drivers/hello/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index d0ff4fdb0dfb69a97c4dea248a6c52d0d1a912a2..1a1e29716e7a228f1a622182250f564e29cf5658 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -196,3 +196,4 @@ obj-$(CONFIG_MOST) += most/ obj-$(CONFIG_ACCESS_TOKENID) += accesstokenid/ obj-$(CONFIG_VENDOR_HOOKS) += hooks/ obj-$(CONFIG_HCK_VENDOR_HOOKS) += hck/ +obj-y += hello/ diff --git a/drivers/hello/Kconfig b/drivers/hello/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..3107defd15a7d78921d83b31ff9b4d68caf6f934 --- /dev/null +++ b/drivers/hello/Kconfig @@ -0,0 +1,4 @@ +config HELLO + tristate "Hello world for lqq" + help + Hello for lqq \ No newline at end of file diff --git a/drivers/hello/Makefile b/drivers/hello/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9ef0255f2159b6096a4ca0bc171587a213aabf22 --- /dev/null +++ b/drivers/hello/Makefile @@ -0,0 +1 @@ +obj-${CONFIG_HELLO} += hello.o \ No newline at end of file diff --git a/drivers/hello/hello.c b/drivers/hello/hello.c new file mode 100644 index 0000000000000000000000000000000000000000..523de6b20ef9f0bf54c547c0d7759aedb3e698cb --- /dev/null +++ b/drivers/hello/hello.c @@ -0,0 +1,18 @@ +#include +#include +#include + +static int first_drv_init(void) +{ + printk("-----------------hello world !-------------------"); + return 0; +} + +static void first_drv_exit(void) +{ + printk("---------------exit hello world !----------------"); +} + +module_init(first_drv_init); +module_exit(first_drv_exit); +MODULE_LICENSE("GPL"); \ No newline at end of file