Small update to this guide: Sadly this guide no longer works with Linux kernel 6.2, but since kernel 6.1 is an Long Term Support version, it's not going to be out of date for a while. Also the MGLRU feature in 6.1 really seems to increase the performance and responsiveness of the system even with my old iBook G4, so I can highly recommend getting the kernel version 6.1 update with this guide (the latest one is 6.1.24 as of writing this update).
Also, I was able to update some of the my packages (like irssi) by manually by just editing the template files to grap the latest source code and it seems works perfectly fine. I hope this guide helps with at least some people who are still willing to stay with Void Linux PPC for a bit longer and still require updates to some of their software.
Well, I managed to compile kernel 6.3.4 without any errors on my 32bit ppc iBook G4. In case some of you want to experiment with it, I'll provide a guide on how to do it with files that are already configured for this. If at any point you'll mess something up, you can always just type ./xbps-src clean linux6.3 inside ~/void-packages/ directory and start again. This guide is only for the 32bit ppc machines. Since I'm unable to test this myself, I can't be 100% sure that it will work with 64bit machines. However, I'll include extra step in the guide if you want to try it with G5 systems.
First of all we need to configure the building environment so that we can build the kernel package (and bunch of other stuff too by just editing the template files and pointing them to the latest sources).
Code:
$: git clone https://github.com/void-ppc/void-packages
$: cd void-packages
void-packages $: ./xbps-src binary-bootstrap
After that is done, you'll need to download the attached linux6.3.zip file to your home directory and then extract it to the void-packages/srcpkgs. To simplify this step I'll assume that you have copied/downloaded the attached linux6.3.zip file to your home directory, but you can of course use whatever method works best for you.
Code:
$: mv linux6.3.zip ~/void-packages/srcpkgs/
$: cd ~/void-packages/srcpkgs/
srcpkg $: unzip linux6.3.zip
srcpkg $: ln -s linux6.3 linux6.3-headers
srcpkg $: ln -s linux6.3 linux6.3-dbg
srcpkg $: rm linux6.3.zip
This one is only for users who wish to try this one with 64bit G5 systems.
DO NOT INSTALL if you are using a 32bit system like G3 or G4.
Code:
srcpkg $: cp linux6.0/patches/ppc64-be-elfv2.patch linux6.3/patches
After this we are pretty much ready to start compiling the kernel. My example is for the latest kernel version at the time of writing this (6.3.5), but you can easily modify it to newer kernels by simply editing the ~/void-packages/srcpkgs/linux6.3/template file's third row (mine says version=6.3.5) and change it to whatever you want. However, if you do this, you'll also need to have xtools installed (simply run sudo xbps-install -S xtools to install them). Then type xgensum -i linux6.3. This will give you some errors, but it will also update your template with correct hash numbers for the base kernel and the patch for it. We are now ready to start compiling the kernel. I seriously suggest that you should do this with a program called screen (sudo xbps-install -S screen if it's not already installed to your system and then type screen bash. This will open a new session where you can leave the script to compile itself and let you do something else with your computer while the script is running (especially since this might take +24 hours). With screen you can simply leave this session by pressing ctrl + a +d and resume to it by typing screen -Urd.
Code:
$: screen bash
$: cd ~/void-packages/
void-packages $: ./xbps-src pkg linux6.3
After this the installer script will download the sources and begin compiling. However before the script can start compiling your new kernel, it will ask you to confirm some of the settings. For most of these you can just leave them at their default values by pressing enter, but there are few which I highly recommend to enable: When it asks about "Multi-Gen LRU (LRU_GEN)", type Y and press enter. It will then ask you about "Enable by default (LRU_GEN_ENABLED)", type also y and press enter. At the end the script will inform you that the configuration has been written to .config and it starts compiling your kernel. If you used the screen method I explained earlier, you can now press ctrl +a +d and leave it to the background.
Once the script has finished compiling and making the kernel packages, you can simply install them with this command:
Code:
void-packages $: sudo xbps-install --repository hostdir/binpkgs linux6.3-headers linux6.3
and press y and enter to confirm it.
The installer will now install your kernel so that it will be used by default on your next boot (but if it doesn't work, you can always select your previous kernel at the startup.
Finally for those that want to customize their kernel even further with something like menuconfig, you'll most likely need to download the kernel sources separately from
https://www.kernel.org, extract the source package somewhere in your home directory and then copy your config file from ~/void-packages/srcpkgs/linux6.3/files/ (in my case it's ppc-dotconfig, but your's might be either ppc64-dotconfig or ppc64le-dotconfig depending on your system) to the directory where you extracted your linux sources. Then rename it to .config and type menuconfig and select whatever features you'll need for your kernel and then select save. This should save your changes to the .config file which you can now move back to ~/void-packages/srcpkgs/linux6.3/files, rename your old *-dotconfig file to something like ppc-dotconfig.bak and then rename the .config to ppc-dotconfig (or to ppc64-dotconfig or ppc64le-dotconfig). After that you can start the compile script like I mentioned earlier in my guide and the script should now include stuff you wanted to add to your kernel.
And that's about it. At the moment this should work with the rest of the 6.3 series of kernels and I'll update this post for future kernels whenever they'll get released.