All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] nvme: Allow libudev support
Date: Mon, 18 Apr 2016 09:27:36 +0200	[thread overview]
Message-ID: <20160418092736.373a7c07@free-electrons.com> (raw)
In-Reply-To: <1460955386-21322-1-git-send-email-sam@mendozajonas.com>

Hello,

Thanks for your contribution!

On Mon, 18 Apr 2016 14:56:26 +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 config option which allows libudev support to be enabled for the
> nvme package.
> 
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> ---
>  package/nvme/Config.in |  9 +++++++++
>  package/nvme/nvme.mk   | 10 ++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/package/nvme/Config.in b/package/nvme/Config.in
> index dd8655f..4590fdc 100644
> --- a/package/nvme/Config.in
> +++ b/package/nvme/Config.in
> @@ -5,3 +5,12 @@ config BR2_PACKAGE_NVME
>  	  Express (optimized PCI Express SSD interface) devices.
>  
>  	  https://github.com/linux-nvme/nvme-cli
> +
> +if BR2_PACKAGE_NVME
> +
> +config BR2_PACKAGE_NVME_LIBUDEV
> +	bool "nvme-udev"
> +	help
> +	  libudev support for the NVME utility
> +
> +endif

We don't need a new sub-option, just enable udev support if udev is
available.

> +ifeq ($(BR2_PACKAGE_NVME_LIBUDEV), y)

Remove the space before 'y', and make this:

ifeq ($(BR2_PACKAGE_HAS_UDEV),y)

> +NVME_DEPENDENCIES = udev

Use += here

And then also define:

NVME_MAKE_OPTS += LIBUDEV=0
else
NVME_MAKE_OPTS += LIBUDEV=1

> +endif
>  
>  # LIBUDEV=1 means that libudev is _disabled_
> +ifeq ($(BR2_PACKAGE_NVME_LIBUDEV), y)
> +define NVME_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
> +		LIBUDEV=0 -C $(@D)
> +endef
> +else
>  define NVME_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
>  		LIBUDEV=1 -C $(@D)
>  endef

Don't duplicate the NVME_BUILD_CMDS variable, simply use
$(NVME_MAKE_OPTS) as defined above.

Could you rework your patch and send an updated version? Thanks a lot!

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

  reply	other threads:[~2016-04-18  7:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  4:56 [Buildroot] [PATCH 1/1] nvme: Allow libudev support Samuel Mendoza-Jonas
2016-04-18  7:27 ` Thomas Petazzoni [this message]
2016-04-18  7:36   ` Samuel Mendoza-Jonas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160418092736.373a7c07@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.