Bug#701690: nvidia: disagrees about version of symbol efi_enabled
Ben Hutchings
ben at decadent.org.uk
Wed Feb 27 19:43:03 UTC 2013
On Wed, Feb 27, 2013 at 10:54:00AM -0500, Lennart Sorensen wrote:
> On Wed, Feb 27, 2013 at 12:05:06AM +0100, Andreas Beckmann wrote:
> > nvidia-kernel-{source,dkms} don't use upstream's conftest.sh to test for
> > availability of features, instead we ship (probably for historic reasons
> > where conftest.sh was not working properly) a manually generated
> > conftest.h that says
> >
> > /* Implement conftest.sh function efi_enabled */
> > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1)
> > #define NV_EFI_ENABLED_PRESENT
> > #else
> > #undef NV_EFI_ENABLED_PRESENT
> > #endif
> >
> > Anyway, checks for efi.h and efi_enabled were only introduced in 310.14
> > and have not been backported to the 304.xx series by Nvidia so far. So
> > this only affects the Nvidia driver in experimental.
>
> Yeah I wrote that .h file because nvidia's conftest.sh was stupid and
> assumed linux == fedora. Solved lots of problems at the time.
>
> Also conftest.sh could not be run under module assistant with the
> linux-headers-* only since module assistant wants to be able to do
> a module build, and gives no option to run something else first that
> mangles things. conftest.sh really does seem like a crappy design.
You can potentially fix this by using the filechk macro under Kbuild.
Something like:
$(obj)/...: $(obj)/conftest.h
$(obj)/conftest.h: FORCE
$(call filechk, conftest.h)
define filechk_conftest.h
./conftest.sh ...
endef
You would need to make conftest.h write to stdout so that filechk can
do a comparison and avoid unnecessary updates.
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
More information about the pkg-nvidia-devel
mailing list