I found out how to solve this problem. First of all I assume that you have compiled the DRM and agpgart into the kernel (2.6).
Run
Even if you don't have Xorg installed, this emerge will do it for you.
Do *not* run
fglrxconfig. This will create an XF86Config-4 file which cannot be renamed into xorg.conf for it to work. Instead generate a generic xorg.conf file either by hand or by
xorgconfig. Change the default driver to "fglrx" and include the ATi device options from an already generated XF86Config-4 file (by fglrxconfig). Uncomment the DRI and GLX section. Save.
Now type
startx. Run
glxinfo in a terminal. In the very first line you should see
Code:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
This is the easiest way.