Announcement

Collapse
No announcement yet.

Catalyst 8.11 - Fix for SuSE build-script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Catalyst 8.11 - Fix for SuSE build-script

    Hello everybody!

    Here's a fix for the non-working SuSE Build-Script in Catalyst 8.11.

    Background:
    On SuSE systems the file firegl_public.c needs to be patched to properly handle SMP configurations. This is done by the SuSE build-script using the file fglrx-install.xxxxx/packages/SuSE/ati-2.6.25-build-fix.diff. In Catalyst 8.11 this patch has not been updated to work with the changed firegl_public.c, so building of the RPM-package will fail.

    Fix:
    This is a modified version of ati-2.6.25-build-fix.diff that will do the trick:
    Code:
    --- firegl_public.c     2008-11-11 17:18:15.000000000 +0100
    +++ firegl_public.c.knutbert        2008-11-15 11:12:40.000000000 +0100
    @@ -243,7 +243,7 @@
     const char BUILD_KERNEL_HAS_MODVERSIONS_CLEARED;
     #endif
    
    -#ifdef __SMP__
    +#if CONFIG_SMP
     const unsigned long __ke_SMP_State = 1;
     const char BUILD_KERNEL_HAS_SMP_SET;
     #else
    @@ -2481,7 +2481,7 @@
    
     /*****************************************************************************/
    
    -#ifdef __SMP__
    +#if CONFIG_SMP
     static atomic_t cpus_waiting;
    
     static void deferred_flush(void* contextp)
    @@ -2497,7 +2497,7 @@
            while (atomic_read(&cpus_waiting) > 0)
                    barrier();
     }
    -#endif /* __SMP__ */
    +#endif /* CONFIG_SMP */
    
     /** \brief Run a function on all other CPUs.
      * \param func The function to run.
    @@ -2513,7 +2513,7 @@
    
     int ATI_API_CALL __ke_flush_cache(void)
     {
    -#ifdef __SMP__
    +#if CONFIG_SMP
         /* write back invalidate all other CPUs (exported by kernel) */
            if (KCL_SmpCallFunction(deferred_flush, NULL, 1, 0) != 0)
                    panic("timed out waiting for the other CPUs!\n");
    @@ -2529,7 +2529,7 @@
    
            while (atomic_read(&cpus_waiting) > 0)
                    barrier();
    -#else /* !__SMP__ */
    +#else /* !CONFIG_SMP */
     #if defined(__i386__) || defined(__x86_64__)
            asm volatile ("wbinvd":::"memory");
     #elif defined(__alpha__) || defined(__sparc__)
    @@ -2537,7 +2537,7 @@
     #else
     #error "Please define flush_cache for your architecture."
     #endif
    -#endif /* !__SMP__ */
    +#endif /* !CONFIG_SMP */
    
         //for kernel 2.6.25, tlb_flush has been included when calling set_pages_*.
         #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
    Usage:

    1. Unpack installer files
    sh ati-driver-installer-8-11-x86.x86_64.run --extract

    2. Replace contents of fglrx-install.xxxxx/packages/SuSE/ati-2.6.25-build-fix.diff by new diff code (see above)

    3. Build RPM-package
    sh ati-installer.sh 8.552 --buildpkg SuSE/SUSE110-IA32

    4. Have a lot of fun...

    Cheers,
    knutbert

  • #2
    What happens without patch?

    Comment


    • #3
      Hi Kano,

      As you can see the patch is all about changing access to the - as I understand - obsolete __SMP__ definition so CONFIG_SMP will be probed instead. Thats generally a good thing, I suppose...
      But I am not an expert on the possible subtle differences between those two definitions...

      What happens without patch I have not tried actually.
      RPM should build, of course, with empty patch but the fglrx module generated by fglrx-kernel-build.sh will be affected or may not build at all, I guess, as (without patch) it tries to access __SMP__.

      Cheers,
      knutbert
      Last edited by knutbert; 15 November 2008, 10:06 PM.

      Comment


      • #4
        Well then delete the reference to that patch.

        Comment


        • #5
          Generating package: SuSE/SUSE110-IA32
          /tmp/ati.7ZBomc
          Package build failed!
          ................................
          Generating package: SuSE/SUSE110-AMD64
          /tmp/ati.cT6ETN
          Package build failed!
          ................................
          Last edited by Xtigyro; 20 November 2008, 05:52 AM.

          Comment


          • #6
            Hi Xtigyro,

            not sure what your question is...
            Did you follow instructions in first post?

            Cheers,
            knutbert

            Comment


            • #7
              Of course. Every single line as it is written.

              Comment


              • #8
                I second that. The package does not build even when I replaced all the scripts with the ones from phorogit

                Comment


                • #9
                  Error messages?

                  Ok, here's how you can find out what's not working:

                  Before building the package (step 3 in first post) open the packaging script packages/SuSE/ati-packager.sh and change the rpmbuild command (line 93) from
                  Code:
                  rpmbuild -bb --root ${TmpDrvFilesDir} --target ${ARCH} ${TmpPkgSpec} > ${TmpPkgBuildOut} 2>&1
                  into
                  Code:
                  rpmbuild -bb --root ${TmpDrvFilesDir} --target ${ARCH} ${TmpPkgSpec} 2>&1
                  Cheers,
                  knutbert

                  Comment


                  • #10
                    There are now official packages in the opensuse ATI repository.

                    Comment

                    Working...
                    X