yocto/meta-igkboard/images/yocto-image-full.bb | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-hello/hello-app/files/Makefile | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-hello/hello-app/files/hello-app.c | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-hello/hello-app/hello-app_1.0.bb | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-kernel/hello-mod/files/Makefile | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-kernel/hello-mod/files/hello.c | ●●●●● patch | view | raw | blame | history | |
yocto/meta-igkboard/recipes-kernel/hello-mod/hello-mod.bb | ●●●●● patch | view | raw | blame | history |
yocto/meta-igkboard/images/yocto-image-full.bb
@@ -44,7 +44,7 @@ " CORE_IMAGE_EXTRA_INSTALL_BASE += " \ kernel-modules \ kernel-modules hello-app hello-mod \ firmwared linux-firmware \ powertop tzdata ppp vim \ xz lrzsz rsync dos2unix \ yocto/meta-igkboard/recipes-hello/hello-app/files/Makefile
New file @@ -0,0 +1,10 @@ APP_NAME=hello-app # Must add LDFLAGS, or Yocto will complain about missing GNU_HASH ${APP_NAME}: ${CC} -o $@ $@.c ${LDFLAGS} .PHONY: clean clean: rm -rf ${APP_NAME} yocto/meta-igkboard/recipes-hello/hello-app/files/hello-app.c
New file @@ -0,0 +1,22 @@ /********************************************************************************* * Copyright: (C) 2024 LingYun IoT System Studio. * All rights reserved. * * Filename: hello.c * Description: This file is hello example application build in yocto * * Version: 1.0.0(2024/07/14) * Author: Guo Wenxue <guowenxue@gmail.com> * ChangeLog: 1, Release initial version on "2024/07/14 10:34:45" * ********************************************************************************/ #include <stdio.h> int main (int argc, char **argv) { printf("Hello, LingYun IoT System Studio!\n"); return 0; } yocto/meta-igkboard/recipes-hello/hello-app/hello-app_1.0.bb
New file @@ -0,0 +1,25 @@ SUMMARY = "My Custom Hello Example Application" # Linces file is in poky/meta/files/common-licenses/ and use `md5sum` command to get the MD5 value LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c" # recipe version PV = "1" PR = "r0" # There is /usr/bin/hello link to hello.lmbench, so can not use application name 'hello' here SRC_URI = "file://hello-app.c \ file://Makefile \ " S = "${WORKDIR}" do_compile() { make } do_install() { install -d ${D}${bindir} install -m 0755 hello-app ${D}${bindir}/ } yocto/meta-igkboard/recipes-kernel/hello-mod/files/Makefile
New file @@ -0,0 +1,14 @@ obj-m := hello.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 yocto/meta-igkboard/recipes-kernel/hello-mod/files/hello.c
New file @@ -0,0 +1,34 @@ /********************************************************************************* * Copyright: (C) 2024 LingYun IoT System Studio. * All rights reserved. * * Filename: hello.c * Description: This file is hello example kernel module build in yocto * * Version: 1.0.0(2024/07/14) * Author: Guo Wenxue <guowenxue@gmail.com> * ChangeLog: 1, Release initial version on "2024/07/14 10:34:45" * ********************************************************************************/ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> int hello_init(void) { printk("Hello, hello-module loaded!\n"); return 0; } void hello_exit(void) { printk("Goodbye, hello-module unloaded!\n"); } module_init(hello_init); module_exit(hello_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Guo Wenxue"); MODULE_DESCRIPTION("A Simple Hello Kernel Module"); yocto/meta-igkboard/recipes-kernel/hello-mod/hello-mod.bb
New file @@ -0,0 +1,26 @@ SUMMARY = "My Custom Linux Kernel Hello Module" DESCRIPTION = "${SUMMARY}" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" SRC_URI = "file://Makefile \ file://hello.c \ " S = "${WORKDIR}" inherit module KERNEL_MODULE_AUTOLOAD = "hello" do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS oe_runmake -C ${STAGING_KERNEL_DIR} M=${S} } do_install() { install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra install -m 0644 ${S}/hello.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/ }