Skip to contentSkip to conversation

udev: Add 2 patches to support 4.4 kernel

PATCH Superseded Saul Wold 2 participants 3 messages Jan 19, 2016 – Jan 20, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 udev: Add 2 patches to support 4.4 kernel

These 2 patches are needed to build udev with the 4.4 kernel, the first mtd-probe adds back a stdint.h header that was removed in the kernel's mtd-user.h header file.

The second adds a check for a new header and sets a Makefile variable to determine which header to use for the new kernel vs older kernels.

---
 meta/recipes-core/udev/udev.inc                    |  5 ++-
 ...-Add-stdint.h-as-it-was-removed-from-mtd-.patch | 26 +++++++++++
 ...c-Makefile.am-Check-for-input.h-and-input.patch | 50 ++++++++++++++++++++++
 3 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch
 create mode 100644 meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch
meta/recipes-core/udev/udev.inc +4 -1
index c00ed34..93d7369 100644
@@ -31,7 +31,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://add-install-ptest.patch \
            file://fix_rule-syntax-regex-ptest.patch \
            file://run-ptest \
-           file://init"
+           file://init \
+           file://0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch \
+           file://0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch \
+           "
 
 inherit autotools pkgconfig update-rc.d ptest
 RDEPENDS_${PN}-ptest += "make perl python"
meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch new file +26 -0
new file mode 100644
index 0000000..439eeac
@@ -0,0 +1,26 @@
+From 2935f9b2dfb92c3ce4376a988cd01b624430905b Mon Sep 17 00:00:00 2001
+From: Saul Wold <[email protected]>
+Date: Tue, 19 Jan 2016 09:49:56 -0800
+Subject: [PATCH 1/2] mtd_probe.h: Add stdint.h as it was removed from
+ mtd-user.h in the kernel
+
+Signed-off-by: Saul Wold <[email protected]>
+---
+ src/mtd_probe/mtd_probe.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h
+index 2a37ede..49c1918 100644
+--- a/src/mtd_probe/mtd_probe.h
++++ b/src/mtd_probe/mtd_probe.h
+@@ -18,6 +18,7 @@
+  */
+ 
+ #include <mtd/mtd-user.h>
++#include <stdint.h>
+ 
+ /* Full oob structure as written on the flash */
+ struct sm_oob {
+-- 
+2.5.0
+
meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.5.0
#1 lore raw
Quoted 9 lines · Saul Wold

These 2 patches are needed to build udev with the 4.4 kernel, the first mtd-probe adds back a stdint.h header that was removed in the kernel's mtd-user.h header file.

The second adds a check for a new header and sets a Makefile variable to determine which header to use for the new kernel vs older kernels.

Patches are ok. You need to add Upstream-Status to both of them.

Quoted 122 lines

---

meta/recipes-core/udev/udev.inc                    |  5 ++-
...-Add-stdint.h-as-it-was-removed-from-mtd-.patch | 26 +++++++++++
...c-Makefile.am-Check-for-input.h-and-input.patch | 50 ++++++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch create mode 100644 meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch

meta/recipes-core/udev/udev.inc +4 -1
index c00ed34..93d7369 100644
@@ -31,7 +31,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
           file://add-install-ptest.patch \
           file://fix_rule-syntax-regex-ptest.patch \
           file://run-ptest \
-           file://init"
+           file://init \
+           file://0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch \
+           file://0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch \
+           "
 

inherit autotools pkgconfig update-rc.d ptest
RDEPENDS_${PN}-ptest += "make perl python"

meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch new file +26 -0
new file mode 100644
index 0000000..439eeac
@@ -0,0 +1,26 @@
+From 2935f9b2dfb92c3ce4376a988cd01b624430905b Mon Sep 17 00:00:00 2001
+From: Saul Wold <[email protected]>
+Date: Tue, 19 Jan 2016 09:49:56 -0800
+Subject: [PATCH 1/2] mtd_probe.h: Add stdint.h as it was removed from
+ mtd-user.h in the kernel
+
+Signed-off-by: Saul Wold <[email protected]>
+---
+ src/mtd_probe/mtd_probe.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h
+index 2a37ede..49c1918 100644
+--- a/src/mtd_probe/mtd_probe.h
++++ b/src/mtd_probe/mtd_probe.h
+@@ -18,6 +18,7 @@
+  */
+
+ #include <mtd/mtd-user.h>
++#include <stdint.h>
+
+ /* Full oob structure as written on the flash */
+ struct sm_oob {
+--
+2.5.0
+
meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch new file +50 -1
new file mode 100644
index 0000000..285680f
@@ -0,0 +1,50 @@
+From 63ae7ebb0c6177efed46734061fb59c458a47a26 Mon Sep 17 00:00:00 2001
+From: Saul Wold <[email protected]>
+Date: Tue, 19 Jan 2016 09:49:19 -0800
+Subject: [PATCH 2/2] configure.ac/Makefile.am: Check for input.h and
+ input-event-codes.h
+
+Add INPUT_HEADER to know which header file to use because it changed
+in the 4.4 kernel code.
+
+Set INPUT_HEADER with default linux/input.h if it exists and if the
+newer input-events-codes.h exists from 4.4 use it instead.
+
+Signed-off-by: Saul Wold <[email protected]>
+---
+ Makefile.am  | 2 +-
+ configure.ac | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2e32e69..04eb194 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -591,7 +591,7 @@ dist_udevkeymapforcerel_DATA = \
+ 	src/keymap/force-release-maps/samsung-other \
+ 	src/keymap/force-release-maps/common-volume-keys
+
+-src/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
++src/keymap/keys.txt: $(INCLUDE_PREFIX)/$(INPUT_HEADER)
+ 	$(AM_V_at)mkdir -p src/keymap
+ 	$(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
+
+diff --git a/configure.ac b/configure.ac
+index 0500313..9674620 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -154,8 +154,10 @@ AS_IF([test "x$enable_keymap" = "xyes"], [
+        if test -z "$GPERF"; then
+               AC_MSG_ERROR([gperf is needed])
+        fi
++
++       AC_CHECK_HEADER([linux/input.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input.h')])], AC_MSG_ERROR([kernel headers not found]))
++       AC_CHECK_HEADER([linux/input-event-codes.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input-event-codes.h')])], [:])
+
+-       AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
+        AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
+ ])
+ AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
+--
+2.5.0
+
--

2.5.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#2 lore raw
Quoted 8 lines · Khem Raj
Quoted 8 lines · Saul Wold

These 2 patches are needed to build udev with the 4.4 kernel, the first
mtd-probe adds back a stdint.h header that was removed in the kernel's mtd-user.h
header file.

Quoted 7 lines
Quoted 4 lines

The second adds a check for a new header and sets a Makefile variable
to determine which header to use for the new kernel vs older kernels.

Patches are ok. You need to add Upstream-Status to both of them.

Dang, to long away from doing core work, new ones coming.

Sau!

Quoted 154 lines
Quoted 153 lines

---
meta/recipes-core/udev/udev.inc                    |  5 ++- ...-Add-stdint.h-as-it-was-removed-from-mtd-.patch | 26 +++++++++++ ...c-Makefile.am-Check-for-input.h-and-input.patch | 50
++++++++++++++++++++++

3 files changed, 80 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-core/udev/udev/0001-mtd_probe.h- Add-stdint.h-as-it-was-removed-from-mtd-.patch
create mode 100644 meta/recipes-core/udev/udev/0002-configure.ac- Makefile.am-Check-for-input.h-and-input.patch

meta/recipes- renamed from meta/recipes-core/udev/udev.inc +0 -0

core/udev/udev.inc
index c00ed34..93d7369 100644

meta/recipes-core/udev/udev.inc +4 -1
@@ -31,7 +31,10 @@ SRC_URI =
 "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://add-install-ptest.patch \
            file://fix_rule-syntax-regex-ptest.patch \
            file://run-ptest \
-           file://init"
+           file://init \
+           file://0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-
 from-mtd-.patch \
+           file://0002-configure.ac-Makefile.am-Check-for-input.h-
 and-input.patch \
+           "

inherit autotools pkgconfig update-rc.d ptest
RDEPENDS_${PN}-ptest += "make perl python"

(quoted diff) +0 -0

stdint.h-as-it-was-removed-from-mtd-.patch b/meta/recipes- core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed- from-mtd-.patch
new file mode 100644
index 0000000..439eeac

meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as- new file +0 -0

it-was-removed-from-mtd-.patch

meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as- new file +1 -0
@@ -0,0 +1,26 @@
+From 2935f9b2dfb92c3ce4376a988cd01b624430905b Mon Sep 17 00:00:00

2001

meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as- new file +3 -0
+From: Saul Wold <[email protected]>
+Date: Tue, 19 Jan 2016 09:49:56 -0800
+Subject: [PATCH 1/2] mtd_probe.h: Add stdint.h as it was removed

from
+ mtd-user.h in the kernel

meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as- new file +21 -0
+
+Signed-off-by: Saul Wold <[email protected]>
+---
+ src/mtd_probe/mtd_probe.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h
+index 2a37ede..49c1918 100644
+--- a/src/mtd_probe/mtd_probe.h
++++ b/src/mtd_probe/mtd_probe.h
+@@ -18,6 +18,7 @@
+  */
+
+ #include <mtd/mtd-user.h>
++#include <stdint.h>
+
+ /* Full oob structure as written on the flash */
+ struct sm_oob {
+--
+2.5.0
+
(quoted diff) +0 -0

Makefile.am-Check-for-input.h-and-input.patch b/meta/recipes- core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and- input.patch
new file mode 100644
index 0000000..285680f

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +0 -0

Check-for-input.h-and-input.patch

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +1 -0
@@ -0,0 +1,50 @@
+From 63ae7ebb0c6177efed46734061fb59c458a47a26 Mon Sep 17 00:00:00

2001

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +3 -0
+From: Saul Wold <[email protected]>
+Date: Tue, 19 Jan 2016 09:49:19 -0800
+Subject: [PATCH 2/2] configure.ac/Makefile.am: Check for input.h

and
+ input-event-codes.h

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +2 -0
+
+Add INPUT_HEADER to know which header file to use because it

changed

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +3 -0
+in the 4.4 kernel code.
+
+Set INPUT_HEADER with default linux/input.h if it exists and if

the

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +20 -0
+newer input-events-codes.h exists from 4.4 use it instead.
+
+Signed-off-by: Saul Wold <[email protected]>
+---
+ Makefile.am  | 2 +-
+ configure.ac | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2e32e69..04eb194 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -591,7 +591,7 @@ dist_udevkeymapforcerel_DATA = \
+ 	src/keymap/force-release-maps/samsung-other \
+ 	src/keymap/force-release-maps/common-volume-keys
+
+-src/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
++src/keymap/keys.txt: $(INCLUDE_PREFIX)/$(INPUT_HEADER)
+ 	$(AM_V_at)mkdir -p src/keymap
+ 	$(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if

($$2 != "KEY_MAX") { print $$2 } }' < $< | sed
's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@

meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am- new file +11 -0
+
+diff --git a/configure.ac b/configure.ac
+index 0500313..9674620 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -154,8 +154,10 @@ AS_IF([test "x$enable_keymap" = "xyes"], [
+        if test -z "$GPERF"; then
+               AC_MSG_ERROR([gperf is needed])
+        fi
++
++       AC_CHECK_HEADER([linux/input.h], [AC_SUBST([INPUT_HEADER],

[$(echo 'linux/input.h')])], AC_MSG_ERROR([kernel headers not found]))
++       AC_CHECK_HEADER([linux/input-event-codes.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input-event-codes.h')])], [:])
+
+-       AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
+        AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
+ ])
+ AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
+--
+2.5.0
+
--
2.5.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core