Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I wrote an explanation of this some weeks ago with my old account:


In short, UMS is a method in which some graphics settings are controlled with a userspace process, while KMS makes the kernel handle them. With KMS, Xorg locks up in most G3s, and that's why we need the old way of doing things. That's also the reason why hermesOS will be based on the 4.4.x kernels, because newer versions dropped support for it.

I'm actually not touching any code, at least for now, I'm just putting together and building the stuff that works and trying to apply some patches made by other people. If I find something that needs fixing and I find no patch for it, I will not bother, at least for now, because I'm focused on building a working system and because I don't really know how to program besides some simple C code.


Excellent explanation, thank you very much. Nice to have learned that.
 
  • Like
Reactions: hermesOS
Problems!

I am trying to build the last version of the UMS-compatible xf86-video-ati driver. Seven years ago, the developers removed UMS support altogether, and placed the UMS version into another branch of their project. It was updated to fix a bug six years ago, and never touched since. Obviously, this was left to "bit rot", and I can't, for the life of me, build it on a recent Linux system with an up-to-date xorg version.

You can find the original version here, and a copy of it on my Github.

First, the compiler complained about the lack of a "xaa.h" file. This is normal, since XAA support was dropped from the xorg-server package in 2012. What I decided to do was to download the last XAA-supported version of xorg-server (1.12), and copy all the XAA header files into /usr/include/xorg.

That seemed to be a step forward, but I'm getting more errors now:

Code:
# make
make  all-recursive
make[1]: Entering directory '/root/src/xf86-video-ati-ums'
Making all in src
make[2]: Entering directory '/root/src/xf86-video-ati-ums/src'
  CC       ati.lo
  CC       atimodule.lo
  CCLD     ati_drv.la
  CC       radeon_accel.lo
radeon_accel.c: In function ‘RADEONEngineReset’:
radeon_accel.c:232:20: warning: variable ‘host_path_cntl’ set but not used [-Wunused-but-set-variable]
     uint32_t       host_path_cntl;
                    ^~~~~~~~~~~~~~
  CC       radeon_cursor.lo
  CC       radeon_legacy_memory.lo
  CC       radeon_driver.lo
radeon_driver.c: In function ‘RADEONCreateScreenResources’:
radeon_driver.c:258:40: warning: implicit declaration of function ‘shadowUpdatePackedWeak’; did you mean ‘shadowUpdatePacked’? [-Wimplicit-function-declaration]
        if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
                                        ^~~~~~~~~~~~~~~~~~~~~~
                                        shadowUpdatePacked
radeon_driver.c:258:40: warning: passing argument 3 of ‘shadowAdd’ makes pointer from integer without a cast [-Wint-conversion]
        if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
                                        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from radeon_driver.c:103:
/usr/include/xorg/shadow.h:78:28: note: expected ‘ShadowUpdateProc’ {aka ‘void (*)(struct _Screen *, struct _shadowBuf *)’} but argument is of type ‘int’
           ShadowUpdateProc update,
           ~~~~~~~~~~~~~~~~~^~~~~~
radeon_driver.c: In function ‘RADEONPreInitXv’:
radeon_driver.c:2700:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  if((microc_path = xf86GetOptValString(info->Options, OPTION_RAGE_THEATRE_MICROC_PATH)) != NULL)
                  ^
radeon_driver.c:2708:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  if((microc_type = xf86GetOptValString(info->Options, OPTION_RAGE_THEATRE_MICROC_TYPE)) != NULL)
                  ^
radeon_driver.c: In function ‘RADEONFixZaphodOutputs’:
radeon_driver.c:2870:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) {
            ^
radeon_driver.c: In function ‘RADEONBlockHandler’:
radeon_driver.c:3382:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = info->BlockHandler;
                           ^
radeon_driver.c:3383:6: error: too many arguments to function ‘pScreen->BlockHandler’
     (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
     ~^~~~~~~~~~~~~~~~~~~~~~~
radeon_driver.c:3384:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = RADEONBlockHandler;
                           ^
radeon_driver.c: In function ‘RADEONScreenInit’:
radeon_driver.c:3740:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((s = xf86GetOptValString(info->Options, OPTION_SUBPIXEL_ORDER))) {
            ^
radeon_driver.c:3759:5: warning: implicit declaration of function ‘miInitializeBackingStore’; did you mean ‘InitializeSprite’? [-Wimplicit-function-declaration]
     miInitializeBackingStore(pScreen);
     ^~~~~~~~~~~~~~~~~~~~~~~~
     InitializeSprite
radeon_driver.c:3899:24: warning: assignment to ‘void (*)(struct _Screen *, void *, void *)’ from incompatible pointer type ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} [-Wincompatible-pointer-types]
     info->BlockHandler = pScreen->BlockHandler;
                        ^
radeon_driver.c:3900:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = RADEONBlockHandler;
                           ^
radeon_driver.c: In function ‘RADEONEnterVT’:
radeon_driver.c:6313:3: warning: implicit declaration of function ‘R600LoadShaders’ [-Wimplicit-function-declaration]
   R600LoadShaders(pScrn);
   ^~~~~~~~~~~~~~~
radeon_driver.c: In function ‘RADEONCloseScreen’:
radeon_driver.c:6443:19: warning: passing argument 1 of ‘DamageUnregister’ from incompatible pointer type [-Wincompatible-pointer-types]
  DamageUnregister(&pPix->drawable, info->dri->pDamage);
                   ^~~~~~~~~~~~~~~
In file included from /usr/include/xorg/pixmapstr.h:53,
                 from /usr/include/xorg/xf86str.h:40,
                 from radeon.h:46,
                 from radeon_driver.c:72:
/usr/include/xorg/damage.h:77:29: note: expected ‘DamagePtr’ {aka ‘struct _damage *’} but argument is of type ‘DrawableRec *’ {aka ‘struct _Drawable *’}
  DamageUnregister(DamagePtr pDamage);
                   ~~~~~~~~~~^~~~~~~
radeon_driver.c:6443:2: error: too many arguments to function ‘DamageUnregister’
  DamageUnregister(&pPix->drawable, info->dri->pDamage);
  ^~~~~~~~~~~~~~~~
In file included from /usr/include/xorg/pixmapstr.h:53,
                 from /usr/include/xorg/xf86str.h:40,
                 from radeon.h:46,
                 from radeon_driver.c:72:
/usr/include/xorg/damage.h:77:2: note: declared here
  DamageUnregister(DamagePtr pDamage);
  ^~~~~~~~~~~~~~~~
radeon_driver.c:6497:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = info->BlockHandler;
                           ^
make[2]: *** [Makefile:900: radeon_driver.lo] Error 1
make[2]: Leaving directory '/root/src/xf86-video-ati-ums/src'
make[1]: *** [Makefile:448: all-recursive] Error 1
make[1]: Leaving directory '/root/src/xf86-video-ati-ums'
make: *** [Makefile:380: all] Error 2


I'm stuck here. I have no idea of what to do, other than ask the developers about it.
 
Problems!

I am trying to build the last version of the UMS-compatible xf86-video-ati driver. Seven years ago, the developers removed UMS support altogether, and placed the UMS version into another branch of their project. It was updated to fix a bug six years ago, and never touched since. Obviously, this was left to "bit rot", and I can't, for the life of me, build it on a recent Linux system with an up-to-date xorg version.

You can find the original version here, and a copy of it on my Github.

First, the compiler complained about the lack of a "xaa.h" file. This is normal, since XAA support was dropped from the xorg-server package in 2012. What I decided to do was to download the last XAA-supported version of xorg-server (1.12), and copy all the XAA header files into /usr/include/xorg.

That seemed to be a step forward, but I'm getting more errors now:

Code:
# make
make  all-recursive
make[1]: Entering directory '/root/src/xf86-video-ati-ums'
Making all in src
make[2]: Entering directory '/root/src/xf86-video-ati-ums/src'
  CC       ati.lo
  CC       atimodule.lo
  CCLD     ati_drv.la
  CC       radeon_accel.lo
radeon_accel.c: In function ‘RADEONEngineReset’:
radeon_accel.c:232:20: warning: variable ‘host_path_cntl’ set but not used [-Wunused-but-set-variable]
     uint32_t       host_path_cntl;
                    ^~~~~~~~~~~~~~
  CC       radeon_cursor.lo
  CC       radeon_legacy_memory.lo
  CC       radeon_driver.lo
radeon_driver.c: In function ‘RADEONCreateScreenResources’:
radeon_driver.c:258:40: warning: implicit declaration of function ‘shadowUpdatePackedWeak’; did you mean ‘shadowUpdatePacked’? [-Wimplicit-function-declaration]
        if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
                                        ^~~~~~~~~~~~~~~~~~~~~~
                                        shadowUpdatePacked
radeon_driver.c:258:40: warning: passing argument 3 of ‘shadowAdd’ makes pointer from integer without a cast [-Wint-conversion]
        if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
                                        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from radeon_driver.c:103:
/usr/include/xorg/shadow.h:78:28: note: expected ‘ShadowUpdateProc’ {aka ‘void (*)(struct _Screen *, struct _shadowBuf *)’} but argument is of type ‘int’
           ShadowUpdateProc update,
           ~~~~~~~~~~~~~~~~~^~~~~~
radeon_driver.c: In function ‘RADEONPreInitXv’:
radeon_driver.c:2700:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  if((microc_path = xf86GetOptValString(info->Options, OPTION_RAGE_THEATRE_MICROC_PATH)) != NULL)
                  ^
radeon_driver.c:2708:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  if((microc_type = xf86GetOptValString(info->Options, OPTION_RAGE_THEATRE_MICROC_TYPE)) != NULL)
                  ^
radeon_driver.c: In function ‘RADEONFixZaphodOutputs’:
radeon_driver.c:2870:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) {
            ^
radeon_driver.c: In function ‘RADEONBlockHandler’:
radeon_driver.c:3382:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = info->BlockHandler;
                           ^
radeon_driver.c:3383:6: error: too many arguments to function ‘pScreen->BlockHandler’
     (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
     ~^~~~~~~~~~~~~~~~~~~~~~~
radeon_driver.c:3384:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = RADEONBlockHandler;
                           ^
radeon_driver.c: In function ‘RADEONScreenInit’:
radeon_driver.c:3740:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((s = xf86GetOptValString(info->Options, OPTION_SUBPIXEL_ORDER))) {
            ^
radeon_driver.c:3759:5: warning: implicit declaration of function ‘miInitializeBackingStore’; did you mean ‘InitializeSprite’? [-Wimplicit-function-declaration]
     miInitializeBackingStore(pScreen);
     ^~~~~~~~~~~~~~~~~~~~~~~~
     InitializeSprite
radeon_driver.c:3899:24: warning: assignment to ‘void (*)(struct _Screen *, void *, void *)’ from incompatible pointer type ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} [-Wincompatible-pointer-types]
     info->BlockHandler = pScreen->BlockHandler;
                        ^
radeon_driver.c:3900:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = RADEONBlockHandler;
                           ^
radeon_driver.c: In function ‘RADEONEnterVT’:
radeon_driver.c:6313:3: warning: implicit declaration of function ‘R600LoadShaders’ [-Wimplicit-function-declaration]
   R600LoadShaders(pScrn);
   ^~~~~~~~~~~~~~~
radeon_driver.c: In function ‘RADEONCloseScreen’:
radeon_driver.c:6443:19: warning: passing argument 1 of ‘DamageUnregister’ from incompatible pointer type [-Wincompatible-pointer-types]
  DamageUnregister(&pPix->drawable, info->dri->pDamage);
                   ^~~~~~~~~~~~~~~
In file included from /usr/include/xorg/pixmapstr.h:53,
                 from /usr/include/xorg/xf86str.h:40,
                 from radeon.h:46,
                 from radeon_driver.c:72:
/usr/include/xorg/damage.h:77:29: note: expected ‘DamagePtr’ {aka ‘struct _damage *’} but argument is of type ‘DrawableRec *’ {aka ‘struct _Drawable *’}
  DamageUnregister(DamagePtr pDamage);
                   ~~~~~~~~~~^~~~~~~
radeon_driver.c:6443:2: error: too many arguments to function ‘DamageUnregister’
  DamageUnregister(&pPix->drawable, info->dri->pDamage);
  ^~~~~~~~~~~~~~~~
In file included from /usr/include/xorg/pixmapstr.h:53,
                 from /usr/include/xorg/xf86str.h:40,
                 from radeon.h:46,
                 from radeon_driver.c:72:
/usr/include/xorg/damage.h:77:2: note: declared here
  DamageUnregister(DamagePtr pDamage);
  ^~~~~~~~~~~~~~~~
radeon_driver.c:6497:27: warning: assignment to ‘ScreenBlockHandlerProcPtr’ {aka ‘void (*)(struct _Screen *, void *)’} from incompatible pointer type void (*)(struct _Screen *, void *, void *)’ [-Wincompatible-pointer-types]
     pScreen->BlockHandler = info->BlockHandler;
                           ^
make[2]: *** [Makefile:900: radeon_driver.lo] Error 1
make[2]: Leaving directory '/root/src/xf86-video-ati-ums/src'
make[1]: *** [Makefile:448: all-recursive] Error 1
make[1]: Leaving directory '/root/src/xf86-video-ati-ums'
make: *** [Makefile:380: all] Error 2


I'm stuck here. I have no idea of what to do, other than ask the developers about it.
You'd think that this problem is something the Adelie team themselves, would be interested in remedying, as the iBook G3 is mentioned under supported hardware on their wiki. I have a bit more free time on my hands than usually lately, so if you do need any help with testing, etc, I'm your guy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.