[oe] [meta-oe][PATCH] efivar: nvme header was renamed in linux 4.4
Robert Yang
liezhi.yang at windriver.com
Wed Feb 3 02:37:48 UTC 2016
On 02/03/2016 01:40 AM, Alexandru But wrote:
> nvme.h was renamed to nvme_ioctl.h in linux uapi headers since 4.4. Patch
> taken from the gentoo repository.
>
> Signed-off-by: Alexandru But <alexandru.but at ni.com>
> ---
> .../efivar/efivar/0.21-nvme_ioctl.h.patch | 30 ++++++++++++++++++++++
> meta-oe/recipes-extended/efivar/efivar_0.21.bb | 3 ++-
> 2 files changed, 32 insertions(+), 1 deletion(-)
> create mode 100644 meta-oe/recipes-extended/efivar/efivar/0.21-nvme_ioctl.h.patch
>
> diff --git a/meta-oe/recipes-extended/efivar/efivar/0.21-nvme_ioctl.h.patch b/meta-oe/recipes-extended/efivar/efivar/0.21-nvme_ioctl.h.patch
> new file mode 100644
> index 0000000..221ec5a
> --- /dev/null
> +++ b/meta-oe/recipes-extended/efivar/efivar/0.21-nvme_ioctl.h.patch
> @@ -0,0 +1,30 @@
> +From ae0869b71a90bc14e67f3c917bd9c96db25c99a6 Mon Sep 17 00:00:00 2001
> +From: Mike Gilbert <floppym at gentoo.org>
> +Date: Thu, 14 Jan 2016 17:02:31 -0500
> +Subject: [PATCH] Workaround rename of linux/nvme.h
> +
> +Bug: https://bugs.gentoo.org/571548
> +---
> + src/linux.c | 5 +++++
> + 1 file changed, 5 insertions(+)
> +
> +diff --git a/src/linux.c b/src/linux.c
> +index 5ebc151..e551377 100644
> +--- a/src/linux.c
> ++++ b/src/linux.c
> +@@ -22,7 +22,12 @@
> + #include <inttypes.h>
> + #include <limits.h>
> + #include <linux/ethtool.h>
> ++#include <linux/version.h>
> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
> ++#include <linux/nvme_ioctl.h>
> ++#else
> + #include <linux/nvme.h>
> ++#endif
> + #include <linux/sockios.h>
> + #include <net/if.h>
> + #include <scsi/scsi.h>
> +--
> +2.7.0
> +
> diff --git a/meta-oe/recipes-extended/efivar/efivar_0.21.bb b/meta-oe/recipes-extended/efivar/efivar_0.21.bb
> index 1684a10..3c34a7b 100644
> --- a/meta-oe/recipes-extended/efivar/efivar_0.21.bb
> +++ b/meta-oe/recipes-extended/efivar/efivar_0.21.bb
> @@ -9,7 +9,8 @@ DEPENDS_class-target = "popt efivar-native"
>
> SRCREV = "aab6c2a64d90b6e5a63661fb5bd6be8d878b0784"
> SRC_URI = "git://github.com/rhinstaller/efivar.git \
> - file://0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch"
> + file://0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch \
> + file://0.21-nvme_ioctl.h.patch"
This path is based on your previous, so it can't be applied.
And I got errors after fix conflicts:
| linux.c:27:30: fatal error: linux/nvme_ioctl.h: No such file or directory
| compilation terminated.
My kernel is 4.1.
// Robert
> SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch"
> SRC_URI_append_class-native = " file://efivar-drop-options-not-supported-by-lower-version-gcc.patch"
>
>
More information about the Openembedded-devel
mailing list