Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Recipe directory structure:
- .
- ├── afrgb-stm32mp1_0.1.bb
- └── files
- ├── afrgb-stm32mp1.c
- └── Makefile
- afrgb-stm32mp1_0.1.bb:
- inherit module
- SUMMARY = "Adafruit RGB LED Matrix Driver for STM32MP1xx devices"
- LICENSE = "CLOSED"
- #SRC_URI = "git://code.technokrat.ch/ecarup/afrgb-stm32mp1.git;protocol=https;branch=rolling"
- SRC_URI = "file://Makefile \
- file://afrgb-stm32mp1.c \
- "
- S = "${WORKDIR}"
- PROVIDES_${PN} += "kernel-module-afrgb-stm32mp1"
- afrgb-stm32mp1.c:
- #include <linux/module.h>
- int init_module(void)
- {
- printk(KERN_ALERT "gay\n");
- return 0;
- }
- void cleanup_module(void)
- {
- printk(KERN_ALERT "oh no!\n");
- }
- MODULE_LICENSE("GPL");
- Makefile:
- obj-m := afrgb-stm32mp1.o
- SRC := $(shell pwd)
- all:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
- modules_install:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
- clean:
- rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
- rm -f Module.markers Module.symvers modules.order
- rm -rf .tmp_versions Modules.symvers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement