package/nvidia-modprobe: new package
PATCH 1/6 package/nvidia-modprobe: new package
nvidia-modprobe package adds a utility and headers for probing the NVIDIA hardware at runtime.
https://github.com/NVIDIA/nvidia-modprobe
--- package/Config.in | 1 + package/nvidia-modprobe/Config.in | 12 ++++++ package/nvidia-modprobe/nvidia-modprobe.hash | 3 ++ package/nvidia-modprobe/nvidia-modprobe.mk | 45 ++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 package/nvidia-modprobe/Config.in create mode 100644 package/nvidia-modprobe/nvidia-modprobe.hash create mode 100644 package/nvidia-modprobe/nvidia-modprobe.mk
package/Config.in +1 -0
@@ -501,6 +501,7 @@ endmenu source "package/nanocom/Config.in" source "package/neard/Config.in" source "package/nvidia-driver/Config.in" + source "package/nvidia-modprobe/Config.in" source "package/nvidia-tegra23/Config.in" source "package/nvme/Config.in" source "package/ofono/Config.in"
package/nvidia-modprobe/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_NVIDIA_MODPROBE + bool "nvidia-modprobe" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + nvidia-modprobe package adds a utility and headers for + probing the NVIDIA hardware at runtime. + + https://github.com/NVIDIA/nvidia-modprobe + +comment "nvidia-modprobe needs a glibc toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBC
package/nvidia-modprobe/nvidia-modprobe.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed: +sha256 396b4102d3075a2dee3024652fae206a1b38ace54b8efb1e2c20757a11ec19f1 nvidia-modprobe-450.57.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
package/nvidia-modprobe/nvidia-modprobe.mk new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH 1/6 package/nvidia-modprobe: new package
Hello,
Quoted 95 lines · Christian Stewart
nvidia-modprobe package adds a utility and headers for probing the NVIDIA hardware at runtime.
https://github.com/NVIDIA/nvidia-modprobe
Signed-off-by Christian Stewart <[email protected]>--- package/Config.in | 1 + package/nvidia-modprobe/Config.in | 12 ++++++ package/nvidia-modprobe/nvidia-modprobe.hash | 3 ++ package/nvidia-modprobe/nvidia-modprobe.mk | 45 ++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 package/nvidia-modprobe/Config.in create mode 100644 package/nvidia-modprobe/nvidia-modprobe.hash create mode 100644 package/nvidia-modprobe/nvidia-modprobe.mkpackage/Config.in +1
-0@@ -501,6 +501,7 @@ endmenu source "package/nanocom/Config.in" source "package/neard/Config.in" source "package/nvidia-driver/Config.in" + source "package/nvidia-modprobe/Config.in" source "package/nvidia-tegra23/Config.in" source "package/nvme/Config.in" source "package/ofono/Config.in"package/nvidia-modprobe/Config.in new file +12
-0@@ -0,0 +1,12 @@ +config BR2_PACKAGE_NVIDIA_MODPROBE + bool "nvidia-modprobe" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + nvidia-modprobe package adds a utility and headers for + probing the NVIDIA hardware at runtime. + + https://github.com/NVIDIA/nvidia-modprobe + +comment "nvidia-modprobe needs a glibc toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAN_USES_GLIBCpackage/nvidia-modprobe/nvidia-modprobe.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally computed: +sha256 396b4102d3075a2dee3024652fae206a1b38ace54b8efb1e2c20757a11ec19f1 nvidia-modprobe-450.57.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYINGpackage/nvidia-modprobe/nvidia-modprobe.mk new file +33
-0@@ -0,0 +1,45 @@ +################################################################################ +# +# nvidia-modprobe +# +################################################################################ + +NVIDIA_MODPROBE_VERSION = 450.57 +NVIDIA_MODPROBE_SITE = $(call github,NVIDIA,nvidia-modprobe,$(NVIDIA_MODPROBE_VERSION)) +NVIDIA_MODPROBE_LICENSE = GPL-2 +NVIDIA_MODPROBE_LICENSE_FILES = COPYING + +NVIDIA_MODPROBE_DEPENDENCIES = host-pkgconf +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 + +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
package/nvidia-modprobe/nvidia-modprobe.mk line 43
Quoted 10 lines
package/nvidia-modprobe/nvidia-modprobe.mk new file +10
-0+ $(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 + +define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/bin/nvidia-modprobe \ + $(TARGET_DIR)/usr/bin/nvidia-modprobe +endef
Why do you prefer to call the compiler explicitly instead of using the Makefile? I tested this package with the following change, and it seems to work fine:
define NVIDIA_MODPROBE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endef
define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) PREFIX=$(TARGET_DIR) $(MAKE) -C $(@D) install
endef
Maybe I miss something?
Quoted 9 lines
package/nvidia-modprobe/nvidia-modprobe.mk new file +2
-1+ +$(eval $(generic-package)) --2.27.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
Asaf.
PATCH 1/6 package/nvidia-modprobe: new package
Hi Asaf,
Quoted 11 lines · Asaf Kahlon
package/nvidia-modprobe/nvidia-modprobe.mk line 43
Quoted 4 lines
package/nvidia-modprobe/nvidia-modprobe.mk new file +4
-0+define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/bin/nvidia-modprobe \ + $(TARGET_DIR)/usr/bin/nvidia-modprobe +endefWhy do you prefer to call the compiler explicitly instead of using the
Makefile? I tested this package with the following change, and it seems to work fine:
defineNVIDIA_MODPROBE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endef
Quoted 6 lines
define
NVIDIA_MODPROBE_INSTALL_TARGET_CMDS$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) PREFIX=$(TARGET_DIR) $(MAKE) -C $(@D) install
endefMaybe I miss something?
You tested this?... I don't think so. It doesn't work:
LINK _out/Linux_x86_64/nvidia-modprobe.unstripped/bin/sh: build/nvidia-modprobe-450.57/_out/Linux_x86_64/gen-manpage-opts:
cannot execute binary file: Exec format error
make[2]: *** [Makefile:149: _out/Linux_x86_64/options.1.inc] Error 126
The package as-is from GitHub has an extremely convoluted Makefile which does not do what we want in Buildroot.
Best regards,
Christian
PATCH 1/6 package/nvidia-modprobe: new package
Hello,
Quoted 24 lines · Christian Stewart
Hi Asaf,
Quoted 11 lines · Asaf Kahlon
package/nvidia-modprobe/nvidia-modprobe.mk line 43
Quoted 4 lines
package/nvidia-modprobe/nvidia-modprobe.mk new file +4
-0+define NVIDIA_MODPROBE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/bin/nvidia-modprobe \ + $(TARGET_DIR)/usr/bin/nvidia-modprobe +endefWhy do you prefer to call the compiler explicitly instead of using the
Makefile? I tested this package with the following change, and it seems to work fine:
defineNVIDIA_MODPROBE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endefQuoted 6 lines
define
NVIDIA_MODPROBE_INSTALL_TARGET_CMDS$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) PREFIX=$(TARGET_DIR) $(MAKE) -C $(@D) install
endefMaybe I miss something?
You tested this?... I don't think so. It doesn't work:
Quoted 7 lines
LINK _out/Linux_x86_64/nvidia-modprobe.unstripped
/bin/sh: build/nvidia-modprobe-450.57/_out/Linux_x86_64/gen-manpage-opts:
cannot execute binary file: Exec format error
make[2]: *** [Makefile:149: _out/Linux_x86_64/options.1.inc] Error 126The package as-is from GitHub has an extremely convoluted
Makefilewhich does not do what we want in Buildroot.
Yeah, you seem to be right.
I tested it with another toolchain, but it indeed does not work on the jetsontx2 toolchain...
Quoted 3 lines
Best regards,
Christian
Asaf
PATCH 1/6 package/nvidia-modprobe: new package
In reply to Christian StewartQuoted 11 lines · On Sat, 8 Aug 2020 04:29:43 -0700 Christian Stewart <[email protected]> wrote:
Quoted 1 line
Maybe I miss something?
You tested this?... I don't think so. It doesn't work:
LINK _out/Linux_x86_64/nvidia-modprobe.unstripped
/bin/sh: build/nvidia-modprobe-450.57/_out/Linux_x86_64/gen-manpage-opts:
cannot execute binary file: Exec format error
make[2]: *** [Makefile:149: _out/Linux_x86_64/options.1.inc] Error 126The package as-is from GitHub has an extremely convoluted
Makefilewhich does not do what we want in Buildroot.
The Makefile is not that convoluted, and we definitely want to use it. The above error is due to the fact that the gen-manpage-opts tool needs to be built for the host.
Two solutions:
- Set HOST_CC and other variables properly when building.
- Don't build the manpage, which should be doable by calling the appropriate make target.
Also, you have host-pkgconf as a dependency, and it doesn't seem to be needed.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com