ThreadRipper "ugly patch" compile script for v6.4


Recommended Posts

Edit (2/3/2018): As of version 6.4.1 unRAID contains the clean patch by the Linux Kernel developers, and therefore this should NOT be used anymore. 

 

This is for any ThreadRipper owners out there wanting to compile their own kernel for, "Ugly Patch."  I've finally wrapped my head around CHBMB's script (again thanks for your help @CHBMB ) so here is a script which accurately redoes my steps that led to this -- I use this wording, because my first compile was more by hand as I was learning. I have tested this on my own setup and seems to be working correctly.  For you Ryzen folks, this is NOT for your cpus! (just in case)

 

USE AT YOUR OWN RISK!! 

Instructions: 

  1. Make a work folder for this script to do its work. Recommend putting it in /mnt/cache and if you don't want it to show up as a user share make it a hidden file/folder,  (I.E.  leading period) /mnt/cache/.WorkFolder/
  2. copy supplied .tgz to folder. Then in CLI:
  3. tar -xvf uglyPatcher.tgz

    IF you are running a VM right NOW, set the ALL auto-starts for VM to OFF and restart your server.   Once or twice I had errors in compiling when I had VM's up, probably was me (because this was in my first attempts). However VM was lagged to worthless during compile as the script uses all your cores :)  If one was so inclined the script could be changed to use X threads.

  4. After reboot go to work folder in console, and type : 

    ./uglyPatcher

    Now given your internet connection it will probably take about 3-6 minutes.  The file everyone here will want will be in  $YourWorkFolder/$VERSION/bzimage-tr

  5. Now in the work folder we go to the newly compiled bzimage, copy, and test.   (( Example as prompt  ))

  6. root@HYDRA:/mnt/cache/.custom# cd 6-4-0/
    root@HYDRA:/mnt/cache/.custom/6-4-0#mv /boot/bzimage /boot/bzimage-STOCK6_4_0
    root@HYDRA:/mnt/cache/.custom/6-4-0#cp ./bzimage-tr /boot/bzimage
    root@HYDRA:/mnt/cache/.custom/6-4-0#
    
    

    Once file has been moved, reboot and test.

 

Information worth noting:  If anyone looks at what I did there are a couple of ugly-bits I did to make it work around some of my bits of ignorance. Most notably pci_tr.c file, I tried to use a .patch file initially, but compiler would reject it and I wasn't sure why. Did I need a CLI flag to accept the .patch file because it's not a sanctioned patch? No clue.  My main concern, as a package like this, is that over time pci.c may change and since pci_tc.c is simply a modified version of pci.c over time it might make errors -- solution being just go to source and make a new one (clunky I admit). 

 

 

uglyPatcher.tgz

Edited by Jcloud
Ugly patch is dead, long live the clean patch
  • Upvote 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.