* [Buildroot] [Bug 16075] New: Cannot use linux kernel extensions from external tree (building zfs into kernel)
@ 2024-05-15 6:22 bugzilla
2024-05-15 16:45 ` [Buildroot] [Bug 16075] " bugzilla
2024-05-15 19:12 ` bugzilla
0 siblings, 2 replies; 3+ messages in thread
From: bugzilla @ 2024-05-15 6:22 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=16075
Bug ID: 16075
Summary: Cannot use linux kernel extensions from external tree
(building zfs into kernel)
Product: buildroot
Version: 2024.02.1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned@buildroot.uclibc.org
Reporter: mscdex@mscdex.net
CC: buildroot@uclibc.org
Target Milestone: ---
I'm wanting to build zfs into the kernel, so after reading through the
documentation it seemed like the best way to go about it would be through
Buildroot's Linux kernel extension mechanism.
I already have an existing, working external tree, so according to the
documentation I added a `linux/Config.ext.in` and
`linux/linux-ext-zfs-inkernel.mk` to my external tree.
Re-running `make menuconfig` and navigating to the Linux Extensions section
shows both the built-in Buildroot extensions and my new extension. However,
after I select my extension and save the Buildroot configuration, just about
every make target except `menuconfig` fails with:
linux/linux.mk:646: *** Package 'linux' defined a second time in 'linux/';
previous definition was in '/home/foo/buildroot-external/linux/'. Stop.
make: *** [Makefile:23: _all] Error 2
I tried explicitly adding a reference to the Config.ext.in in my external
tree's Config.in and adding a reference to the linux-ext-zfs-inkernel.mk in my
external tree's external.mk, but that did not make any difference.
For what it's worth here are the contents of the two files (there may be issues
with them as I obviously haven't been able to test them yet):
linux/Config.ext.in:
config BR2_LINUX_KERNEL_EXT_ZFS_INKERNEL
bool "In-kernel ZFS"
help
In-kernel ZFS module
linux/linux-ext-zfs-inkernel.mk:
ZFS_INKERNEL_VERSION = 2.2.2
ZFS_INKERNEL_SOURCE =
https://github.com/openzfs/zfs/releases/download/zfs-$(ZFS_INKERNEL_VERSION)
ZFS_INKERNEL_INSTALL_STAGING = NO
ZFS_INKERNEL_INSTALL_TARGET = NO
define ZFS_INKERNEL_COPY_BUILTIN
cd $(ZFS_INKERNEL_BUILDDIR) && ./copy-builtin $(LINUX_DIR)
endef
ZFS_INKERNEL_POST_CONFIGURE_HOOKS += ZFS_INKERNEL_COPY_BUILTIN
LINUX_EXTENSIONS += zfs-inkernel
ZFS_INKERNEL_CONF_OPTS = \
--with-linux=$(LINUX_DIR) \
--enable-linux-builtin
ZFS_INKERNEL_MAKE = true
$(eval $(autotools-package))
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [Bug 16075] Cannot use linux kernel extensions from external tree (building zfs into kernel)
2024-05-15 6:22 [Buildroot] [Bug 16075] New: Cannot use linux kernel extensions from external tree (building zfs into kernel) bugzilla
@ 2024-05-15 16:45 ` bugzilla
2024-05-15 19:12 ` bugzilla
1 sibling, 0 replies; 3+ messages in thread
From: bugzilla @ 2024-05-15 16:45 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=16075
--- Comment #1 from Arnout Vandecappelle <arnout@mind.be> ---
Is it possible that you have `include */*.mk` in your external.mk? This will
include your `linux/linux-ext-zfs-inkernel.mk` in the "main" buildroot include,
but it should only be included in the linux-extensions-specific section in
buildroot linux/linux.mk:
include $(sort $(wildcard $(foreach ext,$(BR2_EXTERNAL_DIRS), \
$(ext)/linux/linux-ext-*.mk)))
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [Bug 16075] Cannot use linux kernel extensions from external tree (building zfs into kernel)
2024-05-15 6:22 [Buildroot] [Bug 16075] New: Cannot use linux kernel extensions from external tree (building zfs into kernel) bugzilla
2024-05-15 16:45 ` [Buildroot] [Bug 16075] " bugzilla
@ 2024-05-15 19:12 ` bugzilla
1 sibling, 0 replies; 3+ messages in thread
From: bugzilla @ 2024-05-15 19:12 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=16075
Yann E. MORIN <yann.morin.1998@free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
CC| |yann.morin.1998@free.fr
--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> ---
mscdex, All,
You are calling the autotools-package macro in your linux externsion; that
is going to create an actual package, which is what is actually causing you
trouble.
The linux-ext file should be limited exactly to defining the linux extension.
Downloading the sources for the extension should be done in a separate
package.
See for example the fbtft linux extension, which is simple enough to be
a good example.
Regards,
Yann E. MORIN.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-15 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 6:22 [Buildroot] [Bug 16075] New: Cannot use linux kernel extensions from external tree (building zfs into kernel) bugzilla
2024-05-15 16:45 ` [Buildroot] [Bug 16075] " bugzilla
2024-05-15 19:12 ` bugzilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox