* [Buildroot] [PATCH v1] racehound: fix kernel module compile
@ 2015-07-16 21:24 Peter Seiderer
2015-07-16 21:45 ` Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Peter Seiderer @ 2015-07-16 21:24 UTC (permalink / raw)
To: buildroot
- check for linux kernel >= 3.14
- add cross compile enviornment for linux kernel compile
- add additional kernel config hint (CONFIG_KALLSYMS_ALL)
- fix kernel module install path
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
...install-path-lib-instead-of-usr-lib-prefi.patch | 26 ++++++++++++++++++++++
package/racehound/Config.in | 5 ++++-
package/racehound/racehound.mk | 7 +++++-
3 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch
diff --git a/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch b/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch
new file mode 100644
index 0000000..6cac55d
--- /dev/null
+++ b/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch
@@ -0,0 +1,26 @@
+From 4f8ed39ddaf17c7dd4ddbdb88e67097f00c98173 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 16 Jul 2015 23:11:25 +0200
+Subject: [PATCH] Fix module install path (/lib instead of /usr/lib prefix)
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ cmake/modules/path_prefixes.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/path_prefixes.cmake b/cmake/modules/path_prefixes.cmake
+index 3cb1fe2..9dc50a4 100644
+--- a/cmake/modules/path_prefixes.cmake
++++ b/cmake/modules/path_prefixes.cmake
+@@ -113,7 +113,7 @@ set(RH_INSTALL_PREFIX_DOC
+ # Set derivative prefixes
+
+ # additional, 1
+-set(RH_INSTALL_PREFIX_KMODULE "${RH_INSTALL_PREFIX_LIB}/modules/${KBUILD_VERSION_STRING}/misc")
++set(RH_INSTALL_PREFIX_KMODULE "/lib/modules/${KBUILD_VERSION_STRING}/misc")
+ # Another variant
+ #"${RH_INSTALL_PREFIX_LIB}/modules/${KBUILD_VERSION_STRING}/extra")
+ # additional, 2
+--
+2.1.4
+
diff --git a/package/racehound/Config.in b/package/racehound/Config.in
index f0a8565..e8872c5 100644
--- a/package/racehound/Config.in
+++ b/package/racehound/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_RACEHOUND
bool "racehound"
select BR2_PACKAGE_ELFUTILS
depends on BR2_LINUX_KERNEL
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils
@@ -18,12 +19,14 @@ config BR2_PACKAGE_RACEHOUND
- CONFIG_SYSFS
- CONFIG_DEBUG_FS
- CONFIG_KALLSYMS
+ - CONFIG_KALLSYMS_ALL
- CONFIG_KPROBES
https://github.com/winnukem/racehound
-comment "racehound needs an Linux kernel to be built"
+comment "racehound needs an Linux kernel >= 3.14 to be built"
depends on !BR2_LINUX_KERNEL
+ depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
depends on BR2_i386 || BR2_x86_64
comment "racehound needs a toolchain w/ C++, wchar, dynamic library"
diff --git a/package/racehound/racehound.mk b/package/racehound/racehound.mk
index f77e5f3..26b429b 100644
--- a/package/racehound/racehound.mk
+++ b/package/racehound/racehound.mk
@@ -12,10 +12,15 @@ RACEHOUND_SUPPORTS_IN_SOURCE_BUILD = NO
RACEHOUND_DEPENDENCIES = elfutils linux
+# overwrite auto detection (uses host parameters, not cross compile ready)
RACEHOUND_CONF_OPTS += \
-DKERNEL_VERSION_OK=YES \
-DMODULE_BUILD_SUPPORTED=YES \
-DKERNEL_CONFIG_OK=YES \
- -DKBUILD_BUILD_DIR=$(LINUX_DIR)
+ -DKBUILD_BUILD_DIR=$(LINUX_DIR) \
+ -DKBUILD_VERSION_STRING=$(LINUX_VERSION_PROBED)
+
+# cross compile environment for linux kernel module
+RACEHOUND_MAKE_ENV=$(LINUX_MAKE_FLAGS)
$(eval $(cmake-package))
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v1] racehound: fix kernel module compile
2015-07-16 21:24 [Buildroot] [PATCH v1] racehound: fix kernel module compile Peter Seiderer
@ 2015-07-16 21:45 ` Yann E. MORIN
2015-07-17 6:14 ` Baruch Siach
2015-07-26 16:43 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2015-07-16 21:45 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2015-07-16 23:24 +0200, Peter Seiderer spake thusly:
> - check for linux kernel >= 3.14
> - add cross compile enviornment for linux kernel compile
> - add additional kernel config hint (CONFIG_KALLSYMS_ALL)
> - fix kernel module install path
Could you see if it were possible to use the newly introduced
kernel-module infrastructure to build this kernel module, please?
http://nightly.buildroot.org/#_infrastructure_for_packages_building_kernel_modules
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v1] racehound: fix kernel module compile
2015-07-16 21:24 [Buildroot] [PATCH v1] racehound: fix kernel module compile Peter Seiderer
2015-07-16 21:45 ` Yann E. MORIN
@ 2015-07-17 6:14 ` Baruch Siach
2015-07-26 16:43 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2015-07-17 6:14 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Thu, Jul 16, 2015 at 11:24:12PM +0200, Peter Seiderer wrote:
> -comment "racehound needs an Linux kernel to be built"
> +comment "racehound needs an Linux kernel >= 3.14 to be built"
> depends on !BR2_LINUX_KERNEL
> + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
> depends on BR2_i386 || BR2_x86_64
Should be:
depends on !BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v1] racehound: fix kernel module compile
2015-07-16 21:24 [Buildroot] [PATCH v1] racehound: fix kernel module compile Peter Seiderer
2015-07-16 21:45 ` Yann E. MORIN
2015-07-17 6:14 ` Baruch Siach
@ 2015-07-26 16:43 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-07-26 16:43 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Thu, 16 Jul 2015 23:24:12 +0200, Peter Seiderer wrote:
> - check for linux kernel >= 3.14
> - add cross compile enviornment for linux kernel compile
> - add additional kernel config hint (CONFIG_KALLSYMS_ALL)
> - fix kernel module install path
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> ...install-path-lib-instead-of-usr-lib-prefi.patch | 26 ++++++++++++++++++++++
> package/racehound/Config.in | 5 ++++-
> package/racehound/racehound.mk | 7 +++++-
> 3 files changed, 36 insertions(+), 2 deletions(-)
> create mode 100644 package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch
Applied with some changes:
[Thomas:
- fix Config.in dependency logic for the comment on the kernel
version, as noticed by Baruch.
- minor improvements in the .mk file.]
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-26 16:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 21:24 [Buildroot] [PATCH v1] racehound: fix kernel module compile Peter Seiderer
2015-07-16 21:45 ` Yann E. MORIN
2015-07-17 6:14 ` Baruch Siach
2015-07-26 16:43 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox