emlog: Do not clean modules when building apps
PATCH 1/2 emlog: Do not clean modules when building apps
Fixes
make -C /lib/modules/5.5.13-arch1-1/build M=/mnt/b/yoe/build/tmp/work/core2-64-yoe-linux/emlog/git-r0/git clean make[1]: *** /lib/modules/5.5.13-arch1-1/build: No such file or directory. Stop.
make: *** [Makefile:36: modules_clean] Error 2
Signed-off-by Khem Raj <[email protected]>
--- ...move-modules_clean-from-clean-target.patch | 33 +++++++++++++++++++ meta-oe/recipes-core/emlog/emlog_git.bb | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-core/emlog/emlog/0001-Remove-modules_clean-from-clean-target.patch
meta-oe/recipes-core/emlog/emlog/0001-Remove-modules_clean-from-clean-target.patch new file +33 -0
@@ -0,0 +1,33 @@ +From fd0a4ee201b5c7b24da79dcd346ac121978951a0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 29 Mar 2020 19:58:36 -0700 +Subject: [PATCH] Remove modules_clean from clean target + +This is needed when building applications (w/o module) +Since OE will run 'make clean' before reconfiguring, this +will try to run module_clean and will wrongly try to look for removing +modules from /lib/modules + +Upstream-Status: Inappropriate [ OE-Specific ] + +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index c60863f..fc897d5 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,7 +23,7 @@ all: modules nbcat mkemlog + + install: modules_install nbcat_install mkemlog_install + +-clean: modules_clean nbcat_clean mkemlog_clean ++clean: nbcat_clean mkemlog_clean + + modules: + $(MAKE) -C $(KDIR) M=$(CURDIR) modules +-- +2.26.0 +
meta-oe/recipes-core/emlog/emlog_git.bb +5 -1
@@ -1,6 +1,8 @@ require ${BPN}.inc -SRC_URI += "file://${BPN}.initd" +SRC_URI += "file://${BPN}.initd \ + file://0001-Remove-modules_clean-from-clean-target.patch \ + " SRC_URI_append_libc-musl = " file://Drop-use-of-error-h.patch"
@@ -8,6 +10,8 @@ inherit update-rc.d INITSCRIPT_NAME = "${BPN}" + + do_compile() { oe_runmake nbcat oe_runmake mkemlog
Signature · 1 line
2.26.0
PATCH 2/2 wireguard-tools: Ensure make clean target is run properly
When S is pointing to a level up, it calls clean target which also tries to clean the module build objects, which causes make clean to misnehave since the env is not set to build module and it tries to reach out to /lib/modules dir on host
Signed-off-by Khem Raj <[email protected]>
--- .../wireguard/wireguard-tools_0.0.20191219.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20191219.bb +4 -5
@@ -1,15 +1,14 @@ require wireguard.inc +LIC_FILES_CHKSUM = "file://../../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + inherit bash-completion systemd pkgconfig -DEPENDS = "wireguard-module libmnl" +DEPENDS += "wireguard-module libmnl" -do_compile_prepend () { - cd ${S}/tools -} +S = "${WORKDIR}/WireGuard-${PV}/src/tools" do_install () { - cd ${S}/tools oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \ SYSTEMDUNITDIR="${systemd_unitdir}" \ WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
Signature · 1 line
2.26.0