Open Blackdragon897a opened 6 months ago
Hi @Blackdragon897a
Lets start from your installation problem. You gave me almost no information about the errors so I really can only guess. It looks like you haven't enabled multiarch, please read this if you want to learn, TLDR run bellow commands:
sudo dpkg --add-architecture i386
sudo apt update
and then try installation one more time.
When it comes to patching packages I don't think there is an universal guide. I am a software engineer with 10+ years of experience in many programming language so patching sources manually was really trivial to me. I can share steps I did to build patched packages.
Now when it comes to applying patches. If you would like to patch sources that the original patch file was created it is usually simple. You can use patch
program. But usually the files are different and simple patching will fail do to different line offsets. So you will need to apply patches manually.
Bellow you can see sample diff.
diff -ruN libdrm/radeon/r600_pci_ids.h libdrm-mod/radeon/r600_pci_ids.h
--- libdrm/radeon/r600_pci_ids.h 2020-05-25 18:24:34.398124762 +0200
+++ libdrm-mod/radeon/r600_pci_ids.h 2020-05-25 18:40:57.654848297 +0200
@@ -473,6 +473,11 @@
CHIPSET(0x131C, KAVERI_131C, KAVERI)
CHIPSET(0x131D, KAVERI_131D, KAVERI)
+CHIPSET(0x9920, LIVERPOOL_9920, LIVERPOOL)
+CHIPSET(0x9922, LIVERPOOL_9922, LIVERPOOL)
+CHIPSET(0x9923, LIVERPOOL_9923, LIVERPOOL)
+CHIPSET(0x9924, GLADIUS_9924, GLADIUS)
+
CHIPSET(0x67A0, HAWAII_67A0, HAWAII)
CHIPSET(0x67A1, HAWAII_67A1, HAWAII)
CHIPSET(0x67A2, HAWAII_67A2, HAWAII)
First line is a command line diff was executed and it has also information about the file we need to patch. Which in this case is libdrm/radeon/r600_pci_ids.h
later we have information about line numbers @@ -473,6 +473,11 @@
that are helpful in locating place of change but these are usually incorrect. Most important thins are following lines starting with +
or with -
. The one with +
means we need to add a line the -
means we need to delete a line.
So you need to open every patch file and go thru every diff entry and apply it to downloaded sources one by one, when you're done you build the packages and if you didn't messed up something (if you did compilation probably would fail) you got your fresh new packages ready to work on ps4.
Hi @mordesku !!!!!
It's true that I provide you no information on the error I was facing ! I'm terribly sorry ! In my case, I'm just a 20 years old french student with just a tiny little experience in C# coding. So yep. Trying to port that on ps4 without tutorials IS TERRIBLY HARD for someone like me. XD
Yesterday, I was thinking about Linux Mint and I wondered : Linux Mint is an Ubuntu based system. And Ubuntu is a Debian based system... So, was that okay if I installed directly Debian drivers on Linux mint ?? Maybe, It's better to directly take the source code of Linux mint packages and patch them manually like you said.
But anyway, I took some screenshots !
Above, you can see all the commands I entered in the terminal.
To create a distribution for PS4, I followed this tutorial : https://ps4linux.com/make-ps4-linux-distro/ Sadly you will see on that website, there is nothing about drivers patching and package building :'( .
Yesterday, I have downloaded a .patch file for mesa 23.2.1 from the PS4-Overlay from Dr3kk4n. And I have patched and installed the mesa with these commands :
meson setup builddir
ninja -C builddir/
ninja -C builddir/ install
When I booted the distro, then, on PS4 Pro, the graphical glitches were gone. OpenGL worked but Vulkan doesn't seem to work. Well, I don't know how to verify if vulkan is working but I think, you gave the command on the first issue.
And by the way, I wonder if you have a discord account ? If that's the case, I can send you screenshots faster and you'll be able to help me to port Linux Mint on PS4 easier too ! Just tell me when you have time so, I will not bother you everyday with stupid noob questions XD.
And thank you so much for taking the time to teach me how to patch and build packages for ps4 ! I'll get to work now to see what I can do ! Alright ! LET'S GO !!!!
There are couple thing I need to address here.
>
and paste that file. vulkaninfo
in terminal. If you see something like below it doesn't work:
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.269/vulkaninfo/./vulkaninfo.h:688:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
Hello @mordesku !
1 - I'm sorry !!!! As you can see, I begin with github 😥 I though It was easier to post screenshots ! Sorry again !
2/3 - Yes. Each time I wanted to install Debian drivers on Linux Mint, It results with a messy distro.
3 - I'm using a 5.15.25 FULL LTO linux kernel. I have installed vulkan-tools and wrote vkcube
to test vulkan but... It crashed.
So, where am I ?
Let's begin with mesa 23.2.1 :
patch -p1
command.meson setup build/
and ninja -C build/
ninja -C build/ install
meson setup build/
: libtizonia, and two other dependencies were mising and I didn't know how to install them using apt....About libdrm2.4.113-2ubuntu :
meson setup build/
ninja -C build/
and ninja -C build/ install
worked fineAbout xserver-xorg-video-amdgpu 22.0.0-1ubuntu0.2 :
As you can see, trying to compile mesa correctly is a big pain for a newbie like me and make Vulkan work is hopeless. Tell me if you want the output when I'm trying to compile mesa !
Hello @Blackdragon897a
So according to what you wrote you haven't compiled any packaged and definitely you haven't installed any packages on your system. You took sources and patch them and then "installed" them on your system. I wrote installed in quotes because i don't think it was installed in the right location. You need to distinguish two things.
In the first scenario package sources and install script is prepared by the system developer (we just patch some sources) and when installed all files are placed in the right location.
In your case you compiled some programs and libraries. Installed it in i assume default prefix which usually is /usr/local
. Which is fine for some additional libraries you want o use and you don't want to mess the system. But if you want to replace system libraries you should not install in /usr/local
but in /usr
.
There is additional advantage of using deb packages rather than manual builds. When Ubuntu package maintainer will release an update of a modified packages. If it was installed the way you did it will get simply overridden because the system have no knowledge about your modification (apt/dpkg keeps records of every installed packages). If you install manually created package (.deb), the system will recognize it was not Ubuntu package and will not overwrite it if not explicitly asked. (Well I'm not sure about Ubuntu but Debian wouldn't overwrite it).
So please learn how to build DEB packages from source (there is a link in my first reply, it is more about debian but it should work with ubuntu). Take a look at this thread especially on "New Approach"
Hello there Mordesku !
I'm trying to port Linux Mint on PS4 but nobody want to help me lmao. I'm asking help everywhere and it's been two or three months i'm trying to do this. I finally found a good repo with debian drivers for ps4. I'm happy now because there are no tutorials on internet to show us how to apply patches on linux drivers for PS4.
I was running my linux mint distro on a VM and then installed your drivers but when I tried to install the i386 drivers, it returned me an error code with dpkg...
Also, I've got a ps4pro and I know that there are some differences between ps4 patches and PS4 PRO patches so... can you help me with Linux mint drivers for ps4 pro please ?
My knowledge level with linux : near to 2/10 My configuration : PS4 Pro Belize What I have to make linux mint on ps4 possible : Time !