spakk Posted June 6, 2020 Share Posted June 6, 2020 Hello friends,this page is only for building older AMD Catalina kernel (without support of SSE4.1 instruction). I want to show you in advance how I created the Vanilla Kernel. I started with " Knights " on Github and Shane's Catalina_Fixed.diff Knight's suggestions resulted in major interventions in the original xnu-source and in compiling Vanillia kernel, and especially when building AMD kernel, an enormous number of compiler errors occurred. So everything back to the root about using the xnu source to make minimal changes. see below, after that I was can compile the AMD kernel without errors. Here are the minor adjustments to the Vanilla xnu-source. The first change was made in /bsd/nfs/nfs_node.c / * * Request an nfsnode back so that it can be used for other purposes. * / int nfs_vnop_reclaim ( struct vnop_reclaim_args / * { * struct vnodeop_desc * a_desc; * vnode_t a_vp; * vfs_context_t a_context; *} * / * ap ) { vnode_t vp = ap -> a_vp ; nfsnode_t np = VTONFS ( vp ); vfs_context_t ctx = ap -> a_context; / * This entry was missing! / spakk * / struct nfs_open_file * nofp, * nextnofp; struct nfs_file_lock * nflp, * nextnflp; struct nfs_lock_owner * nlop, *nextnlop; struct nfsmount *nmp = np->n_mount ? VFSTONFS(np->n_mount) : NFSTONMP(np); mount_t mp = vnode_mount(vp); int force; FSDBG_TOP(265, vp, np, np->n_flag, 0); force = (!mp || vfs_isforce(mp) || nfs_mount_gone(nmp)); The second adjustment was made in osfmk/i386/cpuid.h typedef enum { CWA_ON = 2, CWA_FORCE_ON = 3, /* FORCE_ON shares bit 1 so consumers can test that for ON */ CWA_OFF = 4, CWA_FORCE_OFF = 5, /* Similarly for FORCE_OFF sharing bit 2 */ cfgAdr = 0, /* This entry was missing! /Shane */ cfgDat = 0, /* This entry was missing! " */ XeonCapID5 = 0 /* This entry was missing! " */ Unfortunately I am still stuck abroad because of the corona pandemic and it has been really difficult for almost 14 weeks! On this tour I only took my Windows laptop with me and a VMware macOS version is installed. So I can't really test this kernel, so I'll upload this kernel here If you are testing a freshly installed macOS Catalina 10.5 or higher version, use the Enoch or Clover boot loader. i hope it will work xnu-6153.81.5_vanilla.txt.zip xnu-builder.sh.zip (This Vanilla xnu builder is based on the previous Duran Keeley script. The patches mentioned above are not included in this script! After creating the xnu source, add the two changes in bsd/nfs/nfs_node.c and in osfmk/add i386/cpuid.h) Link to comment Share on other sites More sharing options...
Shaneee Posted June 7, 2020 Share Posted June 7, 2020 Spakk, What changes were made to try run older CPUs like the Phenom? Link to comment Share on other sites More sharing options...
spakk Posted June 8, 2020 Author Share Posted June 8, 2020 On 6/7/2020 at 12:55 PM, Shaneee said: Spakk, What changes were made to try run older CPUs like the Phenom? hey Shane, I will send you as soon as I get home. but primarily it is to know whether this kernel is working or not, we need someone with an older AMD CPU. Message sent from my mobile Edit: So, now after so long a period of corona vacation, I have returned to my old home :-). to your question how I built the kernel or how I was able to build the kernel. The first kernel, I took the OPEMU from Ydeng, you can certainly remember how we tested his OPEMU-source with the xnu-source for 10.12.? today's new AMD kernel was from "Tora Chi Yo" / "Meowthra", OPCODE emulator I have migrated his OPEMU to macOS. I am hopeful that the emulator will now work and that the kernel will boot. i will test the kernel on my old amd hackintosh and will report. Edit: My Gigabyte board was badly damaged during testing, so I can no longer further tests with it. I will also no longer invest in older hardware technology because even used hardware components are too expensive on the used market. So , for me is the AMD-Kernel story finally over. In summary it can be said, that the AMD kernel can be built completely, which means that regardless of whether one builds on basis of SSEPlus as well as on older OPEMU with libudis86. There are no compiler errors with "x86 SIMD intrinsics" during the creation of the kernel. As a result, in my opinion, nothing should stand in the way of building an executable kernel for older CPUs without SSE4.1 instructions. I was able to do this with new OPEMU from "Andy" as well as with OPEMU from "Ydeng" as well as with OPEMU (migrated from Linux-Version) from "Meowthra" as well as on basis of my older SSEPlus-V2 Kernel. Which I cannot confirm with absolute certainty whether these kernels are bootable or not, due to my defective hardware. If someone wants to run these tests on their older AMD CPU, they can write to me. Link to comment Share on other sites More sharing options...
Recommended Posts