[Buildroot] [PATCH V2 1/1] nvme: Allow libudev support

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Apr 19 08:01:50 UTC 2016


Hello,

On Tue, 19 Apr 2016 11:54:24 +1000, Samuel Mendoza-Jonas wrote:
> Commands like 'nvme list' require libudev but support for libudev is
> decided at compile time, and in buildroot this is hard disabled.
> Add a check for udev and if it is available build nvme with udev
> support.
> 
> Signed-off-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>

I've applied, after doing a few changes (since below).

> diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk
> index 7c4bd8e..3571494 100755
> --- a/package/nvme/nvme.mk
> +++ b/package/nvme/nvme.mk
> @@ -8,11 +8,17 @@ NVME_VERSION = v0.3
>  NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION))
>  NVME_LICENSE = GPLv2+
>  NVME_LICENSE_FILES = LICENSE

I've added a comment here that insists on the fact that yes, LIBUDEV=0
enables udev support, while LIBUDEV=1 disables udev support, which is a
bit counter-intuitive.

> +ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
> +NVME_DEPENDENCIES += udev
> +NVME_MAKE_OPTS = LIBUDEV=0

I've changed to use += here

> +else
> +NVME_MAKE_OPTS = LIBUDEV=1

and here, since it's a bit more future proof. It will avoid mistakes if
someone adds NVME_MAKE_OPTS = <something> outside of the conditional
block.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list