mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-10-14 19:46:38 +07:00
Support Orange Pi Zero3
This commit is contained in:
10
external/packages/bsp/common/usr/src/hello/Makefile
vendored
Executable file
10
external/packages/bsp/common/usr/src/hello/Makefile
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
obj-m:=hello.o
|
||||
else
|
||||
KDIR :=/lib/modules/$(shell uname -r)/build
|
||||
PWD :=$(shell pwd)
|
||||
all:
|
||||
make -C $(KDIR) M=$(PWD) modules
|
||||
clean:
|
||||
rm -f *.ko *.o *.mod.o *.mod *.symvers *.cmd *.mod.c *.order
|
||||
endif
|
||||
20
external/packages/bsp/common/usr/src/hello/hello.c
vendored
Executable file
20
external/packages/bsp/common/usr/src/hello/hello.c
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
static int hello_init(void)
|
||||
{
|
||||
printk("Hello Orange Pi -- init\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
static void hello_exit(void)
|
||||
{
|
||||
printk("Hello Orange Pi -- exit\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
module_init(hello_init);
|
||||
module_exit(hello_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
Reference in New Issue
Block a user