package/owl-linux: use kernel-module helper
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 12 Jul 2015 00:21:39 +0000 (02:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 09:56:19 +0000 (11:56 +0200)
The owl-linux' Makefile is only calling the Linux buildsystem, so switch
do using the new kernel-module infra.

Get rid of first patch, no longer needed; rename remaining patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/owl-linux/0001-fix-CROSS_COMPILE-usage-in-Makefile.patch [deleted file]
package/owl-linux/0001-fix-for-linux-3.3.x.patch [new file with mode: 0644]
package/owl-linux/0002-fix-for-linux-3.3.x.patch [deleted file]
package/owl-linux/owl-linux.mk

diff --git a/package/owl-linux/0001-fix-CROSS_COMPILE-usage-in-Makefile.patch b/package/owl-linux/0001-fix-CROSS_COMPILE-usage-in-Makefile.patch
deleted file mode 100644 (file)
index 14b4631..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix the owl-linux Makefile so that it protects spaces in the CROSS_COMPILE
-variable. For example, this variable will contain spaces if ccache is used.
-
-Signed-off-by: Simon Dawson <spdawson@gmail.com>
-diff -Nurp a/Makefile b/Makefile
---- a/Makefile 2012-06-14 10:51:45.000000000 +0100
-+++ b/Makefile 2012-07-20 10:46:41.636752148 +0100
-@@ -35,7 +35,7 @@ else
-       PWD := $(shell pwd)
- default:
--      $(MAKE) -C $(KERNELDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) MODE=$(MODE) modules
-+      $(MAKE) -C $(KERNELDIR) ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_COMPILE)" M=$(PWD) MODE=$(MODE) modules
- clean: 
-       -rm -f *.o *.mod.c *.ko modules.order Module.symvers
diff --git a/package/owl-linux/0001-fix-for-linux-3.3.x.patch b/package/owl-linux/0001-fix-for-linux-3.3.x.patch
new file mode 100644 (file)
index 0000000..831ac7f
--- /dev/null
@@ -0,0 +1,21 @@
+Kernel commit b81693d9149c598302e8eb9c20cb20330d922c8e changed the
+net_device_ops structure, removing the ndo_set_multicast_list callback. The
+ndo_set_rx_mode has also been added to this structure.
+
+The upshot of these changes is that owl-linux fails to compile with 3.3.x
+and later kernels.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+diff -Nurp a/owl_net.c b/owl_net.c
+--- a/owl_net.c        2012-06-14 10:51:45.000000000 +0100
++++ b/owl_net.c        2012-07-20 13:16:28.772351464 +0100
+@@ -384,7 +384,9 @@ static const struct net_device_ops netde
+ #endif /* OWL_CONFIG_IFUPDOWN */
+         .ndo_start_xmit         = owl_net_tx,
+         .ndo_get_stats          = owl_net_get_stats,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+         .ndo_set_multicast_list = NULL,
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */
+         .ndo_tx_timeout         = owl_net_tx_timeout,
+         .ndo_set_mac_address    = NULL,
+ };
diff --git a/package/owl-linux/0002-fix-for-linux-3.3.x.patch b/package/owl-linux/0002-fix-for-linux-3.3.x.patch
deleted file mode 100644 (file)
index 831ac7f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Kernel commit b81693d9149c598302e8eb9c20cb20330d922c8e changed the
-net_device_ops structure, removing the ndo_set_multicast_list callback. The
-ndo_set_rx_mode has also been added to this structure.
-
-The upshot of these changes is that owl-linux fails to compile with 3.3.x
-and later kernels.
-
-Signed-off-by: Simon Dawson <spdawson@gmail.com>
-diff -Nurp a/owl_net.c b/owl_net.c
---- a/owl_net.c        2012-06-14 10:51:45.000000000 +0100
-+++ b/owl_net.c        2012-07-20 13:16:28.772351464 +0100
-@@ -384,7 +384,9 @@ static const struct net_device_ops netde
- #endif /* OWL_CONFIG_IFUPDOWN */
-         .ndo_start_xmit         = owl_net_tx,
-         .ndo_get_stats          = owl_net_get_stats,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
-         .ndo_set_multicast_list = NULL,
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */
-         .ndo_tx_timeout         = owl_net_tx_timeout,
-         .ndo_set_mac_address    = NULL,
- };
index 371cc027225494d52c992469f0348088d8117b3e..126242524931a5ad0ead2cd3459918e6da627aa7 100644 (file)
@@ -10,14 +10,5 @@ OWL_LINUX_LICENSE = PROPRIETARY
 OWL_LINUX_LICENSE_FILES = LICENSE
 OWL_LINUX_REDISTRIBUTE = NO
 
-OWL_LINUX_DEPENDENCIES = linux
-
-define OWL_LINUX_BUILD_CMDS
-       $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR)
-endef
-
-define OWL_LINUX_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(@D)" modules_install
-endef
-
+$(eval $(kernel-module))
 $(eval $(generic-package))