[Tutorial] Running Linux 4.8

Discussion in 'all things UNIX' started by Amanda, Jul 27, 2016.

  1. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    Linux 4.7 just came out and developmet of 4.8 has not yet began, but you can run "Linux 4.8" with all the development of amdgpu-si, mesa, and such, for AMD GCN 1.0 cards.

    What I expect from you:

    • That you use this Kernel if you have an AMD Si (Southern Islands) video card and want to see how's the initial experimental support of amdgpu for them (because IMO there's not much more than that for this particular Kernel);
    • That you know how to grab the source files for a project (example: linux source files);
    • That you can grab the source code for your distro, if you're not running Arch;
    • That you can do some basic troubleshooting;
    • That you can patch or edit patches for your Kernel;
    • That you KNOW this isn't a tutorial for beginners and I won't be providing support for newcomers;
    • That you KNOW how to diff two texts;
    • That you understand this thread is still a work in progress and I'll updated it as I'm going through it;
    This tutorial will focus only on Arch Linux since I that's what I use and I'm familiar with it, and that's the distro I can test these things. In addition, Arch is by far the easiest to create and edit packages (using makepkg). However, if you can try these repositories in another distribution and can test them and provide links to the PKGBUILDs/equivs-build/etc, please do and report back here.

    I'll be linking the PKGBUILDs and other files that need to be edited. Most of these source files are grabbed directly from Arch's repos (see "Linux Source Files" above) and edited as needed. Only the needed/edited files are linked here, so for each package you'll have to download the source files and merge my files with them (replacing the needed files is enough).

    These are the repos we're going to use:

    The Kernel: https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-4.8-wip-si
    Mesa: https://cgit.freedesktop.org/~mareko/mesa/log/?h=amdgpu-si
    libdrm: https://cgit.freedesktop.org/~mareko/libdrm/log/?h=amdgpu-si
    xf86-video-amdgpu: https://cgit.freedesktop.org/~mareko/xf86-video-amdgpu/log/?h=amdgpu-si

    First, the Kernel.

    I've successfully built the Kernel, but for some reason "uname -r" displays "4.6.0-1-ARCH-gb0210a4-dirty". I'm yet to fix this.

    The PKGBUILD for the Kernel can be downloaded here. You'll also need "config" and "config.x86_64".

    I've added a patch (dpm.patch) that fixes a terrible screen flickering for my card (R9 270X). If you don't need this patch you can comment it out, or leave it here.

    NOTE: I'm extremely open to fixes on the PKGBUILD. Let's make it perfect :)

    libdrm

    Next comes libdrm. Here's the PKGBUILD.
    I'm yet to edit the pkgversion.

    lib32-libdrm

    Just to be on the safe side, I also compiled lib32-libdrm using the same libdrm repo as I mentioned earlier. The PKGBUILD can be found here.

    Mesa

    Mesa is a tricky bastard to get working. I'm currently compiling it and it seems it will finish this time. The PKGBUILD is here.

    NOTE: Some people say Mesa-git needs to be compiled against LLVM-SVN. I did compile and install LLVM-SVN-4.0, but my Login Manager (sddm) does not start with that. So I'm compiling it against LLVM 3.8.

    BTW, help me get Vulkan for SI on this, if it's possible.

    LLVM 3.9 worked fine here.

    xf86-video-amdgpu

    At last, we need xf86-video-amdgpu-si. Here's the PKGBUILD.


    Blacklist radeon

    Finally, blacklist the radeon driver to prevent it from running at boot. Create a file at "/etc/modprobe.d/modprobe.conf" with the following:

    Code:
    blacklist radeon
    Don't forget to remove xf86-video-ati.


    -------------------------------------------------------------------------------------------------------------------


    Looks like Mesa will finish compiling and package creation. I'll then install every created package and report back here.
     
    Last edited: Jul 27, 2016
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.