Loading recipes-modules/hello/files/Makefile +5 −3 Original line number Diff line number Diff line Loading @@ -2,10 +2,12 @@ obj-m += hello.o SRC := $(shell pwd) KERNEL_SRC := $(shell pwd)/../../../../../work-shared/qemuriscv64/kernel-source all: make -C $(KERNEL_SRC) ARCH=riscv M=$(SRC) modules $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install: $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install clean: make -C $(KERNEL_SRC) ARCH=riscv M=$(SRC) clean $(MAKE) -C $(KERNEL_SRC) M=$(SRC) clean recipes-modules/hello/files/hello.c +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ static int __init hello_init(void){ printk(KERN_ALERT"hello kernel.\n"); printk(KERN_ALERT"hello world!\n"); return 0; } Loading recipes-modules/hello/hello_0.1.bb +4 −16 Original line number Diff line number Diff line Loading @@ -6,21 +6,9 @@ SRC_URI = "file://hello.c \ inherit module do_copy_files () { echo $WORKDIR cp -f ${WORKDIR}/hello.c ${WORKDIR}/hello-0.1/ cp -f ${WORKDIR}/Makefile ${WORKDIR}/hello-0.1/ } addtask do_copy_files after do_configure before do_compile S = "${WORKDIR}" do_compile() { echo $WORKDIR make } do_install( ){ install -d ${D}/lib/modules/${KERNEL_VERSION} cd ${WORKDIR}/hello-0.1/ install -m 0644 hello.ko ${D}/lib/modules/${KERNEL_VERSION} } # The inherit of module.bbclass will automatically name module packages with # "kernel-module-" prefix as required by the oe-core build environment. RPROVIDES:${PN} += "kernel-module-hello" Loading
recipes-modules/hello/files/Makefile +5 −3 Original line number Diff line number Diff line Loading @@ -2,10 +2,12 @@ obj-m += hello.o SRC := $(shell pwd) KERNEL_SRC := $(shell pwd)/../../../../../work-shared/qemuriscv64/kernel-source all: make -C $(KERNEL_SRC) ARCH=riscv M=$(SRC) modules $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install: $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install clean: make -C $(KERNEL_SRC) ARCH=riscv M=$(SRC) clean $(MAKE) -C $(KERNEL_SRC) M=$(SRC) clean
recipes-modules/hello/files/hello.c +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ static int __init hello_init(void){ printk(KERN_ALERT"hello kernel.\n"); printk(KERN_ALERT"hello world!\n"); return 0; } Loading
recipes-modules/hello/hello_0.1.bb +4 −16 Original line number Diff line number Diff line Loading @@ -6,21 +6,9 @@ SRC_URI = "file://hello.c \ inherit module do_copy_files () { echo $WORKDIR cp -f ${WORKDIR}/hello.c ${WORKDIR}/hello-0.1/ cp -f ${WORKDIR}/Makefile ${WORKDIR}/hello-0.1/ } addtask do_copy_files after do_configure before do_compile S = "${WORKDIR}" do_compile() { echo $WORKDIR make } do_install( ){ install -d ${D}/lib/modules/${KERNEL_VERSION} cd ${WORKDIR}/hello-0.1/ install -m 0644 hello.ko ${D}/lib/modules/${KERNEL_VERSION} } # The inherit of module.bbclass will automatically name module packages with # "kernel-module-" prefix as required by the oe-core build environment. RPROVIDES:${PN} += "kernel-module-hello"