From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...use-kernel-makefile-to-get-kernel-version.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch (limited to 'meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch') diff --git a/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch b/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch new file mode 100644 index 000000000..95bd047b9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch @@ -0,0 +1,67 @@ +Get linux kernel version from Makefile of kernel source + +We get below messages while building iscsitarget, + +-- snip -- +x86_64-poky-linux-gcc: error: +/CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work-shared/qemux86-64/kernel-source/include/linux/version.h: +No such file or directory +x86_64-poky-linux-gcc: fatal error: no input files +compilation terminated. +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +/bin/sh: line 0: [: too many arguments +-- CUT -- + +These messages are due to absence of include/linux/version.h file in +kernel source directory and failed to compute linux kernel version. +So, use kernel source Makefile ( i.e $(KSRC)/Makefile) to find out +actual kernel version. + +Upstream-Status: Pending + +Signed-off-by: Jagadeesh Krishnanjanappa + +--- iscsitarget-1.4.20.3+svn499_org/Makefile 2014-01-27 00:00:45.000000000 +0530 ++++ iscsitarget-1.4.20.3+svn499/Makefile 2015-07-23 10:44:47.013600285 +0530 +@@ -18,27 +18,11 @@ ifeq ($(KSRC),) + endif + + +-ifneq ($(wildcard $(KSRC)/include/generated/utsrelease.h),) +- VERSION_FILE := $(KSRC)/include/generated/utsrelease.h +-else +- ifneq ($(wildcard $(KSRC)/include/linux/utsrelease.h),) +- VERSION_FILE := $(KSRC)/include/linux/utsrelease.h +- else +- VERSION_FILE := $(KSRC)/include/linux/version.h +- endif +-endif +- +-KVER := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -E -dM $(VERSION_FILE) | \ +- grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g') +- + KMOD := /lib/modules/$(KVER)/extra +- +-KMAJ := $(shell echo $(KVER) | \ +- sed -e 's/^\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*.*/\1/') +-KMIN := $(shell echo $(KVER) | \ +- sed -e 's/^[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*.*/\1/') +-KREV := $(shell echo $(KVER) | \ +- sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/') ++KMAJ := $(shell cat $(KSRC)/Makefile | grep ^VERSION | gawk -F " " '{ print $$NF }') ++KMIN := $(shell cat $(KSRC)/Makefile | grep ^PATCHLEVEL | gawk -F " " '{ print $$NF }') ++KREV := $(shell cat $(KSRC)/Makefile | grep ^SUBLEVEL | gawk -F " " '{ print $$NF }') ++KVER := ${KMAJ}.${KMIN}.${KREV} + + kver_eq = $(shell [ $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -eq $(3) ] && \ + echo 1 || echo 0) -- cgit v1.2.1