All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Stewart <christian@paral.in>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 1/5] package/nvidia-modprobe: new package
Date: Sat, 21 Nov 2020 12:32:05 -0800	[thread overview]
Message-ID: <CA+h8R2rq67w5b0qhgcMZewNehLKx-CRBDxOX1faixhv6QP=WPg@mail.gmail.com> (raw)
In-Reply-To: <c39da99f-96c6-66ef-8f49-4655112a5441@gmail.com>

Hi Romain,

On Sat, Nov 21, 2020 at 2:19 AM Romain Naour <romain.naour@gmail.com> wrote:

[snip]

> > +NVIDIA_MODPROBE_VERSION = 450.57
> > +NVIDIA_MODPROBE_SITE = $(call github,NVIDIA,nvidia-modprobe,$(NVIDIA_MODPROBE_VERSION))
> > +NVIDIA_MODPROBE_LICENSE = GPL-2
>
> The license should use identifier like GPL-2.0 or GPL-2.0+.
> Here it should be GPL-2.0.

Ok, noted.

> > +NVIDIA_MODPROBE_LICENSE_FILES = COPYING
> > +
> > +NVIDIA_MODPROBE_DEPENDENCIES = host-pkgconf
>
> Why ? the binary is build by using gcc directly without any build system.

At one point I had errors about pkgconf, so I added the dependency.
Will try building it without the dependency and see if it works.

> > +NVIDIA_MODPROBE_INSTALL_STAGING = YES
> > +
> > +define NVIDIA_MODPROBE_BUILD_CMDS
> > +     mkdir -p $(@D)/bin
> > +     $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
> > +             -I $(@D)/common-utils -I $(@D)/modprobe-utils \
> > +             -o $(@D)/bin/nvidia-modprobe \
> > +             -DNV_LINUX=true -DPROGRAM_NAME=\"nvidia-modprobe\" \
> > +             -DNVIDIA_VERSION=\"$(NVIDIA_MODPROBE_VERSION)\" \
> > +             $(@D)/nvidia-modprobe.c $(@D)/modprobe-utils/nvidia-modprobe-utils.c \
> > +             $(@D)/modprobe-utils/pci-sysfs.c $(@D)/common-utils/common-utils.c \
> > +             $(@D)/common-utils/msg.c $(@D)/common-utils/nvgetopt.c
> > +endef
>
> There is a Makefile why not using it ?
> Ok it want to install the man pages but it should be easy to fix it.

The makefile was not working correctly and doing a lot of extra stuff
we don't need.

Why is storing the simplified build commands in the makefile via a
patch more clear / easy to maintain than directly in the Buildroot
makefiles?

If necessary, I will re-format this into the makefile via a patch for
the next revision. But this definitely works fine as-is and we are
unlikely to need a more complicated build script for this package in
the future.

> > +define NVIDIA_MODPROBE_INSTALL_STAGING_CMDS
> > +     $(INSTALL) -D -m 644 $(@D)/modprobe-utils/nvidia-modprobe-utils.h \
> > +             $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvidia-modprobe-utils.h
> > +     $(INSTALL) -D -m 644 $(@D)/modprobe-utils/pci-enum.h \
> > +             $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/pci-enum.h
> > +     $(INSTALL) -D -m 644 $(@D)/common-utils/common-utils.h \
> > +             $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvidia-common-utils.h
> > +     $(INSTALL) -D -m 644 $(@D)/common-utils/msg.h \
> > +             $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/msg.h
> > +     $(INSTALL) -D -m 644 $(@D)/common-utils/nvgetopt.h \
> > +             $(STAGING_DIR)/usr/include/nvidia-modprobe-utils/nvgetopt.h
> > +endef
>
> Same, we really don't want to maintain the gcc command line and the list of
> installed files. The Makefile must do it for us :)

Why? The list won't change. How is storing it in a patch file easier
to maintain than in this makefile?

> > +
> > +define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS
> > +     $(INSTALL) -m 0755 $(@D)/bin/nvidia-modprobe \
> > +             $(TARGET_DIR)/usr/bin/nvidia-modprobe
> > +endef
>
> Same.

??

Best,
Christian

  reply	other threads:[~2020-11-21 20:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  7:53 [Buildroot] [PATCH v4 1/5] package/nvidia-modprobe: new package Christian Stewart
2020-11-19  7:53 ` [Buildroot] [PATCH v4 2/5] package/linux4tegra: " Christian Stewart
2020-11-21 10:40   ` Romain Naour
2020-11-21 20:45     ` Christian Stewart
2020-11-21 23:10       ` Romain Naour
2021-01-11 23:28       ` Arnout Vandecappelle
2021-01-11 23:45   ` Arnout Vandecappelle
2020-11-19  7:53 ` [Buildroot] [PATCH v4 3/5] package/libnvidia-container: " Christian Stewart
2020-11-21 10:55   ` Romain Naour
2020-11-21 20:54     ` Christian Stewart
2020-11-21 23:25       ` Romain Naour
2020-11-25  2:06     ` Christian Stewart
2020-11-19  7:53 ` [Buildroot] [PATCH v4 4/5] board: add nvidia jetson tx2 support Christian Stewart
2020-11-19 13:40   ` Romain Naour
2020-11-21 10:06     ` Romain Naour
2020-11-21 21:12       ` Christian Stewart
2020-11-21 22:12         ` Peter Seiderer
2020-11-21 23:47         ` Romain Naour
2020-11-23 23:07     ` Christian Stewart
2020-11-24 14:46       ` Romain Naour
2020-11-24 16:30         ` Graham Leva
2020-11-25  1:53           ` Christian Stewart
2020-11-26 16:45             ` Graham Leva
2020-11-19  7:53 ` [Buildroot] [PATCH v4 5/5] board: add nvidia jetson nano support Christian Stewart
2020-11-21 11:03   ` Romain Naour
2020-11-21 21:01     ` Christian Stewart
2020-11-21 23:31       ` Romain Naour
2020-11-21 10:18 ` [Buildroot] [PATCH v4 1/5] package/nvidia-modprobe: new package Romain Naour
2020-11-21 20:32   ` Christian Stewart [this message]
2020-11-21 22:49     ` Romain Naour
2021-01-11 23:11       ` Arnout Vandecappelle
2021-01-11 23:20 ` Arnout Vandecappelle

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='CA+h8R2rq67w5b0qhgcMZewNehLKx-CRBDxOX1faixhv6QP=WPg@mail.gmail.com' \
    --to=christian@paral.in \
    --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.