* [Buildroot] [PATCH 1/2] package/liburing: new package
@ 2022-01-04 18:11 Fabrice Fontaine
2022-01-04 18:11 ` [Buildroot] [PATCH 2/2] package/lxc: add liburing optional dependency Fabrice Fontaine
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2022-01-04 18:11 UTC (permalink / raw)
To: buildroot; +Cc: Jérôme Pouiller, Thomas Petazzoni, Fabrice Fontaine
This is the io_uring library, liburing. liburing provides helpers to
setup and teardown io_uring instances, and also a simplified interface
for applications that don't need (or want) to deal with the full kernel
side implementation.
https://git.kernel.dk/cgit/liburing
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/liburing/Config.in | 13 ++++++++++++
package/liburing/liburing.hash | 8 ++++++++
package/liburing/liburing.mk | 36 ++++++++++++++++++++++++++++++++++
5 files changed, 59 insertions(+)
create mode 100644 package/liburing/Config.in
create mode 100644 package/liburing/liburing.hash
create mode 100644 package/liburing/liburing.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 444e58714c..5017dde56e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -904,6 +904,7 @@ F: package/librsync/
F: package/libsoup/
F: package/libsoxr/
F: package/libupnp/
+F: package/liburing/
F: package/libv4l/
F: package/libxslt/
F: package/mbedtls/
diff --git a/package/Config.in b/package/Config.in
index e09e4aad3f..1f3ec9a334 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2001,6 +2001,7 @@ menu "Other"
source "package/libuci/Config.in"
source "package/libunwind/Config.in"
source "package/liburcu/Config.in"
+ source "package/liburing/Config.in"
source "package/libuv/Config.in"
source "package/lightning/Config.in"
source "package/linux-pam/Config.in"
diff --git a/package/liburing/Config.in b/package/liburing/Config.in
new file mode 100644
index 0000000000..898d95cfa6
--- /dev/null
+++ b/package/liburing/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBURING
+ bool "liburing"
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
+ help
+ This is the io_uring library, liburing. liburing provides
+ helpers to setup and teardown io_uring instances, and also a
+ simplified interface for applications that don't need (or
+ want) to deal with the full kernel side implementation.
+
+ https://git.kernel.dk/cgit/liburing
+
+comment "liburing needs a toolchain w/ gcc >= 4.9"
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/liburing/liburing.hash b/package/liburing/liburing.hash
new file mode 100644
index 0000000000..56e90d71cc
--- /dev/null
+++ b/package/liburing/liburing.hash
@@ -0,0 +1,8 @@
+# Locally calculated
+sha256 df7c8fd05fd39da622b2814e06f815f11f1beb429487a4330eed64bb7f353dbf liburing-2.1.tar.bz2
+
+# Hash for license files
+sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c COPYING
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPL
+sha256 d0b225f17ef2d05d5cda6b25b2dc334ef6f5f12537c20edf6e391852a095ec19 LICENSE
+sha256 97d62ff5d7cf0b1cef34c33a89877352911278ca4ac1c6c4f24a835baa5ea10b README
diff --git a/package/liburing/liburing.mk b/package/liburing/liburing.mk
new file mode 100644
index 0000000000..a977e74b4f
--- /dev/null
+++ b/package/liburing/liburing.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# liburing
+#
+################################################################################
+
+LIBURING_VERSION = 2.1
+LIBURING_SOURCE = liburing-$(LIBURING_VERSION).tar.bz2
+LIBURING_SITE = https://git.kernel.dk/cgit/liburing/snapshot
+LIBURING_LICENSE = (GPL-2.0 with exceptions and LGPL-2.1+) or MIT
+LIBURING_LICENSE_FILES = COPYING COPYING.GPL LICENSE README
+LIBURING_INSTALL_STAGING = YES
+
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBURING_MAKE_OPTS += ENABLE_SHARED=0
+else
+LIBURING_MAKE_OPTS += ENABLE_SHARED=1
+endif
+
+define LIBURING_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure)
+endef
+
+define LIBURING_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(LIBURING_MAKE_OPTS) -C $(@D)/src
+endef
+
+define LIBURING_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+define LIBURING_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/lxc: add liburing optional dependency
2022-01-04 18:11 [Buildroot] [PATCH 1/2] package/liburing: new package Fabrice Fontaine
@ 2022-01-04 18:11 ` Fabrice Fontaine
2022-01-07 19:15 ` Thomas Petazzoni
2022-01-06 14:08 ` [Buildroot] [PATCH 1/2] package/liburing: new package Romain Naour
2022-01-07 19:15 ` Thomas Petazzoni
2 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2022-01-04 18:11 UTC (permalink / raw)
To: buildroot; +Cc: Jérôme Pouiller, Thomas Petazzoni, Fabrice Fontaine
liburing is an optional dependency (enabed by default) since version
4.0.11 and
https://github.com/lxc/lxc/commit/b1f9aee5c466b5a6d88582375ea15971d846d18b
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/lxc/lxc.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/lxc/lxc.mk b/package/lxc/lxc.mk
index 4d63fc14cb..08f64bcec7 100644
--- a/package/lxc/lxc.mk
+++ b/package/lxc/lxc.mk
@@ -44,6 +44,13 @@ else
LXC_CONF_OPTS += --disable-selinux
endif
+ifeq ($(BR2_PACKAGE_LIBURING),y)
+LXC_CONF_OPTS += --enable-liburing
+LXC_DEPENDENCIES += liburing
+else
+LXC_CONF_OPTS += --disable-liburing
+endif
+
ifeq ($(BR2_PACKAGE_OPENSSL),y)
LXC_CONF_OPTS += --enable-openssl
LXC_DEPENDENCIES += openssl
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/liburing: new package
2022-01-04 18:11 [Buildroot] [PATCH 1/2] package/liburing: new package Fabrice Fontaine
2022-01-04 18:11 ` [Buildroot] [PATCH 2/2] package/lxc: add liburing optional dependency Fabrice Fontaine
@ 2022-01-06 14:08 ` Romain Naour
2022-01-07 18:39 ` Peter Korsgaard
2022-01-07 19:15 ` Thomas Petazzoni
2 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2022-01-06 14:08 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: Thomas Petazzoni, Jérôme Pouiller
Hello Fabrice,
Le 04/01/2022 à 19:11, Fabrice Fontaine a écrit :
> This is the io_uring library, liburing. liburing provides helpers to
> setup and teardown io_uring instances, and also a simplified interface
> for applications that don't need (or want) to deal with the full kernel
> side implementation.
>
> https://git.kernel.dk/cgit/liburing
liburing is an optional Qemu dependency, it allows to use io_uring instead of
the thread pool.
Archlinux provide some infos about other packages using liburing:
https://archlinux.org/packages/extra/x86_64/liburing/
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/liburing/Config.in | 13 ++++++++++++
> package/liburing/liburing.hash | 8 ++++++++
> package/liburing/liburing.mk | 36 ++++++++++++++++++++++++++++++++++
> 5 files changed, 59 insertions(+)
> create mode 100644 package/liburing/Config.in
> create mode 100644 package/liburing/liburing.hash
> create mode 100644 package/liburing/liburing.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 444e58714c..5017dde56e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -904,6 +904,7 @@ F: package/librsync/
> F: package/libsoup/
> F: package/libsoxr/
> F: package/libupnp/
> +F: package/liburing/
> F: package/libv4l/
> F: package/libxslt/
> F: package/mbedtls/
> diff --git a/package/Config.in b/package/Config.in
> index e09e4aad3f..1f3ec9a334 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -2001,6 +2001,7 @@ menu "Other"
> source "package/libuci/Config.in"
> source "package/libunwind/Config.in"
> source "package/liburcu/Config.in"
> + source "package/liburing/Config.in"
> source "package/libuv/Config.in"
> source "package/lightning/Config.in"
> source "package/linux-pam/Config.in"
> diff --git a/package/liburing/Config.in b/package/liburing/Config.in
> new file mode 100644
> index 0000000000..898d95cfa6
> --- /dev/null
> +++ b/package/liburing/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_LIBURING
> + bool "liburing"
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
Is any linux-headers dependency (5.0 maybe).
> + help
> + This is the io_uring library, liburing. liburing provides
> + helpers to setup and teardown io_uring instances, and also a
> + simplified interface for applications that don't need (or
> + want) to deal with the full kernel side implementation.
> +
> + https://git.kernel.dk/cgit/liburing
> +
> +comment "liburing needs a toolchain w/ gcc >= 4.9"
> + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> diff --git a/package/liburing/liburing.hash b/package/liburing/liburing.hash
> new file mode 100644
> index 0000000000..56e90d71cc
> --- /dev/null
> +++ b/package/liburing/liburing.hash
> @@ -0,0 +1,8 @@
> +# Locally calculated
> +sha256 df7c8fd05fd39da622b2814e06f815f11f1beb429487a4330eed64bb7f353dbf liburing-2.1.tar.bz2
> +
> +# Hash for license files
> +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c COPYING
> +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPL
> +sha256 d0b225f17ef2d05d5cda6b25b2dc334ef6f5f12537c20edf6e391852a095ec19 LICENSE
> +sha256 97d62ff5d7cf0b1cef34c33a89877352911278ca4ac1c6c4f24a835baa5ea10b README
> diff --git a/package/liburing/liburing.mk b/package/liburing/liburing.mk
> new file mode 100644
> index 0000000000..a977e74b4f
> --- /dev/null
> +++ b/package/liburing/liburing.mk
> @@ -0,0 +1,36 @@
> +################################################################################
> +#
> +# liburing
> +#
> +################################################################################
> +
> +LIBURING_VERSION = 2.1
> +LIBURING_SOURCE = liburing-$(LIBURING_VERSION).tar.bz2
> +LIBURING_SITE = https://git.kernel.dk/cgit/liburing/snapshot
> +LIBURING_LICENSE = (GPL-2.0 with exceptions and LGPL-2.1+) or MIT
> +LIBURING_LICENSE_FILES = COPYING COPYING.GPL LICENSE README
> +LIBURING_INSTALL_STAGING = YES
> +
> +ifeq ($(BR2_STATIC_LIBS),y)
> +LIBURING_MAKE_OPTS += ENABLE_SHARED=0
> +else
> +LIBURING_MAKE_OPTS += ENABLE_SHARED=1
> +endif
> +
> +define LIBURING_CONFIGURE_CMDS
> + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure)
> +endef
Indeed, configure is a shell script. It's not generated by autotools.
Best regards,
Romain
> +
> +define LIBURING_BUILD_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) $(LIBURING_MAKE_OPTS) -C $(@D)/src
> +endef
> +
> +define LIBURING_INSTALL_STAGING_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
> +endef
> +
> +define LIBURING_INSTALL_TARGET_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
> +
> +$(eval $(generic-package))
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/liburing: new package
2022-01-04 18:11 [Buildroot] [PATCH 1/2] package/liburing: new package Fabrice Fontaine
2022-01-04 18:11 ` [Buildroot] [PATCH 2/2] package/lxc: add liburing optional dependency Fabrice Fontaine
2022-01-06 14:08 ` [Buildroot] [PATCH 1/2] package/liburing: new package Romain Naour
@ 2022-01-07 19:15 ` Thomas Petazzoni
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2022-01-07 19:15 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Jérôme Pouiller, buildroot
On Tue, 4 Jan 2022 19:11:06 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> This is the io_uring library, liburing. liburing provides helpers to
> setup and teardown io_uring instances, and also a simplified interface
> for applications that don't need (or want) to deal with the full kernel
> side implementation.
>
> https://git.kernel.dk/cgit/liburing
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/liburing/Config.in | 13 ++++++++++++
> package/liburing/liburing.hash | 8 ++++++++
> package/liburing/liburing.mk | 36 ++++++++++++++++++++++++++++++++++
> 5 files changed, 59 insertions(+)
> create mode 100644 package/liburing/Config.in
> create mode 100644 package/liburing/liburing.hash
> create mode 100644 package/liburing/liburing.mk
I have applied, after adding a dependency on headers >= 5.1.
I think this dependency is not strictly needed for building, because
liburing apparently bundles a copy of the kernel header (if I
understood correctly). But anyway, since it can't work on kernels <
5.1, this headers dependency also hints the user about this requirement.
Maybe some kernel config fixup would be useful in liburing.mk, to
ensure the kernel is built with the needed kernel config option;
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-07 19:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 18:11 [Buildroot] [PATCH 1/2] package/liburing: new package Fabrice Fontaine
2022-01-04 18:11 ` [Buildroot] [PATCH 2/2] package/lxc: add liburing optional dependency Fabrice Fontaine
2022-01-07 19:15 ` Thomas Petazzoni
2022-01-06 14:08 ` [Buildroot] [PATCH 1/2] package/liburing: new package Romain Naour
2022-01-07 18:39 ` Peter Korsgaard
2022-01-07 19:15 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.