summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Danks <raymond@edanks.com>2006-05-31 22:41:41 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-31 22:41:41 +0000
commit6bd06f3d27befa6b889c19d4f2602319298fbd8d (patch)
treeca2f42fe5dad03faf6e8168e0082753a9e94e82b
parente766d4610f0cecfb189a959adc81f83c294b2613 (diff)
nvidia-drivers - Initial add.
-rw-r--r--packages/nvidia-drivers/.mtn2git_empty0
-rw-r--r--packages/nvidia-drivers/files/.mtn2git_empty0
-rw-r--r--packages/nvidia-drivers/files/nvaudio-remap_page_range.patch27
-rw-r--r--packages/nvidia-drivers/files/nvidia-oe-conftest.patch60
-rw-r--r--packages/nvidia-drivers/nvidia-display_1.0-8756.bb48
-rw-r--r--packages/nvidia-drivers/nvidia-drivers.inc54
-rw-r--r--packages/nvidia-drivers/nvidia-nforce_1.0-0310.bb71
7 files changed, 260 insertions, 0 deletions
diff --git a/packages/nvidia-drivers/.mtn2git_empty b/packages/nvidia-drivers/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nvidia-drivers/.mtn2git_empty
diff --git a/packages/nvidia-drivers/files/.mtn2git_empty b/packages/nvidia-drivers/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nvidia-drivers/files/.mtn2git_empty
diff --git a/packages/nvidia-drivers/files/nvaudio-remap_page_range.patch b/packages/nvidia-drivers/files/nvaudio-remap_page_range.patch
new file mode 100644
index 0000000000..e653d43a76
--- /dev/null
+++ b/packages/nvidia-drivers/files/nvaudio-remap_page_range.patch
@@ -0,0 +1,27 @@
+--- NFORCE-Linux-x86-1.0-0310-pkg1/nvsound/main/Makefile.kbuild.sav 2006-05-16 09:44:26.000000000 -0600
++++ NFORCE-Linux-x86-1.0-0310-pkg1/nvsound/main/Makefile.kbuild 2006-05-16 09:48:57.000000000 -0600
+@@ -48,16 +48,16 @@
+ EXTRA_LDFLAGS := -d
+
+ # Figure out how many args remap_page_ranges() wants or new remap call
+-ifeq ($(shell sh $(src)/conftest.sh "$(CC)" "$(KERNEL_SOURCES)" "$(KERNEL_OUTPUT)" remap_pfn_range), 1)
++#ifeq ($(shell sh $(src)/conftest.sh "$(CC)" "$(KERNEL_SOURCES)" "$(KERNEL_OUTPUT)" remap_pfn_range), 1)
+ EXTRA_CFLAGS += -DNV_REMAP_PFN_RANGE_PRESENT
+-else
+- REMAP_PAGE_RANGE := $(shell sh $(src)/conftest.sh "$(CC)" "$(KERNEL_SOURCES)" "$(KERNEL_OUTPUT)" remap_page_range)
+-
+- ifeq ($(REMAP_PAGE_RANGE),5)
+- EXTRA_CFLAGS += -DREMAP_NEW
+- endif
++#else
++# REMAP_PAGE_RANGE := $(shell sh $(src)/conftest.sh "$(CC)" "$(KERNEL_SOURCES)" "$(KERNEL_OUTPUT)" remap_page_range)
+
+-endif
++# ifeq ($(REMAP_PAGE_RANGE),5)
++# EXTRA_CFLAGS += -DREMAP_NEW
++# endif
++#
++#endif
+
+ PATCHLEVEL ?= $(shell sh ./conftest.sh "$(CC)" "$(KERNEL_SOURCES)" "$(KERNEL_OUTPUT)" kernel_patch_level)
+ ifeq ($(PATCHLEVEL), 4)
diff --git a/packages/nvidia-drivers/files/nvidia-oe-conftest.patch b/packages/nvidia-drivers/files/nvidia-oe-conftest.patch
new file mode 100644
index 0000000000..6eae764d1c
--- /dev/null
+++ b/packages/nvidia-drivers/files/nvidia-oe-conftest.patch
@@ -0,0 +1,60 @@
+--- ../../../temp/NVIDIA-Linux-x86-1.0-8756-pkg1/usr/src/nv/Makefile.kbuild 2006-03-29 16:02:20.000000000 -0700
++++ nv/Makefile.kbuild 2006-04-26 13:50:47.249353208 -0600
+@@ -28,7 +28,7 @@
+ # Christian Zander (zander@mail.minion.de) (enhancements)
+ #
+
+-all: install
++all: module
+ install: package-install
+
+ #
+@@ -310,19 +310,17 @@
+ # sufficient privileges. Rebuild the module dependency file.
+ #
+
+-module-install: suser-sanity-check module
++module-install: module
+ @mkdir -p $(MODULE_ROOT)/video; \
+- install -m 0664 -o root -g root $(MODULE_OBJECT) $(MODULE_ROOT)/video; \
+- PATH="$(PATH):/bin:/sbin" depmod -ae;
++ install -m 0664 $(MODULE_OBJECT) $(MODULE_ROOT)/video; \
++ #PATH="$(PATH):/bin:/sbin" depmod -ae;
+
+ #
+ # This target builds, then installs, then creates device nodes and inserts
+ # the module, if successful.
+ #
+
+-package-install: module-install rmmod-sanity-check
+- PATH="$(PATH):/bin:/sbin" modprobe $(MODULE_NAME) && \
+- echo "$(MODULE_OBJECT) installed successfully.";
++package-install: module-install
+
+ #
+ # Build an object file suitable for further processing by the installer and
+--- ../../../temp/NVIDIA-Linux-x86-1.0-8756-pkg1/usr/src/nv/Makefile.nvidia 2006-03-29 16:02:20.000000000 -0700
++++ nv/Makefile.nvidia 2006-04-26 13:52:19.573317832 -0600
+@@ -102,7 +102,7 @@
+
+ VERSION_HDR=nv_compiler.h
+
+-all: install
++all: module
+
+ install: package-install
+
+@@ -123,11 +123,9 @@
+ mdl: gcc-sanity-check rivafb-sanity-check $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
+ $(LD) -r -o nvidia.o $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
+
+-package-install: module suser-sanity-check rmmod-sanity-check
++package-install: module
+ mkdir -p $(MODULE_ROOT)/video && \
+- install -m 0664 -o root -g root nvidia.o $(MODULE_ROOT)/video/nvidia.o$(O) && \
+- PATH="$(PATH):/bin:/sbin" depmod -a && \
+- PATH="$(PATH):/bin:/sbin" modprobe nvidia && \
++ install -m 0664 nvidia.o $(MODULE_ROOT)/video/nvidia.o$(O) && \
+ echo "nvidia.o installed successfully."; \
+
+ $(VERSION_HDR):
diff --git a/packages/nvidia-drivers/nvidia-display_1.0-8756.bb b/packages/nvidia-drivers/nvidia-display_1.0-8756.bb
new file mode 100644
index 0000000000..f8f80b29aa
--- /dev/null
+++ b/packages/nvidia-drivers/nvidia-display_1.0-8756.bb
@@ -0,0 +1,48 @@
+# nvidia-display .bb build file
+# Copyright (C) 2005-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+include nvidia-drivers.inc
+
+PKG_BASENAME="NVIDIA-Linux-${NVIDIA_ARCH}-${PV}-${NVIDIA_PKGRUN}"
+
+SRC_URI="http://download.nvidia.com/XFree86/Linux-${NVIDIA_ARCH}/${PV}/${PKG_BASENAME}.run \
+ file://nvidia-oe-conftest.patch;patch=1"
+
+S="${WORKDIR}/${PKG_BASENAME}/usr/src/nv"
+
+EXTRA_OEMAKE=" KERNEL_SOURCES=${STAGING_KERNEL_DIR} KERNEL_MODLIB=${STAGING_KERNEL_DIR} KERNEL_UNAME=${KERNEL_VERSION} PATCHLEVEL=${KERNEL_PATCHLEVEL} MODULE_ROOT=${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers IGNORE_CC_MISMATCH=1"
+
+FILES_${PN} += " /usr/lib /usr/bin /usr/share"
+
+do_configure() {
+ rm -f ${S}/makefile
+ if [ "${KERNEL_PATCHLEVEL}" != "4" ] ; then
+ ln -sf Makefile.kbuild ${S}/Makefile
+ else
+ ln -sf Makefile.nvidia ${S}/Makefile
+ fi
+}
+
+do_install() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" install
+
+ install -d ${D}/usr
+ for dir in bin include lib share ; do
+ cp -a ${WORKDIR}/${PKG_BASENAME}/usr/$dir ${D}/usr/
+ done
+
+ #X11R7.0 style...
+ install -d ${D}/usr/lib/xorg/
+ cp ${WORKDIR}/${PKG_BASENAME}/usr/X11R6/lib/lib* ${D}/usr/lib/
+ cp -a ${WORKDIR}/${PKG_BASENAME}/usr/X11R6/lib/modules ${D}/usr/lib/xorg/
+ ln -s libglx.so.1.0.8756 ${D}/usr/lib/xorg/modules/extensions/libglx.so
+
+}
+
+do_stage() {
+ #Not sure what we need here. This looks like it provides GL
+ :
+}
+
diff --git a/packages/nvidia-drivers/nvidia-drivers.inc b/packages/nvidia-drivers/nvidia-drivers.inc
new file mode 100644
index 0000000000..8a05d60590
--- /dev/null
+++ b/packages/nvidia-drivers/nvidia-drivers.inc
@@ -0,0 +1,54 @@
+# nvidia-display .bb build file
+# Copyright (C) 2005-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+HOMEPAGE="http://www.nvidia.com/object/unix.html"
+DESCRIPTION="NVidia Graphics Driver Binary"
+MAINTAINER = "Raymond Danks <info-linux@geode.amd.com>"
+LICENSE = "NVIDIA"
+
+inherit module
+INHIBIT_PACKAGE_STRIP=1
+
+def nvidia_pkgrun(d):
+ import bb, re
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ pkgrun = "pkg2"
+ if re.match("^i.86$", arch):
+ pkgrun = "pkg1"
+ return pkgrun
+
+def nvidia_arch(d):
+ import bb, re
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ if re.match("^i.86$", arch):
+ arch = "x86"
+ return arch
+
+def get_kernelpatchlevel(p):
+ import re
+ r = re.compile("[0-9]+\.([0-9]+).*")
+ m = r.match(p);
+ if m:
+ return m.group(1)
+ return None
+
+NVIDIA_ARCH := "${@nvidia_arch(d)}"
+NVIDIA_PKGRUN := "${@nvidia_pkgrun(d)}"
+
+COMPATIBLE_HOST = '.*86.*-linux'
+
+KERNEL_PATCHLEVEL = "${@get_kernelpatchlevel('${KERNEL_VERSION}')}"
+EXTRA_OEMAKE=" KERNEL_SOURCES=${STAGING_KERNEL_DIR} KERNEL_MODLIB=${STAGING_KERNEL_DIR} KERNEL_UNAME=${KERNEL_VERSION} PATCHLEVEL=${KERNEL_PATCHLEVEL} MODULE_ROOT=${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers IGNORE_CC_MISMATCH=1"
+
+PKG_BASENAME="NVIDIA-Linux-${NVIDIA_ARCH}-${PV}-${NVIDIA_PKGRUN}"
+
+nvidia_do_unpack() {
+ sh ${PKG_BASENAME}.run -x
+}
+
+python do_unpack() {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('nvidia_do_unpack', d)
+}
+
diff --git a/packages/nvidia-drivers/nvidia-nforce_1.0-0310.bb b/packages/nvidia-drivers/nvidia-nforce_1.0-0310.bb
new file mode 100644
index 0000000000..09d0aae39f
--- /dev/null
+++ b/packages/nvidia-drivers/nvidia-nforce_1.0-0310.bb
@@ -0,0 +1,71 @@
+# nvidia-display .bb build file
+# Copyright (C) 2005-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+include nvidia-drivers.inc
+
+PKG_BASENAME="NFORCE-Linux-${NVIDIA_ARCH}-${PV}-${NVIDIA_PKGRUN}"
+
+SRC_URI="http://download.nvidia.com/XFree86/nforce/${PV}/NFORCE-Linux-${NVIDIA_ARCH}-${PV}-${NVIDIA_PKGRUN}.run \
+ file://nvaudio-remap_page_range.patch;patch=1"
+
+S="${WORKDIR}/${PKG_BASENAME}"
+
+EXTRA_OEMAKE=" KERNEL_SOURCES=${STAGING_KERNEL_DIR} TARGET_KERNEL=${KERNEL_VERSION} INSTROOT=${D} IGNORE_CC_MISMATCH=1"
+
+FILES_${PN} += " /usr/lib /usr/bin"
+
+do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd nvnet
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ ${MAKE_TARGETS}
+
+ cd ../nvsound/main
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ ${MAKE_TARGETS}
+
+}
+
+do_configure() {
+ rm -f ${S}/nvnet/makefile
+ rm -f ${S}/nvsound/main/makefile
+
+ if [ "${KERNEL_PATCHLEVEL}" != "4" ] ; then
+ ln -sf Makefile.kbuild ${S}/nvnet/Makefile
+ ln -sf Makefile.kbuild ${S}/nvsound/main/Makefile
+ else
+ ln -sf Makefile.nvidia ${S}/nvnet/Makefile
+ ln -sf Makefile.nvidia ${S}/nvsound/main/Makefile
+ fi
+}
+
+
+do_install() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd nvnet
+ oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" install
+
+ cd ../nvsound/main
+ oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" install
+
+ install -d ${D}/usr
+ for dir in usr/bin nvsound/lib ; do
+ cp -a ${S}/$dir ${D}/usr/
+ done
+
+}
+
+do_stage() {
+ install -d ${STAGING_LIBDIR}
+ oe_libinstall -a -C ${S}/nvsound/lib libnvalut ${STAGING_LIBDIR}
+ oe_libinstall -a -C ${S}/nvsound/lib libnvopenal ${STAGING_LIBDIR}
+}